JavaScript has a feature that sets it apart from much of the rest of computer languages: a programmer with advanced knowledge in this syntax may intervene in the whole development stack. It's what the developer community call the MEAN full-stack quartet, in reference to MongoDB (database system), Express (development framework on the back-end) side, AngularJS (framework on the client side) and Node.js (development environment for the server layer). EmberJS is an alternative to AngularJS.
EmberJS is a framework under the MVC (Model-View-Controller) pattern for JavaScript. With it applications can be developed on the client side, supported by several JavaScript libraries like jQuery, a well-known library in the world of development, or Handlebars, an alternative to jQuery that creates HTML templates with data objects in JSON format.
Why is it so interesting to use a Model-View-Controller framework to design applications? Because it will be the development framework that deals with synchronizing changes from time to time in the HTML document with the DOM, thanks to the information contained in the View's variables. This is possible for one simple reason: the MVC pattern separates applications into different presentation components, data and logic.
EmberJS Features
EmberJS has some features that can be a big advantage for a developer of web applications. Some of them are:
– EmberJS is a framework prepared to program in a simple and elegant way, what its creators define as “The Ember Way”. This enables large developments to be made with few lines of code, as long as we adapt to the framework's limitations.
– EmberJS is a development framework that is based on the software programming paradigm Convention over Configuration (CoC), decreasing the number of decisions to be taken by the developer as the framework adopts them automatically. Through this you gain in simplicity, but lose out in flexibility. The programmer only needs to specify the unconventional aspects of an application's code as EmberJS generates everything else.
– The EmberJS Router greatly simplifies working with its system of nested routes: templates that share a Router, Controller and View and replicate from the memory the default behavior associated with that route. That saves a lot of effort and time and everything is easier.
– The developer community that maintains EmberJS is small but very qualified; some are also behind projects such as the development Ruby on Rails framework or the jQuery library.
– Easier to use than BackboneJS, another alternative to AngulaJS.
– Templates: a template, written with Handlebars, describes the application's user interface. Each template is supported by a Model, and if the developer updates the Model, the template is modified automatically. The HTML plane of each of the templates contains:
– Expressions: commands that activate functions, for example, to define partial views and incorporate them into other templates, processes rendering views and templates and so on
– Outlets: markers connecting templates with others.
– Components: custom HTML elements that are used to clean the repetitive templates or create reusable controls.
– Router: this is responsible for defining nested routes, each supported by a data model. Templates and models change with user navigation, but the default behavior associated with these nested routes remains unchanged.
In this example, the router creates the following nested routes:
– Components: these are custom HTML elements implemented with JavaScript language and templates such as GUI.
– Models: a model is an object that stores data persistently over time. Templates are responsible for displaying each of these Models to the user to convert them into HTML. Ember has a data persistence layer called Ember Data, which has undergone constant alterations over time and does not have very reliable documentation currently.
– Route: these are the objects responsible for telling the template the data model to use and show to each user.
– Controller: provides, just like the model, properties to the template.
First steps to begin programming
These are the steps to follow if you want to start working with EmberJS to develop a web application. It is relatively simple:
– Download EmberJS dependencies: to program an application in EmberJS you first need to have JavaScript jQuery and Handlebars libraries. The first can be downloaded here and the second, here.
– The second step would be to install Node.js.
– Then you need to configure Ember CLI (the command line interface of this development framework). Ember CLI is the web application development standard in EmberJS. Its installation is done through the command npm install -g ember-cli.
– The fourth is to install Bower, a dependencies manager for front-end that keeps all libraries for the project updated. You must use the command npm install -g bower.
– It is advisable to configure a test automation system. One option with EmberJS is to install PhantomJS. For installation you must use the command npm install -g phantomjs.
– Once you have installed the EmberJS command line interface and all its dependencies, you can begin to create the new project. First use the command cd to choose a folder within the project directory and then the new application is created with the command ember new application name. 'application name' will be the literal name that the application created in EmberJS will have.
The CLI has interesting features for any developer:
– Structure the project's file directory.
– It is able to compile and compress these documents.
– It generates common patterns.
– It enables the functionalities added to the development framework to be easily incorporated. The Ember community develops plugins and the remainder can be incorporated into the framework. You can find these addons in several pages such as Ember Observer or Ember Addons.
Banco Bilbao Vizcaya Argentaria, S.A. owner of this portal uses cookies and/or similar technologies of its own and third parties for the purposes of personalization, analytics, behavioral advertising or advertising related to your preferences based on a profile prepared from your browsing habits (e.g. pages visited). If you wish to obtain more detailed information, consult our Cookies Policy.
Cookie settings panel
These are the advanced settings for first-party and third-party cookies. Here you can change the parameters that will affect your browsing experience on this website.
Technical Cookies (required)
These cookies are used to give you secure access to areas with personal information and to identify you when you log in.
Name
Owner
Duration
Description
gobp.lang
BBVA
1 month
Language preference
aceptarCookies
BBVA
1 year
Configuration Accepted Cookies
_abck
BBVA
1 year
Helps protect against malicious website attacks
bm_sz
BBVA
4 hours
Helps protect against malicious website attacks
ADRUM_BTs
Salesforce Marketing Cloud
Session
Required for monitoring of the service, inherent to SFMC
ADRUM_BT1
Salesforce Marketing Cloud
Session
Required for monitoring of the service, inherent to SFMC
ADRUM_BTa
Salesforce Marketing Cloud
Session
Required for monitoring of the service, inherent to SFMC
ADRUM_BT
Salesforce Marketing Cloud
Session
Required for monitoring of the service, inherent to SFMC
xt_0d95e
Salesforce Marketing Cloud
Session
Remember user preferences (if any)
__s9744cdb192d044faa1bf201d29fafd1e
Salesforce Marketing Cloud
Session
Remember user preferences (if any)
wpml_browser_redirect_test
WPML
Session
Text translation in the portal
wp-wpml_current_language
WPML
24 hours
Text translation in the portal
Analytics Cookies
They are used to track the activity or number of visits anonymously. Thanks to them we can constantly improve your browsing experience
Your browsing experience is constantly improving.
With your selection, we cannot offer you a continuously improved browsing experience.
Name
Owner
Duration
Description
AMCV_***
Adobe Analytics
Session
Unique Visitor IDs used in Cloud Marketing solutions
AMCVS_***
Adobe Analytics
2 years
Unique Visitor IDs used in Cloud Marketing solutions
demdex (safari)
Adobe Analytics
180 days
Create and store unique and persistent identifiers
sessionID
Adobe Analytics
Session
Launch's internal cookie used to identify the user
gpv_URL
Adobe Analytics
Session
Adobe Analytics plugin: getPreviousValue Capture the value of a certain variable in the following page view, in this case the prop1
gpv_level1
Adobe Analytics
Session
Cookie used to store the DataLayer levl1 of the previous page.
gpv_pageIntent
Adobe Analytics
Session
Cookie used to store the pageIntent of the previous page.
gpv_pageName
Adobe Analytics
Session
Cookie used to store the pagename of the previous page.
aocs
Adobe Analytics
Session
Cookie that stores the first values collected at the beginning of a process.
TTC
Adobe Analytics
Session
Cookie used to store the time between the App Page Visit event and the App Completed event.
TTCL
Adobe Analytics
Session
Cookie used to store the time between the LogIn event and App Completed.
s_cc
Adobe Analytics
Session
Determine if cookies are active
s_hc
Adobe Analytics
Session
Cookie used by Adobe for analytical purposes
s_ht
Adobe Analytics
Session
Cookie used by Adobe for analytical purposes
s_nr
Adobe Analytics
2 years
Determine the number of user visits
s_ppv
Adobe Analytics
Permanent
Adobe Analytics plugin: getPercentPageViewed Determine what percentage of the page a user views
s_sq
Adobe Analytics
Session
ClickMap/ActivityMap features
s_tp
Adobe Analytics
Session
Cookie used by Adobe for analytical purposes
s_visit
Adobe Analytics
2 years
Cookie used by Adobe to know when a session has been started.
Advertising Cookies
They allow the advertising shown to you to be customized and relevant to you. Thanks to these cookies, you will not see ads that you are not interested in.
The advertising is customized to you and your preferences.
Your choice means you will not see customized ads, only generic ones.
Name
Owner
Duration
Description
OT2
VersaTag
90 days
VersaTag Cookie used to store a user id and the number of user visits.
u2
VersaTag
90 days
VersaTag Cookie where the user ID is stored
TargetingInfo 2
MediaMind
1 year
Cookie that serves to assign a unique random number that generates MediaMind.
Customization Cookies
These cookies are related to general features such as the browser you use.
Your experience and content have been customized.
With your selection, we cannot offer you a continuously improved browsing experience.
Name
Owner
Duration
Description
mbox
Adobe Target
9 days
Cookie used by Adobe Target to test user experience customization.
Looks like you’re browsing from MexicoSpainArgentinaPeruColombiaBelgiumChileUSAFranceHong KongItalyPortugalUnited KingdomTurkeyUruguayVenezuelaAlemania, so let’s show you the custom content for your
location. Change
Select a country
In order to access the private area and corresponding sandbox, select the country of the APIs you want to use.