📜 ⬆️ ⬇️

Why i hate frameworks

I'm going to make a Java web application (yes, it will be Java, for some reason, which I don’t want to voice now). In the process, I rate a bunch of J2EE portlet-enabled JSR-compliant MVC role-based CMS web service application container frameworks.

After a heap of time spent reading the documentation, I'm ready to gouge out my eyes.

Let's imagine that I decided to make a cabinet for spices.

I have already made small wooden crafts and I think I know what I need: a few plates and a few basic tools: a tape measure, a saw, a level and a hammer.
')
If I were building a whole house, and not just a spice rack, then I would also need a tape measure, a saw, a level and a hammer (not counting the rest).

So, I go to the tool shop and ask the seller where I can find the hammer.

- Hammer? - he asked. - No one has been buying hammers for a long time. It is old fashioned.

I was very surprised and asked why.

- Well, the problem of hammers is that there are so many kinds of them. Sledge hammers, carpenter's hammers, with a round head, etc. What if you buy one type of hammer and then realize that you need another? You will have to buy a separate hammer for the next task. As it turned out, most people want to have one hammer that can cope with all types of tasks that can be encountered.

- Hmmmmm. Well, that sounds reasonable. Can you show me such a Universal Hammer?

- Not. We do not sell them anymore. They are outdated.

- Seriously? From your words, I realized that the Universal Hammer is the technology of the future.

- As it turned out, if you make only one type of hammer that can perform the same tasks as all types of hammers, then it will not be very good for each of them. Hammering nails is not very effective. And if you want to kill your ex-girlfriend, then nothing will replace the hammer with a round head.

- Right. But if no one else buys Universal Hammers and if you no longer sell all the old-fashioned types of hammers, then what kind of hammers do you sell?

- Actually, we do not sell any hammers.

“But ...

“Our research has shown that people do not need a Universal Hammer at all. It is always better to use the right type of hammer for work. Therefore, we started selling hammer factories capable of creating any hammer you need. All you need is to staff the factory with workers, start a mechanism, buy raw materials, pay expenses and - BAM - you have exactly the hammer you need.

“But somehow I don’t want to buy a hammer factory ...”

- It's good. Because we no longer sell them.

“But you just said ...”

“We found that most people don't need a whole factory.” Some people, for example, will never need a hammer with a round head. (Maybe they don't have ex-girls. Or they killed them with an ice pick.) Therefore, it makes no sense for anyone to buy a hammer factory that can produce any type of hammer.

- Yes, it seems so.

“Instead, we started selling drawings for hammer factories, allowing our customers to build their own hammer factories specifically designed to produce only the types of hammers they need.”

- Let me guess. You no longer sell them.

- Not. Of course not. As it turned out, people do not want to build a whole factory, just in order to produce a pair of hammers. Leave construction to professionals, that's what I always say.

- And here I agree with you.

- Yeah. Therefore, we stopped selling these blueprints and started selling hammer factories. Each factory of hammer factories is built for you by experts in their field, and you do not need to worry about the details of building a factory. You get all the benefits of owning a hammer factory that produces hammers for your needs.

“Well, it's not quite like that ...”

- I know what you say! We no longer sell them. For some reason, quite a few people bought hammer factories factories, so we came up with a new solution to the problem.

- Yeah.

- When we took a step back and looked globally at the infrastructure of the tools, we found that people are disappointed, because they need to manage the hammer factory and the hammer factory produced. It is rather cumbersome if you still need to manage a factory of roulette factories, a factory of saw factories, a factory of level factories, not to mention the production of lumber. Looking at the situation, we realized that it is too difficult for those who just want to make a cabinet for spices.

- Yes. That's for sure.

“Therefore, this week we will present a single factory of factories of tool factories so that you can produce each factory of factories with a single, united factory. The factory of factories of factories will produce only those factories of tool factories which you need, and each of these factories of factories will produce a factory based on your requirements for the tool. The final set of tools derived from this process will be ideal for your particular project. You will have exactly the hammer that you need, and a tape measure suitable for this task, all at the touch of a button (of course, you will have to work a little with the configuration to make it all work exactly as you need).

“So you don't have any hammers?” Not at all?

- Not. If you really want a high-quality, industrially designed spice rack, you need something more advanced than a regular hammer from a store.

- And what, everyone is doing it now? Does everyone use a single factory of tool factories whenever they need a hammer?

- Yes.

- Ok ... I think I understood what I need to do. If now this is done in this way, it will probably be better, and I will learn how to do it.

- Very good!

- This thing comes with documentation, right?

Source: https://habr.com/ru/post/141477/


All Articles