[LRUG] Is turbolinks/jQuery still the dominant front-end approach with Rails devs?

Tom Cartwright tecartwright at gmail.com
Mon Jun 13 02:59:46 PDT 2016


Until recently, at Lost My Name we were using a collection of small
jquery-based libs to provide validation, dom manipulation and the odd api
call. We just had standard rails views and the occasional json endpoint. We
didn't use the jquery-ujs or any of the javascript helpers. I tried to use
them once but I was sentenced to a solid week of tea duty.

The jquery approach worked well but as our storefront grew more complex it
was very hard to hold state and update views with state changes. We have
replaced the front-end with a nodejs app that runs React/redux, with the
magic isomorphic (I think the kids call universal these days) rendering on
the server that everyone wants, allowing it to work without js on the
client. I have not had much to do with the project but I have observed
higher levels of developer happiness and the website seems to be up so
thats two ticks in it's favour.

Tom

On Mon, Jun 13, 2016 at 10:20 AM, Jon Wood <jon at ninjagiraffes.co.uk> wrote:

> I think Javascript feels pretty bleeding edge all the time to me, simply
> because everything is in a constant state of flux. Maybe I just need to
> stop chasing the new shinyness, but whenever I start a new project with
> React I end up relearning half of what I did last time because its changed
> again.
>
> On Mon, 13 Jun 2016 at 10:14 Sleepyfox <sleepyfox at gmail.com> wrote:
>
>> Interesting - React (the newest of the frameworks) is already more
>> than 3 years old. Others (Angular, Ember et al) are much older. At my
>> current client they're using React with Rails, and don't consider that
>> at all 'new' let alone 'bleeding edge'.
>>
>> Modern work is moving to API+SPA, with the API in Ruby, Node or even
>> #serverless using Firebase or similar.
>>
>> Is the Ruby community really this behind?
>>
>> @sleepyfox
>>
>>
>> On 13 June 2016 at 10:04, Jon Wood <jon at ninjagiraffes.co.uk> wrote:
>> > I would say that it depends on the scale of your frontend at the
>> moment. If
>> > you're building a web app which can function with just some generated
>> HTML
>> > and the odd sprinkle of Javascript then jQuery is probably the way to
>> go as
>> > you get all the benefits of Rails' gem ecosystem and years of tooling to
>> > build HTML quickly.
>> >
>> > If you're building a rich application then you'll probably want the
>> extra
>> > structure provided by something like React or Ember, but you'll pay the
>> > price in initial bootstrapping of your application, and being somewhat
>> on
>> > the bleeding edge. You do get the advantage of a proper API backing
>> > everything though, which pays off rapidly as your application gets
>> larger.
>> >
>> > Finally, there's the option of having a REST API, and a Rails generated
>> > interface built on top of that. If you're web application is the only
>> API
>> > client then I'm not sure I'd recommend that approach. If you need an
>> API for
>> > other clients anyway then this can be a really nice way of working
>> because
>> > every feature you build for any client requires API endpoints which can
>> > quite dramatically reduce the overheads in supporting the feature for
>> other
>> > clients.
>> >
>> > On Mon, 13 Jun 2016 at 09:47 gvim <gvimrc at gmail.com> wrote:
>> >>
>> >> Is turblinks/jQuery still the dominant approach to front-end
>> development
>> >> in the Rails community or is there a shift towards Ember/Angular/React
>> >> backed by a Rails api?
>> >>
>> >> gvim
>> >>
>> >> _______________________________________________
>> >> Chat mailing list
>> >> Chat at lists.lrug.org
>> >> Archives: http://lists.lrug.org/pipermail/chat-lrug.org
>> >> Manage your subscription:
>> http://lists.lrug.org/options.cgi/chat-lrug.org
>> >> List info: http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>> >
>> >
>> > _______________________________________________
>> > Chat mailing list
>> > Chat at lists.lrug.org
>> > Archives: http://lists.lrug.org/pipermail/chat-lrug.org
>> > Manage your subscription:
>> http://lists.lrug.org/options.cgi/chat-lrug.org
>> > List info: http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>> >
>> _______________________________________________
>> Chat mailing list
>> Chat at lists.lrug.org
>> Archives: http://lists.lrug.org/pipermail/chat-lrug.org
>> Manage your subscription: http://lists.lrug.org/options.cgi/chat-lrug.org
>> List info: http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>>
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> Archives: http://lists.lrug.org/pipermail/chat-lrug.org
> Manage your subscription: http://lists.lrug.org/options.cgi/chat-lrug.org
> List info: http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
>


-- 
Tom Cartwright
tecartwright at gmail.com 07969 977300 Portfolio <http://www.tomcartwright.net> ·
GitHub <http://github.com/tomcartwrightuk> · LinkedIn
<https://www.linkedin.com/in/tomcartwrightuk>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20160613/ebb42f28/attachment-0002.html>


More information about the Chat mailing list