News for hackers. Stuff that matters.
Re:Using a Framework will harm the maintenance of your software by a4isms on Wednesday October 12, 2022 @07:54PM (#33185383)
1. 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.

Re:Using a Framework will harm the maintenance of your software by couchand on Wednesday October 12, 2022 @08:35PM (#33185710)
The author carefully distiguishes precisely what type of framework they mean. The definition includes multiple parts, but the part that really stands out to me is that a framework dictates the overall flow of control.

The suggestion in TFA is to ensure that you consume your dependencies in a decoupled fashion, a move toward utilizing libraries rather than following a framework.

I've spent lots of development time in highly-constrained environments that often feel more like a framework than a true platform. When given the opportunity, I'm inclined to follow the author's suggestion to keep dependencies decoupled. Even supposedly fundamental dependencies will eventually need to be swapped out, even if just for a v2. But your domain core should be making monotonic progress towards the distillation of your key concepts and relationships.

Re:Using a Framework will harm the maintenance of your software by ensignavenger on Wednesday October 12, 2022 @10:24PM (#33186416)
The author uses Django as an example of a framework... but Django doesn't really fit the definition used.

Django does not dictate the flow of your code. It provides some libraries and there are common patterns, but Django is more or less just a set of Python modules you can import and use as you want (A bit of configuration is done for you if you follow common layouts, but you don't have to and can manually do the configuration).

What dictates program flow is when you use HTTP with Django (What its primary use case is) but that is dictated by the request/response nature of HTTP not by Django.

You can use as little or as much of Django as you want. Naturally, the more of it you use, the more it does for you.

Re:Using a Framework will harm the maintenance of your software by indymike on Wednesday October 12, 2022 @10:49PM (#33186569)
All frameworks are collections of libraries and that usually means you can import and use parts of the framework. Django is exactly what the author is saying is hard to maintain. And mostly all things Django start via wsgi, asgi or manage.py.

As the lead developer on three Django based commercial saas products, there is a trade off. Spend your time reinventing the same basic things or spend your time building your product. Even the maintenance argument is really a trade off. When you are small, frameworks help by outsourcing a huge amount of labor. When you can afford more developers, you gain control and maintainability by ditching the framework.

Re:Using a Framework will harm the maintenance of your software by ensignavenger on Wednesday October 12, 2022 @11:15PM (#33186732)
In my experience its not Django that makes apps hard to maintain. Your experience is certainly valid, it just has not been my experience with it at all.
Re:Using a Framework will harm the maintenance of your software by nerdponx on Wednesday October 12, 2022 @11:39PM (#33186914)
My experience goes further, in that the Django apps I've worked on would have been harder to maintain without Django, even with a "smaller" framework instead.
Re:Using a Framework will harm the maintenance of your software by travisjungroth on Wednesday October 12, 2022 @10:53PM (#33186595)
Are we using different Djangos?

Let’s take it for granted you’re using it with HTTP since it’s a web framework (this would all apply with WS).

You routes call your views. Your views load your models. These feed into your templates, which go into a response. You can tweak what’s going on at each step (DRF) but there’s definitely a way it’s all supposed to work together. It’s classic IOC.

Re:Using a Framework will harm the maintenance of your software by ensignavenger on Wednesday October 12, 2022 @11:08PM (#33186696)
I use Django with and without HTTP.

All a Django View is is a function (or in the case of a class-based view, a method of the class) that takes a request object and returns a response object... this is pretty fundamental to HTTP, so any HTTP app will do this. Its not Django dictating it, its the nature of HTTP.

You don't have to use any of those parts of Django if you don't want to.

I often opt to use Jinja2 instead of the Django Template Engine. I happen to like the Django ORM, so I usually do use it, but you certainly don't have to, I have certainly used Django without models before. Your views don't do anything with models unless you tell them to.

Re:Using a Framework will harm the maintenance of your software by ldng on Thursday October 13, 2022 @03:37AM (#33188296)
I second the mention that almost everything is replaceable in Django. And as a matter of fact DRF replaces the whole Request / Response handling with its own.
Re:Using a Framework will harm the maintenance of your software by matsemann on Thursday October 13, 2022 @03:36AM (#33188289)
I recently spent a few months on a project where we used Django without a single HTTP / external endpoint. It basically consumes messages from a rabbitmq queue, then creates new celery tasks which are then run.

Using Django for this is of course completely overkill, but using a known framework, especially considering that Django is what's used in other applications here, did have some benefits. All our devs having to fix something in this app, will immediately be familiar with it as it looks exactly like the other Django apps we have. No new way to do migrations, talk to the db, open a shell, log- and reliability setup is identical with other apps, etc. etc.

Re:Using a Framework will harm the maintenance of your software by notyourwork on Thursday October 13, 2022 @12:07AM (#33187116)
+1 Django is a beautiful example of a framework you can use but doesn’t get in your way.
Re:Using a Framework will harm the maintenance of your software by srcreigh on Thursday October 13, 2022 @01:05AM (#33187457)
The Serializer class is the worst frameworky piece I know of. These are basically classes which force you to use overridden methods to link HTTP with DB operations. Requires tons of hacks to work around all the time.

And just cuz it’s optional doesn’t mean it’s not frameworky. A solid platform just wouldn’t offer any frameworky elements.

Re:Using a Framework will harm the maintenance of your software by lotam on Thursday October 13, 2022 @06:07AM (#33189195)
Aren't you talking about DRF's Serializers ? Django itself does not have serializers. But otherwise, I completely agree with that statement.
Re:Using a Framework will harm the maintenance of your software by pythonaut_16 on Thursday October 13, 2022 @10:06AM (#33191137)
Could you elaborate on this pain point? How do you think serialization should work?
Re:Using a Framework will harm the maintenance of your software by Too on Thursday October 13, 2022 @01:28AM (#33187584)
Django requires you to have imported settings.py and be connected to the database first, before you can even import a model. It makes it impossible to write modules with type hints and modules which are partially usable outside of Django context.

If that is not dictating how you write your code, I don’t know what is.

Re:Using a Framework will harm the maintenance of your software by ensignavenger on Thursday October 13, 2022 @09:56AM (#33190992)
If you are connectiong to a database, you have to tell your program how to connect somewhere. The Django ORM does it through settings.py. I do both of the things you say are impossible, so maybe I am misunderstanding?
Re:Using a Framework will harm the maintenance of your software by crucialfelix on Thursday October 13, 2022 @01:38AM (#33187635)
Django is definitely a framework.

Its not just Django that locks you in, it's all the third party apps people end up adding. All these integrate tightly with Django.

They often block upgrades as they have different python and Django version requirements.

Re:Using a Framework will harm the maintenance of your software by sgt on Thursday October 13, 2022 @03:22AM (#33188203)
But that is also (or can be) an anti-pattern. Don't just blindly add dependencies - there are so many risks involved with that. Of course that is not unique to just frameworks like Django and Rails, but any piece of growing software.
Re:Using a Framework will harm the maintenance of your software by snovv_crash on Thursday October 13, 2022 @03:54AM (#33188412)
Ok, let's use Django with Flask and web2py then, since Django apparently doesn't dictate the flow of your code?
Re:Using a Framework will harm the maintenance of your software by ensignavenger on Thursday October 13, 2022 @09:05AM (#33190426)
There was a talk a couple years back at Djangocon where a company was using both flask and Django together. It was a transition for them from flask to django, but it wasn't hard to do. Probably doesn't make a lot of sense for most projects, but it is possible because Django doesn't get in the way.
Re:Using a Framework will harm the maintenance of your software by berkes on Thursday October 13, 2022 @05:12AM (#33188851)
Author here.

I use Django and Rails as examples. Both are, indeed, "just a bunch of libraries". But many of those libraries, and especially their bundled collection, enforce certain behaviour, shape and architecture.

When you inherit from base-classes offered by a library, you are tightly coupling against that: i'd then stop calling it a library and call it a framework instead. The alternative would be a library that you inject, or compose.

There's a big difference between (Rails)

`class Project < ActiveRecord::Base; end`

and

class Project

  def initialize(project_repo) # Ruby has no interfaces, but this would be something that has at least an `.add(project)`

    @project_repo = project_repo

  end
end

The first inherits, couples tightly to a bunch of libraries (ActiveRecord::Base really is just a bunch of modules that you could pick and choose) the former injects behaviour which might come from libraries, or might come from your own code.

Re:Using a Framework will harm the maintenance of your software by lotam on Thursday October 13, 2022 @06:05AM (#33189187)
I do agree with that, problem is all the other django-related packages that come with it, especially Django Rest Framework (framework is in the name here). I like some parts of it, e.g. Authentication, permissions, but IMO we often have to bend our code so it fits DRF views, and above all their serializers (which I despise). Obviously we could drop this part of DRF, but it would mean to drop DRF entirely, and I'm not sure everyone is ready to do just that.
Re:Using a Framework will harm the maintenance of your software by pythonaut_16 on Thursday October 13, 2022 @10:05AM (#33191127)
What do you despise about their serializers? What would make them better or what would be a better approach for you?

(Genuinely curious as someone who's working on a similar idea in a different language)

Re:Using a Framework will harm the maintenance of your software by lotam on Thursday October 13, 2022 @01:11PM (#33193812)
- They're slow (like really slower than almost any other package, if you use their ModelSerializer) - They're quite verbose - Above all, they're trying to do way too much. A serializer should just be about (de)serialization, i.e. converting from a generic format (e.g. JSON) to / back a python object, with some validation. When you use a DRF serializer inside a view, it can do complex queries to retrieve / modify the model instance, save the instance in database, modify the serializer instance with db values (for example because of default values) and return the modified object in the HTTP response. All this logic should not be defined inside the serializer. Obviously you don't have to do it, but it means you cannot use the DRF mixins, nor the viewsets.

On the opposite, I'm in love with pydantic. Like any other package, it has issues, but it tries to solve a single problem, it's concise, validators are explicit and readable.

Obviously I don't mean any disrespect towards DRF maintainers, they're doing an impressive job, a lot of people use and love their work (and I still use it everyday)

Re:Using a Framework will harm the maintenance of your software by hinkley on Thursday October 13, 2022 @01:26AM (#33187573)
Commonly summarize simply as:

Libraries over frameworks.

If you chose not to use an existing framework and end up building your own instead, you just live long enough to become the villain of your own story, as it were. But it's really, really tempting to write frameworks.

Re:Using a Framework will harm the maintenance of your software by Kiro on Thursday October 13, 2022 @03:00AM (#33188078)
> TFA

That was uncalled for.

Re:Using a Framework will harm the maintenance of your software by cbsmith on Thursday October 13, 2022 @10:48PM (#33199092)
An RDBMS meets the definition.
Re:Using a Framework will harm the maintenance of your software by hsn915 on Wednesday October 12, 2022 @08:29PM (#33185666)
> Every sufficiently complex framework-free application contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of a framework.

This is simply false.

On the other hand, every sufficiently complex framework-dependant application is way too complex for what it does, and would be a lot simpler if it was not using said framework.

> 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.

One of your greatest desires should be to have strong propietry technology that you control. Otherwise you are not different from anyone, and anyone can duplicate your work in two months by just using the same framework.

Re:Using a Framework will harm the maintenance of your software by zdragnar on Wednesday October 12, 2022 @08:40PM (#33185759)
Avoiding the use of a framework does not preclude someone else from duplicating your work in two months by using a framework. It just means that you wasted a whole lot of time hand-rolling things that didn't need hand-rolling.

Most businesses are not successful by virtue of the technologies they choose. Facebook is probably the foremost example here; they started with PHP and moved over time to leverage additional technologies (some homegrown like hack and react, others just additional languages like C++).

There are plenty of facebook clones in plenty of languages. The technology isn't the reason Facebook hasn't been supplanted by a competitor with the exact same product.

Re:Using a Framework will harm the maintenance of your software by matthewmacleod on Wednesday October 12, 2022 @08:39PM (#33185742)
No, it's not "simply false". It's something that many of us have repeatedly observed happening and probably done ourselves at some point. There are of course exceptions, but it's not really fair to bluntly dismiss it.

One of your greatest desires should be to have strong propietry technology that you control

Yes – and you should be investing your time in making that "strong proprietary technology" more effective, and spending as little time as possible doing all the bits that your competitors didn't have to do because they picked an off-the-shelf solution that did most of it to a "good enough" level.

Re:Using a Framework will harm the maintenance of your software by hsn915 on Wednesday October 12, 2022 @08:55PM (#33185853)
This notion that frameworks save you time is just ridicluous. Unless the framework is doing something really complicated and difficult (like, say, a 3D game engine such as the Unreal Engine), chances are it's costing you time and effort.

What often ends up happening is you have to do a lot of useless work to get around the limitation of the framework you decided to use at the start.

Since most people on HN are in the web space, framework often refers to things like "Django" or "Redux". These beats always cost way more than they provide.

For a web server, a library like the standard "net/http" in Go is way more useful than a "framework".

Re:Using a Framework will harm the maintenance of your software by megaman821 on Wednesday October 12, 2022 @11:15PM (#33186728)
I remember people saying this in a PHP days and almost without fail their code would be littered with security bugs. They don't a template language, and there would be a XSS vulnerability. They don't need an ORM, and there would be a SQL injection vulnerability. They don't need a form library, and there would be a CSRF vulnerability.

Now-a-days there are less security vulnerabilities and more buggy messes powered by Express.JS. API's with shitty query string parsers than crash the server.

The average developer should just be using a framework.

Re:Using a Framework will harm the maintenance of your software by goodpoint on Thursday October 13, 2022 @02:57AM (#33188060)
> The average developer should just be using a framework.

Yes, and the non-average shouldn't.

Re:Using a Framework will harm the maintenance of your software by raesene9 on Thursday October 13, 2022 @04:11AM (#33188505)
The tricky part is that many more developers think they're capable of handling all these issues than actually are.

Web app security is a genuinely tricky area with lots of edge cases. Good frameworks provide abstractions that mean you don't have to deal with a lot of those problems for most mainstream cases.

Re:Using a Framework will harm the maintenance of your software by hsn915 on Thursday October 13, 2022 @07:57PM (#33198037)
You're basically saying the average developer is grossly incompetent. Which I don't necessarily object to, but it's important to be aware that this is what you are saying, even though you are not using the exact phrase "grossly incompetent".

If the average developer is so incompetent maybe they should undergo further training before being allowed to touch production systems? I suppose this is what code reviews are for, but I don't see how it helps when incompetent developers review each other's code.

Re:Using a Framework will harm the maintenance of your software by paulryanrogers on Wednesday October 12, 2022 @10:52PM (#33186590)
Are we all talking past each other? IME there is a time for using an off-the-shelf framework and a time to hand roll from scratch. (For varying definitions of scratch.)

Generally when a company's tech needs aren't very unique, and they seek to compete on time to market, then a shelf framework makes sense. Companies whose needs stretch the boundaries of shelf frameworks too much may be better served by building on a lower level platform like from a standard library--entirely or in part.

Yet building from scratch is costly. Depending on the stack / language chosen it may cost an "innovation token" or three. Small companies can't afford a lot of these tokens. And lots of eager engineers want to believe their problems are unique, dragons never before defeated. IME most problems aren't like that. They're boring, such as a codebase that's lost its fit as the market or company has grown, pivoted, or contracted.

Re:Using a Framework will harm the maintenance of your software by tbrownaw on Wednesday October 12, 2022 @10:43PM (#33186530)
> This notion that frameworks save you time is just ridicluous. Unless the framework is doing something really complicated and difficult (like, say, a 3D game engine such as the Unreal Engine), chances are it's costing you time and effort.

... Have you ever written a simple web app? Pull values from a db and present them somehow? Having something that just gives me places to plug in the business logic makes this pretty trivial.

Re:Using a Framework will harm the maintenance of your software by hsn915 on Thursday October 13, 2022 @07:59PM (#33198060)
> Have you ever written a simple web app? Pull values from a db and present them somehow?

Yes I have. A lot.

Re:Using a Framework will harm the maintenance of your software by dalyons on Thursday October 13, 2022 @12:16AM (#33187174)
That is a pretty extreme take - that frameworks “always” cost more than they provide? On what do you base this categorical assertion? I’ve been in this industry a long time, and based on my experience that’s not true at all. “Sometimes” they cost more, if your problem is esoteric or a poor fit to a general framework. Most problems aren’t.
Re:Using a Framework will harm the maintenance of your software by hnfong on Thursday October 13, 2022 @06:27AM (#33189279)
I was going to counter your claims, but I found a comment a couple days ago that perfectly sums up what I was going to say: https://news.ycombinator.com/item?id=33148071
Re:Using a Framework will harm the maintenance of your software by whakim on Thursday October 13, 2022 @01:48AM (#33187686)
Even if this were true (and sibling posts make compelling counterarguments), you've completely overlooked that the value of a unit of engineering time varies wildly. Spending weeks of engineering time re-implementing all the security features Django provides out-of-the-box is suicidal when you're trying to get off the ground. It doesn't matter that it could save months down the road if your project literally doesn't exist anymore.
Re:Using a Framework will harm the maintenance of your software by Daishiman on Wednesday October 12, 2022 @11:51PM (#33187009)
If you think "net/http" is more useful and contains more functionality and less need to reimplement

* HTML forms * and admin * a plug-and-play security framework that's already worked out all the kinks of crypto libraries * an ORM and DB libraries for a half dozen production-ready DBs, with their kinks in transaction and connection management already sorted out

I have a bridge in Crimea to sell you.

Re:Using a Framework will harm the maintenance of your software by dozgon on Wednesday October 12, 2022 @08:35PM (#33185718)
Do you think that formal specifications might alleviate logical bugs to an extent?

Yes, it appears that companies won't budget that at all. Many seem to ship fast, fix later. It is also on the customer, really.

Some people expecting software developers to deliver high quality software (with near 100 % code coverage and exceptional performance), but paying them less and less, is not fair. No wonder, some devs are incentivized to skip unit tests or error handling. Because some employer or some customer won't pay for it.

This is the status quo that makes me pessimistic. It appears that software development is gluing things together and make it somehow work.

This ain't fun for me.

Re:Using a Framework will harm the maintenance of your software by ativzzz on Wednesday October 12, 2022 @09:26PM (#33186068)
I shudder to think about what a formal specification of some of the full stack web projects I've developed would look like. They might take longer than the actual coding of it - especially because specifications change mid project as we build things and realize we actually want them different.

Note this is a feature, not a bug, of "agile" development - you learn and adjust on the fly

Re:Using a Framework will harm the maintenance of your software by ChrisMarshallNY on Wednesday October 12, 2022 @09:42PM (#33186174)
I tend to make it up as I go along ([0], [1]). It works for me (I just finished up a new SDK, using this technique[2]).

However, this would not work for many outfits. It’s just the way that I work.

WFM. YMMV.

[0] https://littlegreenviper.com/miscellany/forensic-design-docu...

[1] https://littlegreenviper.com/miscellany/evolutionary-design-...

[2] https://github.com/LittleGreenViper/LGV_MeetingSDK

Re:Using a Framework will harm the maintenance of your software by ChrisMarshallNY on Thursday October 13, 2022 @05:16AM (#33188882)
Hmm… That’s interesting.

I seem to have upset people. I’d certainly be interested in knowing why, as my comment directly addresses the parent, and does not coarsen the discourse.

Re:Using a Framework will harm the maintenance of your software by ativzzz on Thursday October 13, 2022 @12:41PM (#33193427)
> I’d certainly be interested in knowing why

Don't dwell on it - save your sanity and move on

Re:Using a Framework will harm the maintenance of your software by tomcam on Wednesday October 12, 2022 @08:20PM (#33185589)
Agree 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

Re:Using a Framework will harm the maintenance of your software by forgotmypw17 on Wednesday October 12, 2022 @08:31PM (#33185683)
My 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.

Re:Using a Framework will harm the maintenance of your software by sanitycheck on Thursday October 13, 2022 @05:00AM (#33188778)
I've come to believe the difference between framework-lovers and framework-skeptics is that one (larger) group is generally following a well-trodden path and doing only things the framework authors anticipated. Viewing a framework as a common architecture extracted from the experience of writing lots of software, this makes total sense. Most software looks like X, so a framework like X will look like most software.

Those who have problems with frameworks are solving problems that are to some extent novel. Maybe only 10% novel, but that's still enough to feel like the framework is a straitjacket - because everything else is a solved problem and that 10% is the hard bit and the framework just makes it even harder.

Perhaps some of those people could re-examine their problem and achieve it in a different way using the framework, but others couldn't. But to say "if you're not using a framework you're doing it wrong" perhaps exposes a lack of experience with unusual problems, and "all software ends up containing a custom framework" is confusing frameworks with architecture.

Re:Using a Framework will harm the maintenance of your software by dozgon on Wednesday October 12, 2022 @08:52PM (#33185830)
One example I can think of was the Play framework.

If you wanted to work with Scala 3 and Play 2.7, you couldn't. You needed to stick with Scala 2.13 to be able to use Play 2.7.

This was more than a year ago. Now we have Play 2.8. Is it compatible with Scala 3 now?

Edit:

I am not entirely sure whether it was possible to make Scala 3 and Play 2.7 work. So my statement above might be partially wrong.

However, I had other dependencies too, which required me to use Scala 2.13.

Consider to downvote this, if you think I made a false statement. I should have looked up the documentation beforehand and not rely on my (past) personal experience/impression at all.

Bad mistake!

Re:Using a Framework will harm the maintenance of your software by berkes on Thursday October 13, 2022 @05:18AM (#33188894)
Both could be done with libraries.

Things that you (can) put away behind abstractions, layers or wrappers.

I'm the author and tried to convey clearly the difference between libraries and frameworks. Both allow code-reuse, both allow "standing on shoulders". But one allows you to do so with freedom of movement, independence and domain constraints (libraries) whereas the other locks you in, enforces architectures and designs and requires workarounds when your domain-requirements differ from what the framework dictates.

Re:Using a Framework will harm the maintenance of your software by cratermoon on Wednesday October 12, 2022 @08:43PM (#33185777)
> Using libraries and frameworks is like a business outsourcing things that aren't its core competency and also aren't competitive differentiators.

Adopting frameworks is a variation on the the Build vs Buy question, even when there's no money involved. Does the framework provide some features that are necessary for the technology but not core to what your business does? It's probably OK to use. A company that adopts a framework for its core business is essentially giving up any competitive edge, because any company that uses that same framework with the at least the same skill as your team will end up being a viable competitor.

Re:Using a Framework will harm the maintenance of your software by wruza on Wednesday October 12, 2022 @09:36PM (#33186136)
I agree with a sibling commenter after reading the article. The main point, as I see it between the lines, is not to refuse to use functionality (app side), but instead how this functionality should be packaged preferably (module side). Nothing prevents the one “in control” to give it up and expose a meaningful degree of it to a user, along with default mode convenience for those who want boxed option.

Frameworks actually add to a deplorable side of the software industry. They encapsulate truly great efforts and wisdom into a package which cannot be unwrapped and used partially. They are like smartest CPUs soldered into shitty boards (or simply incompatible with your requirements) without a chance to unsolder the functionality and use it elsewhere. You can’t make your own and you can’t take one off the shelf.

Consider this imaginary example: someone figured out all of the nuances of dom events across all browsers ever and made a clear api to it. Library way is to provide (Context, DomEvent) => MyEvent. Framework way is to create a complex rendering idiom in which MyEvent appears naturally and is an implementation detail. In the latter case you buy two for the price of two, and only so.

Or, they want to test a new idea/paradigm in some area. Without composable libraries, they are doomed to repeat all the mistakes you pointed out because to compete with already existing solutions they have to go all the way through issues unrelated to the idea itself. All that only to battle test it. For most library makers, the desired outcome is a sum of all parts, not just one.

Re:Using a Framework will harm the maintenance of your software by tbrownaw on Wednesday October 12, 2022 @10:34PM (#33186469)
> Frameworks actually add to a deplorable side of the software industry. They encapsulate truly great efforts and wisdom into a package which cannot be unwrapped and used partially.

Do you have a concrete non-hypothetical example? Because I don't think I've seen this.

Re:Using a Framework will harm the maintenance of your software by mechanical_bear on Thursday October 13, 2022 @12:00AM (#33187085)
Exactly. The framework I’m most familiar with, Symfony, specifically is arranged to be antithetical to this statement.
Re:Using a Framework will harm the maintenance of your software by sally_glance on Thursday October 13, 2022 @02:05AM (#33187794)
Same for it's Java-based cousin, Spring :-)
Re:Using a Framework will harm the maintenance of your software by cies on Thursday October 13, 2022 @03:12AM (#33188130)
Say what? That unholy mess of annotations, unusable outside of the Spring "walled garden" where you have to search the internet on how to do the most basic thing (with annotations)? Spring(Boot) is the perfect example --to me-- of a framework that dictates, and does not allow to be get out of your way when all you want is "just libraries".
Re:Using a Framework will harm the maintenance of your software by throwaway284962 on Thursday October 13, 2022 @03:51AM (#33188389)
Yeah Spring is obviously deliberately obfuscated, which makes perfect sense considering the business model.
Re:Using a Framework will harm the maintenance of your software by sally_glance on Thursday October 13, 2022 @07:48AM (#33189713)
Haha yeah I'm curious what Spring will become now that the big ones like IBM are milking the cloud-native cow with Quarkus instead of Spring...
Re:Using a Framework will harm the maintenance of your software by throwaway99593 on Thursday October 13, 2022 @05:00AM (#33188779)
I have to disagree with that. I have developed software without frameworks before, and have come to love a good framework. Spring Boot is a performance multiplier. It may look scary at first because it has so many (optional) modules that supports everything from basic injection to cloud infrastructure.

You don't need to use everything just because it is available. Even basic web services are not enabled by default, and is something you need to explicitly add as a dependency. If you don't want to use Hibernate, just import a different dependency instead.

It lets me focus on business logic, while handling the interface outside the "garden" for me. In my experience, the use of annotations is confined outside the business logic. If that's not the case, the code is organized badly and will cause issues regardless of framework.

Example (could be improved of course)

  @RestController
  @RequestMapping("/dogs")
  public class DogController {
     private final DogRegister dogRegister;

     public DogController(DogRegister dogRegister) {
       this.dogRegister = dogRegister;
     }

     @PostMapping
     public void registerDog(@RequestBody Dog dog) {
       dogRegister.registerDog(dog);
     }
  }
If I decided to change it to a message based approach, I could do that without changing any business logic, by replacing the controller with a queue listener. Also note how IOC will automatically inject the business logic component.

  @Service
  public class DogListener {
    private final DogRegister dogRegister;

    public DogListener(DogRegister dogRegister) {
      this.dogRegister = dogRegister;
    }

    @JmsListener("dogs")
    public void registerDog(Dog dog) {
      dogRegister.registerDog(dog);
    }
  }
In my view this is a framework that gets out of your way. I did not have to change the business logic (dog service). Spring takes care of the interface outside the program. If I wanted to switch to a different standard than JMS, I would most likely in many cases just need to change to a different annotation.

If the code is organized badly, the business logic would have been included in the controller and be harder to change. But isn't that the case of bad structure in general?

Re:Using a Framework will harm the maintenance of your software by sally_glance on Thursday October 13, 2022 @07:45AM (#33189696)
Spring nowadays supports the JDK-native annotations where the exist, and they have a lot of Spring-agnostic libraries under their umbrella.

But I'm inclined to agree on the case of Spring Boot... It's meant to be a "convention over configuration" kind of thing, so I guess by nature it ties you in pretty hard.

Re:Using a Framework will harm the maintenance of your software by throwaway0asd on Wednesday October 12, 2022 @10:30PM (#33186445)
> 1. Every sufficiently complex framework-free application contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of a framework.

After 25 years of experience writing software I can honestly say I have encountered many people that agree with this, and perhaps all of them (every single one) have not actually experienced writing an application without a framework. This sentiment sounds correct in theory, but it isn't based on any experience from any one of the people making such a claim.

The reason why that is comes down to selection bias and cognitive conservatism. Once you become dependent upon a framework everything looks like a framework, even when it isn't. Therefore everything works as expected (like a framework) or it doesn't, which isn't buggy. So really this isn't a question of the software, but of the developer's capability to perceive (or not) that software.

This is why I refer to frameworks as an insane asylum as I described here to 27 up votes: https://news.ycombinator.com/item?id=32914694

Re:Using a Framework will harm the maintenance of your software by jameshart on Thursday October 13, 2022 @09:33AM (#33190704)
Any time a piece of software abstracts a repeatable pattern, that’s a ‘framework’.

All a framework means is that there is a coherent, repeatable model for implementing the building blocks out of which the application is built.

Even a simple command line program with hardly any functionality soon runs into the issue of having more than one command-line argument or environment-variable based configs. And a sensible, maintainable approach to this involves someone spotting ‘hey! We can abstract the bits that all our command-line parameters have in common so processing them all is consistent’. And then you have a framework. Because now ‘adding a new command line parameter’ has to be done in the standard way - you register a validator here and you add a help string there.

Building something without a framework is a rejection of patterns, or of the value of establishing repeatable structure.

Software that facilitates encapsulating chunks of functionality as standard building blocks is more maintainable over time. It’s much easier to work on a system where you can take a user story and interpret it as ‘okay, so we can implement that as a new Task type and then add a Tool to the Tool Library that lets users who have the right Role create a Schedule to run the task’. any time a system is sufficiently structured that you can think that way, it’s essentially become a framework.

Frameworks can be lightweight or heavyweight, sure, and they can be open to being overstepped or closed - and choosing when to prefer to structure your framework to make it easier or harder for someone to step outside the lines is just an engineering choice like any other.

Re:Using a Framework will harm the maintenance of your software by account-5 on Thursday October 13, 2022 @09:42AM (#33190808)
> Any time a piece of software abstracts a repeatable pattern, that’s a ‘framework’.

With that definition all programming languages are frameworks.

The first part of the article defines what the author means by a framework, which is different from libraries, and programming languages in general.

Re:Using a Framework will harm the maintenance of your software by thomastjeffery on Thursday October 13, 2022 @12:32PM (#33193292)
No, programming languages exist in a different domain. The domain of frameworks is explicitly in toolchains and environments.

It's similar to the difference between function and algorithm. The former is literally code, and the latter is conceptual.

Many programming languages are distributed with a cohesive framework. For example, Rust is distributed not only with rustc to compile binaries, but also with cargo to manage library dependencies. That doesn't prevent you from using rustc without cargo, though, or even making another rust compiler for GCC, and using GCC's framework.

Re:Using a Framework will harm the maintenance of your software by jameshart on Thursday October 13, 2022 @10:38PM (#33199033)
In some ways, languages - or features of them - certainly can be 'frameworks'.

What is a class definition in an OO language but a way for you to implement some state and some functions in a particular pattern that, when plugged in the framework of the compiled application runtime, will take care of the lifecycle and marshalling of calls to your code?

That meets all the definitions of framework provided by the author.

Re:Using a Framework will harm the maintenance of your software by throwaway0asd on Thursday October 13, 2022 @06:33PM (#33197346)
What you call a framework I call a function. I don't consider functions or the DRY principle to indicate a framework. A framework dictates how to proceed. A function is merely an available approach. To me this really sounds like imposing the word framework where the word abstraction is more appropriate.
Re:Using a Framework will harm the maintenance of your software by jameshart on Thursday October 13, 2022 @10:32PM (#33198993)
The article precisely defines a framework, in its terms, as "an abstraction in which software, providing generic functionality, can be selectively changed by additional user-written code, thus providing application-specific software," where the "overall program's flow of control is not dictated by the caller, but by the framework"

Which is exactly what I am talking about.

If adding a new commandline parameter to your application involves adding a piece of validation logic that gets called on startup, putting an extra line of code into the help text initializer, and writing a handler to be called when the parameter is supplied... then the flow of control is already dictated by the application, and you are adding new functionality over the top of an abstraction. You are using a framework, not a 'function'.

Re:Using a Framework will harm the maintenance of your software by inopinatus on Wednesday October 12, 2022 @10:41PM (#33186511)
> perhaps all of them (every single one) have not actually experienced writing an application without a framework

I actually have written software without a framework, so by this standard I feel qualified to comment.

Not all software has an implied framework within it. Most Unix command-line utilities do not, for example, with only a few exceptions, and discounting the C standard library as something worthy of the label “framework”. Nevertheless even they exist within an overall architecture that starts to look like one, if you squint, and realise the enormous power of piping stdout around.

However, many line-of-business applications do develop sufficient complexity, as the owner/operator adds new features to support their expanding operations, that the subsequent edifice either accretes random code into a horrifying fatberg of unmaintainability, or some wiser developer refactors substantial parts of the interface, business logic, persistence, and runtime configuration, effectively creating a framework within that application on which the logic and interface and so forth subsequently hang, and with a pinch of skill and luck, in a fashion that is more readily reasoned about and amended.

Whether that informally-specified framework might be considered worthy of extraction into a unit of software for itself is another matter, and largely a case of programmer hubris.

Re:Using a Framework will harm the maintenance of your software by Supermancho on Wednesday October 12, 2022 @11:33PM (#33186869)
> Not all software has an implied framework within it.

The definitions of "framework" are always a sticky issue. If you take "framework" at face value, it's minimally a set of idioms. "an essential supporting structure which other things are built on top of" - which necessarily includes a mental model of execution. This relates closely to why naming, in software development, is considered so difficult.

All software has an inherent framework. First is the mental model and then the implementation. Implementation middleware to simplify utilizing these idioms or enforce them, are incidental. If you're lucky, you can derive some of the underlying design from documentation.

Ironically, those who claim that they never use a framework are largely making implicit claims about what they consider a framework to be or have.

Re:Using a Framework will harm the maintenance of your software by inopinatus on Thursday October 13, 2022 @12:40AM (#33187313)
Well, I don't disagree, and we could almost label that "framework zero", and also hence the reference to Unix utilities, but I am taking a contextual cue from the article linked at the top which is definitely sledging large pre-chewed boli of code such as Rails, Django, Drupal and so forth.
Re:Using a Framework will harm the maintenance of your software by hmlongco on Thursday October 13, 2022 @07:12PM (#33197682)
Really? Did my toggling on an 8e that ran as a controller for a COM (Computer Output Microfilm) "printer".

Not saying that I could write code directly in octal... but I was pretty darn close. Of course, it helps when your assembly language consists of just eight instructions.

Re:Using a Framework will harm the maintenance of your software by vidarh on Thursday October 13, 2022 @03:18AM (#33188178)
> The definitions of "framework" are always a sticky issue.

Hence why the article defines what it means by framework, and by the definition in the article, software rarely has any implied frameworks within as one of the definition points is that there is code in the framework the user is not free to change.

There certainly can be frameworks emerging within large projects, but by the definition in the article they're not problematic because they don't lock you in: You can change those pieces. You in particular ultimately remain in charge of the flow of control in the code. Those "frameworks" don't take away control and put you in a straightjacket.

The article could perhaps have been framed better as "how to write a framework or framework-like thing which doesn't become a problem". Some thoughts might be:

* Structure it as decoupled components where you can opt in and opt of different elements, including of control flow. E.g. Padrino - a Ruby web framework fits well here. You can pick and choose which ORM to use; you can opt in to a router, controller, admin interface, mailers, logging, caching, and view libraries, or not use them at all. You can start with plain Sinatra and add in bits of Padrino as and when you choose, or supply your own.

* In particular, if possible, externalise the control of flow into replaceable components. Doing this alone can often be enough to get you out of the straight-jacket of "frameworks as defined by the article"

* Allow users to override/replace all components rather by defining clear interfaces and not assuming you can call hard-code calls between the different components. Padrino again fits well there. So did e.g. Qmail treated as a "framework for building a mail server" ("nobody" used pure Qmail, but Qmail defined the interfaces between each individual program which made up the full system, so you could replace every single bit step by step). In particular there should be no "magic" glue which there isn't a well defined way of tearing out.

Re:Using a Framework will harm the maintenance of your software by Ma8ee on Thursday October 13, 2022 @03:30AM (#33188255)
An important part of being a framework is that it is made for reusability, similar to a library. Just because your code has some thought out structure/architecture doesn't mean that it has an inherent framework.
Re:Using a Framework will harm the maintenance of your software by Supermancho on Tuesday October 18, 2022 @08:03PM (#33255741)
> An important part of being a framework is that it is made for reusability

I might have agreed with this at one time. A dedicated "framework" has documentation and additional software to shortcut assumptions, but a coherent design isn't different enough from the rules that guide any given framework to be a distinction. The biggest differences are how mature the frameworks are in breadth of documentation, guidance in how to achieve constrained goals (there is no "everything" framework), and supporting software to shortcut boilerplate.

Re:Using a Framework will harm the maintenance of your software by valenterry on Thursday October 13, 2022 @01:16AM (#33187524)
> or some wiser developer refactors substantial parts of the interface, business logic, persistence, and runtime configuration, effectively creating a framework within that application

That's not what people commonly understand as a "framework". Nor is it a helpful definition because then where does "abstracting things" and "framework" start and end?

No, the main difference between frameworks and what you describe is the IOC. In the framework world, the framework calls you and then something happens behind the scenes until the framework decides to call some code that you provided via the frameworks API.

With libraries it's the other way around: you call the library and then you do something with the result and then use it to call the library again and so on until you have the desired outcome.

The difference is, for example, that you can call the library and when it returns something to you, you can inspect it and choose to ignore it. You can do so in an arbitrary way. In the framework case, if the framework does not provide any way for you to interact with it in the way you want, then you are screwed.

Re:Using a Framework will harm the maintenance of your software by inopinatus on Thursday October 13, 2022 @02:20AM (#33187877)
Sorry, I don't accept this very mechanical definition; not only is it a needlessly narrow one, it's downright meaningless in some paradigms, such as when implementing coroutines via continuations, but that doesn't mean you can't have frameworks in Scheme. Conversely, we could describe tuplespaces (a la Linda), or many event- or interrupt- driven systems (like an Ethernet port), as an inversion of control, but whether they're frameworks or not would be an open question, and indeed in the end almost everything happening inside a modern computer consists of one element calling back to another, up and down a stack.

Heck, it's not even true of some of those specifically called out in the article above. For example, I've written programs that use Rails as a library - or rather, suite of libraries - of functions and classes to be called, but anyone suggesting that Rails is somehow "not a framework", on the flimsy grounds that it did not dictate the flow of control, is gonna get some funny looks at morning standup.

But the greater problem is that narrow, mechanical definitions omit purpose, and talking about software without purpose being front-and-center becomes rapidly theological. If you're wondering what I mean by that, look up the wikipedia article for "Software framework", scroll through its desultory talk page, and recognize the inevitability of the boilerplate it got stuck with: "This section is written like a personal reflection, personal essay, or argumentative essay that states a Wikipedia editor's personal feelings".

Re:Using a Framework will harm the maintenance of your software by Lukas_Skywalker on Thursday October 13, 2022 @06:03AM (#33189163)
I‘d say Rails is a combination of framework and libraries.

Some parts (ActiveSupport, the part that simplifies e.g. date calculations) are clearly libraries. They can be used outside of Rails as well, because they totally ignore the shape of your other code.

Other parts (ActionPack, the component that calls your code depending on the incoming web request) are working like a framework. Your code must adhere to their requirements, otherwise it won‘t work.

Re:Using a Framework will harm the maintenance of your software by ItsMonkk on Friday October 14, 2022 @11:45AM (#33205078)
I think it might be better if instead of trying to redefine libraries and frameworks we instead used the terms impure application(frameworks) and pure application(libraries). That would make it evident as to which libraries are actually tainted with impure work and need to be redefined as impure.

When you extend this pure/impure idea all the way throughout the computing eco-system, it quickly becomes apparent that something went wrong a long time ago, and every-time, instead of untangling the mess that is pure and impure into their own buckets, we find a way to run a framework in a framework.

What is an Operating System? What is a container? What is k8s? What is a Programming Language? What is a browser? What is a website? What is next?

Re:Using a Framework will harm the maintenance of your software by valenterry on Thursday October 13, 2022 @02:46AM (#33188007)
I'm not saying that I gave the perfect definition of a framework. But if anything the original definition is even worse or less meaningfull.

Also, it is certainly possible to have a mix of a library and a framework where parts use IOC and others don't. Maybe that's try for Rails (never used it) and that's where your confusion comes from?

Re:Using a Framework will harm the maintenance of your software by rbanffy on Friday October 14, 2022 @06:43AM (#33201785)
> this very mechanical definition

One of the most useful definitions I found was from Luciano Ramalho, the author of Fluent Python (and so many other cool things). According to his insight, a framework is something that calls your code. A library is something your code calls. Frameworks are more rigid things that force structure on your functionality. If the structure it imposes is good, then your code will be good.

Their scope is also tailored to the languages they support. As you pointed out, different languages will have different needs.

Re:Using a Framework will harm the maintenance of your software by flohofwoe on Thursday October 13, 2022 @02:53AM (#33188045)
I don't agree with this simplistic distinction between framework and library. There are plenty of libraries that call back into user code. A better definition might be that a framework imposes an entire 'application model' on you, and trying to step outside that predefined model is at your own risk, while a library is a much smaller and flexible building block (also a building block for frameworks).

But there's a large gray zone between these two, and eventually the distinction is also often quite pointless in the real world.

Re:Using a Framework will harm the maintenance of your software by Someone on Thursday October 13, 2022 @04:06AM (#33188474)
Another, a bit less gray zone, distinction is that you can have only one framework in your program, but can use multiple libraries.
Re:Using a Framework will harm the maintenance of your software by mobiuscog on Thursday October 13, 2022 @06:46AM (#33189395)
In the Java world, at least, you can absolutely have multiple frameworks in your program.
Re:Using a Framework will harm the maintenance of your software by schwartzworld on Thursday October 13, 2022 @09:21AM (#33190600)
You can have multiple programming languages in a program, so of course you can have multiple frameworks.
Re:Using a Framework will harm the maintenance of your software by valenterry on Thursday October 13, 2022 @03:30AM (#33188254)
I think the last sentence is really true. And yes, there are libraries that call back into user code, which makes them framework-like in this regards.

> A better definition might be that a framework imposes an entire 'application model' on you, and trying to step outside that predefined model is at your own risk

This is the kind of definition were 50% will call something a framework and the other half will call it a library then. Not sure if that is really helpful.

Re:Using a Framework will harm the maintenance of your software by 8note on Thursday October 13, 2022 @03:43AM (#33188336)
This kinda suggests that most node modules are in fact frameworks, in that they accept callbacks.

Callback hell however, is not something I'd associate with a framwork

Re:Using a Framework will harm the maintenance of your software by valenterry on Thursday October 13, 2022 @04:09AM (#33188497)
Yeah, if this is not just an once-off async callback (where you could just use a promise) but somthing more complicated, then this is indeed more framework-like and for me would be a reason to try to avoid it.
Re:Using a Framework will harm the maintenance of your software by Aeolun on Thursday October 13, 2022 @07:05AM (#33189491)
> then where does "abstracting things" and "framework" start and end?

It doesn’t. If you abstract things enough there is your framework.

The only things I’ve seen that were truly without a framework were raw php files that did everything contained within that single file. And even these had headers that combined some common functionality.

Re:Using a Framework will harm the maintenance of your software by flohofwoe on Thursday October 13, 2022 @02:48AM (#33188019)
> Not all software has an implied framework within it. Most Unix command-line utilities do not, for example, with only a few exceptions, and discounting the C standard library as something worthy of the label “framework”.

The C standard library is exactly that though, a framework for writing UNIX command line tools :)

(for anything else it's much less useful)

Re:Using a Framework will harm the maintenance of your software by coldtea on Thursday October 13, 2022 @03:20AM (#33188185)
A library is not a framework. You can write framework-free apps while using libraries (in fact, most do - not wanting to be burdened with a framework doesn't mean you have to write all functionality yourself).

A framework is either about inversion of control (it calls your code, e.g. you write web request controller logic, and it sets up the infrastructure for calling your controllers), and/or a set of ways to structure your code, like classes to extend, folder structure, a set of patterns you must follow to work with it, like a specific MVC-like organization of code, and so on.

Re:Using a Framework will harm the maintenance of your software by flohofwoe on Thursday October 13, 2022 @04:18AM (#33188551)
Well to be pedantic, the CRT invokes a callback called 'main' with preprocessed (command line) parameters, in the 'main callback' you're expected to do something with the parameters that have been passed to you (for instance read data from stdin, process it and write back to stdout), and then return from the 'main callback' with a success or failure code.

Ok, I'm throwing together the CRT and standard lib here, but in the end both are parts of the "UNIX command line tools framework" which is supposed to provide a programming environment to easily extend the UNIX shell with your own commands.

Re:Using a Framework will harm the maintenance of your software by coldtea on Thursday October 13, 2022 @07:28AM (#33189608)
Yes, in the same sense that "all program are just permutations of 0 and 1 in the end".

Similarly, "libc is the same as a framework" is not an abstraction/assumption at any meaningful level, or really pertinent to the discussion.

Re:Using a Framework will harm the maintenance of your software by camgunz on Thursday October 13, 2022 @04:57AM (#33188767)
By this definition everything is a framework. You're never the one calling code, it's always the BIOS, the bootloader, the kernel program loader, etc. I don't want to go all ad-reductio, but this is one of the points I have against the anti-framework people: the code you write is actually a pretty small percentage of the total code that makes up your system/application. Good engineering is working to make sure that code is differentiating code, not irrelevant code like garbage collection, HTTP header parsing, etc.
Re:Using a Framework will harm the maintenance of your software by robertlagrant on Thursday October 13, 2022 @07:15AM (#33189538)
> You're never the one calling code, it's always the BIOS, the bootloader, the kernel program loader, etc. I don't want to go all ad-reductio

I don't think you're even being reductive; it's just irrelevant. The saying is to do with the software you're writing right now - do you include a framework (e.g. Django, Ruby on Rails, Spring) or do you include libraries that you could swap out (e.g. Flask - which terms itself a "micro framework", but is a library for this definition, ReactJS, SQLAlchemy) and your code is in control. You're right that the code will run on one or more operating systems, but abstracting out that far elides the useful conversation application developers can have about eggs and baskets.

> the code you write is actually a pretty small percentage of the total code that makes up your system/application

This is almost always true, but seems again irrelevant. How I write my application is worthy of discussion in and of itself, if for no other reason than, with a few exceptions, I'll spend a lot more time and money on making my application than I will thinking about how the Linux kernel works.

Re:Using a Framework will harm the maintenance of your software by NoGravitas on Thursday October 13, 2022 @09:50AM (#33190910)
> The saying is to do with the software you're writing right now - do you include a framework (e.g. Django, Ruby on Rails, Spring) or do you include libraries that you could swap out (e.g. Flask - which terms itself a "micro framework", but is a library for this definition, ReactJS, SQLAlchemy) and your code is in control.

I'd say by this definition (your code calls a library, a framework calls your code), Flask is every bit as much a framework as Django; I write functions that are called by the router just like I do for Django views. Sure, I can swap out the ORM and the templating library; I might even be able to swap out the routing library, but here be dragons. But a standard Flask application and a standard Django application are very similar. And if I wrote an application using Flask, it would be more or less a rewrite to swap in something else for Flask, because I'd be depending on Flask's request and response objects, at minimum.

This is partly why I don't think this definition is very useful, too. Clearly Django and Flask are different, but this isn't why.

Re:Using a Framework will harm the maintenance of your software by camgunz on Friday October 14, 2022 @05:14PM (#33208875)
> I don't think you're even being reductive; it's just irrelevant.

The arguments here are:

"With libraries you call the code; with frameworks they call your code"

"This isn't a good distinction because there are lots of things we wouldn't consider frameworks that call your code"

That seems relevant to me.

> I'll spend a lot more time and money on making my application than I will thinking about how the Linux kernel works.

That means the kernel is doing its job, and if you swap out "Linux kernel" with "Django", that would also mean Django is doing its job. Without the kernel, you'd have to do a lot more work talking to hardware and scheduling other processes to run. Without Django, you'd have to do a lot more work wrangling HTTP and SQL.

It feels like peoples' issue with frameworks are that they force a way of thinking on you. But everything in software does that, the semantics of processes, pages, threads and so on are entirely made up, just like model view controller is.

Re:Using a Framework will harm the maintenance of your software by coldtea on Thursday October 13, 2022 @07:31AM (#33189623)
>I don't want to go all ad-reductio, but this is one of the points I have against the anti-framework people: the code you write is actually a pretty small percentage of the total code that makes up your system/application

Which is neither here, nor there.

We're talking about a specific kind of inversion of control and forced structure within the codebase.

Else we could just go down an irrelevant rabbit hole, and it would like being a lawyer in a criminal case and arguing that your client is innocent, because "ultimately everything, including the murder, is just deterministic after-effects caused by the Big Bang".

Re:Using a Framework will harm the maintenance of your software by camgunz on Thursday October 13, 2022 @11:40AM (#33192508)
Well, my point is that because this applies to more or less everything, it's not a great determinant of library vs. framework.

Like, the way you use Django is by wiring up URLs to functions [0]. This is pretty similar to setting up a vector table for interrupt handlers. Is that a framework? What makes Django a framework and vector tables not a framework?

I'm not trying to be pedantic here, I just really couldn't tell you the difference, and as a result, I'm not sure the distinction is useful. It sounds more like a post-hoc rationalization of why you like or don't like something.

[0]: https://docs.djangoproject.com/en/4.1/intro/tutorial01/#writ...

Re:Using a Framework will harm the maintenance of your software by vidarh on Thursday October 13, 2022 @03:01AM (#33188082)
> The C standard library is exactly that though, a framework for writing UNIX command line tools :)

It doesn't fit the term as used in the article at all, though, in that it doesn't dictate the overall program's flow of control.

Re:Using a Framework will harm the maintenance of your software by flohofwoe on Thursday October 13, 2022 @04:19AM (#33188558)
The overall program flow in this case is:

   shell => CRT => main(argc, argv) => exit code => shell
(to me, the CRT and C standard lib are not strictly separate, although that's debatable of course)
Re:Using a Framework will harm the maintenance of your software by vidarh on Thursday October 13, 2022 @05:01AM (#33188788)
Except none of these steps are dictated by the C standard library (some may be dictated by some libc's)

EDIT: To expand on this: You can call the code from stuff other than a shell; I'm assuming you mean "C runtime" by CRT, and some libc's may have issues without them, though usually only access to argc/argv and atexit(), and you can certainly write C without linking with the initialisation code; and while you'll of course usually enter via main() you don't have to. You decide the control flow.

Re:Using a Framework will harm the maintenance of your software by pjmlp on Thursday October 13, 2022 @05:30AM (#33188977)
CRT also does stuff like floating point emulation, loading dynamic libraries on demand instead of at load time (e.g on AIX and Windows), handling threads post C11, or runtime checks in hardened code.
Re:Using a Framework will harm the maintenance of your software by vidarh on Thursday October 13, 2022 @05:39AM (#33189019)
The point is all of that is optional. You can - and I have - written C to be executed on bare hardware with no initialisation code, and depending on your choice of libc you can still use it (though some functionality may not be available).
Re:Using a Framework will harm the maintenance of your software by pjmlp on Thursday October 13, 2022 @06:58AM (#33189449)
At which point it is no longer C, rather a programing language that vaguely resembles ISO C.
Re:Using a Framework will harm the maintenance of your software by vidarh on Thursday October 13, 2022 @07:19AM (#33189559)
Of course it is still C. You've just opted not to use some of the functionality.

Nothing stops you from e.g. providing your own startup code which then calls the appropriate initialisation code either.

The point being that there's no enforced inversion of control in the sense used by the article, and so calling it a framework in the sense described by the article is meaningless.

Even if we postulated the inversion of control was there, the fact you can replace all parts of it still means it does not fit the article definition.

Re:Using a Framework will harm the maintenance of your software by pjmlp on Thursday October 13, 2022 @11:03AM (#33191996)
Not from the point of view of ISO C and the expected semantics of the abstract C machine.
Re:Using a Framework will harm the maintenance of your software by vidarh on Thursday October 13, 2022 @11:33AM (#33192413)
If you were to write a program that relies on those aspects of the abstract C machine and don't provide those aspects, then you might have an argument, in that in that case the observable behaviour would be different, but if you choose not to make use of that functionality, its presence is entirely irrelevant.

This is also massively shifting goal posts. You first wrote "At which point it is no longer C". By your argument here, e.g. the Linux kernel is not written predominantly in C. But nobody uses the term that way. If you were to speak specifically about ISO C, maybe, but the person I replied to initially did not limit it to ISO C.

As such this is also entirely irrelevant to the original argument.

Re:Using a Framework will harm the maintenance of your software by pjmlp on Thursday October 13, 2022 @12:59PM (#33193664)
Everyone knows Linux is actually written in GCC C, and Google has burned lots of dollars making it work with clang, if it was proper C, that wouldn't never been an issue.
Re:Using a Framework will harm the maintenance of your software by vidarh on Thursday October 13, 2022 @02:19PM (#33194553)
And yet almost everyone would still agree that "GCC C" is also C, so this is entirely irrelevant to what was being discussed.
Re:Using a Framework will harm the maintenance of your software by pjmlp on Thursday October 13, 2022 @05:21PM (#33196647)
Yeah, that is why plenty people then show up on Stack Overflow with questions that prove how much they know C, versus "whatever my compiler did when I tried it out".
Re:Using a Framework will harm the maintenance of your software by vidarh on Friday October 14, 2022 @03:25AM (#33200558)
And this has even less to do with what was being discussed.
Re:Using a Framework will harm the maintenance of your software by pjmlp on Friday October 14, 2022 @04:36AM (#33201063)
What was being discussed was that C without the CRT is a dialect of ISO C.
Re:Using a Framework will harm the maintenance of your software by camgunz on Friday October 14, 2022 @05:40PM (#33209134)
The kernel loads your program, and schedules its execution. This is basically the same as using an async framework and sending the entry point to your application.

If you're willing to extend a little, there are also signal handlers, or setting up callbacks in pthreads.

Again this isn't to be reductive, but to say this is a super common method of encapsulating irrelevant stuff. It doesn't seem to be a significant differentiation between "I'm a library" and "I'm a framework".

Re:Using a Framework will harm the maintenance of your software by marcus_holmes on Thursday October 13, 2022 @08:13AM (#33189918)
But this is fine. The framework that the organisation develops for itself is designed to solve the problems that the organisation has.

As TFA says, one of the main problems with frameworks is that the maintainers of the framework don't share your organisation's goals, and therefore will have different problems to solve.

Re:Using a Framework will harm the maintenance of your software by strogonoff on Thursday October 13, 2022 @10:28AM (#33191441)
While one can think of every problem as a snowflake situation never encountered by anyone before, outside of its core business domain an organization (particularly a non-technical one) rarely faces truly unique challenges. Most of the time one can also decompose the solution into a number of well-known problems that had been solved before.

For example, in an overall solution for some snowflake business challenge you may see components such as an order taking system, a customer support center, a CRM, an ERP—and on another level patterns like a statically rendered site, an SPA, a “classic” content-driven site, and so on. In my opinion, being blind to these opportunities and intent on putting the entire solution together without any delegation of control flow smells of lazy architectural thinking and/or job security. The exact decomposition would depend on business specifics, foreseeable future evolution of the business, team capabilities and other factors, but as a result you’d be able to radically lighten the implementation and indeed maintenance burden with a strategic use of frameworks or even lightly customized CMS.

Re:Using a Framework will harm the maintenance of your software by marcus_holmes on Thursday October 13, 2022 @11:04AM (#33192017)
This simply isn't true for, well, every project I've been on. There is always some unique wrinkle in the requirements that means this project needs a different approach.

SAP is the classic example of this: SAP implements vanilla business processes (with lots of flexibility built in). Yet every single business implementing SAP needs extensive customisation and modification to make it fit their business processes. Some have spent millions or tens of millions trying to make SAP fit their business and failed.

In your terms; every business is a snowflake. You cannot create (for example) an order taking system that will fit all businesses. Or even "all businesses for whom order taking is not part of their core business domain". Only "those businesses who are willing and able to make their order-taking process fit your system".

Re:Using a Framework will harm the maintenance of your software by strogonoff on Thursday October 13, 2022 @11:43AM (#33192554)
You identify common aspects and snowflake aspects, and in the end the separation as to which parts are snowflake (contain business specifics). That’s your job as software architect. Again, the locations of snowflake parts tend to be similar across businesses, and this is where good frameworks and CMS tend to offer extension points.

It’s a spectrum: a CMS may be more fiddly as to customization but more reliable if your needs and extension points fit, framework offers more freedom, and a bespoke combination of libraries generally forces you to implement and integration test more of control flow and imposes higher costs of maintaining proper documentation as to how everything fits together (to avoid the next engineer accidentally killing performance due to a misunderstanding of how it’s supposed to work).

On the other hand, CMS and frameworks can actually inform your decisions, as their engineers had faced tasks similar to yours time and time again.

Re:Using a Framework will harm the maintenance of your software by marcus_holmes on Thursday October 13, 2022 @12:28PM (#33193232)
I work in startups mostly, where requirements are not defined and the business learns as it goes; it's simply not possible to identify all the areas that are "snowflake" ahead of time.

It is sometimes possible to persuade the business that if they create the process in a way that matches the framework it will make life easier for everyone. But often that isn't possible, and often there are good reasons for that.

Re:Using a Framework will harm the maintenance of your software by strogonoff on Thursday October 13, 2022 @12:34PM (#33193327)
I see. When writing my comment I also had in mind all the businesses that are not primarily technical (shops and such).

I think it’s often possible to identify the truly inflexible/snowflake aspects the business and still make use of frameworks/CMS. For a tech-focused company there are possibly more cases in which building your own is a viable decision, but with other companies that don’t have strong technical brains so to speak “this will cost you more to develop and more difficult to hire for later” is something they would understand…

Re:Using a Framework will harm the maintenance of your software by dublin on Thursday October 13, 2022 @10:00PM (#33198801)
<quote>Some have spent millions or tens of millions trying to make SAP fit their business and failed.</quote>

Any business that tries to make SAP fit their needs will fail to some degree (usually to a large degree, and expensively).

SAP will tell you in a heavy German accent that you bought the perfect business practices from them, and if you want to be successful, you VILL make your business fit SAP, not the other way around. In reality, they're right - All the really successful SAP installations I've ever seen had the company tossing all of their existing processes and replacing them wholesale with the ones built into SAP. Trying to make SAP fit foreign practices is a losing deal.

Re:Using a Framework will harm the maintenance of your software by marcus_holmes on Friday October 14, 2022 @08:48AM (#33202824)
Yeah, I've heard the same. And this echoes what I think happens with frameworks. You cannot make the framework fit your process. You might be able to make your process fit the framework. But the further your ideal process diverges from the framework's process, the more painful it is and the more the benefits of getting started faster are lost.

:s/framework/SAP/g

Re:Using a Framework will harm the maintenance of your software by NoGravitas on Thursday October 13, 2022 @09:36AM (#33190740)
> Whether that informally-specified framework might be considered worthy of extraction into a unit of software for itself is another matter, and largely a case of programmer hubris.

The interesting thing to me is that this is how Django, one of the canonical big backend frameworks, came into being. It was based on what a newspaper's website's staff were actually using in practice.

Re:Using a Framework will harm the maintenance of your software by taylodl on Thursday October 13, 2022 @11:38AM (#33192479)
I've been creating software for 40 years and I can tell you the statement "every sufficiently complex framework-free application contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of a framework." is 100% accurate. Back in the day we'd go and create our own frameworks that we could use on multiple projects. They were never as robust as the frameworks that exist today since we didn't have nearly the number of people using the framework and discovering issues. Not to mention the incredible amount of time we spent creating and maintaining these frameworks. Coming from that experience early on in my career to where we are today with people complaining about "too many frameworks" sounds like first world whining to me! :) I'll take too many frameworks over having to create everything from scratch any day.
Re:Using a Framework will harm the maintenance of your software by mattgreenrocks on Thursday October 13, 2022 @09:45AM (#33190844)
> So really this isn't a question of the software, but of the developer's capability to perceive (or not) that software.

It is quite telling of HN's audience if they honestly think that "every sufficiently complex framework-free application contains a [buggy] half-framework." The precise definition of a framework may be a bit hard to pin down, but most any experienced practitioner knows it when they see it. Things I look for:

* coupling of a blessed architecture, libraries, and patterns. Some choice of libraries may be allowed, but they must conform to a framework-prescribed interface.

* difficulty of isolating behavior for fast unit testing when using framework as prescribed (not always, but this is right more often than I want still)

* inversion of control as a core building block instead of straightforward composition. (This point gets fuzzier in callback-centric langs.)

* main() (or its moral equivalent) ends up being a framework bootstrap call, or is hidden entirely.

* related to last points: emphasis on hiding as many execution details as possible to present a simplified view of what the framework author believes is important.

* reliance on extension points to customize behavior (via subclassing/hooks) rather than simply exposing primitive operations that users can call alongside custom code.

* documentation beyond API docs and tutorials, usually necessitated by the number of novel concepts introduced by the framework

* heavier-than-normal emphasis on marketing, often leading with social proof from a megacorp, sometimes with big promises on how this framework is not like the others

The main takeaway should be this: a framework is not something that wants to blend into the background of your application. It is extremely visible and it is something that you program to, and often must take what it wants into account when designing. Without a framework, you can literally do whatever you want, including making a huge mess, or something small, functional and minimal.

I believe that should disqualify most of the rather absurd claims that all libraries/patterns/libc are "frameworks."

Re:Using a Framework will harm the maintenance of your software by piokoch on Thursday October 13, 2022 @03:33AM (#33188271)
Where do you draw the line between using and not using framework.

Programming language is a framework over machine language. Java garbage collector is a wrapper around manual memory management. Java Servlets is a pretty thin wrapper over HTTP request/response, is this a framework already? How about Java JAX-RS, it is built on top of Java Servlets and built to handle mostly REST type requests.

Same with database connectivity. Where framework starts? On JDBC/ODBC driver layer? ORM mapper like iBatis? JPA/Hibernate "true" ORM with automatic dirty checking?

Re:Using a Framework will harm the maintenance of your software by planede on Thursday October 13, 2022 @04:28AM (#33188605)
For me the most important defining characteristic of a framework is inversion of control. With a framework high level control flow is dictated by the framework itself. It follows from this that using two different frameworks can be challenging.

An abstraction layer over a database is not necessarily a framework, it can be just a library. I'm not familiar enough with specific ORMs to comment on those.

A programming language is interesting to look at from this point of view. While sure, you need to use the programming language's features to implement control flow, it typically doesn't actually dictate a high-level control flow itself. There are probably languages where this is not completely true.

Re:Using a Framework will harm the maintenance of your software by NoGravitas on Thursday October 13, 2022 @09:59AM (#33191043)
By this definition, though, which does seem to be the one used by the article, both Flask and Sinatra are frameworks. Which I don't necessarily disagree with, but there are tons of people here in the comments arguing the opposite.

For that matter, it seems to me that CGI would be a framework in this sense - the high level control flow is that you are called by the web server, run, take input from environment variables, output an HTTP response, and exit. Not fundamentally different from "Django views take a request object as an argument, and return a response object, and are called by the framework". Just a matter of degree.

Re:Using a Framework will harm the maintenance of your software by throwaway0asd on Thursday October 13, 2022 @05:38AM (#33189018)
It appears you are falsely using the word framework to describe abstraction. Language is not a framework. APIs are not frameworks. A framework is a tool providing conventions that dictate exactly how to proceed, typically demonstrated as a packaged architecture. The appeal, it seems, is not having to independently form many minor decisions.

It appears bias, and possibly even neurological limitations, largely account for framework dependence. Typically this is self evident when you step back and examine the opinions qualifying that dependency as most such arguments are fallacies from ignorance. Decision avoidance is the primary indicator of ASD.

For example many of the arguments in favor of frameworks will sound something like: ”I tried without a framework once and produced a framework anyways, so therefore you must use a framework”.

Another example: ”The code must broken and slow if not using a framework.” Without evidence (numbers) this is a bias (or a lie). Before making that claim there is likely no performance measure or comparative defect count. In my experience doing this for 25 years rarely measure anything and instead invent assumptions to qualify whatever opinion they want. Example (look at the parent and peer comments for comparison): https://news.ycombinator.com/item?id=33004060

Re:Using a Framework will harm the maintenance of your software by BlargMcLarg on Thursday October 13, 2022 @06:57AM (#33189446)
>The appeal, it seems, is not having to independently form many minor decisions.

No. It's also to make the work easier and do the heavy lifting, too. Conventions alone are useless if the work becomes more difficult.

It's a vague term but it is pretty darn obvious what the desired intent is behind frameworks and why the endless discussions on their costs and benefits exist. Frankly, most developers couldn't care less about the semantics, they only care if the outcome is beneficial.

Re:Using a Framework will harm the maintenance of your software by throwaway0asd on Thursday October 13, 2022 @07:11AM (#33189524)
Easier versus decision avoidance... I don't see the difference. When you have confidence easiness is dictated by the goal, not the approach.
Re:Using a Framework will harm the maintenance of your software by Aeolun on Thursday October 13, 2022 @07:09AM (#33189512)
> I tried without a framework once and produced a framework anyways, so therefore you must use a framework

In my experience, the correct way of saying this is: I tried without a framework once, and I found myself rebuilding everything that the framework previously gave me. Therefore, I must use a framework (for things that are remotely similar to the thing I built a framework for).

Re:Using a Framework will harm the maintenance of your software by Test0129 on Thursday October 13, 2022 @11:59AM (#33192811)
Seat of pants definition is that a library is something with a single function. Add postgres support, logging (sort of a grey area sometimes), etc.

A framework is something that provides an ecosystem for you to develop in. Rather that using your own style/glue/etc a framework provides all of this for you. Another key aspect of a framework is how much it hides. It's not uncommon that a framework (like rails) hides almost everything from you down to exactly how it's launched. I suppose you could say the hallmark of a framework is it's closer to writing a giant configuration in a bespoke DSL than actual programming.

Re:Using a Framework will harm the maintenance of your software by pmontra on Thursday October 13, 2022 @02:04AM (#33187787)
Sometimes I stated writing a web app with Sinatra, which is about the less frameworkish thing you can do in Ruby unless you are also writing your own router.

I regularly end up having to

1. Either write my own code to query the db and build Ruby objects from the response and viceversa OR use ActiveRecord.

2. Same thing about managing the database schema. Either my own code or someone else's. So why not Rails' well tested one?

3. Organize the code base in some way that makes sense.

4. Write my own code to manage tests OR use rspec / capibara (OK, they are not part of a framework but they are a large dependency)

In the end I always regret I didn't use Rails from the beginning because I end up spending a lot of time doing useless takes. Keep in mind that I do that for my own projects in my free time. 99% of the times my customers decide what to use (Rails, Django, Phoenix.)

Re:Using a Framework will harm the maintenance of your software by vidarh on Thursday October 13, 2022 @03:37AM (#33188293)
Here's another view on using Sinatra:

* It lets me pick and choose an ORM. I usually prefer Sequel over ActiveRecord. Pretty much nobody suggests you should use Sinatra without an ORM unless you genuinely don't need a database.

* Nobody suggests you should build your own schema management. Pick an ORM which provides it out of the box (e.g. Sequel), or use a component which provides it (e.g. Padrino has a generator component which out-of-the-box supports generating migration helpers for the major Ruby ORM's and some you're unlikely to have heard of)

* Nobody suggests you should write your own code to manage tests. Just use rspec / capybara, or whatever else you prefer. And again, consider using Padrino's generator if you want something to generate scaffolding for it for you.

The point of using Sinatra is the freedom to opt-in to your preferred components as and if/when needed. If you always want the ones Rails provide, just use Rails, nobody will think less of you for doing so. Not even those of us who personally don't like using Rails.

For my part I rarely want the ones Rails provide, and so I rarely use Rails. Often I use bare Sinatra. Sometimes I mix in some components from Padrino because they can be easily torn out again.

I'd suggest that if you want something lighter than Rails but have those issues with Sinatra, look at Padrino (Sinatra + a pre-packaged set of components you can opt in or out of separately, or layer in piece by piece on top of Sinatra if/when you need them). But you can also just use Rails.

Re:Using a Framework will harm the maintenance of your software by wink on Thursday October 13, 2022 @04:09AM (#33188500)
Counterpoint, and let's assume mostly parity of flask :: sinatra and rails :: django.

I've usually used Flask and even when I needed a few db operations you could easily contain that to a small part of the code and stepping up to django would have felt like a huge step up in complexity. But I guess it really depends on what you're actually writing - your use case sounds a bit like "something like wordpress" from a "customer uses this" point, and mine were mostly "small REST API endpoint for something".

Re:Using a Framework will harm the maintenance of your software by pmontra on Thursday October 13, 2022 @05:40AM (#33189026)
Small REST APIs are usually not very small because they hit the database to perform useful operations, must be tested etc. Furthermore a framework enforced common structure shortens the onboarding time for any developer regardless of the seniority.
Re:Using a Framework will harm the maintenance of your software by tbrownaw on Wednesday October 12, 2022 @11:27PM (#33186814)
A framework is what happens when you write a ton of similar apps and factor out the common parts.

The whole here is no more literally true than the original lisp quote, but (just like the original) that doesn't stop it from being true in spirit.

Re:Using a Framework will harm the maintenance of your software by valenterry on Thursday October 13, 2022 @01:17AM (#33187532)
If that were true, what would be the difference between a library and a framework? Is a library not also factoring out common parts? Or is a framework just a bunch of libraries?

No, this definition doesn't describe what people understand as frameworks.

Re:Using a Framework will harm the maintenance of your software by piaste on Thursday October 13, 2022 @03:44AM (#33188339)
I would say the difference is that you can put a shim interface between your code and a library, allowing you to switch it out safely if desired.

A framework is a library that is so pervasive that you cannot reasonably do so - your shim would just be a copy of the framework's API, and it would be exceptionally difficult to take a different framework and make it fit the shim.

E.g. if you need to work with time zones, you can easily write out the function signatures you need, then look up any number of date-time libraries and make any one of them fit your shim.

But if you need to 'manage data flow between backend and UI', and try to write out the function signatures you need, you're either going to be copying a particular framework's API or you're going to have a hell of a time implementing the same signatures for two different frameworks if one is one-way and the other is two-way.

Re:Using a Framework will harm the maintenance of your software by NoGravitas on Thursday October 13, 2022 @10:02AM (#33191081)
Not every library is a framework, but some libraries are. For example, gp's description describes exactly how Django came into being.
Re:Using a Framework will harm the maintenance of your software by bulatb on Thursday October 13, 2022 @02:15AM (#33187846)
Maybe common structure, not common parts. "Framework" is a good description: it gives you the shape, you fill it in.
Re:Using a Framework will harm the maintenance of your software by valenterry on Thursday October 13, 2022 @02:43AM (#33187986)
Care to elaborate the difference? In both cases common code is extracted.
Re:Using a Framework will harm the maintenance of your software by vidarh on Thursday October 13, 2022 @03:43AM (#33188334)
The article includes a crucial point about inversion of the flow of control. Somewhat exaggerated: You call into a library; a framework calls into your code.

The old archetype of a framework might be one which expects to control an overall event loop for your application.

In practice many things we would still recognise as frameworks allows you to undo that, but I still think it's a useful rule of thumb in that even many frameworks which technically allows you to remain in control of the overall flow tend to assume the framework will mostly dictate structure and flow.

Re:Using a Framework will harm the maintenance of your software by Ma8ee on Thursday October 13, 2022 @03:34AM (#33188275)
The difference between a framework and a library is that you call the library, while the framework calls your code.
Re:Using a Framework will harm the maintenance of your software by ChrisMarshallNY on Thursday October 13, 2022 @09:46AM (#33190863)
> This sentiment sounds correct in theory, but it isn't based on any experience from any one of the people making such a claim.

I've written a number of frameworks, plugins, and extensions, and refactored existing ones. I've used a number of them. I tend to customize stuff, which isn't always conducive to using "heavy" frameworks. I've enjoyed "bald" ones. Done some big stuff.

Some came out great ... some ... not so great.

The "not so great" stuff tended to be early in my career. Refactoring existing ones, helped me to learn how to do it right.

I think the first one that I refactored, was PHP Nuke. It emitted terrible HTML, and my refactoring made sure the output would validate (and WAG the dog, so to speak). I ended up binning it, when they did their first upgrade. Learned a harsh lesson, there.

I wrote a framework in Perl. That was ... challenging.

These days, I tend to use a lot of modules and connectors, and use whatever framework is built into the OS (I write native Swift). I've heard great things about Laravel, but I have never used it.

Re:Using a Framework will harm the maintenance of your software by johnfn on Wednesday October 12, 2022 @11:01PM (#33186646)
> This sentiment sounds correct in theory, but it isn't based on any experience from any one of the people making such a claim.

Do you really think that there isn't a single person who claims that frameworks are good who has never written an application without one?

Well, now you know me. I've tried writing a website without React, and I ended up writing a buggy half-implementation of React. (In my defense, I didn't really know of React at the time.) You only really have to do that sort of thing once before you learn that frameworks have some advantages.

Re:Using a Framework will harm the maintenance of your software by throwaway0asd on Wednesday October 12, 2022 @11:20PM (#33186766)
Your comment appears to reaffirm the consequent. Your comment suggests you tried to not use a framework once, but failed only to write a bad framework, which suggests you are incapable of writing code without frameworks. Is there something more to draw from this?
Re:Using a Framework will harm the maintenance of your software by schwartzworld on Thursday October 13, 2022 @09:19AM (#33190577)
> have not actually experienced writing an application without a framework

There are a lot of different types of organizations, and their needs for development vary. Using well known tools reduces onboarding time, and in a large organization with turnover, that's not an insignificant cost. You really think the documentation you wrote for your app is better than those of a popular open source framework?

Frameworks also bring community defined best practices and standards. There is support from tooling like test frameworks that make functional / unit testing easy, linting and code formatting tools, IDE support, autocomplete snippets, debugging tools, browser extensions. These things might not be important in a small team, but with 100 devs, they bring real benefits.

> I just put all my state data in one object, save it on each user interaction

The saying is any "sufficiently complex app", and your approach to state management speaks volumes about the scale and type of front end apps that you work on. If you've never had bugs in your state using this strategy, it's wonderful. But if there were 100 of you constantly adding to and changing this global object, do really think that would be manageable?

How much state are you dumping in this object? If you only reference it on page refresh, your app must not be very reactive. One UI component could have quite a bit of state associated with it. One complex dashboard SPA could have hundreds of different pieces of state that are being tracked. Modern frameworks are tackling that problem, and the fact that you don't have it doesn't mean nobody else does.

Re:Using a Framework will harm the maintenance of your software by m00x on Thursday October 13, 2022 @02:48AM (#33188014)
Maybe you should master your tools before using them.

You can use frameworks where they fit, and not where they don't. Knowing when to do which takes time and experience, but it is definitely do-able, and better.

Frameworks allow you to update, and maintain your app for free, since others will do it for you. If you do it yourself, you have to do all the work and that's keeping you from adding value elsewhere.

To not use frameworks these days would be objectively stupid unless you're working on extremely low-level things.

Re:Using a Framework will harm the maintenance of your software by throwaway0asd on Thursday October 13, 2022 @08:03AM (#33189819)
I think you misunderstand the value proposition. In order to spend less effort on maintenance, thus freeing yourself to add value elsewhere, you need increased automation. That automation may or may not include a framework but is absolutely not limited to frameworks.

I instead prefer test automation to frameworks for automation. They are both tech debt, but only one of those provides a layer of risk mitigation (regression detection or changes to business requirements). The other provides a substitute for training, experience, and soft skills which suppresses risk realization. Just because the danger is hidden to lower layers does not indicate the danger is gone or avoided. If this were true frameworks would eliminate the need for testing and quality assurance.

Re:Using a Framework will harm the maintenance of your software by Ialdaboth on Thursday October 13, 2022 @07:06AM (#33189493)
The voice of reason. Frameworks just work for a reasonable cost, offer an easy upgrade pathway to follow, and facilitate the integration of new devs. In most case (depending of your business domain, of course), they should be more than adequate.

The cold hard truth is that most developers are not the genius hackers they fancy themselves to be.

Re:Using a Framework will harm the maintenance of your software by BlargMcLarg on Thursday October 13, 2022 @03:03AM (#33188088)
>since others will do it for you

That's the big caveat. Loads of frameworks leave clear issues dead in the water. Your team/predecessors weren't the most clean. Now have fun fixing that one issue working out a framework you can't easily modify or switch out.

Of course that problem isn't unique to frameworks nor inherent to framework rather than social and legal problems.

Re:Using a Framework will harm the maintenance of your software by xnzakg on Thursday October 13, 2022 @03:35AM (#33188283)
> Frameworks allow you to update, and maintain your app for free, since others will do it for you.

Usually not for free. Sooner or later there's an API breaking change and you end up spending time reading changelogs trying to figure out how to get your code working again...

Re:Using a Framework will harm the maintenance of your software by m00x on Thursday October 13, 2022 @04:35AM (#33188643)
Still way more work to do all of that yourself.
Re:Using a Framework will harm the maintenance of your software by RunSet on Thursday October 13, 2022 @08:51AM (#33190294)
I think of frameworks as running with crutches or cycling with training wheels. People interview potential couriers, look them in the eye, and ask: "DO you run with crutches?"

Not "CAN you run with crutches?" (as anyone who can run without crutches can run with them) but DO you run with crutches, as though running without crutches might signify a lack of ability. Fine time to unask the question.

Re:Using a Framework will harm the maintenance of your software by matharmin on Thursday October 13, 2022 @07:13AM (#33189534)
In my current job, I have written a small framework. It's very limited in scope and hasn't changed much since the initial implementation, so it works fairly well. But, there is a big issue with getting other team members to understand how to use it. That alone is enough that we're replacing it soon.

Another team member has developed frameworks for both infrastructure management and creating services exposed over http. Here there is a large value in using the same internal tooling over 20+ projects. But once again, being an internal-only tool means that the documentation is severely lacking, and often we need new features in the frameworks. All of that is essentially blocking on the single team member. In this case we're keeping the frameworks, but it definitely has its caveats.

Re:Using a Framework will harm the maintenance of your software by throwaway0asd on Thursday October 13, 2022 @08:17AM (#33189944)
I am a big believer that the primary business benefit of frameworks is that they ease hiring (candidate selection). There are pros and cons to that.

Where I currently work they primarily rely on nontechnical qualities for candidate selection because they are more interested in choosing the right people than a tool user. Either way they will be investing time in training in some form and would rather that training focus on the business objectives than the technical objectives. Counter-intuitively I was entering the code earlier here than at previous employers even though I am writing in a language I have never touched before. This is likely because I entered this employment drowning in deliberate one-on-one training.

Re:Using a Framework will harm the maintenance of your software by scarface74 on Thursday October 13, 2022 @12:14AM (#33187158)
> After 25 years of experience writing software I can honestly say I have encountered many people that agree with this, and perhaps all of them (every single one) have not actually experienced writing an application without a framework. This sentiment sounds correct in theory, but it isn't based on any experience from any one of the people making such a claim

I also have 25 years of experience and started my career writing C and FORTRAN on mainframes without any real library let alone a framework and then wrote my own libraries in C for my next job where I had to write cross platform code that ran on x86 based PCs and mainframes.

My next job, involved maintaining a proprietary compiler/IDE/VM for ruggedized Windows CE devices. So I think I have experience working without frameworks. Not to mention by the time I graduated from college in 1996 , I was a hobbyist assembly language programmer on 4 processors for 10 years (65C02, 68030, PPC 601, x86)

I can say that it’s the fifth level of hell coming behind an “architect’s” half ass framework who thought their problem was so special that they didn’t want to use a mainstream framework to handle non business specific concerns.

There have been a few times that I have ripped out my own code in favor of a popular library when I discovered it.

Re:Using a Framework will harm the maintenance of your software by jstrong on Thursday October 13, 2022 @03:15AM (#33188155)
> There have been a few times that I have ripped out my own code in favor of a popular library when I discovered it.

I'm much more likely to rip out the one function I need out of a framework or library and put it in my code, with a comment "// stolen from <source>". I've spent lots of time untangling the crux of someone's implementation away from the problematic abstractions they built up around it to make it universally adaptable.

Re:Using a Framework will harm the maintenance of your software by ldng on Thursday October 13, 2022 @03:30AM (#33188251)
And of course you regularly check back for bugs and security issues, right?
Re:Using a Framework will harm the maintenance of your software by snovv_crash on Thursday October 13, 2022 @03:53AM (#33188402)
Usually the security issues come from the wrapper code that tries to hammer the square peg of an algorithm into the round hole of the abstraction they provide. Dropping the wrapper code is the safest thing you can do.
Re:Using a Framework will harm the maintenance of your software by raesene9 on Thursday October 13, 2022 @04:10AM (#33188502)
I used to be a web app security tester. I loved it when I got an app that didn't use a framework for development because I knew I'd get some security issues for sure.

In the context of web applications, frameworks mean that your devs don't have to be experts in SQL Injection, XSS, SSRF, Session management etc etc etc.

My experience over several hundred tests was that without a framework there weren't many apps that could get that right first time. If they were lucky the pentesters found the issues, if they were unlucky, it was attackers.

Re:Using a Framework will harm the maintenance of your software by snovv_crash on Thursday October 13, 2022 @06:33AM (#33189323)
A library could work here too, to turn off the footguns and provide safe tooling. No need for the library to also intercept all of the DOM callbacks for you as well.
Re:Using a Framework will harm the maintenance of your software by snovv_crash on Thursday October 13, 2022 @03:49AM (#33188374)
This isn't about NIH syndrome. This is about other people's code which is composable and can be mixed and matched with other code from other sources, compared to other people's code which dictates to you how your code is written, how it runs, and what contexts you can use it with. Libraries vs. frameworks.
Re:Using a Framework will harm the maintenance of your software by treeman79 on Thursday October 13, 2022 @08:14AM (#33189922)
I’ve written without a framework several times. Pretty soon realize I’m spending my time writing up a framework.

I’ve inherited non framework projects many times. They take way more time to get up to speed on.

Now I’ve seen framework projects where they clearly didn’t try and work with it. Those ones just make me sad.

Re:Using a Framework will harm the maintenance of your software by garyrob on Wednesday October 19, 2022 @02:12PM (#33265856)
"After 25 years of experience writing software I can honestly say I have encountered many people that agree with this, and perhaps all of them (every single one) have not actually experienced writing an application without a framework. This sentiment sounds correct in theory, but it isn't based on any experience from any one of the people making such a claim."

Twice, I made the mistake of programming my own data frameworks so that I wouldn't have to rely on pre-existing databases. Total mistake both times. I have learned my lesson. (Most people wouldn't even think of doing that now; but I've been a pro since the 80's. The situation with web frameworks now is analogous in many ways to the situation with databases long ago.)

Re:Using a Framework will harm the maintenance of your software by quickthrower2 on Wednesday October 12, 2022 @11:00PM (#33186638)
The adhoc framework will also be half known to 5% the current team and barely known outside of happy path use cases to the rest. If you find a bug with the adhoc framework you need to convince a busy person in another team to spend time to unblock you. Or chuck in another hack and move the ticket to done and walk away slowly with stretched out arms.
Re:Using a Framework will harm the maintenance of your software by throwaway284962 on Thursday October 13, 2022 @03:49AM (#33188378)
> If you find a bug with the adhoc framework you need to convince a busy person in another team to spend time to unblock you.

Which is not so difficult, because that busy person is in the same organisation as you, and therefor working towards the same goal.

Fixing that bug is much more difficult if that person is in an outside organisation, serving many other customers on the same code base (with possible conflicting needs), and/or is not actually in any way accountable for it (open source).

Re:Using a Framework will harm the maintenance of your software by mightyRodri on Thursday October 13, 2022 @04:07AM (#33188485)
> Which is not so difficult, because that busy person is in the same organisation as you

Hopefully. But not necessarily. This argument is spinning in circles. In house projects can be abandoned just as oppen-source ones can. For me that was Powermock for example.

Re:Using a Framework will harm the maintenance of your software by quickthrower2 on Thursday October 13, 2022 @04:09AM (#33188491)
> Which is not so difficult, because that busy person is in the same organisation as you, and therefor working towards the same goal.

{evil laugh.mp3}…

Ideally yes but in reality: all teams have bottlenecks, and nearly all teams have assholes. Is fixing your problem on their OKR or whatever.

Free / open source code can be fixed by anyone: the volunteer owner (who you could even bribe to fix it), any contractor with experience, or someone in the org. This is the beauty with free software. It enables people to fix their printer drivers even if they didn’t write it originally.

Re:Using a Framework will harm the maintenance of your software by sanitycheck on Thursday October 13, 2022 @04:46AM (#33188696)
Free / open source code can be _forked_ by anyone, but in doing so one often takes on a maintenance burden bigger than one's current codebase.

To have a fix accepted on an OSS project means fixing it not just for your use case but also for every other user of the project, on every target platform, while aligning with the goals of that project. If you can get anyone to look at the PR in the first place. Assuming you've used the framework to save time, you probably don't have time to go through all that and your deadline will not wait a month or six for your code to make it into a release. Depending on your employer you may well need internal permission and legal sign-off to contribute to an OSS project in company time which is yet another hoop to jump through; though that goes for forking too.

Re:Using a Framework will harm the maintenance of your software by resonious on Wednesday October 12, 2022 @11:27PM (#33186816)
This is good and I pretty much agree. One thing though is that I think #1 and #4 actually also apply to framework'd applications. In my experience, even apps built on Rails end up with a business logic-level "framework" that is ad hoc and not obvious to newcomers, which results in bugs.

Not to mention, the frameworks tend to be hard to use "correctly". Rails devs will have heard the term "the Rails way". In fact this article has an awesome example. There's a snippet of code of a controller checking to see if a User exists with the given email. Any Rails veteran would know that you can just call `User.create` in the controller and rely on validations for that kind of check. But that's another problem with frameworks - you have to know the whole thing in order to use it well.

Re:Using a Framework will harm the maintenance of your software by flomo on Thursday October 13, 2022 @12:12AM (#33187142)
That has long been one of my complaints about Rails. It creates a nice directory structure for the framework's objects. But there's no obvious place by default to put business/application "your logic". So then all that stuff gets wedged into huge controller and model files. (in the old days there was a division between 'business objects' vs 'data objects' etc)

#1 is definitely true. I had my own halfassed 'framework', and have dug into enough older web apps to know that everyone else had one too. (Or at least the smart ones did.)

Re:Using a Framework will harm the maintenance of your software by scarface74 on Thursday October 13, 2022 @12:01AM (#33187086)
> But that's another problem with frameworks - you have to know the whole thing in order to use it well.

The difference is I have plenty of resources at my disposal to learn how to use a popular framework. I only have hopefully the one “architect” who thought their problem was a special snowflake to ask about their framework - if they are still at the company.

Re:Using a Framework will harm the maintenance of your software by Daishiman on Wednesday October 12, 2022 @11:46PM (#33186974)
> But that's another problem with frameworks - you have to know the whole thing in order to use it well.

This applies to whatever in-house monstrosities get built too, except that without docs or a million eyeballs to judge whether a workflow makes some sense to an outsider.

Re:Using a Framework will harm the maintenance of your software by resonious on Thursday October 13, 2022 @01:27AM (#33187579)
Right. I'm definitely not trying to say that apps on a framework are actually larger and nastier than frameworkless apps. They both get large and nasty.
Re:Using a Framework will harm the maintenance of your software by sbf501 on Wednesday October 12, 2022 @11:53PM (#33187017)
I think this argument is about free vs. not-free frameworks. Frameworks that are supported by a company and actively developed are far superior to the state of NPM open source right now (thinking of Qt vs Electron and my 7 year battle with both).

It is no fun when an open-source framework pushes a new major version, then deprecates the version you were on, or dependencies fail to find matching version, and you beg github developers to fix the bug and your issue sits open for months and is then closed with no warning.

Re:Using a Framework will harm the maintenance of your software by holri on Thursday October 13, 2022 @12:30AM (#33187260)
And it is no fun when the manager of the company developing your proprietary framework decides to tank it because of a change in strategy or the competitor buys the company and stops development. Since you have no source code you are forced to do what the commercial interest of foreigners dictate.
Re:Using a Framework will harm the maintenance of your software by sbf501 on Thursday October 13, 2022 @11:04AM (#33192012)
That is far, far less likely than a package being abandoned. What happened to your project? What "commercial interest of foreigners" went under that doomed you so?
Re:Using a Framework will harm the maintenance of your software by holri on Friday October 14, 2022 @08:10AM (#33202455)
For example VB6 -> VB.dotnet
Re:Using a Framework will harm the maintenance of your software by sbf501 on Friday October 14, 2022 @01:42PM (#33206607)
Ah, that's a great example!
Re:Using a Framework will harm the maintenance of your software by DrewADesign on Thursday October 13, 2022 @12:21AM (#33187211)
I think some of your experiences can be explained by your citing NPM as representative of FOSS. Not that there's anything wrong with the astonishing breadth of functionality available in the NPM ecosystem, but stability isn't its strongest comparative suit. OTOH, Django, which was cited by the author, just doesn't have that kind of volatility in its base features.
Re:Using a Framework will harm the maintenance of your software by tbrownaw on Thursday October 13, 2022 @12:43AM (#33187329)
> Not that there's anything wrong with the astonishing breadth of functionality available in the NPM ecosystem

There are at least two things wrong. One is those things is missing standard functionality (eg, leftpad), and the other is a failure to maintain appropriate hubris (eg, is_even).

Re:Using a Framework will harm the maintenance of your software by DrewADesign on Friday October 14, 2022 @01:14PM (#33206288)
I don't think those are criticisms of the repository, are they? They seem like criticisms of modern Javascript.
Re:Using a Framework will harm the maintenance of your software by sbf501 on Thursday October 13, 2022 @11:07AM (#33192057)
True. I should have been more clear because NPM =/= FOSS.
Re:Using a Framework will harm the maintenance of your software by eyelidlessness on Wednesday October 12, 2022 @11:56PM (#33187046)
> Every sufficiently complex framework-free application contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of a framework.

Or three or twelve of them.

Re:Using a Framework will harm the maintenance of your software by eyelidlessness on Thursday October 13, 2022 @12:01AM (#33187089)
I want to credit both the reference (it’s about lisps) and my frame of reference (there are at least a couple of should-be lisps in projects I maintain, and at least one more I think would benefit from a going concern that seldom gets recognized as lispy but absolutely is).
Re:Using a Framework will harm the maintenance of your software by Test0129 on Thursday October 13, 2022 @12:36AM (#33187292)
I've been burned by so many frameworks I am hesitant to use one unless the advantage is abundantly clear. Even something as mundane as an ORM can cause massive problems down the line if you're not careful, or you forgot to anticipate the case you need something more complicated than braindead CRUD.

Frameworks force you into a paradigm. Yes, to spin up quicker, get new engineers onboarded quicker, etc a framework will do the job. But it's not a free lunch. In exchange for this you are hopelessly intertwined in the author's idea of what makes something good. You're bound to their bugs, you're bound to the nuance, and most importantly you're developing knowledge of a framework, and not what the framework does. Some major frameworks, for example React, might pass the smell test as "just use it". This is the exception and not the rule mostly guided by the fact that Javascript is the absolute hottest garbage to ever grace our unfortunate field.

For some people this exchange is worth it. I'd generally recommend a company use pieces of a framework where they can. But to use a whole framework? Let's put it this way, early in my career I was involved in more old rails projects than I care to admit that were FILLED with kludges because no one could justify actually doing it right and in-housing most of it. I've been involved in projects that were hopeless dependent on the ORM-du-jour that were completely hamstrung because the ORM didn't take full advantage of the query planner, or lacked the necessary constructs for complicated queries, etc. ORMs are the worst, in my opinion, because the only other option is to then _force_ the ORM to do what you would've done originally (defeating it's purpose). General purpose web frameworks are close runners up (and related).

Your 5 points are nice sounding, and you probably get a lot of CTOs and engineering directors to agree with you. However, as a man in the trenches I can't say anything but you're fortunate to never have been on something complicated enough that a framework hamstrings you. Rescuing a project from a decision made by some framework-first shortsighted genius is the reason we get paid as much as we do.

Re:Using a Framework will harm the maintenance of your software by Beltalowda on Thursday October 13, 2022 @12:54AM (#33187386)
I mostly agree with this, and also with the parent poster. I've seen framework become a big problem, and I've seen shitty ad-hoc frameworks for "framework-less" applications.

I've had fairly good success with what I like to call "framework libraries". That is, all or most of the functionality of a framework, but composed more as a library (or rather, a set of libraries) than a framework, giving you the best of both, mostly. ORMs are often given as an example, but I rarely found them as issue as most I've used have an "escape" to allow you to just use SQL if need be. The bigger problems with frameworks are when you want to compose some application in a way the framework doesn't really like (this can be a problem in Rails, for example).

I aggressively push things to libraries whenever I work on something; sometimes they can be made public, sometimes not, but even when private it helps a lot in mentality of people, especially with certain kind of devs.

Re:Using a Framework will harm the maintenance of your software by m00x on Thursday October 13, 2022 @02:50AM (#33188034)
> You're bound to their bugs

If you do it yourself, you're bound to your own bugs. When they have bugs, it's fixed by a team of highly skilled contributors.

Not using frameworks is just an ego problem, or a lack of skills.

Re:Using a Framework will harm the maintenance of your software by Test0129 on Thursday October 13, 2022 @11:41AM (#33192522)
When I was briefly on a Go project when go was still relatively young we decided to use a framework. I can't remember what it was...GORM + something possibly.

Three months later we find a few game breaking bugs. Do the right thing and send a report and hope the author's fix things. Things didn't get fixed in time. Now over budget and over the time limit I have VPs of engineering breathing down my neck (as the lead at the time) for why things aren't getting done.

This is not an isolated case. You might not run into this problem using a mature framework (the problem then is being bound by the author's idea of a good architecture), but if you're needing something better and venture into other languages for your needs you will run into this at some point. "Highly skilled contributors" often work for free. Perhaps I'd agree with you if you meant some professional, paid, framework. But I have never had an experience where these "high skill open sourced contributors" fix bugs inside my sprint cadence. The implication that I have an ego and skill problem for not using a framework, but these so-called contributors are "high skilled" is insulting to not only me but the entire profession.

I'd imagine the nuance is in what kind of language you use. Lowest common denominator languages like Ruby, Javascript, etc (things that can be learned quickly in a code camp) tend to be dominated by framework-first-and-always people since frameworks can be parsed easily by seat warmers. Engineering management loves frameworks because it takes the thinking out of writing code. The maligned view of engineers as people who will "screw things up when they're left to their own devices" is so pervasive they've even got other engineers parroting it.

If you believe it's a "lack of skill" or "ego" problem to honestly not use a framework in some cases you should probably stop hiring idiots. An actual "high skill" engineer will evaluate the cost and probability of needing to break out of a framework.

Re:Using a Framework will harm the maintenance of your software by m00x on Sunday October 23, 2022 @03:47AM (#33305325)
I assumed senior-level engineering decisions here, not junior engineer decisions.

Using a framework you're not familiar with to build a project on a deadline is absolutely stupid.

Using a new framework without wide community support for, that you're not familiar with, and for a project is mind-blowingly stupid.

I'm hoping that you were a junior engineer at the time that didn't know better and that you learned from it.

Re:Using a Framework will harm the maintenance of your software by jgrpf on Thursday October 13, 2022 @04:36AM (#33188646)
I've had a couple of cases case where a bug was not fixed in time or fixed at all which results in writing workarounds or forking which is far from an ideal solution and further reduces the advantages of using a framework.
Re:Using a Framework will harm the maintenance of your software by pydry on Thursday October 13, 2022 @05:41AM (#33189031)
I kind of feel that people talk past each other on this issue. If you use a bad framework, no framework is vastly better.

If you use a really good framework, no framework is vastly worse.

From one day to the next there will probably be one or two frameworks which dominate your work. If it's really good you'll have an overall positive impression of them and vice versa.

Re:Using a Framework will harm the maintenance of your software by saiya-jin on Thursday October 13, 2022 @06:02AM (#33189155)
I completely agree, unless you are doing something unique, low level where ie latency is the king (which most of us don't), frameworks and libraries shine for 99% of the cases.

Some brilliant folks are just bored by usual rather generic work, and their idea of 'fun' is to keep reinventing the wheel that specifically fits current problem. Actual benefits to business be damned, intellectual fun is more important. Once those folks leave (and they always leave eventually), its mayhem for the remainder of the team/company.

For me, this kind of 'autistic' brilliance is overall just professional incompetency that shows over long time period and I avoid hiring such folks. One can babysit them and steer them but its rarely worth it within usual teams.

Re:Using a Framework will harm the maintenance of your software by Test0129 on Thursday October 13, 2022 @11:53AM (#33192718)
> Some brilliant folks are just bored by usual rather generic work, and their idea of 'fun' is to keep reinventing the wheel that specifically fits current problem. Actual benefits to business be damned, intellectual fun is more important. Once those folks leave (and they always leave eventually), its mayhem for the remainder of the team/company.

I could write a dissertation on this statement alone. But let's use two examples. Python and Node. Both are very "never do anything yourself" languages. Lots of libraries, even more frameworks. What's the result?

1. CVEs all over that place that effect nearly anything people touch.

2. Library creep. Pulling in one library or framework pulls in the entire planet.

3. Libraries and frameworks exist for absolute trivia. Node is famous for this, including stupid packages that literally just color text (and not in a meaningful way like a logger).

So in exchange for avoiding your alleged "autistic brilliance" you increase your attack surface 10 fold. I use libraries all the time, I am absolutely sure to limit their scope as much as possible. I won't use libraries for trivia, and I evaluate frameworks extremely carefully. It's kind of funny how often your opinion is parroted in startup forums but for some reason I keep making more money every year despite every signal pointing to me somehow being in the class of engineer that are, according to you, better off without a job.

Companies are run by idiots. The hubris you show is the same hubris a VP of engineering shows having last programmed 10 years ago. It shows a complete lack of nuance and understanding of the engineer.

Re:Using a Framework will harm the maintenance of your software by kodah on Thursday October 13, 2022 @01:05AM (#33187463)
Some counterpoints and personal experience:

> 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.

I disagree that framework or no-framework is the distinguishing characteristic. I do think that the quality of the code base, documentation, and onboarding plays a role in how fast devs get onboarded. Anecdotally, the only framework-based projects I've signed on to ended up incurring more onboarding time because I had to learn the framework, how the framework does things, and then how the team does things in the framework. All of this "how" is a step before "why", of which, every step eventually needs to be repeated over the course of my tenure in order to be successful.

> 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.

I've personally never seen this in any language except Java. Spring might as well be Java at many companies. The bespoke applications stay around, in my experience, because:

- They exactly match the business requirement and that requirement doesn't change much

- People don't know how to work on them or the product has little funding, probably because of the above reason

- The company has hired a team to maintain the product that have not moved

I've also seen where companies try to replace something bespoke with something written in a framework where the budget expands multiple years in a row and the project never completes because it's impossible to make the framework do what the bespoke product did completely.

> 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.

To me, this reads as, "we should spend the majority of the time focusing on our core competencies". I've heard this time and time again in this industry and no matter what way I've heard it explained I've never liked it. Businesses that only stay in their core competency, or narrowly define their competency, often stagnate with time. There's a lot less opportunity for organic business growth with that mindset. They'll also have little expertise to solve problems as they scale, other than through purchasing, because they only have knowledge that serves their core competency. The businesses I've seen become most successful alongside strong technical success were businesses that encouraged employees to innovate and experiment in new ways on a rhythm, allowing that innovation to inspire and percolate when it finds a strong usecase.

Re:Using a Framework will harm the maintenance of your software by a4isms on Thursday October 13, 2022 @11:20AM (#33192251)
> Anecdotally, the only framework-based projects I've signed on to ended up incurring more onboarding time because I had to learn the framework, how the framework does things, and then how the team does things in the framework. All of this "how" is a step before "why", of which, every step eventually needs to be repeated over the course of my tenure in order to be successful.

This is one of the most interesting replies, thank you.

The pitch for a lot of tools—be they frameworks, libraries, languages, &c.—is that if they’re popular, you get to hire people who arrive already knowing the basics of how things are done.

The reality is that popularity waxes and wanes, so when people are evaluating a tool’s fitness for purpose, they sometimes have to read tea leaves to decide if it’ll pay off or not.

A company making several such wrong bets in a row often has a trail of poorly supported ancient technologies lurking around. They still work—Joel Spolsky famously said that code doesn’t rust—but it’s aggravating to onboard, there are few productivity advantages, and sometimes the same thing is done three different ways because the company made two “wrong” bets before making the bet they currently think is “right.”

Would things be better had they just done their own thing and stuck to it? Possibly, I tried above NOT to make a claim that a popular framework is either the right thing to do or the wrong thing to do.

But it is good to read your comment pointing out that sometimes, a popular framework isn’t popular enough to harvest the benefits for people onboarding.

Re:Using a Framework will harm the maintenance of your software by 8n4vidtmkvmk on Thursday October 13, 2022 @01:14AM (#33187509)
bug ridden mess maybe, but probably not slow. with 0 overhead, things to be fast by default. frameworks add weight.
Re:Using a Framework will harm the maintenance of your software by cies on Thursday October 13, 2022 @03:20AM (#33188189)
> frameworks add weight.

Not really true. Sure they add some, but the alternative (libraries) also add weight. So the question should be: do FWs add more weight than using libs directly.

There are some FWs in Rust where the weight is very minimal. That said the FWs are also very minimal.

Re:Using a Framework will harm the maintenance of your software by gernb on Thursday October 13, 2022 @01:26AM (#33187578)
> 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

not sure what framework-free has to do with. I'd remove the word "framework-free" and it would still be just as true

Re:Using a Framework will harm the maintenance of your software by goodpoint on Thursday October 13, 2022 @02:55AM (#33188057)
> 1. Every sufficiently complex framework-free application contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of a framework

Yet a nicely designed, simple, custom half-framework is cheaper to maintain than a bloated popular framework.

Re:Using a Framework will harm the maintenance of your software by throwaway290 on Thursday October 13, 2022 @10:44AM (#33191688)
Unless your half-framework has equivalently good documentation as a popular framework (which hardly ever happens), this thesis break apart as soon as someone who didn't implement your in-house creation needs to maintain your project and fix your bugs.
Re:Using a Framework will harm the maintenance of your software by goodpoint on Friday October 14, 2022 @09:59AM (#33203573)
Wrong.
Re:Using a Framework will harm the maintenance of your software by throwaway284962 on Thursday October 13, 2022 @03:06AM (#33188102)
> 1. Every sufficiently complex framework-free application contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of a framework.

Of which you are the creator and expert, and have complete control and insight, and can change it in any way you want any time. It is in 100% alignment with your goals at all time.

If you use a framework your organisation becomes incredibly complex, because you are now actually competing against the needs of other companies, your competitors, which are also influencing the framework.

Your software is custom made for your organisation, it's not mass producing identical systems on an assembly line, so it doesn't make sense to share a common platform like you do with cars. And even if you did, this platform would be a joint venture, and absolutely not made by a subcontractor, and no way in hell some random unpredictable volunteering hobby organisation.

Re:Using a Framework will harm the maintenance of your software by jarek83 on Thursday October 13, 2022 @03:09AM (#33188120)
> Of which you are the creator and expert, and have complete control and insight, and can change it in any way you want any time. It is in 100% alignment with your goals at all time.

And then you change a job and you take 80% knowledge with you and your now-past project is in deep trouble.

Re:Using a Framework will harm the maintenance of your software by coldtea on Thursday October 13, 2022 @03:13AM (#33188139)
If knowledge is on a single person alone, then your ex-company has bigger issues than framework or no framework.

Not to mention that the interesting parts of your app should be the domain logic and workarounds and solutions used in it for business issues and historical layers of bussiness logic choices. And that a single person can take with them whether there's a framework or not.

Re:Using a Framework will harm the maintenance of your software by camgunz on Thursday October 13, 2022 @04:44AM (#33188682)
These are generally just resource issues. Companies generally won't pay for engineering hours to build really good framework documentation. It's not in the critical path. Companies that know that documentation, as well as tests, compatibility guarantees, security policies, etc. are actually critical components would probably not ever make the decision to take on that engineering burden themselves unless it were a business differentiator, which it almost never is.

> Not to mention that the interesting parts of your app should be the domain logic and workarounds and solutions used in it for business issues and historical layers of bussiness logic choices.

In my experience this has been a point in favor of OTS frameworks--the code you don't care about is handled by the framework, and you bring the business logic. But also, reading through this, I guess I don't understand your comment. Isn't the business logic in the code? How can a person take it with them?

Re:Using a Framework will harm the maintenance of your software by spion on Thursday October 13, 2022 @05:25AM (#33188941)
> In my experience this has been a point in favor of OTS frameworks

Its not guaranteed. I've seen many developers spend lots of time trying to get the framework they're working in to cooperate or dig through bad documentation. Framework authors are fallible too and general-purpose software is really hard to get right.

Re:Using a Framework will harm the maintenance of your software by camgunz on Thursday October 13, 2022 @05:42AM (#33189039)
Well, my point here is that even if there are little patches against a framework, we're talking something like 5% of the repo's code is framework-y stuff. If you've got your own framework, then... what even is the limit? 50%? 90%?

I wonder if some of the disagreements in this thread are just like, people in favor of frameworks used Rails/Django, people against them used Spring/Struts.

> Framework authors are fallible too and general-purpose software is really hard to get right.

Yeah, I think that's solved by the "market". There was a big explosion of Python frameworks in the aughts: TurboGears, CherryPy, Pyramid/Pylons, Zope, web.py, etc. etc. Lots of stuff. The ecosystem now is Django/FastAPI (Flask/Tornado legacy apps are either stuck or moving to FastAPI IME). Django got it right.

But more broadly, what are the odds a bespoke framework will do it right? Will you think up a new way to organize controllers, or to abstract auth, or to manage database sessions, etc. etc. etc. That sounds like a nightmare to me; just let me focus on the business logic please, haha.

Re:Using a Framework will harm the maintenance of your software by spion on Thursday October 13, 2022 @08:44AM (#33190227)
> Yeah, I think that's solved by the "market".

The market will settle on "good enough for the average usecase".

> But more broadly, what are the odds a bespoke framework will do it right? Will you think up a new way to organize controllers, or to abstract auth, or to manage database sessions, etc. etc. etc.

Some of this is a nightmare indeed (e.g. dealing with any web security stuff). Other things are very straightforward, especially when you don't have to deal with 1000 other people's use cases but only your own.

> just let me focus on the business logic please

We all want this. The question we should be asking is do we spend more time fighting a 3rd party framework or implementing our own. The answer may well be we'd spend more time implementing our own - but its still important to be aware if things start to go south.

Re:Using a Framework will harm the maintenance of your software by camgunz on Thursday October 13, 2022 @01:36PM (#33194126)
> Other things are very straightforward, especially when you don't have to deal with 1000 other people's use cases but only your own.

> ... fighting a 3rd party framework ...

Can you give some examples of this? I'm personally finding it hard to come up with examples where this is a significant problem. The closest I can get is I worked on a Django REST Framework project where we went all-in on serializers, but then ripped it out because performance wasn't where we wanted it to be. But it's pretty easy to not use serializers in DRF, so it wasn't actually significant.

Re:Using a Framework will harm the maintenance of your software by spion on Thursday October 13, 2022 @07:47PM (#33197965)
- Fighting webpack (its plugin system makes it a "build framework"). Lots of configuration complexity to support thousands of possible tool configurations, when you need only one combination.

- Angular v1. Scope, transclusion, watchers, directives, DI and things randomly breaking.

- Almost all of the modern devops configuration tools. Would be easily replaced by some very basic typescript functions / libraries and Deno. In fact, cdk8s (which is typescript) comes with a mandatory jsii layer included, adding about 150MB of node_modules. This layer translates between the TS API and other languages you might use (Python etc). You get it even if you don't use the other languages and it has measurable impact on e.g. CI run times

- Bazel (another "build framework"). You just wanted some basic build caching, but get to do all the work for perfect hermeticity instead, which includes things like different directories, dealing with symlinks and dealing with tools that handle those symlinks poorly.

Its really, really easy to pick the wrong tool(s).

Re:Using a Framework will harm the maintenance of your software by camgunz on Friday October 14, 2022 @05:22AM (#33201347)
Yeah, I definitely see what you're saying here--I think a lot of people have had really frustrating experiences with these tools (even though I might quibble about them being frameworks).

But is it a reasonable alternative to build an alternative to webpack yourself? Or Angular? I would bet some people have tried/done this, and also have some frustrating experiences.

My point is I think you have to be _very_ careful when deciding to take on a big engineering project, like making your own JS build tool. Will the improvements in devex really outweigh the engineering hour investment? IME the answer is almost always no, what usually happens is you get a half-baked, non-documented/tested system, and reading through this thread, I'm not sure any of the anti-framework people have shown convincing examples where they did better than an OTS framework.

Or if they did, they released it! Django is famously one such instance, or your Bazel example. It seems like they bet right, or did a lot of off-hours work (pretty sure that's the case w/ Django haha) to get it going.

Re:Using a Framework will harm the maintenance of your software by spion on Sunday October 16, 2022 @09:52AM (#33223617)
> But is it a reasonable alternative to build an alternative to webpack yourself?

Before code-splitting, yes, it was quite easy (not much harder than building a makefile). Webpack is difficult and complex because it has to cater to literally thousands of tools (https://www.npmjs.com/search?q=webpack%20plugin). An individual project can choose to use a simple js-only bundler and a copy command for static assets.

There was nothing to release there, however - we just wrote the equivalent of a makefile. It was not a big engineering project at all.

Would I do the same thing today? No, because of code splitting and because there are simpler, faster bundlers out there already (esbuild).

> Will the improvements in devex really outweigh the engineering hour investment? IME the answer is almost always no, what usually happens is you get a half-baked, non-documented/tested system, and reading through this thread, I'm not sure any of the anti-framework people have shown convincing examples where they did better than an OTS framework.

This is, where I think we differ. I think much more often than not, we already have half-baked, poorly documented systems which we insist on trying to use, even if the team is quite capable of building something better. This is also one of the reasons we have JS fatigue - its not because the language or even the browser somehow prevents something better from being built, its because we keep insisting on using poorly designed tools or tools designed to solve problems that large companies have but we don't really have.

Re:Using a Framework will harm the maintenance of your software by 8note on Thursday October 13, 2022 @03:39AM (#33188311)
The advantage is that I wrote it and am the foremost expert on how it works.

If it's a matter of training up other people, we're just as well becoming experts in a framework

Re:Using a Framework will harm the maintenance of your software by jarek83 on Thursday October 13, 2022 @04:51AM (#33188728)
Well, business usually don't have that comfort of spending money on this when there is much cheaper alternative. Aaand they can hire experts in a framework instead of an engineer that would have to be learned the custom stuff and could eventually say that he doesn't like the stack and would build his own...
Re:Using a Framework will harm the maintenance of your software by RamblingCTO on Thursday October 13, 2022 @03:17AM (#33188163)
It will always happen to a degree anyway. The more people are experts because of specifics to this company, the worse. Using a framework also improves hiring.
Re:Using a Framework will harm the maintenance of your software by vjk800 on Thursday October 13, 2022 @04:54AM (#33188744)
> If knowledge is on a single person alone, then your ex-company has bigger issues than framework or no framework.

You are both right and also describing every single company I've seen. I haven't worked in a straight up software company, though. Maybe they have things better.

Re:Using a Framework will harm the maintenance of your software by randomsearch on Thursday October 13, 2022 @03:25AM (#33188224)
Theory vs reality.
Re:Using a Framework will harm the maintenance of your software by coldtea on Thursday October 13, 2022 @03:56AM (#33188431)
Exactly. In theory a framework would solve that.

But I described the reality.

Re:Using a Framework will harm the maintenance of your software by soco on Thursday October 13, 2022 @04:32AM (#33188625)
I'm not sure why you would describe the entire real world as "problem". Because this is how the real world works, with organizations where the last knowledgeable guy was fired two years ago and now discovers they need to touch that incredibly useful and huge application he wrote ten years ago. I'm aware there's an entire book industry telling how the ideal world should look like but there are also unicorns in every fantasy book yet nobody would judge you for not herding a couple.
Re:Using a Framework will harm the maintenance of your software by amenghra on Thursday October 13, 2022 @03:38AM (#33188306)
This. And you’ll feel lost or sub-productive while you ramp up on the new company’s bespoke framework.
Re:Using a Framework will harm the maintenance of your software by slifin on Thursday October 13, 2022 @03:58AM (#33188446)
Unless you're in a library driven ecosystem like Clojure in which case the majority of interesting code is just calling into a library

Yes you still have to know how it's glued together but at least there is still standardisation whilst still being flexible enough to swap individual libraries

Not a perfect solution but a good compromise in my experience

Re:Using a Framework will harm the maintenance of your software by randomsearch on Thursday October 13, 2022 @03:25AM (#33188220)
That’s why I always start a new app by writing my own operating system for it first.

Use frameworks, use libraries. They will save you time, make your code less buggy, make it easier to hire other people.

Writing your own ball of mud is great for a hobby but not for business.

Re:Using a Framework will harm the maintenance of your software by throwaway284962 on Thursday October 13, 2022 @03:39AM (#33188312)
I started using a framework for a task at work, was immediately tripped up by an obvious stupid bug in the config files, reported it and it was closed because "too many people already depend on this behaviour". So now I've in-sourced other companies legacy and taken on a huge liability in depending on the evolution of undefined number of other organisations and their code bases.

And even worse when these frameworks are open source and don't even have any accountable people at all, and god knows how many people working professionally are suddenly held hostage by some dude who just felt like going backpacking in south america for 6 months without giving any notice to anyone.

Re:Using a Framework will harm the maintenance of your software by another-dave on Thursday October 13, 2022 @03:57AM (#33188433)
Build everything in-house or be beholden to some dude going backpacking is a false dichotomy.

It'd be like saying I always make my own food from scratch — have you seen the state of the burger van down on the corner? You can't trust food made by others.

All frameworks aren't created equal — as with any tooling, you choose something based on the features of the framework but also the longevity, reputation and ecosystem built around it.

Re:Using a Framework will harm the maintenance of your software by planede on Thursday October 13, 2022 @04:17AM (#33188546)
Yeah, but this has other trade-offs than the other two options of just using a 3rd party framework and inventing your own. Not saying that this is not viable though.
Re:Using a Framework will harm the maintenance of your software by abirch on Thursday October 13, 2022 @05:12AM (#33188849)
Thank you for this common sense reply. Can you imagine someone wanting to roll their own Flask? Their own React? It's like most people here seem to be siths and only deal in absolutes.
Re:Using a Framework will harm the maintenance of your software by mightyRodri on Thursday October 13, 2022 @03:55AM (#33188418)
Then your architect needs a fresh course in how to decide what open source project to use. When its a critical spot you first check how it is maintained. Its that easy.
Re:Using a Framework will harm the maintenance of your software by camgunz on Thursday October 13, 2022 @04:51AM (#33188729)
Yeah but isn't this example just a trivial config bug? We're not talking about core functionality here. You're extrapolating from a minor nuisance to "a huge liability in depending on the evolution of undefined number of other organisations and their code bases" which is quite a leap. Just do config the way everyone else does; again it's not a differentiator.

Thinking about this case more, this is exactly what you want from frameworks: compatibility guarantees. Frameworks break compatibility, but deliberately and slowly. Will your in-house framework do that? Will it announce and well document its intent to deprecate functionality in favor of new features? Will it find all the users of it across your enterprise and work with them on migration strategies? Will it build in deprecation notices for literally years? Will it build in tests for the bridging changes? Django does all of this, for you, for free.

Re:Using a Framework will harm the maintenance of your software by tpxl on Thursday October 13, 2022 @04:02AM (#33188460)
Good news, the framework is open source! You get to fork it, fix the bug and get every other functionality for free!
Re:Using a Framework will harm the maintenance of your software by yardstick on Thursday October 13, 2022 @04:25AM (#33188600)
At which point it becomes an in-house framework, which is what they were trying to avoid I the first place.
Re:Using a Framework will harm the maintenance of your software by dagw on Thursday October 13, 2022 @03:25AM (#33188218)
Of which you are the creator and expert

No, I'm not. The guy who quit 2 years ago was. I've worked with custom frameworks, and while they where both clever and powerful with some quite cool features which would have been tricky to do in a more generic framework, they where also virtually undocumented, fragile, difficult to extend and slow to get people up to speed on.

Re:Using a Framework will harm the maintenance of your software by spion on Thursday October 13, 2022 @04:52AM (#33188736)
Building a library or a framework comes with implied obligation to write extensive documentation. I wish more software engineers understood this.
Re:Using a Framework will harm the maintenance of your software by dandellion on Thursday October 13, 2022 @05:35AM (#33189000)
I'm confident most software engineers I've worked with understood this. Usually the problem wasn't understanding that but rather meeting the deadlines and finding the resources to write that documentation. The only time I've seen documentation done really well, the company had a dedicated technical writer whose main job was making sure they had good documentation. Engineers would write the first draft and hand it off to the tech writer. My impression is that many companies don't want to spend resources on that level of documentation, which is the level you'd probably want to roll your own framework.
Re:Using a Framework will harm the maintenance of your software by spion on Thursday October 13, 2022 @10:28AM (#33191454)
I meant it "part of the job" the same way unit tests are.

I see this more often when the project is open source. For some reason we feel like when its not, we don't need to pay attention to the documentation. Nothing could be further from the truth.

Re:Using a Framework will harm the maintenance of your software by dstick on Thursday October 13, 2022 @03:26AM (#33188230)
Speaking purely about web software / web APIs, most software is 90% CRUD. It absolutely makes sense to use a framework to save new hires from grokking 90% of it's capabilities. You can have a new developer do stuff right out of the gate.
Re:Using a Framework will harm the maintenance of your software by glroyal on Thursday October 13, 2022 @08:37AM (#33190157)
Isn't that the real, unspoken purpose of a framework?

To commoditize a critical (and formerly well compensated) skill for the purpose of outsourcing it to the country with the cheapest possible labor?

Re:Using a Framework will harm the maintenance of your software by silversmith on Thursday October 13, 2022 @04:33AM (#33188633)
You not only are in control, you HAVE to be in control. Nobody else will patch holes, optimise or deliver new interesting features. You're on hook for all of that.
Re:Using a Framework will harm the maintenance of your software by camgunz on Thursday October 13, 2022 @04:38AM (#33188661)
This is one of my hobby horses! I'm disclaiming my bias upfront so I can try and have empathy for your position, but I strongly disagree with this line of thinking. I've been thinking a lot about this personally, and I think I would summarize my argument as "a lot of engineers think they're building beautiful, bespoke palaces, but in truth they're building regular houses, which is actually more important in the macro, but should be boring in the micro".

I broadly agree with GP here, but to round out some of their points:

- Frameworks take care of the parts of your application that aren't special. In the same way garbage collection isn't the value your company provides to customers, HTTP header parsing (or whatever) isn't either.

- Frameworks prevent your team from diving down architecture rabbit holes, or having to read a bunch of books on DDD, or what have you. This sounds like a small point, but if you tracked the number of expensive engineering hours spent disagreeing about where code should go, look like, and work, you would realize it's a pretty big one.

- Frameworks are tested way better than you ever could by thousands of users, actually documented, contain compatibility guarantees, and have security policies. To match this quality, your company would probably spend millions of dollars on eng hours. That's why company-specific frameworks don't match this quality.

- Frameworks make onboarding way easier. Most Python engineers know Django; most Ruby engineers know Rails. By definition, you can't hire engineers that already know your framework (even if you use something like Hexagonal, because no two implementations of this are alike). And again, because your in-house framework will be poorly tested/documented/etc., new hires will struggle. They'll also wonder if this is a career cul-de-sac: "I have 4 years of irrelevant experience in [bespoke framework X]" is not an enticing resume bullet.

> Your software is custom made for your organisation, it's not mass producing identical systems on an assembly line

This returns us to the palace vs. suburbs framing. The software you write is a super small percentage of the code that runs your app, all the way from firmware to CSS libraries. Good engineering is carefully deciding what code you will write yourself, because code isn't just implementation, it's design, buy-in, maintenance, documentation, and liability. Some enterprises are replacing a big chunk of that stack (Oxide or Cloudflare come to mind), but I bet 95% of companies are just building REST/GraphQL servers. That's not special enough to require a custom, in-house framework. You should just build the house the regular way.

Re:Using a Framework will harm the maintenance of your software by coldtea on Thursday October 13, 2022 @03:10AM (#33188124)
>1. Every sufficiently complex framework-free application contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of a framework

Every sufficiently complex built-on-top-of-a-framework application contains an ad hoc, informally-specified, bug-ridden, slow implementation of workarounds to the framework's limitations, the overhead of parts it doesn't need, a nightmarish dependency situation, and as a cherry on top, it ends up based on a previous version, of the framework (as the latter's creators rewrite with different APIs every couple of years for no good reason).

Re:Using a Framework will harm the maintenance of your software by dmitriid on Thursday October 13, 2022 @03:57AM (#33188438)
Why not both? :)

Often you end up with an external framework, and an internal framework, and workarounds for both of them.... that are trying to evolve into their own framework

Re:Using a Framework will harm the maintenance of your software by cjfd on Thursday October 13, 2022 @03:57AM (#33188432)
For a "sufficiently complex application" it is more likely than not that the framework of which half was implemented in an "ad hoc, informally-specified, bug-ridden, slow" way actually is not available anywhere. Instead, very likely, some random framework that sounded like its functionality is somewhere in the direction of what is needed was downloaded and now partially helps and partially hinders development. Probably it hinders more than helps. But this assumes "sufficiently complex application". For a simple application it is more likely that a helpful framework is available.
Re:Using a Framework will harm the maintenance of your software by kybernetyk on Thursday October 13, 2022 @04:00AM (#33188451)
Re point 1: yes. But it’s your bug ridden half framework and you don’t depend on external developers to make sane decisions.

I’ve been using static site generators for my product site and app documentation and every time I set up a new dev machine e (or just update the generator) I’m in dependency hell because some plugins had breaking changes etc. that’s why I switched to my own bug ridden php implementation of the site/docs. At least I don’t get to spend the day googling for change logs, etc when I type ‘make’.

/rant over

Re:Using a Framework will harm the maintenance of your software by ihateolives on Thursday October 13, 2022 @07:54AM (#33189745)
PHP is a bit of a special case here. I returned to PHP after 10+ years of hiatus and was surprised how easy it is to get shit done for the web, I had forgotten all about it.
Re:Using a Framework will harm the maintenance of your software by dustedcodes on Thursday October 13, 2022 @05:04AM (#33188798)
Software is a layer cake and in my opinion from 20 years software development experience I firmly believe that the top 1-2 layers of your business application should not rely on some framework if you want to create a great product, stand out amongst competitors and have a technological advantage in terms of innovation and maintenance. Whatever happens at the top 1-2 layers is what your business cares about the most and what defines your business and you want to have 100% control to fine tune it. I've worked in many companies and on many projects and this made a difference every time.
Re:Using a Framework will harm the maintenance of your software by zelphirkalt on Thursday October 13, 2022 @07:02AM (#33189475)
I would add though, that if the framework consumes much of the attention of the developers, then it is still a loss.

And I would add to the title, that using a overly _hyped_ framework will harm the maintenance. Using some framework, simply because it is new or hyped, that will get teams and companies in trouble.

Re:Using a Framework will harm the maintenance of your software by Fire-Dragon-DoL on Saturday October 15, 2022 @06:47AM (#33213594)
Something I keep observing that seems to be passed over, coming from a Rails background, is that by using a known framework, the company is also accepting the "population" that comes with it, as well as the known problems.

I observed many Rails developers and many apps (purely anecdotal, I wish I could run a real study), but the problems are the usual, the ones on top of my mind right now:

    - database changes affect directly UI code, so a change in the DB requires changing code in a million places
    - Rails devs don't know SQL as much as they should (often just don't know it), for a framework that so SQL-centered, it's weird
    - hidden logic (callbacks)
These are very common problems with this framework and are well known to hinder company growth and ability to iterate.

Would a home-grown framework be better? I cannot tell, but surely if the list of downsides when choosing a framework was written in the splash page, I would be way more scared. "If you use this framework, your db will 100% be coupled with your frontend" is a terrifying statement.

Given that, framework should be evaluated for their downsides too, but there isn't even a list of known issues.

Re:Using a Framework will harm the maintenance of your software by a4isms on Saturday October 15, 2022 @12:35PM (#33216212)
100% worthy observation from my career experience.

Choice of a framework both attracts a certain type/subculture, and repels another.

Example: You have an old app that uses Backbone+CoffeeScript for the front end. If you stick with that, it will absolutely impact your hiring. But what about switching?

If you pick React, that will have one impact. If you pick Ember, that will have a different impact. And so forth…

Re:Using a Framework will harm the maintenance of your software by a4isms on Saturday October 15, 2022 @03:46PM (#33217974)
Also, speaking very specifically about Rails, every architecture is composed of design choices that make some things easy, and other things hard.

The default "Rails Way" has a particular dynamic around REST and CRUD that makes it very easy to "Extrude the implementation into the interface," and, "Extrude the implementation into the API." It's what accelerates building a thing the first time, but later on it can work against you.

JM2C about this, but it's what I have observed and have lived through refactoring on multiple occasions...

Re:Using a Framework will harm the maintenance of your software by mbrodersen on Sunday October 16, 2022 @11:10AM (#33224165)
Not my experience at all. The fewer frameworks I use, the more solid and reliable the software tends to be. And you avoid the yearly “our current framework is crab so let’s try something else” rewrite that everybody else seems to be involved in.