Rails 7.1 Released
121–130 of 245 posts
Re: Rails 7.1 Released
#122Earlier quoted context omitted.
I love the new hotwire stuff. What don’t you like about thd front-end?
Asset pipeline is a hot mess: https://fly.io/ruby-dispatch/making-sense-of-rails-assets/ Propshaft should bring sanity back to it, but its going to be a while before that's mainstream.
Re: Rails 7.1 Released
#123If you have time to answer - why would I upgrade?
Re: Rails 7.1 Released
#124Rails is great, and better than ever. I've spent most of my early years in the field working with Django and Laravel, then moved to frontend doing [all the usual stuff we do nowadays] and this year I was assigned back to a Rails + Hotwire project. I'm truly amazed how much simpler things are. I feel sad most of us have forgotten how easier things could be, and I'm terrified about new people joining this industry that…
Interesting to hear your comparison to Django and that you wouldn’t say they’re on par, at least for you, today. Any particular reasons for preferring Rails over Django?
The project structure of a Rails project is fixed and it's easy to jump into somebody's else project. The structure of a Django project is potentially pure anarchy, good luck with that.
That's mitigated by the lack of autoloading so you can learn the structure of the project by looking at the import statements at the top of the files. Unfortunately that means that you have to waste time by writing those imports. I hated that in Java even if the inevitable Java IDE added them for me.
The ORMs are more or less equivalent. I have a dislike for having to actually type the default scope (not the Django term) in Django as in
Model.objects.filter(...)
when Rails lets me type Model.where(...)
The real time waster is the templating language which in Rails is basically Ruby and in Django is not Python. It's something else much less powerful so you have to either prepare all the data in the controller (which is called a view in Django) exactly as they'll be displayed in the page, or write a templatetag and use it to transform the data inside the page. That loses an unbelievable amount of time. If I count the cumulative hours, days, weeks spent at writing templatetags instead of a couple of Python statements I don't know whether to thank Django developers for the easy money or to roll my eyes because that time is useless.To recap, Django wastes developer time. It's death by a thousand cuts. I'll never use it for one of my personal free time projects.
Edit: don't be too smart in Rails, that is don't build too much magic and waste the time of the next developer into a quest for finding where something really happens. Write straightforward code and if some method name is created automatically, put a comment hinting at the source.
Re: Rails 7.1 Released
#125Earlier quoted context omitted.
I'd like to throw in Phoenix LiveView here. Rails wins every battle for initial development speed, as the conventions are so thorough and well thought out that nothing even remotely comes close. Laravel is creeping in, but it's not there yet IMO. LiveView however, scales better (in every sense of the word). It also comes with batteries included (auth, database access, jobs, mailer, complete testing kit etc), little-t…
Other than learning for fun. Is there enough of a benefit to learning Elixir if you would already consider yourself an expert at PHP/Laravel and JS/Vue ? At a glance it's hard to see the value or believe that it has the same longevity or $$$ value.
In terms of $$$ value, it is extremely efficient --including all the "alien" stuff, and that's why it's so cool. An Elixir team will generally create things cheaper to build and operate.
Now, the question is how many Elixir shops you are going to find a job with, but the answer to that depends on the type of career trajectory you are choosing. For example, Rails is not an industry standard by any means if you think in terms of classic IT consulting jobs but has a stronger dev mindshare in startups, so there you go.
Re: Rails 7.1 Released
#126Don't beat me, but still on rails 4.2 and happy... Gives me everything I need for no/low JS backend SaaS stuff I do for my self and B2B companies, running on low end VPSs... If you have time to answer - why would I upgrade?
The main thing with older versions is vulnerabilities in associated gems, e.g. nokogiri which you can't upgrade without a major rails upgrade. However most apps don't do fancy XML parsing for example so most vulns are not applicable. So there is a bit of maintaining to ensure things are safe. Often you might add in a monkey patch to cover a bug.
Upgrading therefore makes it more secure and lowers maintenance time. However there's the cost of the non stop upgrades to factor in. Another factor might be faster Ruby support in newer versions.
(Generally when I make a rails app I use the latest release but I don't upgrade the rails version afterwards unless it's popular or the app is very old and stuff doesn't work on newer systems)
Re: Rails 7.1 Released
#127Earlier quoted context omitted.
But why? So many more performant frameworks for this in strongly typed languages to boot.
The performance of Rails serializers is still a nightmare. God awful performance.
Re: Rails 7.1 Released
#128Don't beat me, but still on rails 4.2 and happy... Gives me everything I need for no/low JS backend SaaS stuff I do for my self and B2B companies, running on low end VPSs... If you have time to answer - why would I upgrade?
Re: Rails 7.1 Released
#129Earlier quoted context omitted.
Interesting to hear your comparison to Django and that you wouldn’t say they’re on par, at least for you, today. Any particular reasons for preferring Rails over Django?
I'm using both on two different customers. I have a preference for Rails. The project structure of a Rails project is fixed and it's easy to jump into somebody's else project. The structure of a Django project is potentially pure anarchy, good luck with that. That's mitigated by the lack of autoloading so you can learn the structure of the project by looking at the import statements at the top of the files. Unfortuna…
Re: Rails 7.1 Released
#130Earlier quoted context omitted.
Other than learning for fun. Is there enough of a benefit to learning Elixir if you would already consider yourself an expert at PHP/Laravel and JS/Vue ? At a glance it's hard to see the value or believe that it has the same longevity or $$$ value.
Elixir is like an alien shiny flying soucer. It can do all types of technical marvels with a simplicity that is not possible without disfiguring more traditional frameworks. So I'd say having a cursory glance at it is a must. In terms of $$$ value, it is extremely efficient --including all the "alien" stuff, and that's why it's so cool. An Elixir team will generally create things cheaper to build and operate. Now, th…
Personally, I'm comfortable betting my career on Elixir at the moment. It's too goddamn good to remain a niche language - I expect it to get a lot bigger in the years ahead as more companies and devs fall in love with it. It'll happen slowly, and it's never going to reach the level of saturation that that, say, Javascript has, but I think it has a bright future.
Phoenix and LiveView are a joy to work with, much more so than any previous technology I've used. I haven't yet looked at any of the exciting new ML stuff that's happening in the Elixir world (Nx etc.) but hopefully they'll drive adoption too. I'm never going back to my old ways.