4 ms·
> For example - is it really "better" to say 7.even? rather > than isEven(7)? Yes. And that has nothing to do with rails, it's just the Ruby way. > Or is
by rimliu 8y ago
> For example - is it really "better" to say 7.even? rather
> than isEven(7)?
Yes. And that has nothing to do with rails, it's just the Ruby way.
> Or is the article's example of a data model migration
> really better than a series of alter table sql statements?
Yes. Migrations provide much more than just altering DB schema.
> And why not go for a pure SPA rather than an
> AJAX-sprinkled compromise
I would love more people to ask themselves "do I really need SPA?" actually.
- freehunter 8y ago>I would love more people to ask themselves "do I really need SPA?" actually. And I'd love if people asked "is anyone actually doing SPA" beyond what TurboLinks + a Vue frontend on a Rails backend would get you.
- chvid 8y agoMy point is rather if you are doing that (a hybrid app) wouldn’t doing a full spa actually be simpler? And allow you to use a less complex framework / a framework which doesn’t have to support that legacy.
- freehunter 8y agoYou're going to need to define a "full SPA". Every SPA needs a backend, and Rails is as good as any. In fact, Rails + Vue is, by any definition, a "full SPA" as Vue is a SPA front-end framework and SPA only refers to the front-end design. You can launch Rails in API-only mode so there is no "legacy" anything, just a backend framework that has all the benefits of Rails while still giving you the SPA front-end you're looking for. I wouldn't even call it a hybrid, nor would I say it's any more complex than anything else. Every SPA needs a backend, and Rails is as good as any.
- chvid 8y agoBy full spa i meant something where all ui is rendered on the client side and the server only serves static files and a set of web services for whatever business logic that has to run on the server.