What is Ember?
Team: Yehuda Katz and Tom Dale started developing the ember framework first. With time lot others joined them.
What is MVC architecture?
MVC or Model View Controller architecture is a standard to isolate the application logic from the user interface layer.
Model: The data, your app is using is represented in models. It can be a simple array, predefined JSON object or data dynamically retrieved from a RESTful JSON API, via an Ajax request.
View: The name says it all. View is presentation of data in a particular format. This is the part of the application where user will see things, rise events or can do other interactivities.
Controller: Controllers are like intermediate communicator between models and views. They are typically used to store data in models, represent data in views and to handle the events raised by the user in view.
How Ember helps
1. Ember helps to make desktop like application in web.
2. It helps to develop a single page multi route app.
3. Codes become very structured and clean.
4. You have to write dramatically less codes than traditional jQuery.
5. Easy to manage the apps.
6. To make a complex user interface easy to develop
7. To reduce number of http requests required for new views.
8. Nice documentation and easy to learn.
Key features of Ember
Bindings: One of the major tasks which a normal web app has to do is constantly flowing changing data from A to B. This thing has become very easy to do with Ember’s two way data binding. With very minimal effort you can reflect the changing data in view (UI) and vice versa in real time using ember.
Router: Using this feature of ember you can develop a multi url based single page web app, which will look like desktop apps. Within the same page using different routes, you can show different view with different set of data and event handlers.
Nesting: Nested routes, nested views are possible in ember.
To start with ember, you must have an idea of handlebars.js which is a string based template engine. Handlebars generates your HTML by taking a JSON structure and running it through a template. These templates are written mostly in regular HTML, and are peppered with placeholders that allow you to inject data, as needed. Handlebars gives you the ability to create your own custom helper. Simply register your function into Handlebars, and any template you compile afterwards can access your helper. There are two kinds of helpers that you can make:
1. Function helpers are basically regular functions that, once registered, can be called anywhere in your template. Handlebars writes the function’s return value into the template.
2. Block helpers are similar in nature to the if, each, etc. helpers. They allow you to change the context of what’s inside.
You don’t have to learn handlebars separately; we will cover the necessary parts of it while writing the ember tutorials.
Few big Ember applications
Start using Ember
Now you have enough understanding to start learning EmberJS. So let’s begin with My First Ember App, which will guide you to write the very first and basic Ember Application.