SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Turbolinks

  1. #1
    SitePoint Member
    Join Date
    Feb 2013
    Location
    Salt Lake City, UT
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Turbolinks

    What do people think about the turbolinks feature in the upcoming Rails 4 release? Has anyone done a comparison with something like Emberjs in both terms of performance and developer experience?

  2. #2
    Team SitePoint Bentheax's Avatar
    Join Date
    Feb 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm pretty concerned about the potential for turbolinks to break a lot of the things we currently take for granted in the request/response cycle. It's definitely going to be rough going for awhile until we 'beta test' all the bugs that will invariably crop up.

  3. #3
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,095
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by treybean View Post
    What do people think about the turbolinks feature in the upcoming Rails 4 release? Has anyone done a comparison with something like Emberjs in both terms of performance and developer experience?
    You can't compare turbolinks and Ember.

    Turbolinks and pjax were designed to give a performance boost AND keep the standard Rails development stack e.g. server-side rendering of views.
    Ember is designed to remove this server-side generation of views / forms and treat the server as nothing more than a JSON API.

    There are times when both approaches make sense but more often than not I feel that server-side rendering is superior, in development experience, testability, stability, routing, SEO. Server-side rendering of views is much simpler, faster to develop etc.. The only benefits of doing everything on the client is a theoretical speed boost. To me, that's not worth the problems you encounter with it.

    I'm not completely opposed to client-side heavy applications, I feel that a framework like ember shouldn't encompass the whole app though, save the client-side complexity for when it's really required and only introduce it when there's something when the server-side development wouldn't suit.

  4. #4
    SitePoint Member
    Join Date
    Feb 2013
    Location
    Salt Lake City, UT
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think it's off base to compare the two. Both are solutions to the problem. They just fall on different sides of what should be the most important focus in an ideal solution. Rails, and it appears you, think that server-side rendering has so many advantages that it's not worth adopting considering rich-client apps. If that's your take, I agree, turbolinks might be a good way to continue building apps how you're used to and still get some perceived performance boost on your client-side. I'm just curious how close it gets compared to something like Emberjs where the server is really treated just as a persistence layer.

  5. #5
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,095
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by treybean View Post
    I'm just curious how close it gets compared to something like Emberjs where the server is really treated just as a persistence layer.
    I highly recommend watching this to the end.
    http://www.youtube.com/watch?v=FkLVl3gpJP4&t=34m0s

    I'm not against client-side frameworks like Backbone and Ember and actually use Backbone quite a lot.
    I do try to caution people though, Javascript heavy apps get complicated fast no matter how well you structure things - my advice is always to write as little as possible and to keep your js as simple as possible.

    It is entirely possible to build fast responsive apps using the standard rails stack without Node.js, client-side MVC or NoSQL
    By all means you should learn how to use client-side MVC frameworks to know their strengths and weaknesses, it's the weaknesses I'm trying to highlight here.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •