5 ms·
Angular is a frontend framework, Rails is a backend framework. Care to elaborate?
by bauerd 9y ago
Angular is a frontend framework, Rails is a backend framework. Care to elaborate?
- vectorpush 9y agoRails was designed at a time before angular brought the SPA into fashion. SPAs manage state and template rendering on the front-end, so much of the Rails machinery becomes unnecessary. You can still use Rails to implement your JSON API backend, but the simplicity of something like Sinatra is often preferable since you're increasing the complexity on the front. The node+react+webpack combo gave web devs the power to process application states and render the UI on the front-end and the back-end using the same code; a feat that is not possible at all with Rails pushing it a little further out of fashion. Of course, the SPA suffers plenty of criticism, and Rails is still a popular choice with and without an SPA on the front-end, but I think it's fair to say that Rails is no longer the "fun" way to do things (though the most fun doesn't mean the best business or engineering solution).
- jholman 9y agoI agree with all of the major points of your comment, but I have a quibble: > Rails was designed at a time before angular brought the SPA into fashion I dunno that Angular is the relevant point here. Rails (late 2005? I think?) post-dates the public existence of Gmail (public April 2004), a wildly popular SPA. It also post-dates the existence of Google Maps (early 2005). The famous blog post by Jesse James Garrett that coined the acronym "AJAX" is also from early 2005. The thing that Rails does well was already largely-obsolete before Rails was open-sourced. (Though that is one state-of-the-art buggy whip! Very impressive!)
- vectorpush 9y agoI absolutely agree that the SPA was already a thing before angular, in fact, angular was specifically designed to wrangle the general design concerns related to building SPAs and doing so sold the distinct concept of the SPA to many developers.
- hkjgkjy 9y agoThe difference between front and backend web applications is nothing more but where the views are rendered - which on client side also means managing state and IO. This means Rails and Angular are doing the same job - the main difference is where data keeping and rendering is done.
- bauerd 9y agoI disagree. For data persistence one still needs to talk to a backend. What sets Rails and Angular apart is not only view/template rendering.
- wwweston 9y agoBoth Angular and Rails talk to "a backend." In Angular's case it's (probably) an HTTP server handing over JSON representation of data. In Rails' case it might well be exactly the same thing, or it might well be a NoSQL database handing over JSON representations of data, or it might be an SQL database. You can certainly make distinctions between those data stores, but they have enough in common it's perfectly reasonable to say they're doing many of the same things. Now, Angular is considerably more horrible than Rails and tries to solve some additional front end problems badly, and its use is a likely indicator that the organization or individual that have decided to employ it aren't capable of making wise technical decisions, so I'd say it's also reasonable to make distinctions between the two on a number of levels. But there's considerable overlap in the kinds of problems they attempt to solve.
- dasil003 9y agoThe difference is Rails can handle both the front-end and backend of a typical web application, whereas Angular is just the front-end. Equating Rails data store backend to Angular's service backend is a poor analogy. The concepts and principles behind web browser client code, server-side application code, and data stores are 3 completely different engineering paradigms.
- wwweston 9y ago