How can I write Ember.js applications with HAML, SASS, and CoffeeScript? - ember.js

I don't want to be tied to any back-end framework and just want to write a full client-side Ember.js application that gets its data via various JSON APIs.
I haven't yet found a way to pre-compile writing a haml/sass/coffeescript application in a way that is satisfactory for my liking.

You might want to check out brunch.io it has various skeletons to get started, is extensible via bower and takes care of everything that used to be a pain in the neck like minification etc.

Related

Django compared to Microservices

I've been learning what microservices are and heard something like this: when you use microservices, if one part of your system fails (say the card processing part of an online store platform), you can still use others (like browsing products in the store).
However, I have experience with Django and I know that if you mess up a function for card processing, you CAN still use the rest of the platform, it will just fail when you use that function. So, is Django then automatically microservices? Thanks!

Suggestions for real-time charting with SignalR in C# application

I am building a dashboard that will monitor production data, and am able to access this data via web services. The data changes every 1 minute, so I would like to have a page with 4 charts/gauges (the number of systems I am monitoring) that would get the data pushed to them with a successive web service call.
Can anyone suggest a good charting kit that would work well with C#? And would SignalR be a good fit here do you think? I have read that node.js and socket.io are options, but I have no experience with node yet. I would like something along the lines of DevExpress. Perhaps jquery and something on the front end works here as well? Thanks!
For such a dashboard SignalR is definitely a good fit if you already work with .NET and ASP.NET. For a web dashboard in particular, a good graphic library is Raphael, which is open source and pure JavaScript. It's simple and straight to the point, but often less is more. You can build interesting kinds of charts with it.
This project is maybe interesting for you as a sample of those 2 technologies together. If you press the skulls to raise errors, they will be triggered on a backend simulator and pushed to the dashboard using SignalR. You will notice a piechart graph there, which is done using Raphael and updates live when new errors are received.
The code of the project is here, it's a bit complex but maybe you want to have a look anyway. It's based on SignalR 1.x, but overall concepts are still the same.

Long polling with EmberJS / Ember-Data?

I have setup a very basic first application where I can add and remove names from a list, which are then added/removed from a database using a RESTful API, using Ember-Data with the default REST Adapter.
I'd like to implement some form of polling/long-polling so my interface remains up-to-date.
So for example, lets say I open my 'list' in two tabs, delete a few names in one tab - I'd like for the changes to then (eventually) show up in the other tab.
How can this be done easily with Ember?
What you want to do is really a job for WebSockets, which would allow you to push changes to your models from the server to the Ember app whenever they happen. This type of approach can easily take care of keeping thing in sync between tabs. I would recommend checking out Socket.io, which has a great client-side JS library and many server side libraries. By default it will try to use WebSockets, which are better than long-polling, but will degrade to long-polling if it needs to. This might force you to change a bunch of your application set-up, but I would consider this the "right" way to go.

Turn application into web application

Please excuse the noobiness of my question. I am mostly searching here for some directions and buzzwords to start digging from.
I spent some time developing an application in Python
Basically, it takes a bunch of images and creates a video out of it.
It i quite simple, and uses only a few libraries (opencv and nunmpy mostly).
I designed a small gui in gtk, but I think that it would be a good idea to offer the service over the web.
I think I could reuse some of my core and design a front end that people could access in their browser.
I only need a few data to get it running (images, an email)
The thing is my web dev skills are really close to 0, and I don't exactly know where to start from .
I don't plan on having hundreds of people a day on the platform.
People would connect, feed me with the data (link to a dropbox folder, google drive, whatever) and I would send them a message where it's finished.
If you could provide me with some names or links so that I could touch the field, I'd be really glad.
CGI is a fine option, but if you already have Python experience Django is definitely worth checking out (it falls in the category of rhooligan's #3 except it uses Python!). Django completely takes care of all of the database backend details for you, which is a benefit over simple CGI. It also provides easy-to-use pre-defined classes for handling file uploads, images, etc. It also has a great tutorial that will get you up and running. Just be careful about whether you're using version 1.3, 1.4, or the latest dev version, because some aspects of the framework have changed fairly quickly. Make sure that you're always looking at the right version of the docs.
Another handy service to keep in mind for doing something like image processing through a web app is a hosted cloud computing service provider like PiCloud. Unless you already have a private web server with lots of memory and processing power, these cloud services that charge by the ms are really cool. They also give you 1000s of cores which could allow you to do lot's of concurrent processing. They provide a nice Python API, and it has numpy and opencv pre-installed in both v2.6 and v2.7. (They use PyOpenCV, but you also have root access to install anything you want, so you can set up the "cv2" interface if that's what you're using--actually I just looked at your GitHub and it looks like you're using the old "cv" interface. You can also install any application you want on PiCloud--it doesn't have to be Python.)
You could start by looking into the Python CGI module and see if it will work for you. Then you'll need to do the following steps:
Decide on a webserver and install it, Apache is probably a good starting point.
Design the UI. Wireframe things out on paper paper. Figure out how you'd ideally want the users to go through your site and what you want on each page/view.
Your decision in #2 drives all the decisions from this point out. These days, most web applications are a combination of Web 1.0 and JSON/REST "services" (there's a couple of buzzwords for ya!). JQuery is a popular and widely used JavaScript library for developing the front end of your site. That would be another thing to look at. JQuery is completely independent from the back end and can be used with any type of back end (PHP, Ruby, Perl, .NET, etc)

What Java templating frameworks/engines allow remote templates?

I've got an intermediate amount of experience programming in Java and a fairly advanced amount of experience programming web applications in other languages. I'm currently in the process of learning some of the Java web frameworks (Spring MVC, Struts.)
Where I work, we have a number of individual Java web applications, deployed in separate contexts and as separate wars. A few of the oldest are servlets, many are Struts 1, and the new ones will be Spring 3.
Most of the existing applications have inconsistent or no branding (graphics/decoration), and one of the things I am looking into is applying a consistent header and footer across multiple sites that we can maintain in one place. Ideally it wouldn't even have to be on the same server as the web applications. To be clear-- whereever I configure my template, I want to be able to configure http://some.other.server/template instead of WEB-INF/template.
I would like to use SiteMesh or something with the same "decorating" approach but I researched it, and apparently the only way this has been done in SiteMesh 2 was done by someone who forked the code and customized it to allow remote templates to be imported. (I found this information on the Sitemesh3 Google group.)
I'm at the beginning of designing this solution so I suppose we could use anything like Velocity, Freemarker, Tiles. However, where I work we are slow to update old apps and conservative in adopting new technologies, so I have to prove a solution has good community support, works with Struts 1 and Spring 3 MVC, and is fairly trustworthy and stable.
Velocity has a concept of "resource loader", i.e. an interface for finding template files which can be configured. There is already a loader for URL-based resources. See the Velocity Documentation for Resource Loaders. It also has basic support for caching.
If you need something a bit more sophisticated it should also be fairly easy to provide your own implementation of a resource loader, I did that for one of my projects and it works fine.