Live data from Hacker News

Ember.js Octane Edition

blog.emberjs.com

31–40 of 80 posts

Re: Ember.js Octane Edition

#31
Wow. I really didn't realize it was so close! I've just today finished up what took me away from my Ember project.

Ember has been freakin' amazing to use, and Octane really, really, makes it shine. I love ember because it includes everything you need to manage state in your application, install and you're ready to go. I don't have to pick my view renderer, state/history management, storage system, networking stack etc... I also don't have to maintain the dependencies between them, like I would with something built using React.

Ember also favors convention over configuration; which, I find to be a godsend when visiting the world of JavaScript. Yeah, it's a bit painful sometimes not knowing the convention, but that's just good ol' fashion learning. I also think the opposite, configuration, is incredibly painful in JavaScript, because the ecosystem moves so fast.

The Ember team (and community) also have fixed, and continue to fix, a ton of issues from making module loading easier to better support of Typescript.

I'd like to give a few getting started tips for anyone about to jump in (as I did the same a few months ago):

* Glimmer templates give you nice HTML-esque looking components while separating the HTML from the JavaScript itself (which I like versus embedding it like JSX does)

* Use the decorators. Seriously, they're awesome, they're a MUST if you use typescript.

* Ember modifiers are really a big improvement over the previous hooks/lifecycle management. It's just the constructor and willDestory (I think), it also to me, makes it a lot easy to commit to ol' "data down, actions up" philosophy.

* Ember Concurrency [1] is a brilliant tool and can pretty much prevent any UI blocking you ever find yourself doing.

* Some things are automagically created for you unless you explicitly create them (with the right names) like the application controller and application router. Use the Ember debugger browser plugin to see what controllers and routes are being rendered if you're at all unsure.

* Ember CSS modules [2] helped me quite a lot encapsulating css (and wiring it up correctly for that matter).

* Use Mirage [3] to mock out your data from the beginning, don't hard code things you intend to query for later. You'll have trouble, plus Mirage is super easy to use.

* Make sure guides you're reading are relevant to the current version. Octane has been coming for a while so there's a fair bit of information, it's just something to be aware of (especially from results in google).

* If you're reading an older article that's relevant, but using older syntax try reading this: https://blog.emberjs.com/2019/01/26/emberjs-native-class-upd...

This series of articles is also immensely helpful: https://www.pzuraq.com/coming-soon-in-ember-octane-part-1-na...

Finally, I've found the Ember community to be incredibly nice and welcoming. Their Discord [4] is very active and full of helpful folks. Huge props and thanks to everyone who worked on this, it's super exciting and I'm gonna go hack on my Ember project now.

----

[1] https://ember-concurrency.com/

[2] https://github.com/salsify/ember-css-modules

[3] https://www.ember-cli-mirage.com/

[4] https://discord.gg/emberjs

Edit: Formatting.

Re: Ember.js Octane Edition

#32
post #12

With a cursory glance, a lot of these changes make Ember look more familiar for React users, w.r.t. not treating root specially (versus Angular for example) and with moving away from mixins for more functional composition. All in all I think this is great and would like to take a look at Ember and see what it has to offer nowadays.

Yes, basically all frameworks became React-like after the success of React.

In my opinion, the only one that got a really interesting take on components was Cycle.js, the rest simply tried to bend their APIs to look more Reactish.

Re: Ember.js Octane Edition

#34
Ember does a ton of magic under the hood that when something goes wrong it's the hardest thing to debug. Ember is also strongly opinionated which some people like I guess. Ever since I've switched to React + Redux I've never looked back.

Re: Ember.js Octane Edition

#35

Ember does a ton of magic under the hood that when something goes wrong it's the hardest thing to debug. Ember is also strongly opinionated which some people like I guess. Ever since I've switched to React + Redux I've never looked back.

A big part of Octane is reducing the amount of "magic" under the hood for a lot of features. For instance, autotracking and tracked properties now allow you to use plain JS for most computed values, which means that every stack trace that you have while debugging a getter will be a standard stack trace, without confusing computed property code in between!

I definitely encourage you to check it out sometime, a lot has changed!

Re: Ember.js Octane Edition

#36
I've been building new product from scratch with Ember Octane and TypeScript since March 2019, and it's been a great experience. I will be able to launch the app I spent 10 months building without any substantial refactoring. I would say the Octane API has essentially been stable for almost a year, if not longer. I even had a preview of the rewritten documentation to learn from the entire time. Ember has really come a long way from the early days. The last time I built an Ember app was before 1.0 was released. Building with Octane before it was released has been spectacular.

Re: Ember.js Octane Edition

#37

At Intercom, we've been incrementally upgrading our almost 6 year old Ember app to Octane as the features have landed over the past 8 months. Our app continues to be in great health and we continue to ship hundreds of times a day with a constant stream of features that our customers love [1] Octane is a huge leap forward for Ember. Its APIs are extremely well designed, composable and cohesive. The new Glimmer compone…

Can you shed a little light on the sorts of things that are shipped hundreds of times a day? curious if you could share some use cases or examples.

Intercom is pretty awesome - congrats!

Re: Ember.js Octane Edition

#38
post #32
post #12

With a cursory glance, a lot of these changes make Ember look more familiar for React users, w.r.t. not treating root specially (versus Angular for example) and with moving away from mixins for more functional composition. All in all I think this is great and would like to take a look at Ember and see what it has to offer nowadays.

Yes, basically all frameworks became React-like after the success of React. In my opinion, the only one that got a really interesting take on components was Cycle.js, the rest simply tried to bend their APIs to look more Reactish.

good ideas are good ideas. The world only gets better when we let ourselves be inspired by others' success

Re: Ember.js Octane Edition

#40
post #10

One of the things I really wish Ember would focus on is reducing the amount of JavaScript shipped to the browser. I just tried out the included project with ember-cli, and the default JavaScript bundle is 2.7 MB (591 KB gzipped)[1] for an app that doesn't have any functionality. I know that you get a lot with that 591 KB (Ember's router, the Glimmer VM, etc.), but it's still much more than what you can get your React…

I share your concerns.

fwiw, here is a small-medium sized app's bundle: https://emberclear.io/bundle.html (ignore the fact that ember is in that report twice, that's a problem with my analysis, and not the actual bundle)

Over the next year, the framework team is focusing _hard_ on reducing bundle size. Including: stripping deprecated features (which will be huge... at least 20kb (min+gzip), iirc)

Post reply on HN