惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
D
Docker
GbyAI
GbyAI
B
Blog RSS Feed
博客园 - 司徒正美
博客园 - Franky
美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
aimingoo的专栏
aimingoo的专栏
C
Check Point Blog
IT之家
IT之家
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
www.infosecurity-magazine.com
www.infosecurity-magazine.com
AI
AI
O
OpenAI News
Attack and Defense Labs
Attack and Defense Labs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Tailwind CSS Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
S
Secure Thoughts
博客园 - 聂微东
L
LINUX DO - 最新话题
U
Unit 42
SecWiki News
SecWiki News
A
Arctic Wolf
Schneier on Security
Schneier on Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
Visual Studio Blog
量子位
The Cloudflare Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
T
Threat Research - Cisco Blogs
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
B
Blog
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
Scott Helme
Scott Helme
Last Week in AI
Last Week in AI
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Microsoft Security Blog
Microsoft Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
Latest news
Latest news

Ember.js Blog

Ember 7.0 Released Announcing the Official TypeScript Types Public Preview Accessibility Working Group Update The 2020 Ember Roadmap Countdown to The New Year - Built-in Addons Countdown to The New Year - Ember Exam Countdown to The New Year - Ember Code Snippet Countdown to The New Year - Ember Changeset Countdown to The New Year - Ember In Viewport Countdown to The New Year - Ember CLI Update Countdown to The New Year - Ember Template Invocation Location Countdown to The New Year - Ember CLI TypeScript Countdown to The New Year - Ember Bootstrap and Ember Paper Countdown to The New Year - Ember CSS Modules Countdown to The New Year - Ember Mapbox GL Countdown to The New Year - Ember Shepherd Countdown to The New Year - Ember Template Lint Countdown to The New Year - Ember Composable Helpers Countdown to The New Year - Ember Leaflet Countdown to The New Year - Ember Intl Countdown to The New Year - Ember Test Selectors Countdown to The New Year - Ember Power Select Countdown to The New Year - Ember Simple Auth Countdown to The New Year - Ember SVG Jar Countdown to The New Year - Ember Page Title Countdown to The New Year- Ember A11Y Testing Countdown to The New Year - Ember Angle Brackets Codemod Countdown to The New Year - Ember CLI Sass Countdown to The New Year - Ember Animated Countdown to The New Year - Ember Auto Import Countdown to The New Year - Ember Concurrency Countdown to The New Year - Ember Tether Countdown to The New Year - Ember Modifier Countdown to The New Year - Ember CLI Mirage Countdown to The New Year - Ember Sortable Coming Soon in Ember Octane - Part 5: Glimmer Components Coming Soon in Ember Octane - Part 4: Modifiers Coming Soon in Ember Octane - Part 3: Tracked Properties Coming Soon in Ember Octane - Part 2: Angle Brackets & Named Arguments Preview Weekend: 2019 Ember Community Survey Coming Soon in Ember Octane - Part 1: Native Classes First Annual DecEmber Event! 2018 Ember Community Survey 2017 Ember Community Survey Announcing The Glimmer 2 Alpha Upcoming deprecation of baseURL in Ember CLI 2.7 2016 Ember Community Survey Announcing Ember Core Team Face to Face, January 2016 Ember.js 1.13.0 and 2.0 Beta Released Another Ember 2.x Status Update Ember.js 1.12 and 1.13 Beta (Glimmer!) Released Ember.js 1.11.1 Released Ember.js 1.11.0 and 1.12 Beta Released Ember.js 1.10.0 and 1.11 Beta Released Compiling templates with Ember 1.10 Core Team Meeting Minutes - 2014/08/01 Core Team Meeting Minutes - 2014/08/14 Core Team Meeting Minutes - 2014/09/12 Cleaning Up Github Issues Core Team Meeting Minutes - 2014/07/11 Core Team Meeting Minutes - 2014/07/25 Core Team Meeting Minutes - 2014/06/13 Core Team Meeting Minutes - 2014/06/20 Core Team Meeting Minutes - 2014/06/27 Core Team Meeting Minutes - 2014/06/06 Core Team Meeting Minutes - 2014/04/25 Core Team Meeting Minutes - 2014/04/04 Ember 1.5.0 and 1.6 Beta Released Core Team Meeting Minutes - 2014/03/07 Core Team Meeting Minutes - 2014/03/14 Core Team Meeting Minutes - 2014/03/21 Core Team Meeting Minutes - 2014/02/28 Core Team Meeting Minutes - 2014/02/21 Core Team Meeting Minutes - 2014/02/14 Ember 1.4.0 and 1.5 Beta Released Core Team Meeting Minutes - 2014/01/27 Core Team Meeting Minutes - 2014/01/31 Core Team Meeting Minutes - 2014/02/07 Core Team Meeting Minutes - 2014/01/17 Core Team Meeting Minutes - 2014/01/03 Ember 1.3.0 and 1.4 Beta Released Core Team Meeting Minutes - 2013/12/20 Core Team Meeting Minutes - 2013/12/06 Ember 1.2.0 and 1.3 Beta Released Ember 1.1.2 Released Ember 1.1.1 and 1.2 Beta Released Ember 1.0 Released Ember 1.0 RC8 Released Ember 1.0 RC7 Released Ember 1.0 RC6.1, RC5.1, RC4.1, RC3.1, RC2.1 RC1.1 Released Ember 1.0 RC6 Ember 1.0 RC5 Ember 1.0 RC4 Ember 1.0 RC3 Announcing the Ember.js Security Policy Ember 1.0 RC2 Ember 1.0 RC Ember 1.0 Prerelease 2 Ember 1.0 Prerelease
Ember Data 2.7 and 2.8 Beta Released
2016-07-25 · via Ember.js Blog

Ember Data 2.7, a minor version release of Ember Data, is released. This release represents the work of over 27 direct contributors, and over 103 commits.

Ember Data 2.8 beta.1, the branch of Ember Data that will be released as stable in roughly six weeks, is also being released.

Blueprint Changes

In Ember Data 2.5 there was a change made to the blueprints to use module paths when importing instead of importing the default DS namespace. At the time this was thought to be a minor change and did not receive much scrutiny. However, in time the Ember Data team has discovered that the changes to the import statements in the blueprints have made it more confusing for both new and experienced Ember developers.

In Ember Data 2.5 and Ember Data 2.6 the following generator command for building a model:

ember generate model post content isDraft:boolean comments:has-many user:belongs-to

It would generate the following blueprint:

// app/models/post.js
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import { belongsTo, hasMany } from 'ember-data/relationships';

export default Model.extend({
  content: attr(),
  isDraft: attr('boolean'),
  comments: hasMany('comment'),
  user: belongsTo('user')
});

Ember Data 2.7 the same command will now generate the following blueprint:

// app/models/post.js
import DS from 'ember-data';

export default DS.Model.extend({
  content: DS.attr(),
  isDraft: DS.attr('boolean'),
  comments: DS.hasMany('comment'),
  user: DS.belongsTo('user')
});

The main difference is the blueprints no longer use the paths to import specific modules. We have found that encouraging users to omit the paths results in better defaults for both new and experienced Ember developers. The simpler import DS from 'ember-data'; statement has less room for typos and other errors and is easier to developers to remember so they do not need reference documentation whenever they want to add a new import.

This change only impacts the blueprints that are generated when using the ember-cli generate command. Code that is written to use the path imports will still continue to work and be supported until at least Ember Data 3.0.

The Ember Data team will also be releasing patch releases to Ember Data 2.5 and 2.6 to update their blueprint generators to match Ember Data 2.7.

Changes in Ember Data 2.7

ds-boolean-transform-allow-null #4022

Allow null/undefined values for boolean attributes via attr('boolean', { allowNull: true })

// app/models/user.js
import DS from 'ember-data';

export default DS.Model.extend({
  email: DS.attr('string'),
  username: DS.attr('string'),
  wantsWeeklyEmail: DS.attr('boolean', { allowNull: true })
});

This feature exposes a links object on a RecordArray. This can be used to load additional links when present in the response JSON-API document.

store.query('post', { isRecent: true }).then((posts) => {
  posts.get('links.next');
});

Thanks to @danmcclain for implementing this feature.

Upcoming Features in Ember Data 2.8.beta-1

ds-improved-ajax #3099

The ds-improved-ajax feature was originally planned to be released in Ember Data 2.7. However, feedback from the beta found that many people are overriding ajax() to change the protocol of the adapter and the new methods added in made ds-improved-ajax made this usecase harder to achieve. The Ember Data team has decided to delay the ds-improved-ajax feature flag until the Ember Data 2.8 release while improving the API for this usecase.

The ds-improved-ajax feature adds new public methods to DS.RESTAdapter, which allow to customize the properties of a request:

  • methodForRequest to get the HTTP verb
  • urlForRequest to get the URL
  • headersForRequest to get the headers
  • dataForRequest to get the data (query params or request body)

The params hash passed to those methods has all the properties with which the corresponding find, createRecord, findQuery, … calls have been invoked: store, type, snapshot(s), id(s) and query. The requestType property indicates which method is requested; the possible values are:

  • createRecord
  • updateRecord
  • deleteRecord
  • query
  • queryRecord
  • findRecord
  • findAll
  • findMany
  • findHasMany
  • findBelongsTo

Performing the actual AJAX request is handled by the makeRequest method, which is similar to the existing ajax method: it makes the request using jQuery.ajax and attaches success and failure handlers.


Say your API handles creation of resources via PUT, this can now be customized as follows:

// adapters/application.js
import DS from 'ember-data';

export default DS.RESTAdapter.extend({
  methodForRequest(params) {
    if (params.requestType === 'createRecord') {
      return "PUT";
    }

    return this._super(...arguments);
  }
});

Thanks to @pangratz for implementing this feature.

For more details on changes in the 2.8 beta, please review the Ember Data 2.8.0-beta.1 CHANGELOG.