How will Ember change in 2014? (1)

Source: Internet
Author: User

Add more packages

Ember CLI provides bower support by using the following command:

Every few months, the core team of Ember will gather to discuss the current problems and decide the various transactions that need to be prioritized in the next quarter.

This time, in Portland, Oregon, everyone gathered to discuss the development direction of 2014.

Development Tools & Modules

We spent a lot of time discussing how to integrate ES6 modules with fast, powerful, and functional development tools.

One of the reasons why I like Ember communication meetings is that the faster it is applied in practice, the more valuable it is. For us, solving problems is more important than proposing solutions because different solutions will not change as applications grow.

So far, we have not yet recognized any specific build tool, because we have investigated them in depth, currently, all available options have fatal defects that make your application larger, which will make your application very unpleasant.

Many people have also asked us about modules. When we started the Ember project, there was no popular module format. However, since then, CommonJS's server-side modules and AMD's browser modules have been explosively popularized. Although both of them are good choices, their ecosystem is broken, and their communities often quarrel over the Emacs/vi style.

Fortunately, TC39, the JavaScript maintenance committee, recognized the need for a unified module system. The ES6 module provides the best part of AMD and CommonJS modules and is directly integrated into the language.

Initialization

 
 
  1. ember new my-app 

Initialize the Ember. js project and create the root directory, including app and router.

Enable Development Server

 
 
  1. ember server 

Run the test program

 
 
  1. ember test 

To run the Qunit test program, you need the PhantomJS plug-in on the Karma browser), even though we are planning to migrate it into the development program for better development.

You can also run the following command to start the QUnit test:

 
 
  1. ember test:server 

Add more packages

Ember CLI provides bower support by using the following command:

The general Franca module in Ember is part of the ES6 module. We will ensure that the bower module can be automatically called by the Ember application through correction of global packages in AMD, CommonJS, and browser:

Even if a library is used by AMD, you can use it as an ES6 module:

 
 
  1. import md from "markdown"; 

When the file changes, the associated file app. js, app.css, and so on will be locked by the browser. Each HTTP request to access the file will be suspended until the new version is compiled.

Enhanced inspection tool Functions

If you are using the Ember CLI tool to develop your application, Chrome and Firefox will become your preferred choice. The Development Server opens an interface to connect the checking tool to provide additional Environment Information for the browser.

Once a link is established between your browser and development tool, you can do a lot of interesting things, but we have to decide in advance:

  • Saw a bunch of bower packages
  • View running result
  • Review code
  • Use the visual editor to configure package. json

File System layout

The following is a simple example of the layout you will see when you initialize a new Ember app through CLI:

 
 
  1. app/ 
  2.   controllers/ 
  3.   models/ 
  4.   fonts/ 
  5.   … 
  6. config/ 
  7.   shim.json 
  8. vendor/ 
  9.   underscore.js    // bower installed 
  10.   markdown.js 
  11. lib/ 
  12.   ember-histogram/ // incubator for packages 
  13.     skylight/ 
  14.     bower.json  
  15. modules/           // non-MVC stuff 
  16.   underscore.js 


Related Article

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.