TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

An In-Depth Introduction To Ember.js

73 点作者 elie_CH超过 11 年前

5 条评论

Mc_Big_G超过 11 年前
I only reviewed it quickly, but I think they should be using the &quot;then&quot; pattern of promises when saving and transitioning.<p>So this:<p>this.get(&#x27;model&#x27;).save();<p>this.transitionToRoute(&#x27;users&#x27;);<p>Should be:<p>var controller = this;<p>this.get(&#x27;model&#x27;).save().then(function(model) {<p><pre><code> controller.transitionToRoute(&#x27;users&#x27;); </code></pre> }).fail(function(error) {<p><pre><code> &#x2F;&#x2F;Feedback for the user </code></pre> });
评论 #6689794 未加载
ekidd超过 11 年前
I&#x27;m really loving the new Promises&#x2F;A+ support in Ember—lots of weird corner cases just got a lot cleaner, and it&#x27;s much easier to bypass Ember-Data when the need arises. See this section of the original post for an example:<p><a href="http://coding.smashingmagazine.com/2013/11/07/an-in-depth-introduction-to-ember-js/#what_about_not_using_emberdata" rel="nofollow">http:&#x2F;&#x2F;coding.smashingmagazine.com&#x2F;2013&#x2F;11&#x2F;07&#x2F;an-in-depth-in...</a><p>The first rule of Ember.js happiness is &quot;Don&#x27;t fight with Ember Data.&quot; When Ember Data does what you want, it&#x27;s amazing. When you want to do something that it doesn&#x27;t support, just fall back to jQuery and promises at the model layer, as shown above.
Tzunamitom超过 11 年前
Really good site. I&#x27;ve also found Ember Sherpa to be very useful once you&#x27;re up and running: <a href="http://embersherpa.com/" rel="nofollow">http:&#x2F;&#x2F;embersherpa.com&#x2F;</a>
runnr_az超过 11 年前
I&#x27;m doing my latest project in Ember... it&#x27;s cool, but even with a whole bunch of javascript experience, it&#x27;s been a steep learning curve. I&#x27;m starting to get it and I like what I see, but I&#x27;d definitely welcome any resources people have in terms of getting to know it in a deeper way.
atburrow超过 11 年前
I&#x27;ve always been meaning to take a look at Ember. When I first started seeing discussions about it about 2 years ago, there weren&#x27;t many guides or quick examples on how it is different than other frameworks out there. What would the use case be for Ember.js vs something like AngularJS?
评论 #6691006 未加载
评论 #6690779 未加载