Thursday, March 8, 2012

Announcing Lightrail: Lightweight Rails stack for HTML5/JS applications

There's been a lot of debate lately surrounding Rails suitability for the server stack underlying modern HTML5/JS applications. Having used Rails for some four years for this purpose, and worked with a number of Rails core members, this is a problem I think the Ruby community has solved wonderfully, but yet some are confused as to what solutions are available or the way forward.

Rails 3 provided enormous advances in terms of letting you specialize what Rails provides to the problem at hand. However, to a certain extent this goes against the Rails mantra of "convention over configuration". While Rails 3 provides ample opportunities for configuration, as Rubyists, we shouldn't have to configure anything, right?

I'm a huge believer in both Rails' suitability as a backend for modern client-heavy HTML5/JS applications, and someone experienced in building such applications. Rails is, was, and continues to be a game-changer for modern web development. ActionController::Metal provides the bare minimum needed to build apps which don't need the complete set of HTML-generating abstractions provided by ActionView, but need more tools than a more minimalistic framework like Sinatra makes available. Between Sinatra and Rails lies an unaddressed middle ground, one where, in theory, you should be able to build an ActionController::Metal stack appropriate to your needs, but maybe this is too daunting a task.

For you, the JSON API builder, who wants more than Sinatra but less than Rails... I have what you desire. Introducing Lightrail:


What is Lightrail? Lightrail is Strobe's ActionController::Metal stack for HTML5 applications, originally used to provide the backend APIs for Strobecorp.com and its frontend HTML5/JS application authored with SproutCore (which has been superseded by Ember.js).

Lightrail contains everything you need to build lightweight applications on the Rails stack which serve only JSON, and furthermore, contains an innovative system for building JSON APIs around your objects. Rather than adding a fat #to_json method on your models, or using a template to construct your JSON, Lightrail's allows you to map the JSON serializations of your objects to specific wrappers that know how to serialize specific objects. Like using #to_json, this makes it easy to recursively serialize nested objects to JSON without having to use ActionView voodoo like invoking other renderers. Besides that, it still separates the concerns of what your domain objects are and how they serialize to JSON. If you've tried to build JSON APIs in Rails and found the existing mechanisms for JSON serialization lacking, please try out Lightrail::Wrapper and let me know what you think.

Lightrail is something of an experiment. I didn't write it, but it's software I believe in so much I'd like to support it and see if people are interested in it. Rather than competing with Rails, Lightrail takes the latest, greatest Rails stack and reconfigures it for lightweight applications that provide a JSON API exclusively. Lightrails builds upon all of the modularity that Rails 3 brings to the table, and simply and easily delivers a lightweight stack which is still suitable for complex applications.

Please let me know if Lightrail seems like a good idea to you and if you'd like to help support it. As I have my hands in an awful lot of other open source projects, Lightrail isn't the sort of thing I can support full time. However, if you have some time to spare and ideas to contribute, I am definitely looking for people to help maintain and improve this project.

If you're interested in using Lightrail or helping out with its development, sign up for the mailing list. Just send any message to lightrail@librelist.com to join.

219 comments:

«Oldest   ‹Older   201 – 219 of 219
Goa Escort said...

i am offering Cheap rate escorts services in goa independently through this agency because they are safe and secure, guys trust us we only hire ESCORT GIRLS
https://mahiescorts.in/
https://goanescort.com/

Ankita Tiwari said...


CALL GIRL
CALL GIRLS

Escort Service In Delhi said...

Escort girls in Delhi make independent Brahma; Delhi call girls are always ready to serve you for interested people. Call girls in Delhi have been placed in many categories. Surely we are available according to you, you can come on our website and contact us. Delhi Escort Service

Goa Escort said...

Goa call girls
i am offering Cheap rate escorts services in goa independently through this agency because they are safe and secure, guys trust us we only hire ESCORT GIRLS
https://mahiescorts.in/
https://goanescort.com/

shanaya said...

noida escorts
gurgaon escorts

Escort Service In Delhi said...

Escort girls in Delhi make independent Brahma; Delhi call girls are always ready to serve you for interested people. Call girls in Delhi have been placed in many categories. Surely we are available according to you, you can come on our website and contact us. Female Escort In Delhi

Anjali Singh said...

Satisfy your sexual necessities at that point connect with sizzling Lucknow Hotel Escorts. Delightful darlings who are excessively open to sensual love.
Lucknow Hotel Escort


Lucknow Escort Service
Goa Escort Service

mimi said...

Hey, I really like this blog and it was very helpful for me to thank you so much. Also, check out our blog.
Alight Motion Pro APK

Escorts Service In Gurgaon said...

Welcome to Gurgaon Escort Service. We provide one to one sexiest girls and provide cheap service rates. You can visit our website to take advantage of the service. Cheap Escort Service In Gurgaon

razijan said...

I tried it didn't worked for me and Then I started playing and controlling mod games like kick the buddy mod apk
and sky glider mod apk.
and they really worked for me.

Harry Potter said...

Tech world’s school management system is a powerful management software that enables the owner to effectively manage all day to day tasks of an academia.
Best School management software In Pakistan

arccmedia09 said...

Absolutely right. free tips here. ad agency in san francisco

arccmedia09 said...


Excellent Blog with so much useful information, thank you so much for your work.sf advertising agencies

Astrid said...

towing service buffalo ny Very interesting website it is.

razijan said...

can anyone tell me what was the post about cause I am busy playing mods for free like kick the buddy mod apk
from free-modapk.com

Unknown said...

If you are looking for a memorable and reasonable experience of SAP MM Training in Delhi, if yes; then we are here for you with huge discounts and great deals.

Astrid said...


If any of you need cooling and heating services, please go to our website: hvac san francisco

bandar togel online said...

live draw hk
live draw sgp
live draw sd
data hk
keluaran data togel
prediksi togel jitu
prediksi jitu
bandar togel terpercaya
bandar togel online
agen judi terpercaya

Astrid said...

Excellent Blog with so much useful information, thank you so much for your work. | ac repair san francisco

«Oldest ‹Older   201 – 219 of 219   Newer› Newest»