Contribution Stories: Preston So, Decoupled Drupal with Ember

Drupal gets better when companies, organizations, and individuals build or fix something they need and then share it with the rest of us. Our community becomes better, stronger, and smarter when others take it upon themselves to make a positive difference contributing their knowledge, time, and energy to Drupal. Acquia is proud to play a part, alongside thousands of others, in some of the stories making tomorrow’s Drupal better than today’s. One of them Preston So’s.

Preston So, Development Manager, Acquia Labs, has been a web developer and designer since 2001, a creative professional since 2004, and a Drupal developer since 2007. He produced prototypes for the Spark Initiative in Drupal, co-founded the Southern Colorado Drupal User Group in 2008, authored the initial concept for the Waterwheel.js SDK, and “has presented in two languages at events on four continents, and contributes to Drupal core when time permits.”

At DrupalCon Dublin, Preston’s session was a comprehensive introduction to building fully-decoupled Ember applications — Drupal-backed Ember applications — from scratch! If you follow directly along with the video, you'll end up with an actual Drupal-backed Ember application at the end of it. It also gives us insight into what Drupal's future could look like in a few years.

“Drupal 8 has made it colossally easier to build decoupled applications ... As the Drupal community continues to discuss the merits of JavaScript framework and potentially adopting one, my session articulates a vision for how API-first Drupal and JavaScript communities can come together to produce an amazing outcome for both.” - Preston So

Learn more: Drupal on Ember webinar

If you’re interested in building decoupled Drupal applications and front-end development in general, Preston will be hosting a webinar building on this topic on December 7, 2016: Drupal on Fire: Ember, JSON API, and Decoupled Drupal 8.

jam: What value does Drupal, Ember, decoupling, and front end frameworks deliver to ...

  • ... developers? Preston: Ember offers front-end developers the power to build JavaScript applications quickly and efficiently thanks to its opinionated nature and prizing of convention over configuration. As a result, skills you learn on a single Ember project are easily applicable to other Ember projects, which is great for reducing the need for on-boarding.
  • ... site owners and businesses? Preston: Because of its vibrant ecosystem, focus on stability, and animated community, Ember can offer more flexibility than other frameworks like Angular and React when you're building Drupal-backed JavaScript applications, both from the progressively decoupled and fully decoupled standpoint. Pairing decoupled Drupal with an Ember front end can be advantageous because it has the potential to improve the front-end developer experience, increase velocity on projects, and provide a more modern user experience. Once people see how easy it is to build Ember applications, I imagine we'll be seeing much more happening in new decoupled architectures.
  • ... the Drupal community? Preston: The Ember community is an animated, involved, and welcoming community which reflects a lot of the traits we respect in the Drupal community. Trying out Ember is a great opportunity to “get off the island” and have a look at what other open source communities are doing.

Preston So

jam: Preston, tell us about the background of your session. How did you come to submit it?

Preston: This session came about because of a wave of recent interest in decoupled Drupal and the JavaScript renaissance. I've long given talks about decoupled Drupal and writing Drupal-backed JavaScript applications, particularly about React and GraphQL. Lately I've been interested in Ember, primarily because of its community's closeness to Drupal's own and an open-source mentality which matches our philosophy. Ember core maintainer Ed Faulkner's session at DrupalCon New Orleans [Amazing User Experiences with Drupal and Ember] wowed the audience with a demonstration of how the user experience of Drupal could evolve with Ember at its side. Mostly, however, I wanted to do something different with my session by zooming out from live-coding Ember applications to the larger-scale implications on the future of Drupal's front end.

DrupalCon Dublin Session [video]

Preston: My session consists of almost an hour of live coding! I love doing live coding presentations despite the huge amount of risk involved. It's also one of my favorites out of the many sessions I've given at DrupalCons :)

Session resources

jam: What is the state-of-play and what is coming next regarding Drupal and front end frameworks?

Preston: Many JavaScript developers have decried the fragmentation of the landscape and how difficult it is to follow along with the recent blistering rate of change. However, I believe that the maturity of the JavaScript community has pointed toward a shift in the coming year or two towards greater standardization and codification of best practices. As for Ember, the Ember community recently released Ember 2.0 and has been working hard to develop a holistic framework that can be used flexibly for a variety of use cases. While the last few years have been years of fragmentation, I think that we're inching closer to much more unification. And as more members of the Drupal community pursue decoupled architectures, we'll start to see much more adoption of JavaScript frameworks as those front ends, which will hopefully loop back to benefit Drupal's front end as well.

jam: How has Drupal 8 affected Drupal, Ember, decoupling, and front end frameworks?

Preston: Drupal 8 has made it colossally easier to build decoupled applications. The Web Services and Context Core Initiative (WSCCI) worked to build a standard REST API in Drupal core, which is now used as the basis for many other projects. Since Drupal 8's release, there have been many new improvements to web services in the Drupal ecosystem, with modules for the JSON API specification and GraphQL, as well as many enhancements to the existing core REST API. For example, you can now log into and out of a Drupal 8 site’s user account via REST, without touching a Drupal user interface!

jam: So why is putting Ember and Drupal together important? Who should care?

Preston: As the community continues to discuss the merits of JavaScript framework and potentially adopting one, it's a timely and essential piece of the discussion. We all can do more to "get off the island" and learn more about front-end communities that are revolutionizing user experiences on the web. Not only does my session expose Drupalists to unfamiliar technologies; it also articulates a vision for how API-first Drupal and JavaScript communities can come together to produce an amazing outcome for both.

Check out the Drupal on Ember webinar!

Sign up! Drupal on Fire: Ember, JSON API, and Decoupled Drupal 8. Learn more about this topic, December 7, 2016!