The problem resides exactly in using the term application
as you are using it, because the pieces of code that @pragdave describes as library
are intend to solve one exact single thing, thus treating them as applications
is misleading and will lead inevitably to code that is not easy to change, because everything is tied up together in a big thing.
This is not about the Users of the application
but about us Developers working on it or with it… so I don’t want it to be Opaque but rather very Explicit.
Software Architecture Matters
The current style of mixing a lot of concerns in 1 single file is a no go for a Clean Software Architecture that clearly violates the Single Responsibility Principle, that leads to code that is hard to change, thus hard to maintain and improve, not to mention that is prone to produce more bugs.
As it stands now having Client and Server logic mixed together makes hard to reason about the code. Having 1 single file with the unique responsibility of defining he API for the Component we want to use is a big plus for me. The same goes to define the Server and the business logic. I even say more, the business logic must be separated by their actions on the Resource they handle. So the logic to create should be in a separated file from the logic to update the resource.
So for me to be able to distinguish only by the folder architecture what is what without the need to jungle inside the code is a big win. If I need to fix a bug or implement a new feature will make my life much easier to know where I need to go to achieve it.
I see developers saying they love big files of code because:
- they don’t like to have many files open in the editor.
- is easier to debug them in production with VIM.
- everything is in one place, even if that means thousands of lines in 1 file.
This is only some of the ones that I remember now from the top of my head.
Conlusion
Software that is developed with re-usability, easy of change and composition in mind are always a big win in the long term, but they require a huge effort and discipline to pay up-front, that normally no one wants to pay, because they are too much excited to see the thing working and to release it.
Is normal for companies to say is unacceptable to spent more time to come with a good software architecture, but they then are happy to accept that their developers spent countless hours to debug or implement new features that could otherwise take a fraction of the time in a Clean Software Architecture.