News for hackers. Stuff that matters.

demiazz

Re:Modern Front-end in Rails on Friday December 08, 2017 @06:42PM (#15883098)
We did not set a goal to teach well-experienced front-end developers how to organize their code. The well-experienced developer knows about many ways of code organization and can choose one for a project depending on the situation.
Re:Modern Front-end in Rails on Friday December 08, 2017 @06:37PM (#15883064)
Another case. My case.

My project started more than four years ago. It was a mainly content project around content creating and sharing, and of course SEO.

Facebook released React two month early than we started. Webpack has not yet created. Gulp is a bleeding edge. And we used sprockets, CoffeeScript and SASS.

It's is a massive project now. And it changed development vector for last year. We make a lot of changes, and we haven't resourced for rewriting them on separated front-end and back-end for now.

But described methodology allows us to keep this project maintainable. We migrated this approach from Sprockets to Gulp, and from Gulp to Webpack.

And we thought. What if we tell about how we maintain the project to beginners? They are writing jQuery-spaghetti code, and they may don't know frontend frameworks and Webpack.

Let's tell them how to write maintainable code with webpacker, components, BEM and our code organization. It's maybe a good starting point for them.

Re:Modern Front-end in Rails on Friday December 08, 2017 @06:08PM (#15882909)
Ok. Let's see from another side on this point.

If you are beginner Rails developer who doesn't know how to configure Webpack properly and doesn't know how to works with React/Vue/Ember?

And if your project must be a SEO-friendly? You don't know React, Webpack and doesn't know how to works with React/Vue SSR.

Maybe learning its tools will be an excellent investment if you want to be a front-end developer. But what if not?

We wrote this article mainly for beginners full stack developers. They are not well-experienced front-end developers.

Re:Modern Front-end in Rails on Friday December 08, 2017 @05:22PM (#15882596)
Of course! If you have human resource to separate and maintain backend and frontend - it's an excellent solution.

But it's article not for teams like this. The described solution for full-stack developers and small projects, which needs to be maintainable too. And component manner is a proper way to organize frontend code.