Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making life better by not using Java web frameworks? [closed]

I'm so tired of having to learn yet another Java web framework every other day.
JSP, Struts, Wicket, JSF, JBoss Seam, Spring MVC to name just a few - all this countless frameworks out there try to address the same issues. However, none of them really solves the fundamental problems - that's why there are still coming up more and more new ones all the time.

Most do look very bright and shiny on the first impression because they simplify doing simple things.
But as soon as it comes to the implementation of a real world use case one is running into problems.
Often the frameworks don't provide any help but are hindering one and limiting the options by forcing things to be implemented according to the frameworks own logic and environment.

In short, I see the following disadvantages when using a framework:

  1. There mostly is a steep learning curve and you first need to understand sometimes quite academic concepts and know meaning and location of a bunch of configuration files before you can get started.
  2. The documentation usually is more or less awful, either missing a public accessible online reference, is helpless outdated, confuses different incompatible versions or all of this together and often doesn't provide any helpful examples.
  3. The framework consist of zillions of classes which makes it practically impossible to understand the intended use only by browsing the sources.
  4. Therefore you need to buy some "XYZ in action for dummies in 21 days" kind of books which have a bad user interface because they are missing a full text search and are heavy to carry around.
  5. To really use one of this frameworks you need to learn by heart how things can be done the way the framework requires it by remembering the adequate classes and method names until your head is full of stupid and useless information you can't use for anything else.
  6. There is a big overhead, slowing down your applications performance and making your brain feeling numb when try to understand what really is going on.
  7. In the real world there is usually no time to get well familiar with something new because of the pressure of being productive. As a consequence of this learning by doing approach one always looks only for the fastest way to get the next task done rather than really understanding the new tool and it's possibilities.
  8. The argument that following a standard would allow people who are new to a project to quickly get started is not valid in my view because every project uses a different framework even within the same company (at least in my case).

It seems to me that the following quote from Albert Einstein fits here very well:

“We can't solve problems by using the same kind of thinking we used when we created them.”

Back in my good old PHP coding days when coding still was fun and productive, I used to write my own frameworks for most things and just copy-pasted and adopted them from one project to the next.
This approach paid out very well, resulting in fast development, no overhead at all and a framework which actually was mightier than most Java frameworks out there but with only a few hundred lines of code in a single file plus some simple mod_rewrite rules.
This certainly wasn't solving all problems of web development, but it was simple, fast and straight to the point.
While perfectly adjusted to the requirements of the current project, it also was easy expandable and had a very high performance due to zero overhead.

So why all that hassle with using this frameworks, why not throwing them all away and going back to the roots?
What should I say to my boss when we're starting tomorrow the next project with a new framework again?
Or are there maybe frameworks which really make a difference?
Or some hidden advantages I have ignored?

like image 797
dankoliver Avatar asked Apr 23 '09 10:04

dankoliver


People also ask

Why you should not use frameworks?

Frameworks are one of the hugest anti-patterns in software development. They're hard to learn. They limit your creativity. They increase your project's complexity and dependencies.

Are web frameworks necessary?

In other words, web frameworks may not be necessary, but they are still useful enough to be popular and widely used. This is a trait common to most of the popular web frameworks out there, from React, Angular, Vue, and Ember to style and formatting models like Bootstrap.

Why is Web framework important?

Web frameworks help us achieve structure in our applications, and they give us additional features we can add to them without too much extra work. Frameworks give us a place to start so that we can focus on features rather than configuration details.

What is Java framework used for?

Java frameworks are specific to the Java programming language. It's a Java platform for developing software applications and Java programs. Java frameworks are bodies of reusable pre-written code acting as templates that developers can use to create applications by filling in custom code as needed.


2 Answers

Back in my good old PHP coding days when coding still was fun and productive, I used to write my own frameworks for most things and just copy-pasted and adopted them from one project to the next. This approach paid out very well, resulting in fast development, no overhead at all and a framework which actually was mightier than most Java frameworks out there

Forgive me for believing that not one second.

but with only a few hundred lines of code in a single file plus some simple mod_rewrite rules. This certainly wasn't solving all problems of web development, but it was simple, fast and straight to the point.

So basically you developed your own framework over the course of months or years, tailored to your own needs, and could work very fast with it because you knew it intimately.

And yet you can't understand why others do the same and then try to turn the result into something useable by everyone?

Where's this great framework you developed? If it's so powerful and easy to use, where are the dedicated communities, thousands of users and hundreds of sites developed with it?

every project uses a different framework even within the same company (at least in my case)

Well, that's your problem right there. Why would you throw away the expertise gained with each framework after each project?

The idea is to choose one framework and stick with it over multiple projects so that you get proficient in it. You have to invest some time to learn the framework, and then it saves you time by allowing you to work on a higher level.

like image 65
Michael Borgwardt Avatar answered Oct 12 '22 05:10

Michael Borgwardt


The problem with coming up with your own framework is that you will make all of the same mistakes that all of the established frameworks have already stumbled on and addressed. This is true particularly when it comes to security.

Just ask Jeff and the guys about what they had to consider when implementing the WMD in stack overflow. I'd rather use what they have produced in a project rather than implement it from scratch. That is just one example.

like image 36
Martin OConnor Avatar answered Oct 12 '22 05:10

Martin OConnor