Are developers creating Ember apps outside the context of Rails?

I made a basic Grunt-Ember boilerplate set up for myself that will do all the template and JS bundling + CommonJS modules which makes working with Ember backend agnostic. Check it out as an example Grunt project. GitHub - haywoood/grunt-ember-boilerplate: This is a Grunt.js 0.4x starter project that gives you everything you need to start developing Ember.js applications.

4 Likes

I’m currently using Ember with a Sinatra backend, and Mongoid/MongoDB for persistence. I’m using a non Rails-like conventions for REST, and not using ember-data. I’m sculpting my own communication between Ember and the backend for persistence.

I’ve used rake-pipeline to build my Ember assets when this Sinatra app was stand-alone. Now it is incorporated and mounted within a bigger (slower) Rails app. I migrated my asset pipeline to Sprockets throughout.

In other projects I happened to also use Ember over an existing JSON-spitting APIs, and things like Graphite, which was very much fun.

We are using Erlang as a backend.

I’m using ember.js with require.js and yeoman. node.js, express.js server side.

Also one thing that’s worth noting is that you can use Ember only for frontend without actually having an application backend. Here are a few examples:

I’m sure there are many more :slight_smile: Both of these are basically static HTML/CSS/JS.

I have made a little Flask backend for Ember. I wrote about it on my tumblr. I do a pretty thorough job of explaining how to setup Flask and build ember-data, but I just steal code for the Ember TodoMVC example (with credit). The next installment will be a blow-by-blow explanation of the Ember app and extend it with something that can be side loaded (maybe people).

Also, I would really appreciate feedback and corrections. Apologies it’s a little long, but I work through some of errors I encountered when building ember-data with a fairly fresh install of Debian.

1 Like

Just wrote a very simple set of helpers for Laravel 4 for it to accept RESTAdapter’s JSON. https://github.com/Babeard/Laravel-Ember-Eloquence . Still needs work, but I plan on using it in my next Ember/Laravel project.

I also have http://github.com/joefiorini/movie-cabinet. It could use some code cleanup, but it’s built 100% built with grunt.js and hits the Rotten Tomatoes API for information.

For posterity here’s the updated Brunch skeleton - gcollazo/brunch-with-ember-reloaded

I’ve been building some apps with Brunch - first using LocalStorage and then popping over to an external Rails-API backend when I’m ready. It’s a great way of working; nice to decouple your app from your datastore.

We have just started using ember at work for quite a few projects.

Django + mssql backend with djangorestframework + toran’s ember-data adapter

django_compressor for pipeline management

https://github.com/Juvenal1228/ember-compressor-compiler for template pre-compilation in django_compressor

I found my solution to the handlebars precompiler to be preferable to the many others simply because it does not rely on spawning a shell into a node.js package. We deploy to windows, and I had run into some fun issues with node.js packages and the windows environment so I opted to avoid them.

How are you modifying the WebApi JSON output? Are you creating custom json output and not returning the models?

Sorry for the late reply @knownasilya.

I now use a WebApi adapter on the client side. It’s an extended RESTAdapter. It’s in the Ember SPA template for Visual Studio, or you can find another version here: https://github.com/MilkyWayJoe/Ember-WebAPI-Adapter

In my WebApiConfig I use this configuration:

config.Formatters.JsonFormatter.SerializerSettings.ContractResolver = 
                            new CamelCasePropertyNamesContractResolver();

(namespace: Newtonsoft.Json.Serialization)

Hope this helps!

2 Likes

Just keep in mind this adapter is not done. The most updated branch is wip and not master. I will update it only in June (I’m moving and there’s a lot of things to take care of… and it’s taking much more time than I anticipated), likely Ember-Data next release will be out by then. There will be changes in regards to the adapter’s ajax in favor of RSVP. It currently has the exact same features and issues present in the adapter from the the SPA template for VS2012. If you’re starting a new project in .NET, check the SPA template here or @myslik Handlebars Compiler here, which also has a Web API sample.

The major problem for .NET right now is JSON.NET serialization which is definitely not what’s expected by Ember-Data. My plan is to also include a different serialization class along with the js adapter, then I’ll add a NuGet package when it’s more stable. Any help/contribution/criticism is welcome.

If there was an alternate JSON serializer, we wouldn’t need to extend the REST adapter, would we? I prefer that solution, it makes the JSON data easier to work with, in Ember and any other framework.

Even with a different JSON serialization in the server, I’d still go for an override of RESTAdapter#ajax to include authentication token in the header. Not that this is a necessary step for all scenarios, but if you need to validate the client with ValidateAntiForgeryTokenAttribute in your controller, you have to override at least the AJAX call.

it seems like that should be part of ember-data, without having to extend the REST adapter.

perhaps, but each environment may have a different way to handle that, so I believe one should override this to match with the environment the app is being built.

I’ using emberjs in combination with the java based play (2.1) framework. Play 2.1 has a good support for building restful services. Additionally I use mongodb as a NoSQL Backend (play 2.1 + Jongo - Mongodb plugin).

1 Like

@Costent : Could you share the basic app structure and the boilerplate for nodejs and emberjs to communicate for that kind of application?

I left Yeoman for Mimosa. I do not like Grunt and Bower. Integration with ember.js, handlebars and emblem is easier. It have less npm dependencies. You can have your server and your client managed by Mimosa (I use to have Apache in front for dispatching). Configuration and documentation are more simple. I can find an old project with Yeoman if you want to but I can also recommend you to use Mimosa and give your my application structure.

1 Like