Lately I am exploring ember-cli. Ember-cli is a very nice way to start a standalone ember application or start learning ember. It provides out-of-the-box many tools, the common ember app structure and some specific commands for making your life easier. For me, it is like the official way for developing ember standalone applications. Before that there was EAK (ember app kit) but it's replaced by ember-cli. We had the documentation, now we have also the "generators". It was like we had rails guides but we didn't have rails g new project commands and we should look at the documentation for structuring the app.
Some of the tools that ember-cli provides:
- Broccoli, a minification, concatenation tool for your assets which also adds fingerprints. One of the missing features when I was developing in a standalone ember app, was assets pipeline. On the other hand when I was using rails with ember (with ember-rails gem), it wasn't easy to do some specific tasks like image replacement with ember and using assets pipeline at the same time. With broccoli, you don't have this kind of problems anymore, you are doing the minification-concatenation with it and you keep the ember application in a separate place.
- A ready to use testing platform
- Server for running in development
- Three environments (development, test and production), just like rails, each with its specific configuration
- Commands for generating models, resources etc. and building it for production
To be fair, there are similar solutions like yeoman, but for me ember-cli is a better solution as it is more ember specific and it has all the configuration ready, as you would expect from an opinionated framework. Like Tom Dale and Yehuda said in the following video, this one is a nice step towards achieving what they want:
Ember vs angular - round 2Lately I have also used angular. I think ember is awesome and I would choose it for a complete separate application with a rails api on the backend. But if for some reason I wanted to use rails for rendering and do some common tricks, I would go with angular.
Is ember ready? The not so ready thingsI really like ember, I think it is the future. but right now, there are some parts that I don't feel comfortable with.
- Handlebars and metamorphs. I feel like metamorphs restrict my templates and how I am designing my application. It's like I don't have a complete control. When I want control, I have to use some magic tricks, ember-addons, ember groups etc. This one will be solved when htmlbars will be ready, but until then, we stick with the hacks
- Ember-data. Ember-data is being evolved significantly and it is a really promising project. But there are still some corner cases that you need to hack your way around them.