28 ms·
Using a framework will harm the maintenance of your software
- WantonQuantum 4y agoBefore you comment with "So you want us to write everything ourselves?", make sure you read the paragraph that starts with "Many people will argue that not using a framework means write everything yourself. This is a false dichotomy."
- akprasad 4y agoIndeed. This excerpt from that paragraph is a good thesis for the essay as a whole: > The point is not to never use frameworks, but to isolate them. To call them from a single place. One that we own. That we are responsible for and that we limit very much in what it can touch.
- OJFord 4y agoI think an easy example of that is what frustrates me the most in JS-land: everything has it's own CLI. Why? Quick start: `npm run nouveau-framework create@app 365 --with-voodoo`. I don't want that. I want (maybe, at my discretion!) to add your framework as a dependency, read some API docs, and just start plugging it in where necessary. But they all focus on greenfield projects, they all think the whole project is about/driven by them.
- wjdp 4y agoThis does frustrate! On more than one occasion I've spun up a create-x-app project just to see what an implementation looks like to then do it manually inside an existing project. Then again when I'm greenfielding having the option to be up and running in 2 minutes is rather nice.
- arinlen 4y ago> > The point is not to never use frameworks, but to isolate them. To call them from a single place. One that we own. That we are responsible for and that we limit very much in what it can touch. I had the misfortune of working on a project which abstracted a framework. It was awful. It ended up being an ad-hoc component that was half-façade, half-adapter that was inadvertently tightly-coupled with the framework. It added an awful lot of complexity with the only tradeoff being theoretically being able to abstract away the underlying framework. It was not worth it. It created far more problems than those that it solved.
- LAC-Tech 4y agoI feel like this response is common enough that it's almost a trope. "Oh you don't like leaky abstraction X, so what we should all code in binary!?" I think it comes from a kind of "Just World" spin off whereby all abstractions are considered pretty much equal, and it's cavalier to not code to the "highest" of these, no matter how many rickety chairs you've piled on top of each other to get that high. Not all abstractions are created equal. As an example, choosing to use vanilla JS over react is not the same as hand-coding assembly instead of using C, Zig or Rust.
- akiselev 4y ago> Not all abstractions are created equal. I'd go so far as to extend the statistics aphorism about models to software abstractions: all abstractions are wrong (/leaky?), but some are useful for now. The problem with software abstractions is that they, unlike the fundamental laws of physics, model code organization and business logic that frequently changes. These changes often make no sense beyond "VP lifer thought it was a good idea" so our house of cards is built on ever shifting sands. No abstraction short of a pointer can survive that.
- LAC-Tech 4y agoNo I get that all abstractions leak on some level. But some leak a lot more than others. And as an industry we don't seem to have good mental models or languages around that. More than once I've seen using the abstraction + working around the leaks being more complex than just using the the thing underneath the abstraction. I have no pithy phrase to describe that scenario, without the "why don't we just code in binary" retort.
- randomsearch 4y agoIf your argument is that using someone else’s abstractions is bad because you can write your own (which is what this article is saying), then the standard cliched reply is accurate. Cliches are cliches for a reason.
- josephcsible 4y agoThe capital F in "Framework" everywhere made me expect at first that this had something to do with the eponymous brand of laptop.
- flobosg 4y agoThis article is about software frameworks, by the way. The capitalization made me think it was about the Framework laptop.
- emptyparadise 4y agoNow I'm curious what sort of argument could be made about not using the Framework laptop.
- vulcan01 4y agoEasy to upgrade, so developers keep testing on the latest hardware and forget about older devices? Not sure how well this fits with the title.
- ar_lan 4y agoI thought the same exact thing, and had entered the article with a significant bias against the author based on the headline.
- mhink 4y agoThe entire article uses some very odd grammatical conventions. The author is from the Netherlands, which I think might account for some of the oddness, but I can't tell if the capitalization is because of that or just because of the desire to be quirky.
- Qwertious 4y agoI didn't enter with a bias, I was just thinking "LOL, how are they going to justify this, this is gonna be good." And then they had to be something completely different and yet completely justified. Darn.
- idealmedtech 4y agoOne reading which might be valid is that testing on hardware that lives in the happy path will lead you to think your code has less issues than it actually has on real user systems.
- cgh 4y agoFrom the author’s About page: “I mostly work with Ruby on Rails. A professional, Open Source platform which powers enormous (e.g. Twitter.com) and tiny applications.”
- LAC-Tech 4y agoIs your implication here that he's a hypocrite, or that he knows what he's talking about from experience?
- shadowgovt 4y agoBased on my own experience with Ruby on Rails, I'm ill-convinced that Rails experience gives you a good understanding of frameworks in general. It can give you a solid respect for the dangers of letting a framework grow far beyond a simple focus.
- djbusby 4y agoWait, Twitter is still RoR?
- kayodelycaon 4y agoNo. They haven’t been for a very long time. ~2008, iirc.
- Gigachad 4y agoRails really does not scale. In performance or development. It’s still a great option for small sites though.
- kayodelycaon 4y agoDone Rails my entire career. It scales more than you think if you’re willing to throw some hardware at it and avoid turning your controllers and models into logic layer soup. What kills scaling is inexperienced developers doing what I just mentioned. Also, ActiveRecord is not your friend at scale. It’s wonderful in small amounts, but callbacks and memory overhead will kill you. You really need to learn SQL to avoid doing select * on seven tables. Also, view partials. The lookup cost on those is pretty high.
- jvalencia 4y agoNo problem is new. You could use a facade pattern to decouple your framework. Though the extra step is often too tedious for most developers.
- chrismeller 4y ago> The more isolation, the better maintainable. I think sums up the entire thing. Nothing will necessarily harm anything, but… If you make sure your framework and your app logic are sufficiently isolated then everyone is happy.
- jmathai 4y agoThe post is promoting building applications in a loosely coupled but highly cohesive manner. It mentions using libraries when appropriate and not duplicating code. I agree with this but it requires a lead who's good at architecting such a codebase. That person also needs to stay with the company for a long time because they're essentially replacing the "framework" with bespoke human logic. I think many, maybe most, companies that try to build loosely coupled and highly cohesive code bases end up failing and it ends up being a mess. Frameworks aren't perfect. But know what's less perfect? Humans. The really big frameworks try and take the human component out and replace it with codified conventions.
- convolvatron 4y agobecause you are flawed, you should just give up on actually owning your software
- arinlen 4y ago> I think many, maybe most, companies that try to build loosely coupled and highly cohesive code bases end up failing and it ends up being a mess. Companies who try to build any type of codebase end up with a mess. Always. No exception. There is no reason to pretend software development's natural tendency to increase entropy is exclusive to a specific type of software architecture. In fact, some developers even go to the extent of criticising software architects for existing, because they have "rules" and enforce "order" and "organization". If anything, being mindful of a specific architecture goes already a long way to fight entropy.
- meesterdude 4y ago> Companies who try to build any type of codebase end up with a mess. Always. No exception. I love how demonstratively wrong this is
- Ma8ee 4y agoI would love to see some demonstration of how wrong this is.
- woranl 4y agoFrameworks come and go. What is trendy today will be deemed obsolete a few years later. By the time when the community no longer interested in said framework, it will feel like the rug got pulled leaving many projects stranded.
- hocuspocus 4y ago13 years into my professional career I'm still seeing Spring everywhere.
- jamesfinlayson 4y agoAgreed - I think most programming language communities have settled on one major framework (though there are plenty of other smaller ones) and they've survived. Spring: June 2003 Rails: August 2004 Django: July 2005 Symfony: October 2005
- woranl 4y agoMany don’t survive. You mentioned Symfony, Zend used to be equally popular. Not many people use it now.
- jamesfinlayson 4y agoOh I agree - 15 years ago picking a web framework would have been much more difficult - for web frameworks now though I think that using the most popular choice should be quite safe.
- kgeist 4y agoSymfony is actually more like several different frameworks under the same name. Some of our projects are stuck with Symfony 1 and upgrading them to the latest version is aking to switching the frameworks because they have almost nothing in common.
- oreally 4y agoLikely lockins. Spring is bloated as hell, last I tried it took full minutes to startup a server on default settings. This kills iteration speeds for fresh projects.
- OJFord 4y agoIt matches TFA, but I think 'Framework' in that capitalisation (incorrectly) implies it's about Framework (https://frame.work https://frame.work) the company. I think quotes - 'framework' - would be better, both here and in the OP; we can fix one of those.
- a4isms 4y agoI'm so old, I thought of the productivity suite from the 1980s: https://en.wikipedia.org/wiki/Framework_(office_suite) https://en.wikipedia.org/wiki/Framework_(office_suite) I still think about that suite, because it had a certain kind of elegance: Everything was frame, and therefore text documents and spreadsheets were frames, and you could embed a frame in a document, which correctly implies you could put a spreadsheet in a text document. But the cells in a spreadsheet were frames, and therefore you could make a hierarchal spreadsheet, or put a text document in a spreadsheet's cells, and so on. It had a "frames all the way down" philosophy that appealed to me, although the implementation was hobbled by the (to us) obvious limitations of the technology of its time. From the wikipedia link: The spreadsheet program was superior in its day, offering true 3D capability, where spreadsheets could form an outline which can be "opened" to reveal a separate spreadsheet, as well as other frame types — a feat of sheer convenient function never again seen and further enhanced in later versions. Framework's built-in interpreter, the FRED (Frame Editor) computer language, was based on Lisp eval function. It can reference all frames and types across the product and can sense and perform all user interface operations.
- heavyset_go 4y ago
- draw_down 4y ago
- epgui 4y agoAm I the only one who thinks this is really hard to read?
- berkes 4y agoIn what sense? The design or contrast? Or the language used? English isn't my first language, so I can imagine I could do better (I'm the author btw). If it's the design: I really need to tweak it a little further, but rather spend that time writing content than tweaking the blog itself :D
- epgui 4y agoThe grammar! Do you use something like Grammarly when writing? I must say that anyone writing in a second language deserves high respect. English is my second language as well, so I know the struggle... Keep it up! You have good content here.
- berkes 4y agoI'd never heard of grammarly, but like it's idea, will certainly check it out. I'm just using spellcheck in Vim. Thanks for the kind words, though!
- a4isms 4y ago1. Every sufficiently complex framework-free application contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of a framework. 2. If you have a talented team, that half of a framework can be much better than using a one-size-fits-all framework that is popular because it used to be lean and mean with a small surface area, but has grown over time to do everything for everyone, becoming a complex monster. 3. If you have a small team that hires slowly, it's relatively straightforward to bring new devs up to speed on "the way we do things." if you are hiring rapidly and/or have a large team, the more bespoke things you have, the harder it is to maintain them. 4. Over time, everything degrades. In the long run, many framework-free applications either get walled off as "legacy" apps with new work done in separate services, or replaced outright. If it makes you money before that happens, you win. It is not necessary to try to design architecture that will last for centuries. 5. My last and--to me the most significant--observation is this: You want to pay the majority of your attention to the code that has the greatest impact on your desired outcomes. Using libraries and frameworks is like a business outsourcing things that aren't its core competency and also aren't competitive differentiators. Most software shops do not win by having their own framework or by not having a framework, they win by using something bog-standard and saving their attention for the part of their code that "moves the needle." But that's only "most," and your business may be one of the few.
- tomcam 4y agoAgree completely. I’d like to add a couple of things. 6. Frameworks often handle the last 20% of a project that no one wants to do, such as handling compatibility or accessibility issues. 7. There’s a good chance that the framework has already had to deal with edge cases that you would otherwise learn the hard way
- forgotmypw17 4y agoMy experience is the exact opposite. Frameworks have a very narrow compatibility and accessibility range, and to get the other (often more than) 20% requires extra hackery which has to be bolted onto the framework in ways that were not foreseen by the framework writers.
- ZikPhil 4y agoI think his website could use a framework and some off-the-shelf templates to make it easier to read :)
- junon 4y agoDiscrediting the article with blanket statements and criticizing the format of the site are both against HN guidelines which you can review at the bottom of this page.
- meesterdude 4y agononsense. This is relevant to the authors thesis: If frameworks are bad and everything should be done manually or in a decoupled way - the quality of the work product of the author, should be subject to discussion. Are they hand weaving beautiful prose? or deluding themselves that they can do a better job? I find it highlights a key discrepancy: if the author had relied on a framework for this, the quality could be far greater at less effort.
- chris_wot 4y agoSeems on point to me.
- knodi 4y agoWithout a framework whats the alternative? Roll your own everything...?
- kazinator 4y ago> a software framework is an abstraction in which software, providing generic functionality, can be selectively changed by additional user-written code, thus providing application-specific software. [..] Frameworks have key distinguishing features that separate them from normal libraries: You mean, whereas you call a library; a framework calls you? :)
- tabtab 4y agoWe wouldn't need bloated convoluted web & JavaScript frameworks if we had a state-ful GUI markup standard. Then any language that can emit and read XML can use the GUI kit/browser/component, no binders needed. At least in the domain of custom business and administrative CRUD, the end users really want a web-enabled GUI application, as most work is still done on desktops. ("Desktop first" works better for typical biz than "mobile first".) Somebody criticized the idea saying that one would end up writing their own wrappers for such a language, but that's not a problem: one would customize a sub-interface for their own shop's needs and conventions. That's not a bad thing. But if we had a decent state-ful GUI markup standard, such wrappers would be lite, more about managing domain patterns & defaults than reinventing a GUI engine and common GUI widgets from scratch. Here's a partial list of GUI widgets & idioms that DOM lacks or does half-ass: https://www.reddit.com/r/programming/comments/otixwo/comment/h6zi86w/ https://www.reddit.com/r/programming/comments/otixwo/comment...
- lmm 4y ago> Many frameworks aren't as extreme as Rails with its public interface of over 1200 methods. But all offer an API, functions, classes, to be used by the user of the framework: it's the whole point of the framework to offer this! Some frameworks make the effort to make a clear distinction between which methods you can extend, which you can call, and which are framework-internal. The only one I've seen that really did this properly is Wicket, but it absolutely does work: you can fearlessly upgrade even a major version. (Of course the cost is you sometimes find yourself cursing because the method you wanted to override is final, so instead you have to copy-paste it and accept the maintenance burden belongs to you now - but you're doing so explicitly in that case). > The more isolation, the better maintainable. The code that handles e.g. token authentication should not be written by us, but be included in a single, well contained, bounded area. One that encapsulates this and translates it into domain language, preferably. E.g. behind a authentication.is_known_as_admin(request.token) rather than sprinkled throughout our controllers, commandline-interfaces, scripts, or async jobs. This sounds superficially like good advice, but it's practically impossible in a language without monads, and often ends up as the "inner-platform effect" - sure, you've put a wrapper around the library, but reimplementing your wrapper to switch out that library is no easier than reimplementing your first library's API directly on second library. In my experience you're better off YOLOing it most of the time. If you ever do need to remove or replace a dependency, you can do the work then rather than front-loading it, and it's actually pretty easy - delete the dependency, fix the compilation errors, and you're done.
- TillE 4y agoThis is like saying game engines can be clunky and get in your way (absolutely true), therefore you should just glue a bunch of libraries together. In practice, that almost never works out well. You want to carefully pick the right tools for the job, but those tools will be enormously helpful when dealing with any kind of complex task, even if you can recite a litany of annoyances. Of course if you don't have a complex task at hand, go nuts, find a sleek solution that truly fits your needs.
- baobabKoodaa 4y agoYour point works better in game dev than it does in web dev.
- quantum_state 4y agoIt’s not even wrong …
- peterdunn1 4y ago
- deleted 4y ago[deleted]
- tracerbulletx 4y agoI'm glad I started my professional career working on a large Django app, I think learning about its abstractions and organization gave me a really good starting point in building my mental model of all the problems sufficiently complex web applications end up having to solve. Now I often find I prefer, or am in a situation where the companies architecture dictates writing projects and services with much simpler dependency graphs, I've also found the prospect of deploying web applications with python a lot less appealing, but there are many reasons the opinionated all-in frameworks like Django and Rails were and are awesome.
- forgotmypw17 4y agoHave to agree. Just the framework itself usually requires maintenance, unless the developer prioritizes backwards compatibility, which is rarely the case.
- zinckiwi 4y agoSure. But not using a framework will harm the maintenance of your software more.
- platz 4y agoHe likes to generalize the kinds of problems he has with Rails and Rails-like frameworks to all frameworks. This seems impertinent, since Rails-style frameworks are a particular style/flavor of framework, those of which I'm sure experience the problems he describes, but more generally? I'm not so sure about that.
- bayesian_horse 4y agoWhat even is a framework-free web application? Do you have to write the HTTP server yourself?
- baobabKoodaa 4y agoThe author started their post by defining what they mean by "framework" and it's pretty clear that your snark "do you have to write the HTTP server yourself" is way off from that definition. Also, if you don't have any experience with framework-free web applications - to the point where you can't imagine how one might exist - perhaps it would be a good idea to familiarize yourself with one? Yes, they exist. I've written several.
- bayesian_horse 4y agoI don't accept the distinction between frameworks and libraries. Once past the most trivial stages, any codebase uses frameworks, often multiple of them. But they aren't all published or named as such. Often you create them yourself. I have myself written lots of things that work like a framework. Inversion of control is a powerful pattern. There really is no clear cut difference between a library and a framework. All depends on the mental model what you call what.
- baobabKoodaa 4y agoFor a discussion that began with a clear definition of "what is a framework", you sure are spending a lot of effort muddying the waters. I for one strongly disagree with you on the idea that coders "accidentally" create frameworks, just like one might accidentally slip on a banana peel. I have written several codebases that have NOTHING resembling a framework in them.
- oblib 4y agoI decided not to use a framework. I spent about a month going over the "TodoMVC.com" demos with the intent to choose one but after a few weeks of pondering which one I concluded I didn't want to invest in any of them. jQuery and Mustache.js do a lot and are easy to use. CouchDB and PouchDB are too and that gave me user authentication, a powerful server side DB, and offline-first/local-first features. I've never regretted those decisions but I had no investment in SQL DBs. Over the years since I've seen other's who've did struggle with CouchDB and I get that. I came from using CGI.pm's "Save" and "Get" functions and CouchDB/PouchDB.js are similar in how you use them, but way better.
- matthewwolfe 4y agoWow a lot of those Todo MVC codebases are very out of date
- WA 4y ago> CouchDB and PouchDB are too and that gave me user authentication, a powerful server side DB, and offline-first/local-first features I use CouchDB / PouchDB as well, but I'm curious about user authentication: I had to implement a wrapper around it (in Node), because CouchDB auth is extremely limited. For example, I want users to sign up by email + password (not username) and I want them to be able to change their username. CouchDB itself basically has no concept of that. You make a user with a name and that's it. Can't change it without additional code. How did you solve this?
- rglover 4y agoUnless the framework you're using treats maintainability as a feature [1], not an afterthought. This is really just a long argument against bad framework design (which is fair), not frameworks. [1] https://github.com/cheatcode/joystick#what-distinguishes-joystick-from-other-frameworks https://github.com/cheatcode/joystick#what-distinguishes-joy...
- SevenNation 4y ago> Many people will argue that not using a framework means write everything yourself. This is a false dichotomy. We can use libraries and frameworks just fine. ... > But we should give them a clear, and well-isolated place in our project. ... There's an excellent, if older, presentation called "Architecture, the Lost Years" that addresses exactly this problem and gives very specific, actionable guidance on how to solve it: https://www.youtube.com/watch?v=WpkDN78P884 https://www.youtube.com/watch?v=WpkDN78P884 But how to pull off this decoupling? The answer is both obvious and surprising. Define a boundary. On one side is the framework. On the other side is your code. Through the boundary, only dumb data structure can pass. JSON works. So do structs. So does XML. The point is that these are behaviorless blobs of data. This buys you a lot. You can run your application completely detached from the network, a database, and other expensive dependencies. So testing becomes much simpler and easier. And of course, you can replace the framework by writing new boundary code. The other big lesson has something to do with why frameworks get added to a project in the first place. When designing a system, the goal should be to defer major decisions for a long as possible. That's when the best information is available. Sometimes you can just defer until the point becomes moot, which is a major win. Reaching for a framework before being forced to do so sets up the kind of situation the author is talking about.
- googlryas 4y agoIsn't the problem here that your decouple framework requires data X,Y, and Z in the message across the boundary, so you plumb that data through right near boundary where the request is made. But later on, you want to switch out a different framework, but that framework requires U, V, W, X, f(y), and Z. So even on your apps side of the boundary layer, you still formatted your code and data flow to support the single framework you started with.
- fuzzy2 4y agoIf your message contains framework-dependent data, it wasn’t decoupled. For example, in a typical web API, all the stuff concerning HTTP endpoints, JSON, OpenID Connect or whatever should be entirely separate from your domain logic. I’ve been doing this for years and it is very feasible. Do you still have to write code where the framework dictates its structure? Absolutely. That’s the decoupling layer. Do you have to change this layer if you upgrade or switch frameworks? Also yes. However, you don’t have to touch the application core.
- phendrenad2 4y agoI strongly caution solo developers away from using a backend framework. A frontend framework is necessary for modern web development. Every HN startup should be going as minimal as possible. Once you have 2 or more developers, you'll need to adopt a framework for new work (Rails, Django, etc.). Once you have 20 or more developers, you'll have more frameworks than you can count. And that's ideal.
- jcelerier 4y agoI absolutely disagree. I use Qt for most of my GUI C++ apps, it is very framework-y and a joy to get things done with. Since last year I've been working on a framework for making media processors (audio, etc): https://github.com/celtera/avendish https://github.com/celtera/avendish Every year I have 2/3 internship students. This year I put them on this framework as a baseline, compared to the previous years where the students would have to do things more manually through libraries. They all got at least 5 times as much done as the students of the previous years in the same 3-4 months span of time.
- tbrownaw 4y agoSo, frameworks are bad, unless you follow standard advice about loose coupling? I'd think most things would be bad if you failed to follow that advice about them, and the frameworks I'm most familiar with (aspnet core, ef core) seem to be pretty good about making it easy to follow.
- Qwertious 4y agoNo, the article is saying "frameworks are bad, unless you follow nonstandard advice about loose coupling.
- throwaway0asd 4y ago
- bayesian_horse 4y agoThat sounds like a ton of toxic bs.
- lucasyvas 4y agoI think this comment went off the rails a bit, but the framework people you are describing do exist. I don't think it's a majority, but I've encountered them. A case was Celery, where despite countless other options for async tasks - we must use Celery because that's what the framework says. It was a bad fit as well. I do stress that I do not lump all framework proponents in this bucket though - that seems like an overgeneralization.
- imoverclocked 4y ago> Companies that have, "A team that defines the standards, processes, practices, frameworks or architectures that other teams must follow," are amongst the lowest performers. Reversed: companies that lack this, amongst the high performers. (formatting edited) 1) I'd like to see real data behind this claim. (feels very anecdata and I have reversely correlated anecdata) 2) Companies that have large codebases or large developer populations and don't have any of these things are often headed for disaster.
- tbrownaw 4y agoThat's from the state of DevOps surveys. Those aren't causal and define performance oddly. I'd speculate that companies that benefit from that sort of standardization probably don't care about blindly maximizing deploys/day (maybe nightly plus emergencies is enough) or minimizing time from coding started to deployment finished (maybe a better starting point is when the request is first made, or maybe they're optimizing for development throughout instead).
- sodapopcan 4y agoWhile I don't necessarily agree with most of this article, it's very good. It really just illustrates why so many people get jaded with tech. I believe you can absolutely build your own well-documented framework and be successful, but ultimately some little sh*t is probably going to come in either say, "Why aren't we using React? Let's rewrite in React!" or "I don't like how this is done so I'm just going to redo it some other way I like in this one place." From here you have your camp of people who say, "Just don't let that happen!" and then your other camp of people who say, "I need to hire people, and nobody wants our custom stuff on their resume so let's just use TodaysFlavour.js so we can hire whoever and make the investors happy". And that's, like, two scenarios of many. I guess all I'm saying is that it's really hard to find value from articles like this one when the surface area of the context is pretty much unimaginably wide. I like frameworks and two of my professional anecdotes are: I once worked for a company with an absolutely horrid culture yet their codebase was rails done "the rails way (tm)" and it was great! I got my bearings immediately and pretty much had no questions about where anything was (which was good because I didn't want to talk to my coworkers... don't worry, I didn't stay there long). I also worked at a much better company where one or two people were hell-bent on coming up with their own ideas while everyone else mostly didn't care and just wanted to get the work done. This is well-and-good but these people had already decided a previous defined way of doing things was no good so they changed that, and when they leave, I can bet that whoever replaces them will decide that their well-documented way of doing things was no good. I wish people would just follow the framework unless it doesn't make sense to (which you only actually know after you've tried to do it the framework's way). Well, I've written way too much already for a comment... But I'll add that I think the biggest thing this article misses is its points around "speed of development". Speed of development is always important in the beginning. Once the idea has been proven to work market fit, then the generators this article talks about are no longer important. Anyway ya, Imma shut up now. Overall, good article. I'm going to read it again tomorrow as I'm sure I missed a lot.
- quickthrower2 4y agotl;dr: NIH
- Qwertious 4y agotldr: "libraries > frameworks"
- Joel_Mckay 4y ago"Frameworks are designed to take your project hostage" Wow, that is some enterprise level FUD, and with zero citations to back up that assertion. While one could possibly see 3rd party external dependencies pose a variable cost, service risk, or security issue... a standalone/maintainable site should not have 25 domains for every lame js widget a designer thought looked cool. Those who do not use a good framework, are simply doomed to rewrite a buggier implementation. https://www.youtube.com/watch?v=wvVPdyYeaQU https://www.youtube.com/watch?v=wvVPdyYeaQU
- smeagull 4y agoYou don't need a framework. You can control execution and use libraries. Once you use a framework changing back is hard. Removing a library on the other hand is easy. Because for libraries you control execution, and for frameworks you have to fuck your code so it will obey the requirements of that framework.
- Joel_Mckay 4y agoEasier still, Spiral-development doesn't have to plan anything except the next feature... works right up to the point it implodes. Thank you, I will see myself out... ;)
- oriolid 4y agoDid you mean Agile?
- Joel_Mckay 4y agoDepends how much you hate a project, but one could go full polyglot for each team member... =)
- mmis1000 4y agoIf library is deprecated. You replace the library. If framework is deprecated. You give up the project or rewrite 'everything' to use another framework because essentially your project is build on it. That's the difference. If you make abstract to make it suitable to port to another framework. Then you are writing yet another framework on the top of a framework. In my opinion, it's even worse.
- meesterdude 4y agoTo put it simply, this reflects an amateur understanding of frameworks. I know where the author is coming from, because I've been there/done that/tried that. It sounds nice on paper, but experience has shown that this is a poor way to approach software development. I see this kind of mindset with developers who think only about code, and not about solving problems at scale with other people.
- jonwinstanley 4y agoTotally agree. Hiring is the big one for me. As a business owner, you need to be able to easily find new developers to slot into your team who can get up to speed quickly. This is much more easily done when your app is something like Rails, Django or Laravel.
- fullstackchris 4y agoDon't you want the engineers who are language agnostic, and have seen many a many framework and can quickly learn any quirks from your existing team?
- twobitshifter 4y agoMaintainability is how long it takes you to solve a problem. If the reliability of the framework exceeds that of code you could write then we're limiting the overall scope that must be maintained to begin with. Now on to what issues look like with frameworks, if you use the framework as designed, the code should follow convention - convention improves maintainability. If your framework can't do what's asked, it's been misapplied and another tool is needed. Using a tool improperly is terrible for maintenance
- Alacart 4y agoThis pretty much sums it up. Narrowing the scope of maintenance is a big deal. Once I'm confident in the quality of a framework, the next question is how likely and how often am I going to need to use escape hatches for this project now and in the medium term. If I expect too many (or too difficult) escape hatches, it's the wrong tool. If I can't find a framework that I'm reasonably confident in that way, only then would I go without. If so, whatever I come up with is by default a framework. It's just probably not going to be as good as an open source one.
- plaguepilled 4y agoCitation needed: the blogpost. Less FUD on HN please and thanks.
- langsoul-com 4y agoEven though he has a point about harming future maintenance and how the framework has no obligation to give a damn about what you need. Ie, see React 18 introducing double rendering for state and useEffect on strict mode (on by default in Nextjs). Makes debugging harder when shit runs twice, all for some future update.
- efficax 4y agoyou either use a framework or you end up writing (a bad, usually) framework
- etchalon 4y agoI feel like every decent developer goes through a period where they decide Frameworks aren't worth the hassle.
- deleted 4y ago[deleted]
- default-kramer 4y agoIf you read far enough, this is the author's actual complaint: "Yet most frameworks come with all those details up-front and mixed up. They often make it very hard, if not impossible, to be isolated." I disagree. Very few of the frameworks I've used have made it difficult for me to write all the interesting parts of my app in a framework-agnostic way. A complaint I could agree with is "frameworks tempt people to write too much framework-dependent code", but a purely technical criticism does not match my experience with frameworks.
- deleted 4y ago[deleted]
- lucasfcosta 4y agoI don’t fully agree. The author has quite a few excellent points, but when one says it may “harm” the “maintenance” of your software one must define which variables are used to measure “maintainability”. Is it MTTR, cycle times, bug density, or what? Speaking of maintenance in broad terms makes the argument fuzzy.
- henning 4y agoThis is what happens when you view your application as an abstract Platonic object, immortal and perfect, outside any actual concrete implementation. Making the app serve web requests is part of the problem to be solved. The problem is the problem. Looking up whether a user exists as part of handling a request is completely fine because that's the simplest way to make the app do what it needs to do. If you have some stupid "clean architecture" layer bullshit where your own application doesn't know how any of the rest of it works and everything is absurdly decoupled via some hexagonal bullshit, you're going to get into shitty situations where e.g. you have to call the database repository to do N queries rather than just one because the "clean domain layer" is written that way and the "HTTP message delivery layer" is only an "implementation detail" that has nothing to do with the pure business domain. Then your product will fucking suck fucking shit and you haven't actually solved the problem.
- yi_xuan 4y agoFrameworks subject to MVC pattern are logical cohesion, and tight coupled. In this respect, other frameworks, like Flask, are much better.
- SkyMarshal 4y agoThis is a beautiful blog. Love the typography and layout and readability. Looks like Jekyll fwiw [1]. [1]: https://github.com/berkes/berkes.github.com https://github.com/berkes/berkes.github.com
- berkes 4y agoYup. Jekyll indeed. Though a really old one. I should really upgrade, but -being a static site- never felt an urgent need, all the security flaws in any of the dependencies are hardly relevant. :)
- 8n4vidtmkvmk 4y agoI'm experiencing this with Laravel. I'm stuck on 5.2 while they're on v9 now because the author thought it would be a good idea to arbitrarily change some method signatures because he regretted his decisions earlier, while not providing any additional value and I don't have the time to hunt all these down and refactor everything, and I feel unmotivated when he's made it clear he's a bad steward. He refused semver for the longest time, not sure if they're using it now but even if so, 4 more major breaks is not encouraging
- dvko 4y agoThat’s Laravel in a nutshell. I tried it for a year, then got fed up with all the useless name changes or directory layout changes after every “minor” (yeah, no SemVer) and moved to Symfony with their LTS promise. Still happy with that decision.
- mrunkel 4y agoThere is no reason to be stuck on a previous version of Laravel. With the help of rector, it should be an afternoon's work to upgrade. https://github.com/rectorphp/rector https://github.com/rectorphp/rector
- 8n4vidtmkvmk 4y agoI will be astonished if that works, especially with all the nonstandard junk I've done to my codebase, but I will give it a whirl. Thank you, didn't know about this. I did see a paid version of something similar before but never tried it.
- jonwinstanley 4y agoI’ve upgraded a large application all the way from 5.2 to 9. It does take a long while, but is well worth it in the end. They provide an upgrade guide which is pretty comprehensive. Im not saying it’s simple, but it certainly wasn’t as bad as I imagined it would be. Good luck getting through it!
- darylteo 4y agoStuck on Zend Framework 1 :D
- koshari 4y ago
- habibur 4y agoThat brings up the old debate between framework vs library. My personal conclusion had been don't use frameworks, rather use libraries.
- itake 4y agoI am getting bit in the butt right now for using the ionic framework for building a multi-platform mobile app. If I want to build a mobile app in JS, but not use a framework (ionic/cordova/react native), how do I proceed? While I admit framework-driven cross platform mobile apps are bad, even native code is vulnerable to OS updates shifting the ground from underneath them. How do you use a library in mobile app dev?
- jonwinstanley 4y agoSurely in this situation a framework is pretty much your only choice? Trying to do this yourself would be very complex and stop you from writing your actual app?
- itake 4y agoI agree. I feel like OP's advice is heavy handed.
- 42e6e8c8-f7b8-4 4y agoOnce you go to the grocery store and pick the 25 different libraries fundamental to your application, congratulations! You've created a completely new interaction between those sets of libraries and you get to debug those interactions instead of your own code for a portion of your time. I've seen this with python flask REST environments where folks pull all these tiny pieces off the shelf and stitch them together. Meanwhile Django REST Framework has a mostly common baseline that you adopt and then diverge from as needed.
- didip 4y agoThe problem with using a framework is that the upgrade tax is steep. Every major version change is basically an Armageddon. This is one reason why micro service design is popular, you can throw away everything later.
- 42e6e8c8-f7b8-4 4y agoI think that says more about the maintainers than libraries vs framework. Some maintainers value backwards compatibility and some don't. Some value the time of their users more than the purity of their platform/framework. React as a framework seems to value it's users -- upgrading isn't that hard. Angular 1 to 2 didn't. Microsoft and x86 worship backward compatibility -- 30 year old programs frequently run without a hitch on the PC platform, thus showing that they value backward compatibility. Anything written against a Google sdk or api or platform will need to be reworked every 2-3 years or the app will break.
- osigurdson 4y agoLibraries that you can call from your code are conceptually much simpler than frameworks that call your code. I don't think this means that zero frameworks should exist, but frameworks are generally not composable (hard to use many in a single application) while libraries compose trivially.
- crossroadsguy 4y agoNumber of people here (apparently) confusing frameworks and libraries is kinda surprising. With framework, your app becomes the framework and that framework becomes your app. There’s no abstraction and clear separation like with libs. Oh, maybe you can have abstraction with frameworks, but then why use the framework in the first place.
- emsimot 4y agoI was against frameworks until I used re-frame in Clojurescript. If the framework is sufficiently pluggable it can be incredibly valuable.
- gonzo41 4y agoIt's been a whilst since we've had one of these on HN. What a bit of fun. My 2c. There's a choice about the work you do. does your work satisfy a business requirement, or does it satisfy your ego. I need a site for work for a 3 year project, CRUD, users, auth, sessions. Django's perfect for my team of 1.5. It wouldn't be responsible to roll my own, when I can have the bare bones of that site up and ready to go within a day. This is like complaining that X company is locked in because of a chipset, and suggesting they branch out into lithography to ease that burden. Is your core business getting things done, or is it flexing by rolling your own framework.
- herr_gurke 4y agoI did some Django but in the days, and I completely agree that as long as you have CRUD, Django shines. The issue starts when you cannot really fit your uses cases into simple CRUD and you start to fight against the framework to achieve this. The author also made a point of negligible gains - even if you spend a week to setup auth, sessions etc. if still negligible for longer running projects
- gonzo41 4y agoI've worked on to many long dead projects with scant doco and the best ones are always where people colored inside the lines. Remember google web toolkit? That flamed out hard 15? years ago. I've recently had to make a mod to a decaying app written in GWT. It was easy because no one got creative. I think theres a long term risk with rolling you're own that you box yourself into a lot of corners without knowing it.
- herr_gurke 4y agoYou can also get really creative with frameworks, specially if you need to quickly overcome some strange limitations imposed by framework. There is also a long term risk with using frameworks - somebody here mentioned method renames in Laravel, that makes upgrading difficult. Im not talking about writing your own http server, or building the whole database access library. You can use some ready made libraries. As long as you keep proper boundaries between IO and business logic, you can fairly easy change the IO libraries. Of course there is quite some overhead there, and for some projects it makes not sense.
- osigurdson 4y ago>> A team that defines the standards, processes, practices, frameworks or architectures that other teams must follow..are amongst the lowest performers. It is a matter of degree. If teams responsible for this are legitimately trying to make things better (and not just trying to infallible high priests), it can be helpful. If there are established ways of doing things, it can sometimes alleviate the need to make the same decisions over and over again.
- civilized 4y agoAt a minimum, Technology Standards Czar has to be earned. You can't just conjure up a spot on the org chart one day and staff it with some outside rando with a long, jargon-stuffed resume. The Technology Standards Czar should be an internal hire with a history of making good technology decisions for the org.
- osigurdson 4y agoI wouldn't even call them a Czar. Consistency facilitator might be better.
- personjerry 4y agoNot using a framework will harm the existence of your software
- hinkley 4y agoI will just sit over here nodding along and not making any eye contact with anyone who mentions unit testing frameworks...
- berkes 4y agoUnit testing libraries are very valuable. A unit-testing framework? What does it really do? It has a test-runner. But running software isn't some black magic, its easy and solved. It has naming conventions. But those are really just something a team can pick and never look back. It has ways to call functions based on those naming conventions. But that is really an extension to the test-runner. Now, all the assert_contains, has_called_x, those are valuable. But easily offered as library.
- z3t4 4y agoIt depends a lot how strong/leaky the abstraction layer is. For example nodejs and PHP are less leaky then the abstraction layers (frameworks) applied on top of them. So the more layers of frameworks stacked on top the faster it is to get a working demo, but the harder it will be to maintain.
- bradwood 4y agoHere I was thinking this was a knock against the Framework laptop offering dho
- raydiatian 4y ago> Using a Framework will harm the maintenance of your software “Time will harm the maintenance of software.” Simpler, more correct.
- deltasevennine 4y agoKind of a useless argument. Frameworks are designed to predict the future about how they're going to be used. They're often wrong in that prediction but people try to write frameworks nonetheless. If you're not using a public framework then you're writing one from scratch. If you're writing a framework from scratch then you're predicting the future. If you're predicting the future you'll probably be wrong, and the person who came after you is stuck using your framework. Since most people don't greenfield apps, most people will be stuck using someone elses framework. The problem with frameworks is the problem with software. How do we design things such that the design has enough flexibility to perfectly anticipate the future?
- culi 4y agoAs everyone else pointed out, frameworks are a natural evolution of sufficiently complex applications and "framework-less" codebases often have their own proto-framework solutions to things. I don't think the issue is frameworks but rather being locked in to a framework. I'm really interested in seeing where the micro-frontend trend as well as island-centric tools like Astro, Fresh, or Hotwire evolve. Tools like these show it might not be the frameworks themselves but rather the way we use the frameworks that are the issue. Despite React praise for being "a library not a framework", there is a very clear focus on SPAs throughout the ecosystem and I feel like its potential flexibility is really stifled by this
- fullstackchris 4y agoEvery time I see anti framework posts I am forced to frusteratedly chime in. This mentality makes me fume... not all of us work on massive teams where building stuff without a framework is even an option. And even then, whats really a "framework"? You could argue it's even the language itself. Android apps used to be written in Java, and now they are pushing Kotlin way harder (and it may even be the default soon). Everyone who wrote those JavaScript apps back in the 1990s without TypeScript, are they still just as maintainable as their TypeScript counterparts? Such a shortsided and ignorant view IMO. I think what bugs me the most is any sort of purist mentality (about anything) in software engineering. WE ARE ENGINEEERS. ENGINEERS USE THE RIGHT TOOL FOR THE RIGHT JOB! It should NEVER be "always use X", "never use Y". Both X and Y exist for a reason, so they are both useful for some reason. And again, because I'm an engineer, I've also built my fair share of apps in just "purist" languages, the classic HTML / CSS / JavaScript, so I'm not against the purist approach either. Again, right tool for the right job.
- interactivecode 4y agoalso typescript apps that haven't had active development in the last 10 years will be a pain to work with again. Toolchains need maintenance and upkeep.
- berkes 4y ago> And even then, whats really a "framework"? I've tried to answer that in the article. Anything that I should have clarified even more? Do note that I make an explicit distinction between libraries and frameworks. I'm not expecting a one-man-show to write the SSL libs or even the HTTP routing: there are perfect libs for that. When this HTTP library lives on the side of your app, abstracted away behind e.g. ports&adapters there really isn't any issue. It could be Sinatra, Flask or such. My article wasn't meant to argue against code-reuse, au contraire. It was meant to explain that there's "dangerous" code-reuse, and good code-reuse. That with the wrong re-use of existing code, you'll paint yourself in a corner that might easily prove impossible to get out of. Frameworks, I argue, are such code-reuse. Libraries, used and layed out in architectural patterns is, I argue, the alternative that allows for longer living projects.
- seydor 4y agothe real reason frameworks are a burden is that you re not allowed to edit their code. We should be able to change every bit of the architecture for whatever reasons to make it an organic , coevolving part of our project. But for this to be possible we will need AI to perform external upgrades without breaking our code
- stevebmark 4y agoRails will harm the maintenance of your software* *Is really the accurate summation of the article. And yes, this is well known. Every article about a company upgrading Rails is "it took us several years and only three people died." And we know better than to use MVC nowadays. No offense to Rubyists, but in the Ruby ecosystem, I have seen a disturbing lack of absorbing information from other programming ecosystems. This article smells like that to me. If you've only used Ruby and Rails, you might not realize some of the dangers and inherent limitations of the design unless you've worked in other ecosystems.
- jarek83 4y agoI agree on how this article is mis-titled. It's clear that the author just hates Rails. Now - I use RoR and other ecosystems and I really miss Ruby or RoR features in those other ones.
- berkes 4y agoI'm the author and I certainly don't hate Rails. I use it for several projects still and will continue using it when the use-case is apt.
- throwaway290 4y agoThis article seems wrong on every possible level. > This makes sense: if everyone in a company is forced to use, say, Django, for any project, regardless, there will be a lot of projects where Django is a very poor choice. Sorry, if you are forced to use a framework that's your beef with the company not the framework. > if the use of framework slows down shipping of new features today, it is causing harm. ... when the use of a framework allows shipping features fast early on, at the cost of slowing down the shipping of new features or changes later on, that is harming maintenance. ... when the framework diverts resources into work that has nothing to do with delivering value to your customers. You just described tests. Any app will become slower to maintain as you need to update the increasing amount of tests. Guess what, framework does the bunch of it letting you focus on testing business logic, and it does so at a cost of imposing a structure. > a last type of harm, is when a framework that was once a good fit for a project, is no longer a good fit. That's just reality. I guess coming up with your own structure somehow makes your app immune to having to ever refactor it? IMO the author thought framework is a silver bullet that allows you to not think or care about the architecture at all and now is channeling misplaced disappointment.
- huimang 4y agoMost sufficiently complex codebases that aren’t “framework” based will have a poorly implemented, feature-lacking, bug-ridden version of a framework eventually. If Django doesn’t fit the use case for your thing, don’t use it? Just don’t use flask and then start reimplementing Django. Also, Rails is better Django. It’s not even a close comparison.
- herr_gurke 4y agoThe issue starts if you start with Django, but later on you discover that there it does not support your use case anymore.
- huimang 4y agoIt’s impossible to predict the future. I would rather start with rails and rewrite portions later on, than start with Sinatra and shoddily reimplement rails features. I also just think Django is terrible compared to rails, and that may be why the author has such a dim view of frameworks in general. It’s worth noting huge companies started with frameworks initially. Just looking at rails: Twitter, Shopify, Airbnb, Basecamp, ..
- 42e6e8c8-f7b8-4 4y agoEvery flask REST implementation I've seen has been a bespoke library combinatorics mess compared to something that could have been written in Django REST framework.
- tobyhinloopen 4y agoBetter title: Using Rails will harm the maintenance of your software. Because Rails sucks. A framework like Phoenix (Elixir) is perfectly usable as a plugin.
- RamblingCTO 4y agoYeah, I think this is pretty language specific and really case-dependant. My ports-and-adapters project in golang is built so that I can easily switch out gin or gorm or graphQL in a bit. I don't really get this discussion haha
- fbn79 4y agoMore experience I do into programming, more and more I coming to the opinion that Framework is just an alias of "Technical debt". Please use libs, not framework.
- revskill 4y agoUse of framework to me is a prove of lacking of knowledge for self-control. Framework is a debt, not an asset.
- o_m 4y agoMost developers only have a two year horizon, and they are always thinking about the next job. If you learn some proprietary software it will hurt your chances to easily switch jobs in the future. So you end up choosing the company that uses the framework you believe you're going to keep using at your next job.
- BiteCode_dev 4y agoIt's not an "or" proposition. E.G: a complex django project will have parts that don't use the framework at all. In fact, I never ever use forms with Django, and I do use raw SQL. Not to mention you can start with a framework, and remove pieces you don't need on the way. Like Instagram did with the django ORM. Of course, you have to choose a framework with the proper balance for this to work. Purists want their project to be homogeneous, but it never ends up that way because engineering is a about compromises and dev is only partially about code. And in the end, you framework will not harms more your maintenance that home made structure, it will just put the burden of maintenance on different levels, which may or may not be what you want depending of your objectives. But usually, you are not Google, and you have neither the requirements or abilities of such a big structures. Which means a framework is likely bringing more than it's going to cost you if you look at the project average cost during it's entire life. Provided the framework is well made, chosen and integrated, which is a big if, but then you have similar ifs for custom systems.
- jarek83 4y agoIt seems that there are mostly 2 types of devs: - those that use tools, learn them and master in them, - those that always want to create their own tools, and will usually oppose adopting and learning existing ones. I belong to the first type. I love frameworks because they give publicly available documentation that plenty of people contribute to - so my project will have access to all of it even if I'm gone. Another reason is that frameworks have opportunity to be battle tested in terms of robustness and in terms of use cases. My stance here is that I love to use wheels instead of creating my own ones. I'm a project developer and not an academia developer. The second type of devs are what I would avoid hiring to my projects if they wouldn't be an academia projects. I need to deliver business goals in a most efficient way. That efficiency has to be on multiple levels. One these levels is to that the code won't be depending on one or two my best developers, because there is a high chance they will go at some point. My project would then rely only on what they created and documented, hoping that documentation cover everything. But my project would also slowly deteriorate technically, because most devoted contributors would be gone. Frameworks usually take much longer to become abandoned. I believe first type should work for businesses. The second type - should aim academia.
- iveqy 4y agoI belong to the second type. I believe it's a great asset to have in business. Most often less code means shorter development time and cheaper maintenance. People knowing a framework will often use it for everything. Instead looking at the problem and find the easiest solution to it offers great time to marked. I've proudly deleted more code than I've written at work.
- willsmith72 4y agoAgree on the importance of deleting code, but with "less code means shorter development time and cheaper maintenance", I don't think I've ever seen a program without a framework use "less code" than it would using one.
- mightyRodri 4y ago> Instead looking at the problem and find the easiest solution to it offers great time to marked. The easiest solution you can imagine. These are 90% of the time cute tricks that narrow down the scope of the solution so far it makes the surrounding code unmaintainable after a year. I learned to call those people "Ricks" they are best used in walled of projects that are not expected to change. Not useable in cooperation.
- low_tech_punk 4y ago1. "If you don't use a framework, you will end up creating one" -- And that's exactly how successful frameworks were born. If everyone uses an existing framework, who is to create better frameworks for the future? 2. Framework vs. Library -- Framework calls your code; Library is called by your code. There is clear inversion of control. The article touched on this, but I think it's a very important distinction to call out. 3. Framework makes me think inheritance. Library makes me think composition. 4. Framework is like CPUs. A more powerful CPU is a more powerful CPU, no doubt; but you need more power to bring out the performance. If your company don't have the resource to deal with the maintenance, Framework becomes a liability rather than asset. But if you can sustain it, it should still be a net positive. 5. In addition to the mixing of domain and non-domain concerns, poor Framework bring incomplete abstraction that expands the surface area for reasoning/debugging/maintaining. A good framework should provide the perfect abstraction that frees the developer from having to descend the stacks. I consider programming languages as good "frameworks". So are the layered networking architecture. 6. Watch out for self-fulfilling prophecies. e.g. in the web frontend framework space, a framework might claim it helps solve problem X, but it might also be very cause problem X. Accessibility, Routing, State Management... a lot of these can be solved by using the platform. Before you reach out for a framework, be sure to assess platform capabilities and single purpose libraries first. 7. Reliance on framework can be caused by lack of knowledge. If you are a manager, give your team the time, money, and endorsement they need to learn things, attend conferences, and provide ample budget for training and technical book purchase. They might pay more dividends than a framework does.
- p-e-w 4y agoDevelopers use frameworks because frameworks that are used by many others take care of edge cases that most engineers have no chance of fixing, or even discovering, on their own. Web framework code is typically riddled with comments like "this extra margin is added to the input to work around a bug in Internet Explorer 11 where Tibetan characters are cut off". Good luck solving such issues without having tens of thousands of eyes and hundreds of hands to help you.
- test1235 4y agoyou don't always need all the solutions a framework provides e.g. your Tibetan users don't use IE11, so all your IE11-Tibetan code is just taking up disk space You ain't gonna need it, and all that.
- adrianthedev 4y agoA bit dramatic and provocative. But a nice way to go in-depth with the pros and cons of a framework.
- sz4kerto 4y agoI think using a framework can help with the maintenance of the software. Let me use the one that is usually used as a negative example in hacker circles: Spring. Spring has a steep learning curve. Spring feels like too much magic. Spring makes simple things look complicated and hard to understand. Spring is large. On the other hand: I don't care about making extremely simple things more complicated. In the enterprise world / large-scale SaaS development, we don't do extremely simple things. If we wanted to have a service that adds to two integers and returns the result, then it must have unit testing, integration testing, end-to-end testing lifecycle management, documentation, health checks, clusterability. Why? Because we want to make our own lives easier by having ground rules for services and code, and anyone who starts maintaining, improving or operating a service knows that they can expect the stuff mentioned earlier. So Spring gives us these out of the box. People learn it once, and then whenever they start to work on something new, they get Prometheus metrics, testability, proper logging, etc. right off the bat. I find Spring (and other frameworks) annoying and boring as a hacker, and I find them very useful as a CTO when a large team is working on system and people come and go over years or decades.
- berjin 4y agoSvelteKit made some breaking changes recently but they also had a migration script to re-write 99% of my code. I wish all frameworks did this.
- adenozine 4y agoCapitalizing Framework in the title made me think this had something to do with those laptops…
- magicalhippo 4y agoUsing a framework will affect the maintenance of your software. So you need to consider that aspect before using it. If it will harm or hinder you, depends entirely on the specifics of both the framework and your project. For example, source code availability is a big factor. Is your project short lived, say a prototype, or do you need it working for 10+ years? If the former, source code availability of the framework might not be an issue, if the latter then you certainly want the framework source. Another point is if you need to track the latest version of the framework for some reason, or can you live with an old version. On Windows for example, you can still use Delphi 7, released in 2002, with its VCL framework to develop applications. Won't look pretty but will work.
- abracadabra_ 4y agoWrite small, well tested services in the easiest to use framework you can find. If the service becomes hard to maintain then replace it. This should be a simple job guided by the tests.
- willsmith72 4y agoNot everything should be a small service
- abracadabra_ 4y agoMaybe not, but the larger it is the harder it is to change. There are pros/cons to both sides.
- 42e6e8c8-f7b8-4 4y agoPeople talk about services like libraries aren't a thing. That exact same statement with `s/services/libraries/`. "Write small, well tested libraries..." If you have a library with a solid, small public interface and you carefully maintain compatibility on that interface with great testing, you can be decoupled. Plus you don't have 2 network interfaces and the internet injected into a call to the interface.
- abracadabra_ 4y agoYes, this applies almost equally well to libraries as well. With the slight exception that you are not just bringing the library into your code but all of its dependencies as well. This makes it _slightly_ harder to wholesale change a library compared to a service.
- ThePhysicist 4y agoFrom my own experience, writing something without a framework often seems very elegant to yourself, but the moment you try to onboard other people to your framework-less code it becomes a nightmare. Turns out most folks don't want to get familiar with e.g. intrinsics of browser technologies, HTTP request processing or other complex things that you've reimplemented in your code, they just want to deliver working software using frameworks and conventions they know. You can think of frameworks like conventions: If enough people know them, it makes life so much easier for everyone, even though the convention might not always be the best fit. To state an analogy, imagine each municipality would invent their own traffic signs from first principles - because it makes maintenance easier for them - and you were tasked to drive through such a city with large speed, learning the conventions as you go. An absolute nightmare. I think that's how most programmers feel about code that brings its own framework-less abstractions and technologies. So while I would've been able to write my own frameworks I've become humble and reasonable enough to just default to something that's popular and well-known, because it will make life easier for my colleagues or employees.
- edf13 4y agoNo, it won’t
- JodieBenitez 4y agoThe article tries to generalize but I think it's a bad idea since not all frameworks are equal. Back in 2005 (and to this day), I made websites with Django and it was relatively easy to maintain and upgrade them to follow the framework. I can't say the same thing about websites I made using the Zend Framework (now Laminas). The wrong framework will harm the maintenance of your software. The right framework will keep it going for decades. Of course it's not always obvious how a framework will evolve over time (let alone the requirements of your website/app/api), so the safe bet is to stick with the ones that already stood the the test of time.
- ozim 4y agoI love these technical topics because I can open up popcorn bag and read how people with statistical significance of 1 person experience throw their opinions and claim they have it all figured out. In my 14-15 years of experience in software industry I learned that having framework helps mostly with that - having bunch of "know it alls" rounded up to use the same approach instead of having "I know better discussions". Where frameworks shine is specifically lowering amount of discussions on technical details that has no relevance to the business but has all kind of opinions from devs. Someone in the thread claims - if he is hired he has to learn framework - well I am hiring people with knowledge on framework we use, he might not have been looking for a job lately. I have not seen we hire c# or c or java dev - there is always framework in requirements. Just see how frontend devs ads look "react dev to hire"/"angular dev to hire" no one hires "someone who knows html and css", yes it is requirement to know these but you also have to know at least one framework.
- bowsamic 4y agoWhy start your post with an "I love to see 1 sample anecdata" and then make a whole post doing the same thing?
- berkes 4y agoArchitectural patterns and design patterns can just as well help against "bikeshedding". More than a framework. I avoided this topic in my article because it already is far too long :). But a framework such as Angular or Rails does three things here, all of which aren't really properties of the framework: 1. Dictate where to put files, and how to name stuff. 2. Dictate what architectural pattern you must use. Rails? MVC or GTFO. 3. Dictate what surrounding tech to use. RDBS, REST, template languages etc: you don't have a say, use them, or GTFO. First, I don't think this is good, not because I know better, but because use-cases demand different setups. Sometimes Event-sourcing is crucial to a domain. Sometimes message-bus, sometimes microservices, sometimes monolyth. It really depends. Having the freedom to choose the best constraints and trade-offs for a project is IMO a crucial skill for long-term success. But even if such bikeshedding is bad and "we use Rails for everything, from websites to bots to embedded software" is the proper thing. Nothing in those thre points come from a framework directly: 1. where to put what, how to name things? - ubiquitous language, a thesaurus a simple loader or even the language (rust "enforces" file naming conventions as a language). It's a good thing to have, but can be achieved without marrying to a framework with all its trade-offs. 2. What architecture to use? This should be the first thing. Maybe second is to then choose a framework that uses or allows this pattern. Not the other way around. So you'll need to do this anyway: frameworks or not. 3. Again, highly dependent on the use-case. The requirements should dictate the tech to be used, not the other way around. And the tech used then dictates whether a certain framework is feasible at all.
- spion 4y agoI agree that there is a problem here, but I think its a slightly different one. Frameworks and libraries both save you time and require you to invest some time. The main question is whether the savings will be bigger than the investment, and that question can be hard to answer. In most cases we tend to err on the side of framework optimism - we presume a framework or library will always save time (don't reinvent the wheel, NIH syndrome, etc). Sometimes when we do this, its because we realize the deep rabbit hole of building something like the framework or library we're using. Other times, its because we don't know whether the hole is deep or not - we don't have the expertise to evaluate. I think the second case is where most of the danger lies. Which is why, paradoxically, its a good idea for a software engineer to reimplement a few pieces of general purpose software in a more specific manner every once in a while and live with them for a longer time. Unfortunately, this is not always possible; often the next best thing is to contribute to an existing open source project and ask (in the kindest way possible) why certain things were implemented in a certain way and/or learn from its commit and issue history. Learning doesn't mean you have to agree with the authors - in fact often even authors will lament certain design decisions that painted them into a corner or increased complexity unnecessarily. Doing the above will make it easier to evaluate wheather a framework (or library) will save time or drain time. Without it, erring on the side of caution seems like the safer option, which is why we keep recommending it. However, sometimes the drain can be significantly bigger than the savings - if you're spending most of your time fighting the framework that's a signal that something is wrong and we should have a way of listening to that signal and responding strategically. The downside of frameworks that I think the article is correct about: general-purpose software is really hard to get right. Every author has a specific set of experiences and needs which depend on their specific situation. It may be worth spending some time researching the kind of software built with that framework (or library) to see if there is any obvious bias that would make it not fit your problem domain or your specific context.
- lll-o-lll 4y agoThanks for taking the time to write this insightful comment.
- ddevault 4y agoDaniel Stone once pointed out a key difference between libweston and wlroots, two competing approaches for generalizing the work involved in building a Wayland compositor, to explain why wlroots succeeds where libweston does not. He drew the key distinction between a framework and a toolkit. Weston is the former and wlroots is the latter. The difference is that a framework is in control and defers to your code from time to time, whereas with a toolkit, you are in control and defer to the toolkit when necessary. A toolkit-style library can still do most or all of the heavy lifting for you in a single library, but this approach is much more powerful and flexible than a framework approach while retaining most of the benefits. Many people view the framework/no-framework debate from the angle that the no-framework side describes a hodgepodge of libraries thrown together to create a crappy half-framework in the downstream code, but that is not necessarily the case. A "one big dependency" approach works with or without the framework design, and a toolkit design offers many advantages that the framework approach cannot.
- the-printer 4y agoIf you ever feel the need to divulge further into the concept of toolkits as opposed to frameworks, I would be most appreciative to read a blog post outlining such.
- nottorp 4y ago> In a framework, unlike in libraries or in standard user applications, the overall program's flow of control is not dictated by the caller, but by the framework. > In other words, users can extend the framework, but cannot modify its code. He is talking about a specific kind of framework, not about every library under the sun. And for those he may well be right. Back when Unity was new, most games done with it kinda looked the same. I don't know if Unity evolved to allow more control/customization or people are just better at working around it now. And if you browse the web, you eventually run into a bunch of sites that all kinda look the same and act the same. Again, this is due to the framework imposing their way to do things instead of the developers/designers deciding it. I suppose an experienced web dev could actually recognize what framework a site like that is done on without looking at the source code, just based on behaviour. This may be good for cheap one offs but not so much long term indeed.
- jll29 4y agoArchitectural mismatch leads to a clash when one's own architectur (or framework, for bigger projects) does not align well with another one that one wishes to use. As a friend of mine used to say "frameworks are like hollywood: you can't call us - we'll call you". If you can, supply your functionality as a toolbox instead. In the context of NLP, I addressed some of these issues with using frameworks and toolkits in this 2003 paper https://dl.acm.org/doi/10.3115/1119226.1119233 https://dl.acm.org/doi/10.3115/1119226.1119233 .
- NikhilVerma 4y agoI see Frameworks as another layer of abstraction, just like programming languages. And they have the same pros/cons that comes with abstractions.
- kohlerm 4y agoNot sure I agree with this . A dependency is a dependency and you should always think about whether you want that dependency. Whether it is a framework or not is not really the important point. The important point is how much does this dependency "lock in". e.g. if inversion of control is a framework "thing", doesn't that in principle minimize the impact of the dependency?
- jokull 4y agoThe criticism is mainly on last-generation frameworks that came around before React and the like. They bundled together an all-in-one approach to writing web apps. Django comes with an admin tool! The world has largely moved to richer frontends so stacks are more flexible.
- Octabrain 4y agoDisclaimer: I'm a DevOps, not a developer, but enjoy writting software side projects at home where I am free to chose whatever I want and don't suffer from real world engineering decisions. So, take my opinion on this with that in mind. Traditionally, I've always used Python with whatever framework (Django, Flask, FastAPI) but always had this feeling that I am learning a framework, not digging into the language which is what I would like. Django, for instance: you end up feeling that a big part of it is magical, which is something that I personally dislike. A few months ago I found Go and fell in love with it's pragmatism and its non-written (as far as I am aware) rule of not relying on frameworks but instead on just libraries. I find it great, but again, I don't have direct experience in the real world to know the trade offs on multiple levels this can bring.
- mirzap 4y agoOn contrary. Not using frameworks (when you have need for them) actually means you build 60% of framework your self, and then you have to maintain your app and your framework. Which is waste of time and resources. In my experience as freelance developer the worst project I could possibly get is from people who invent their own "frameworks" (they just call it "lib") because they thought they were smart avoiding frameworks like next.js, laravel or springboot. It is a mess to maintain and to implement anything new on that codebase. Complaining that framework wont support you forever because you were too lazy to maintain the software incrementally, is like complaining why php 1.0 or why windows 98 is not supported anymore. It simply doesn't make any sense. My advice was always focus on your product, on your app, use as little dependencies as you can, but do not waste time on things that are solved already. Don't write your own framework to avoid using some other more mature and better maintained framework or lib. Sure you do not need library dependency which will tell you is something boolean or not, but if you need to add router to your app, use the lib.
- Kinrany 4y agoAs a freelancer you only see projects that were in bad enough shape that they needed extra help, no?
- mirzap 4y agoNot really. Those bad ones look for outside help when people who maintained all that leave and they don't find in-house devs quickly. Projects that use frameworks tend to maintain opinionated structure that frameworks usually push. Which helps onboarding. Not always, but mostly. And it's always easier to fix and maintain the mess I see for example in a Laravel project, than in built-all-alone project.
- Kinrany 4y agoI'll rephrase: my suspicion is that there's a survivorship bias here. No-framework setups with poor architecture cause people to leave more often, while no-framework setups that work out are a pleasure to work with.
- makach 4y agoProblem with this statemetn is that it is recursive. Everything you do will end up as some sort of framework and thus, stack overflow achieved.
- glroyal 4y agoI would add that frameworks: * promote helplessness by abstracting away fundamental but tedious tasks one ought to know how to do, * erode the capacity for innovation by making it difficult to contemplate or impossible to implement solutions outside the framework's feature set, * achieve an equilibrium I call 'mutually assured mediocrity' in which a programmer or organization necessarily vows to remain at the same low level of technology as their competitors.
- marcus_holmes 4y agoI've worked on projects that use frameworks, and don't. My experience: 1. Frameworks do save time at the start of the project. There's lots of stuff that comes for free and it does get the project going faster. 2. Every project that uses a framework (and survives long enough) ends up fighting that framework. And the more comprehensive the framework, the quicker the project reaches this point and the harder the fight is. 3. If the team doesn't know the framework well at the start of the project, most of the speed gains at the start are lost, and most of the issues with the framework later are worse. In my experience (almost 30 years now), using libraries instead of frameworks gets most of the benefits and stops most of the pain.
- mejutoco 4y agoI heard an analogy between writing without a framework / your own framework an nuclear energy that I found fitting (not taking sides either way). Please bear with me. The best-case scenario is better. More energy in the case of nuclear and just what you need, more performant, less code in the case of no framework. Everything just for your use case and no more. But the worse-case is much much worse too. If you drop checks and discipline once (key developer switching jobs without in-team knowledge, for instance) there is no way back and the consequences can be catastrophic. I would conclude than in general it is not worth it, but if you have the discipline and political incentives and/or special requirements (big ifs) it can be worth it, as long as those ifs keep being true. I guess my insight is: it depends :)
- talkingtab 4y agoComplexity. Specifically the complexity of the framework vs the complexity of your need. Often frameworks/libraries solve the whole problem. For example Oauth. If you want to provide "login with {Google, Amazon, Apple, Facebook, Instagram, etc}. then you must deal with the differences and oddities of each implementation of the service. And all the different modes of "login with" and then keep up to date with changes. The difference is the same as that between buying a shovel and an excavator. Excavators are fun - at least until you have to fix them - so if you can afford one there is a temptation. Complexity in software is the product killer. The cost of maintaining ten excavator type solutions can kill your product and your productivity, and can require you to create a maintenance department. Libraries and Frameworks are always a temptation and often are useful, but understanding the full cost and all the downsides increasingly makes what seems like an obvious choice not so good. But what if you need only a very basic flow for Github? Do you need that complexity? You may need to expand your solution, so
- deleted 4y ago[deleted]
- hnarn 4y agoMy main issue with the usage of frameworks is when they are used in a situation where they are clearly not needed. It seems common in my opinion that people who use npm, react etc. as a part of their work -- where we can assume for the sake of argument that it is necessary -- also use these same tools for minor hobby projects they're involved in, where it really wouldn't be necessary. I've seen more than one "theme" for example for any generic site generator or blogging software that does nothing more than set up some CSS rules, define some views and use some very minor JS for interactivity, but still has a minified output ground through npm with the almost mandatory 200+ dependencies that of course break and cause security warnings over time. I've also seen entire products written in a framework that seemed invincible in the day it was created, only to be a dinosaur everybody despises five years later when new functionality needs to be added. Frameworks inevitably makes me think of the poem "Ozymandias"[1], they accumulate as dead monuments over time, and it cannot be avoided. So, what to do? Well, my humble and highly personal opinion is that two thoughts should at least be entertained: 1) Using less code and less infrastructure to "build" it may, for smaller projects, make them a lot more maintainable and robust over time 2) For larger projects, instead of hooking your cart to one framework for everything, focus on separating the functionality into different parts, so that at least when one of your frameworks need to be replaced five years down the road, you can keep using the other separate parts that work fine. [1]: I met a traveller from an antique land, Who said—“Two vast and trunkless legs of stone Stand in the desert. . . . Near them, on the sand, Half sunk a shattered visage lies, whose frown, And wrinkled lip, and sneer of cold command, Tell that its sculptor well those passions read Which yet survive, stamped on these lifeless things, The hand that mocked them, and the heart that fed; And on the pedestal, these words appear: My name is Ozymandias, King of Kings; Look on my Works, ye Mighty, and despair! Nothing beside remains. Round the decay Of that colossal Wreck, boundless and bare The lone and level sands stretch far away.”
- tootie 4y ago"In other words: enforced standardising the tech, doesn't pay off." That's a completely different thesis from frameworks are bad. My org uses frameworks extensively and we reevaluate which are fit to purpose at every new project. Rigid enforcement of rules without thoughtful analysis is just a straw man and I've never seen an org that does that. I'd also just disagree with the rest of the argument. Frameworks provide both speed to market and shared vernacular that makes it easier to onboard team members and find support communities online. I have a small team and some software that is 10+ years old. The maintenance team has turned over 300% since inception. Without a framework we'd be completely lost.
- lasereyes136 4y agoEverything or almost everything stated in the article is true. That said, it doesn't matter. All software and software ecosystems are ephemeral and you can't know what you might need or want in the future, especially years down the road. All software lives in a constantly changing world so attempts to manage maintenance needs in the future can be a fools errand. Yes, decouple your business logic from your frameworks and libraries as much as possible. Don't expect that to make your software more maintainable. Yes, be aware the using a framework or any technology is coupling, but also be aware that you can't decouple from everything. Make the best decisions you can with the information you have now and have test automation to check for regressions.
- fleddr 4y agoIt's funny, this divide between the old world and new world. The old world has a heavy emphasis on computer science itself, theoretical correctness, long term thinking. It has led to the role of the careful software architect, design patterns, UML, the like. Everything about this old world is a fantasy, as it requires ideal conditions. You'll need low delivery pressure and a homogenous set of well-disciplined high-end engineers. That's not how software is built these days. You need to ship multiple features per engineer per 2 weeks or so. There's no time to do it the right way. Worse, most programmers are bread programmers and couldn't even grasp deep computer science, most have never studied it. Even better educated engineers compromise due to time pressure. The role of software architect as it was before, barely exists anymore. It's just a senior developer winging it. In this context, if anything, frameworks aren't opinionated enough. Many don't have "batteries included" leaving unlimited options to screw it up. And the team will screw it up. Maintenance? The software cycle in some domains, especially web and apps, is so fast that we'll just start over every 3-5 years anyway.
- AugustoCAS 4y agoI didn't read the whole article, but I agree in principle. My rule of thumb is: * Prefer code vs a library if what I want to do is simple and/or if the complexity of the library overshadows whatever benefit I get from using it. * Prefer a library vs a framework if the library provides what I need. A couple of examples when using: * The use of the Spring Framework in the Java world to do DI, web apps and many other things. I think java is the only language where a framework has such a bad influence on developers (maybe Ruby and Rails follows it, after all Spring tried hard to copy Rails ease of use). In this example the framework makes a few things easier, by ading a metric ton of complexity. * The npm left-pad library (debacle). This doesn't mean that one shouldn't use libraries or frameworks, just that they need to be justified. Development is boring and most developers just see shiny stuff and have to use it in production just to get some entretainment.
- eezing 4y agoNot using a framework will harm the maintenance of your software.
- _hcuq 4y agoI always preferred libraries. But they don’t seem to exist for web development.
- dotxlem 4y ago"[Frameworks] have different goals than you or your team." Seems like if that's the case, then you've selected the wrong framework more than frameworks as a whole are bad.
- ontologiae 4y agoI think most of the problems come from insufficient semantic power of actual language. Most programming language, even the most advanced don't manage time, don't manage locality, and don't fit in the brain representation human makes of the code. It's remarkably explained by Blackwell in his paper "Metaphors we Program By: Space, Action and Society in Java" https://www.ppig.org/papers/2006-ppig-18th-blackwell/ https://www.ppig.org/papers/2006-ppig-18th-blackwell/ So frameworks try to manage this gap, and the only solution, IMO, is to invent language that integrate more advanced semantics to avoid the necessity of frameworks
- night_person 4y ago
- night_person 4y agoWhoever insisting promoting building everything from scratch, should try to live with such home grown framework. I saw few times when after building such software, original authors left and you stuck supporting this old crap with usually no documentation. After some time you decided to leave, but your CV does not contain now magic words as Spring, Django, etc.
- twhitmore 4y agoI've had extensive experience on both sides of the fence -- working on apps within existing frameworks, and also maintaining custom frameworks & libs for apps using those. Unfortunately I find this article of very little value. The author's claimed idea of "decoupling from the framework" is generally ineffective & impractical. It leads to extra layers of adapters & SPI with high cost and almost always zero value. These sure add bloat & make the codebase pointlessly difficult to navigate, but are improbably unlikely to ever add value in allowing the framework to actually be changed. Difficulties include mismatched abstractions, endless adapter layers, parameter types for methods also all needing to be abstracted, restricted capabilities, difficulty conveying behaviour/ dynamism rather than static values, and -- of course -- poor performance. Results are severe choke-points hindering functionality, broken abstractions where stuff actually had to be done, and 90% of the SPI abstractions turning out worthless if you ever did try to migrate to another framework. I'm an architect. I've seen people's non-portable abstractions so many times. The article's advice just seems so unlikely to help. Pick a framework that offers long-term maintainability and lets you separate out your domain model & business logic, and just code directly in it. Rather than railing against bad frameworks from limited experience (perhaps in rickety languages too), the author should perhaps spend some time to find a good one. Spring is fine for many purposes. The MVC is coupled at the front, but your domain model need not & should not be. Focus on that, which should be your business value.
- deleted 4y ago[deleted]
- pepito_fdez 4y agoSo many things wrong with this article... But I won't comment here. Like a good gladiator, I will eviscerate it on the public square: LinkedIn!
- ladyattis 4y agoI think this article sums up my experience with frameworks. It's not to say they're worthless but that if you use them then you should minimize how much you modify them based on your stakeholder feedback. That means communicating to your stakeholders the limitations of the framework and the costs up diverging from the framework's structure to build a feature.
- deleted 4y ago[deleted]
- cnokleberg 4y agoI wrote an article for the ACM which covers how Google uses frameworks: https://queue.acm.org/detail.cfm?id=3447806 https://queue.acm.org/detail.cfm?id=3447806 It discusses many of the same trade-offs, but reaches different conclusions. It is true that frameworks are not for everyone, and their benefits are likely more pronounced in larger organizations.