Sharing Code Between Client and Server with Node.js

Chris Powers (Groupon)
Average rating: ***..
(3.73, 11 ratings)

Synopsis

The explosion in popularity of Fat Client Web apps has improved user experience and empowered JavaScript developers to offer rich interactions with little help from the server. Client-side frameworks like Backbone, Ember and Knockout have given code much needed structure, breaking it out into MVC and MVVM patterns.

With this, however, comes frustration from the inevitable duplication. Business logic is duplicated between Rails models and Backbone models. URL routing logic is duplicated between Sinatra and Sammy.js. Views need to be rendered in the browser for users, but on the server for Google.

The rise of Node.js gave developers a common language shared between client and server, yet the two environments are so different that sharing code between them was still difficult. Clearly there is a demand for tooling that helps solve these problems and DRY up our code.

Having worked on developing the Drumkit.js code-sharing framework over the last year, I have first-hand experience seeing what approaches work and which ones fail. As a software engineer at Groupon (which is primarily powered by Ruby code), I have been able to introduce Node.js apps into the ecosystem that were built quickly and are maintained easily thanks to these code-sharing techniques.

NOTE: While Drumkit.js will be used as an example of how code-sharing techniques can be implemented, this talk will NOT be a pitch to use the framework.

Attendees will walk away having learned about…

  1. The benefits of sharing code to a development team.
  2. The challenges that make sharing code between server and browser difficult.
  3. Techniques for effectively reusing code in both environments.
  4. Techniques for streamlining the delivery of code and transfer of data between environments.
  5. Useful Node libraries like Drumkit, Flatiron, Browserify and AirDrop.
  6. How Groupon leverages these techniques to improve app development.

In addition, attendees will be given access to an open-source demo that exemplifies the explained techniques and can be used as a starting point for their own project.

People will want to attend because…

  • Sharing code between client/server is a very hot topic right now.
  • Many JS devs are frustrated by code duplication in their Fat Client apps and want a solution.
  • Attendees will be interested to hear how Groupon uses these techniques.
  • Everyone wants to know how they can write half the code and still get the job done!

Chris Powers

Groupon

Chris Powers has been developing Web applications for the last six years, now specializing in JavaScript and Ruby development. He strongly believes in the power technology has to bring people together and enjoys developing platforms that empower the user. Currenty Chris is working as a software engineer at Groupon and lives in the northern Chicago suburbs with his wife, daughter, dog and cats. In his free time he enjoys sketch-noting, playing the drum kit and homebrewing.

Sponsors

  • appendTo
  • Enyo
  • Ludei
  • Sencha
  • Appcelerator
  • Twitter
  • Infragistics
  • Code For America
  • DevChix
  • Eclipse Foundation
  • Women Who Code

For information on exhibition and sponsorship opportunities at Fluent conference, contact Gloria Lombardo at (203) 381-9245 or glombardo@oreilly.com.

For information on trade opportunities with O'Reilly conferences contact mediapartners
@oreilly.com

View a complete list of Fluent contacts