The Ember Times - Issue No. 165

வணக்கம் Emberistas! 🐹

Hacktoberfest 2020 events and info 🎃, read the new RFC to deprecate tryInvoke 📜, tips for switching from Ember Data to Ember Orbit 💡, read the blog post on Ember Octane with Glimmer Components ✨, and last, but not least, September EmberJS Chennai Meetup 🇮🇳 !


Hacktoberfest 2020 events and info 🎃

Have you always wanted to contribute to open source, but don't know where to start? The month of October is the perfect time to give it a try!

Hacktoberfest is an annual celebration of open source happens around the world, in thousands of projects on GitHub. Here in Ember land, we have lined up special events, mentoring, pairing, and more. You can read the full details in the Ember blog, but here are the highlights:

  • Tomorrow on Saturday, October 10th, drop into a pairing session! You can join voice chat on Ember Discord, where mentors are available to to take your questions, give some advice, and do pair programming during two sessions. Just jump into the "General" voice channel on Discord, all the way at the bottom of the channels list. Mentors are available 9am-10am ET, and 9pm-10pm ET. Click the links to see times in your own time zone.
  • You can join the #hacktoberfest chat channel that is open all day, every day. Volunteers are also keeping an eye there for questions or help reviewing pull requests.
  • On October 16th, there is a sold out Contributors Workshop. If you are registered and can't make it, please let the organizers know so that someone else can join!
  • If you are a parent, person of color, LGBTQ+, or woman, check out our channels for these groups! They are another great place to connect with others and maybe find a pairing buddy. Please note we are welcoming and respectful of trans women and any others who identify as women in a way that is significant to them.
  • If you belong to one of those groups but have not joined the channel yet, you can ask in the #discord-server-admin channel or send a direct message to Melanie Sumner.

RFC: Deprecate tryInvoke 📜

Bach Vo (@bachvo) created a new RFC to deprecate tryInvoke. It builds on top of the previous RFC to deprecate getWithDefault.

The author explains that, in most cases, function arguments should not be optional. In the rare occasion that it is optional, the Javascript language has optional chaining so we can deprecate the usage of tryInvoke.

Before:

import { tryInvoke } from '@ember/utils';

foo() {
 tryInvoke(this.args, 'bar', ['baz']);
}

After:

foo() {
 this.args.bar?.('baz');
}

Read the full RFC on Github!


Switching from ember-data to ember-orbit 💡

Derek Gray (@derekwsgray) encountered a business requirement to provide an Undo/Redo feature in a large Ember app. While gradually updating the app to rely on ember-orbit, Derek recorded tips and changes that you will want to consider when you are in a similar situation. Perhaps you will want to leverage other Orbit features (offline cache, transaction logs, background sync strategies).

The blog post provides:

  • A list of introductory reference materials
  • How to allow ember-data and ember-orbit to coexist during migration
  • How to convert ember-data syntax to ember-orbit

We encourage you to check it out and bookmark the link for future reference!


Blog Post: Ember Octane with Glimmer Components ✨

Ricardo Mendes (@locks) in a blog post, goes through the challenges of building apps using classic Ember components and how Glimmer components address them in a modern, clean way. He goes through building Glimmer components from the viewpoint of classic Ember Components. Improvements include:

  • Glimmer components use native class syntax and do not extend from EmberObject.
  • Separation of internal state (properties) and external state (arguments).
  • HTML-first approach makes for a much simpler API surface.

With improvements such as Native Class Syntax, reducing the API surface, and removing framework gotchas like components adding a default <div> around itself provide the ability to reason about the code locally instead of having to rely on the framework knowledge.

Read the full blog post on Simpler and more powerful components in Ember Octane with Glimmer Components today!


September EmberJS Chennai Meetup 🇮🇳

On September 4th, 2020, EmberJS Chennai featured five speakers at their fourth Meetup and the first virtual one. Topics included:

You can watch all the five talks today on YouTube playlist. To learn more about EmberJS Chennai, you can visit their website and follow them on Twitter, Meetup, and the #as-india channel on Discord!


Contributors' corner 👏

This week we'd like to thank @34Johnny69, Abraão Duarte (@abraaoduarte), Matt Gardner (@allthesignals), Amy Lam (@amyrlam), @Anshu-jindal, bach vo (@bachvo), Jonathan Haines (@BarryThePenguin), Ben Glancy (@Benjy1979), Alberto Cantú Gómez (@betocantu93), Bryan Mishkin (@bmish), Bradley Leftley (@BradLeftley), Chad Hietala (@chadhietala), Godfrey Chan (@chancancode), Chirag Patel (@chiragpat), Chris Ng (@chrisrng), Chris van der Ploeg (@chrisvdp), Ava Gaiety Wroten (@hergaiety), Igor Terzic (@igorT), Isaac Lee (@ijlee2), @JamesS-M, Jared Galanis (@jaredgalanis), Joe Cardali (@jcardali), Jen Weber (@jenweber), Jayvic San Antonio (@jpsanantonio), Jack Rowlingson (@jrowlingson), Katie Gengler (@kategengler), @Kennie-create, Dave Laird (@kiwiupover), @KroneckerDeIta, Luke Melia (@lukemelia), Mahmood Hosseini (@mahmoodhosseini), Chris Manson (@mansona), Max Fierke (@maxfierke), Anne-Greeth van Herwijnen (@MinThaMie), Matthew Beale (@mixonic), Nathaniel Furniss (@nlfurniss), @NullVoxPopuli, Nathan Whittaker (@nwhittaker), Dhruv Parikh (@parikhdhruv24791), Loris Bettazza (@Pustur), Chris Garrett (@pzuraq), Raido Kuli (@raido), Rishikesh Yadav (@rishikesh7355), Paul Kuruvilla (@rohitpaulk), Ronan Fegan (@ronan-f), Robert Jackson (@rwjblue), Simon Dahlbacka (@sdahlbac), Scott Newcomer (@snewcomer), Taksh Chanana (@takshch), @thisisgarv, Yehuda Katz (@wycats), @XenomShox, Sean Luong (@xuanluong), Yicheng (Jerry) Gong (@ygongdev), and Zabrina (@zabrinatan) for their contributions to Ember and related repositories! 💖


Connect with us 🤓

Office Hours Tomster Mascot

Wondering about something related to Ember, Ember Data, Glimmer, or addons in the Ember ecosystem, but don't know where to ask? Readers’ Questions are just for you!

Submit your own short and sweet question under bit.ly/ask-ember-core. And don’t worry, there are no silly questions, we appreciate them all - promise! 🤞

Want to write for the Ember Times? Have a suggestion for next week's issue? Join us at #support-ember-times on the Ember Community Discord or ping us @embertimes on Twitter.

Keep on top of what's been going on in Emberland this week by subscribing to our e-mail newsletter! You can also find our posts on the Ember blog.


That's another wrap! ✨

Be kind,

Isaac Lee, Chris Ng, Jen Weber, Abhilash LR, Amy Lam and the Learning Team