4 ms·
Rails has a problem most are aware of, When i started rails few yrs back, they said skinny controllers fat models, but in a few months our Models became 3000 li
by pankajdoharey 8y ago
Rails has a problem most are aware of, When i started rails few yrs back, they said skinny controllers fat models, but in a few months our Models became 3000 lines, so they said external loading libraries, then came concerns, then they took concern back because it doesnt work. Then another solution came in the form of gems, people thought lets make more gems we have tried so many different ways to do this. If that is not all there is a problem in rails that exist purely because of the way the framework works. The mass assignment problem, this problem literally doesnt exist in any other framework. What we do with this is a patch to restrict an action, but it really exist because of the nature of the framework. This is a code smell if your program due to its very nature creates problems that needs patching is probably not doing something right. In my opinion best is to go back to simpler ways of organising code. Rails is too much an abstraction that creates its own unique problems.
- meesterdude 8y ago> Clearly an easier way to start developing small crud apps is JS or (Your favourite transpiler for the front) + Firebase Are you being serious?
- k__ 8y agoI found getting into MVC stuff back in the days rather cumbersome and in 2009 many of my friends did internships as Rails devs, they went in hyped and came out disillusioned. It always occupied a strange niche between stuff like WordPress and SPA/PWAs (sinatra+front-end fw)
- meesterdude 8y agoLet me make sure I follow you: you think Rails, the top framework used by startups, occupies a "niche" between wordpress and SPA's; and you think sinatra + any JS frontend the bees knees?
- k__ 8y ago"the top framework used by startups" Wat?
- weego 8y agoSeriously though, the only problem firebase solves is the question "what infrastructure decision can I make right now that I will regret as soon as possible?" I'm being facetious but then I feel like this whole thing is a joke, so it's kind of fitting.
- meesterdude 8y agoI've known a lot of people get started quickly with firebase and then proceed to have to yank it out for the nonsense they run into. I also question the real value/merit of firebase.
- tbrock 8y agoHeroku did this properly imho. They are a perfect example of how one can provide hosting that actually is helpful and sophisticated where it needs to be but gets out of your way when you don’t need to care (for 99% of applications that don’t need to scale beyond a certain point). The people want postgres, give them Postgres.
- erokar 8y agoFirebase excels for real time/multiuser/shared data scenarios. It gives you things out of the box that are not trivial to implement from the ground up. You can also use something like Firestore if your backend is primarily a place to store data. Combined with e.g. Next.js you can develop quite quickly with it.
- sergiotapia 8y agoI actually noped out of a contract when the client wanted to bet his entire infrastructure on firebase. Data, documents, authentication etc. Now I'm not familiar with Firebase, but I am familiar enough to know when to bow out. Their company in for a wild ride.
- DJHenk 8y ago> MVC in rails breaks for larger apps. This. Rails is perfect for fast development of CRUD in MVC, but if you're building anything complicated, you need something that supports more options than MVC. People can laugh at PHP all they want, but a framework like Symfony runs circles around Rails. You can do both simple and complex in it. I haven't tried Hanami yet, but while the frameworks concept seems much more promising than Rails, it's community is much smaller. Still Rails is very populair, also here on Hackernews. Probably because the things we need to do in real life are actually not that complicated as we often make them out to be.
- meesterdude 8y ago> Symfony runs circles around Rails Ok Which circles, specifically, does Symfony run around Rails?
- wolco 8y agoSpeed, periformance, scaling. But rails can be more fun.
- canhascodez 8y agoProbably, the ability to dump arbitrary 3000-line classes into arbitrary directories. If you happened to start out working with Zend and then moved to Symfony, you might have strange ideas about how Rails is structurally too opinionated.
- radus 8y agoI've not used Rails, but I don't think that the idea that one can place an arbitrary file in an arbtrirary directory is strange at all.
- canhascodez 8y agoHow much of that do you think is a good thing? Zend was essentially an unstructured collection of arbitrary classes which were more-or-less interoperable. Class names needed to be globally unique, and namespaces didn't exist, and there were no conventions about where third-party code should go, or a very effective class registry, and dependency management often meant PEAR, which was like CPAN, but terrible. The idea of having arbitrary files in arbitrary places is something that any framework should be able to accommodate, but having some sort of well-defined folder structure is really quite necessary (in my opinion). It was not really the norm in Zend, and the tools and libraries and conventions and language are all much improved since then, but it's still possible to write ad-hoc-structured code using Symfony, and there are developers who prefer this.
- TomK32 8y agoThey all need a certain amount of knowledge to start.
- erokar 8y agoI actually don't think MVC (the way Rails implements it) is a very good fit for web development. A project shouldn't be divided by file types, but by features. Django does it a bit better. The way it's done with Pages apps in .NET Core 2 is also interesting.
- pankajdoharey 8y agoI take it back.
- matthewmacleod 8y agoYour karma is going down because you are snobbish, patronising and rude - not because you have a different opinion from others.
- deleted 8y ago[deleted]
- meesterdude 8y agoI downvoted you for talking babble that has little basis in reality. With that said, don't take downvotes on HN to heart. I get downvoted for the most innocent or earnest of comments. It's not signal. Comments are signal. In the end, It's up to you to decide if discussion or internet points matter more to you.
- stevebmark 8y agoI wish Rails developers would listen and understand real flaws in the ecosystem instead of downvote. I happily admit major flaws in all languages I prefer to work in. Skinny controllers and fat models are both solving problems that never needed to exist in the first place.