Ember.js Environment (window) installation and creation of applications

Source: Internet
Author: User
Tags install node

Today, we can often see complex javascript applications, and because these applications become more complex, a long list of jquery callback statements, or different function calls performed in various states through the application, will become unacceptable. This has led JavaScript developers to start looking for a more organized and more efficient way to develop. One of the most common architectural patterns for organization and efficiency is the model View Controller (MVC) pattern we know, which encourages developers to split different parts of their applications into more manageable modules, and we don't have to use a function to call the database directly. The database is managed by creating a model (the models or entities), the display code is simplified through templates (template) or Views (view), and finally, by using the controller to process requests for our applications, The MVC pattern minimizes the degree of coupling between each module and provides the development efficiency of the program. Ember.js is a JavaScript MVC framework that evolved from the renaming of Sproutcore 2.0, created by Apple's former employees. Currently Ember has been released to 1.3.0. For more information, visit the Emberjs English Web site to view the latest version.

EMBERJS Basic introduction and use in this also no longer explain, specific also please visit Emberjs English Web.

Here are some of the findings from the front-end MVC framework:

Gordon L. Hempton, a Seattle hacker and designer, spent months researching and comparing 12 popular JavaScript MVC frameworks and summarizing the pros and cons of each framework in the blog, and the end result is that Ember.js wins.

The comparison of the characteristics of the standard has four kinds, namely:

    • UI bindings (UI Bindings)
    • Composite view (composed views)
    • Web presentation layer (Web Presentation layer)
    • Good collaboration with other frameworks (Plays nicely with Others)

For various JavaScript MVC frameworks, Gordon summarizes the pros and cons:

    1. backbone.js--Advantages: Strong community, strong momentum; disadvantage: abstract weak, many functions need to increase.
    2. sproutcore--Advantages: Support for bindings, reliable communities, lots of features, Cons: Over-spec, difficult to decouple from unwanted features.
    3. sammy.js--Advantages: Easy to learn, easier to integrate with existing service-side applications, disadvantages: too simple to apply to large applications.
    4. spine.js--Advantages: Lightweight, documentation is complete; disadvantage: Its core concept "Spine" is the asynchronous user interface, which means that the ideal user interface will never clog, and this foundation is flawed.
    5. cappuccino--Advantages: Large, well-thought-out framework, good community, great inheritance model ; Cons: Created by iOS developers, use JavaScript to emulate objective-c.
    6. knockout.js--Advantages: Support for bindings, complete documentation and tutorials; Cons: Poor binding syntax, lack of a unified view component hierarchy.
    7. Javascript mvc--Advantages: a reliable community; disadvantage: The string-based inheritance model is poor, the controller is too dense with the view and lacks the binding.
    8. GWT (Google Web Toolkit)-Advantages: A comprehensive framework, a good community, a reliable Java-based component inheritance model, a disadvantage: you may not be able to withstand the test of time, in addition, Java on the client's abstraction is somewhat clumsy.
    9. Google closure--Benefits: A good component-based UI composition system. Disadvantage: Lack of UI binding support.
    10. ember.js--advantages: A rich template system with composite views and UI bindings; Cons: Relatively new, incomplete documentation.
    11. angular.js--Advantages: The template range and controller design are well considered, have a dependency injection system, support rich UI binding syntax. Disadvantage: The code is not strong in modularity, and the view is not modular enough.
    12. batman.js--Advantages: The code is clear, binding, persistent method is simple; disadvantage: A single controller is used.

After a comparison of the various JavaScript MVC framework features, Gordon believes that only Ember.js can fully meet his requirements, thus becoming his final choice of framework.

Here is the environment for Amber and the creation of the application:

First step: Install node. js

  Take a look at the following installation tutorial: http://www.runoob.com/nodejs/nodejs-install-setup.html
Part II: Installation of Ember.js

  Open cmd to test whether node. js and NPM are working correctly

Then install ember.js, the command is: NPM install-g [email protected]

After the installation is complete, you can use the command "EMBER-V" to test whether the installation is correct.

The Ember environment is now set up, but Git and Bower will have to be installed before the app is created.

Git installation: The installation method and the usual way to install the software, the next step.

git:https://git-for-windows.github.io/

BOWER:NPM Install-g Bower After the installation is complete, you can create the project.

Ember Create an app:

First go to the target directory and create the app with the Ember New Test_ember command, where Test_ember is the project name

  

This step appears to indicate that you are creating an application file for Ember, just wait a minute.

  

The following scenario indicates that the installation is correct.

  

Then the local directory also appears file

  

Run the Ember program: Enter the application folder you just created, execute Ember server or ember s

  

  

  

When it appears: serving on http://localhost:4200/This sentence, it means that the environment starts normally, then you can enter Http://localhost:4200/Access ember program in the browser

Our ember environment is set up here, so please enjoy the thrill of ember!

Ember.js Environment (window) installation and creation of applications

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.