3 ms·
I’m pretty sympathetic to this, as my experience with Spring has been “it’s convenient when it works, but awful to deal with when it’s not working”. However, I
by hyperpape 6y ago
I’m pretty sympathetic to this, as my experience with Spring has been “it’s convenient when it works, but awful to deal with when it’s not working”.
However, I think to push this line of thought, it would help if we had examples of how to build significant applications without a framework. Ideally someone could provide a walkthrough of an app like that. Unfortunately I can’t volunteer myself: the last time I built without a framework, it was a mess.
- jvanderbot 6y agoIf you're trying to build an entire app, you are not building a library. An app uses libraries and frameworks to stitch them together. A library brings functions, and a framework brings connectivity and logical flows. An app without a framework is an app with a hidden framework. An app without libraries is an app with a hidden framework and monolithic, catch-all, single-purpose library.
- hyperpape 6y agoSo then turn the question on its head. What are the examples of frameworks that should have been libraries? It’s not that I disagree with you, necessarily. I’m just trying to extract a more specific claim from this post.
- brundolf 6y agoI think you're right that people - even (especially?) those who use frameworks - should know how the sausage gets made. Though it's hard for me to address your specific wish since the answer varies widely depending on what kind of "app" we're talking about
- hyperpape 6y agoAny kind of app where you might reach for a framework. The point is to have a reasonable contrast between "here's how you do it with a framework, here's how you do it without one". I think size is important, as I can imagine that the benefits of a framework might show when there's more to do. Personally I'd think of a web app, since this is one place the discussion comes up a lot, but I don't know that's a requirement (I also think the idea that you can build command line tools out of a handful of libraries with no framework is pretty widely accepted).
- brundolf 6y agoIt has occurred to me in the past that frameworks are often just a way of publicizing a pattern, and that there could be room for something like "open source patterns" that people could reach for and implement themselves without getting locked into an actual dependency and loading a bunch of extra code. That sounds kind of like what you're suggesting.
- Orou 6y agoI'd love to see this as well. Web apps seem really tricky when it comes to not using frameworks though. You can use JQuery - it's tried and true - but it also seems to be on the way out. Great if you know it, but is it worth learning if you don't? I had the unfortunate experience of building a static site using Nuxt recently which included Jupyter Notebook exports as html files. I ran into so many problems that the complexities of the framework quickly overshadowed the conveniences. Makes me wish I tried doing everything in vanilla JS instead - I might at least have learned something transferable to other projects that way.
- BossingAround 6y ago> Great if you know it, but is it worth learning if you don't? The main thing with a lot of these small web libraries (I'd consider JQuery a library) is that they are incredibly easy to learn. You can be productive with JQuery within an afternoon. You can be productive with React within a weekend or two. These are not Java frameworks with Hibernate, XML configuration, database drivers, migration paths, etc etc. You pick one up, do what you need to do, and forget it within a week if you so desire. That said, if you use JQuery in 2020, with a new project, the vast majority of frontend devs I know would consider that a serious code smell (as in, you don't know JS and that's the reason you have to result to JQuery). Check [1] for some info about vanilla JS. [1] http://youmightnotneedjquery.com/ http://youmightnotneedjquery.com/
- jmchuster 6y agoI think Dropwizard is a great alternative to Spring. If you want to draw a spectrum between framework and "curated libraries + best practices", it's much closer to the latter. But then I guess that also depends on how much you consider the libraries it uses like guice and jndi to be "mini-frameworks". Ultimately, all that matters is how easy it makes your job, in both the best case and worst case scenarios, so I'll leave that to your own judgement as an engineer.
- garethjrowlands 6y agoDropwizard was amazing when it came out and is still much better than deploying to Tomcat, say. But it's showing its age and I'd consider it too frameworky these days. My current currently preference is http4k, which is more library and less framework. Admittedly, that's Kotlin and thus not a fair comparison, but then, newer things can take advantage of other newer things.