6 ms·
I'm waiting for a framework that covers the whole stack and also makes it easy to make SPAs, if you wish. When that arrives I think it'll really take off. For
by erokar 8y ago
I'm waiting for a framework that covers the whole stack and also makes it easy to make SPAs, if you wish. When that arrives I think it'll really take off.
For a while Meteor seemed to be that framework, but for a number of reasons — performance issues, lack of support for SSR - it hasn't taken off. While it's often good practice to separate the API and the frontend, for solo developers or small startups that's often overkill and adds complexity.
- deleted 8y ago[deleted]
- andybak 8y agoOr - get 90% of the benefit of SPAs but leave your business logic where it belongs (on the server). PJAX/Turbolinks/Intercooler or something similarly lightweight is probably all most people need when they reach for full-fat front-end framework.
- erokar 8y agoYes, for personal projects I've moved away from SPAs to backend frameworks and as little JS as I can get away with. I admit I don't know how easy Turbolinks or PJAX are. A while back when i played around with Intercooler in Django it wasn't seamless.
- andrewmcwatters 8y agoTurbolinks and PJAX are really what a lot of folks wanted before the web development community at large was introduced to client-side routing through SPAs post-Knockout.js days.
- brianwawok 8y agoDjango plus DRF?
- erokar 8y agoDRF is nice, but what I'm looking for is something more radical where the frontend and the backend is more integrated. The way it's done now data structures are duplicated. Of course this has to do with how things are done with REST over HTTP. Meteor actually implemented their own websocket protocol -- it's ideas like that I'm looking for. Of course you risk making monoliths with this approach, but like I said I'm primarily looking for something that makes it easy for solo developers or small teams.
- amingilani 8y agoCorrect me if I'm wrong in understanding your wish but I believe the answer to your prayers is: rails! It ships with webpacker and can generate a scaffolded React, Vue, or whatever-you-want app.
- erokar 8y agoImo Rails is currently the fastets most conevenient framework to develop in because of its comprehensiveness and maturity. But what I'm looking for is something more radical [copying my comment below] where the frontend and the backend is more integrated. The way it's done now data structures are duplicated. Of course this has to do with how things are done with REST over HTTP. Meteor actually implemented their own websocket protocol -- it's ideas like that I'm looking for. Of course you risk making monoliths with this approach, but like I said I'm primarily looking for something that makes it easy for solo developers or small teams.
- websitescenes 8y agoI built a huge SPA application that is real-time connected by web sockets (Turbolinks which is included in Rails) with Rails. I did it in 3 months, alone. Hired our first engineer and we can tackle pretty much anything that comes up. I think Rails has worked incredibly well for a small team. The addition of webpacker allowed us to use React where it makes sense and Rails views everywhere else while Turbolinks holds it all together. Rails is the framework you describe.
- toasterlovin 8y agoYou don’t really duplicate that much between server and client. Yes, you have models on both. But the models do different things. Server is all about validation and querying a database to generate responses. Client side is all about user interaction.
- kayoone 8y agoMeteor kind of has this vision, but it's not that popular anymore
- brightball 8y agoYou might be interested to look at Drab in the Elixir / Phoenix ecosystem. It takes advantage of the lightning fast view layer of Phoenix as well as Phoenix Channels to manage everything. Approaching 1.0 it’s the most unique approach to the problem I’ve seen.
- codetrotter 8y agoThat is certainly interesting. We’ve all seen the video where the Erlang guys live update the code on a telephone switch without closing any of the calls that are on-going. Elixir runs on the Erlang VM. Does Drab support hot code reloading? Does it handle modifications of templates without breaking existing client sessions?
- brightball 8y agoThat’s a good question. I haven’t played with it enough to know, just been watching from a distance til it hits 1.0.
- dep_b 8y agoNot an expert on this matter but I'm pretty sure it doesn't mess with that particular base feature of the programming language / runtime.
- zinclozenge 8y agoDrab is a hex package, so asking if it supports hot code reloading isn't the right question. As to the second question, the answer is yes assuming your server side hot code didn't break the client session, and didn't introduce an API mismatch.
- k__ 8y agoI had the impression that time is in the past. With Node+NPM you basically can take what you need and leave these bloated things behind. But I have to admit, I've worked on many projects where devs build their own bloat with many small modules. I try really hard not to use too much third party stuff, but am happy that I can easily add them if needed.
- toasterlovin 8y agoThe whole Rails ethos is about admitting that your app isn’t really special and that what you’re doing is pretty similar to what everyone else is doing. So it’s better to decide on the best way to do things as a community so you don’t have to roll your own framework.
- k__ 8y agoSomehow I had different experience. 50% of Rails was solving what you said, but the rest got harder because of all the constraints.
- toasterlovin 8y agoFWIW, my experience is different. I spend almost no time in Rails doing anything other than implementing the business logic that is unique to my app. But I’m a go with the flow kind of a guy.
- thrownaway954 8y agoYou achieve the same thing with Rails and Turbolinks. Watch this presentation by Sam Stephenson to see what I mean. https://www.youtube.com/watch?v=SWEts0rlezA https://www.youtube.com/watch?v=SWEts0rlezA
- elbear 8y agoIt has a high learning curve and basic tooling support but servant + miso (Haskell) allow you to share code between back and front-end. https://github.com/FPtje/miso-isomorphic-example https://github.com/FPtje/miso-isomorphic-example
- wuschel 8y agoNever tried it out - but Ur/web [1] sounds interesting. [1] http://www.impredicative.com/ur/ http://www.impredicative.com/ur/
- sergiotapia 8y agoMeteor dropped the ball so hard, it's a net loss for the world! If only they had come out with routing baked into the project, and react baked in. They would have survived. None of this "we support 29 different routers but zero documentation on how to integrate it with meteor." Now it's dead, used only by legacy apps or tinkerers. No real mass use applications are being written with Meteor these days.
- erokar 8y agoI agree, it's a pitty, Meteor could have evolved to something very interesting.
- tootie 8y agoSpring Boot. It has monstrous enterprise horsepower, supports many deployment models, scales horizontally and vertically, easily configurable as REST or MVC with built-in views or both concurrently, can be bootstrapped in 30 minutes.