Skip to content

Are development frameworks worth anything?

July 10, 2008 by Przemysław Bielicki

After graduating from university every decent software development undergraduate is able to write computer programs in many languages. Most probably the list will include C, C++, Java, Ada, Pascal (Delphi), PHP, Shell scripts, JavaScript. Depending on the university the list could be longer or shorter and programming skills would also differ. And those guys are able to write almost everything in every enumerated language (starting from HTTP servers up to transactional systems and applications computing shortest paths between two or even ten cities in Europe).

How is it possible that even guys who graduated with honors know almost nothing when they start working for companies for their first assignments? Is it because companies and already existing projects use frameworks (transactional, middleware, whaterverware)? Does it make sense to invest in using frameworks? Aren't they only the source of problems and maintenance horror? Isn't it better to write your home-grown tiny little framework that will do good - you don't need full blown framework because your project is too small now?

I'll try to answer some of these questions and other questions regarding development frameworks.

A bit of history

I started working before the end of fourth year (out of five) at my university in a small development company. Although it was a small company it had really fancy products in its portfolio all developed in Borland Delphi. My task as a "fresh" and highly skilled student was to port some of the functionality from those products to the Java technology and expose it as a web application. My only choice was J2EE stack: Apache Tomcat, Java Servlet, JSP, JDBC and maybe something more. I knew MVC design pattern and I knew all mentioned technologies. I started developing the system and it was working well until it reached its critical mass i.e. adding new features meant copying-pasting a lot of code. OK - I was not the Java and object-oriented prodigy at that time but everything I touched simply worked. Yet, it was not very easily extensible.

My first framework
Struggling with such problems I found Struts that solved 99% of my problems, literally. This framework was what I was looking for. I even wanted to write something like that by myself but I found it first. Struts 1.x saved my life and my project at that time. 1:0 for the frameworks.

It's time to learn more
After couple of months I moved to a bigger and more prestigious company for a trainee position. Some time before that happened I started interesting in Aspect Oriented Programming (AOP) - more specifically AspectJ. This AOP-thing seems unimportant in this context but it really isn't. You will see it shortly :)

In my new, bigger, more prestigious job there was a system that we were supposed to develop as a standalone GUI application in SWT and JFace. Middleware components were based on Spring Framework and Hibernate - two big and full-blown frameworks I didn't know at that time. I had to learn them and be an expert in them.

Is it so simple?
As I was extremely fast-learner then (I really think I was better in learning then that I'm now :) I caught Spring and Hibernate in minutes and my colleagues also. It doesn't mean we were good at Spring and Hibernate just like that. I still didn't understand many things but I was able to be a leading developer in this project (after over one year) and deliver requested features.

Although we learned Spring very fast there was a part of it not all of the guys were able to catch - it's name was AOP. It was very important part of this framework we were using extensively - and if I weren't learning AOP before I could have had big problems at work then. This means that even if you know how to use the framework and you're good at it you don't have to know it from the inside - although it can really help you in case of any problems.

Was it worth?
After all those years I see how Spring together with Hibernate made our lives easier. We were able to deliver new features really really quickly. The maintenance of the system was not so bad at all and I know that if we developed this system using pure JDBC and home-grown ORM stuff we would not deliver this system to the customer or would deliver it much later.

What now?

When I start a new Java-based project I almost always assume that we would need Spring Framework, Hibernate, Struts2, JFree Chart, Lucene, iText, Jakarta POI, Velocity, ........................................... And most of the time we need all of these.

The real learning
I hope you see what I mean - you have to know a lot of stuff and you cannot know it all after you leave your school. Learning all those frameworks and libraries took me years and I still know nothing. There is still a lot of things I have to learn but isn't it fun? It is - for me. Our job (software developer) is very difficult, we have to learn enormous amount of things. Not just for the sake of learning - we have to use our knowledge, be creative and produce something from nothing. Smart people are not enough - you need here smart, knowledgeable and skilled people.

The real learning starts after graduation when you know programming languages but you don't know frameworks. Frameworks are like languages themselves - and they make developer's live easier (after they make his/her life much more difficult).

Conclusions

Does it make sense to learn all of this, to spend so much time on learning frameworks? Does such investment pay off? Isn't it better to write something simpler and quicker but on your own? You can multiply such questions and each similar question is an excellent question.

Try it yourself you'll see how difficult it is
If you tried to learn and then apply at least one framework in your professional life you should know how horrible it can be. You go through tutorial (torturorial :)), copy the code, set all properties, start the example and.... java.lang.NullPointerException. Yes - you know this very well :) After at least few days and many WTFs you finally solve the problem but wait! Here is another one...

Until you excel the use of the framework of your choice you can get mad many times. You will lose a lot of time and nerves and you still cannot be sure that the use of your framework will do good to your project.

Invest or not?
As always there is no simple answer. Definitely it's worth investing some time and money into investigation. If the framework you want to use makes the development or maintenance easier the decision should be obvious. If the learning curve in order to excel the framework is bigger than the value of using the framework you should consider not using it.

The big disadvantage of frameworks is the learning curve - you have to learn it and to be smart enough to understand it - not everybody is capable of doing this and doing this for such a long time. Many team leads and project managers don't like that risk and they invest in crappy home-grown solutions - that doesn't pay off in the long run.

Answer?
If your project is to write couple of JSP pages with maybe few Servlets it really doesn't make sense to use Struts or Spring. It may make sense to write your own two- or three-classes tiny little framework that will work after couple of hours - not days or weeks of training.

After all using frameworks pays off and is worth investing time and money - of course if you use appropriate frameworks to your project and your project reaches its critical mass. Your application will be much more maintainable and extensible (maybe also more testable and portable). Your customer will be satisfied and your employees will be smarter and more skilled. These are the reasons you should consider development frameworks very seriously.

Do you have different view on frameworks? What do you think - is it worth investing your time and effort in learning how to use them? I would be glad to know your opinions.

About the Author: Przemysław graduated from Gdańsk University of Technology in 2004 having specialized in Distributed Information Systems. He worked in Lufthansa Systems, Intel Corporation in the past where he developed complex IT solutions in many Java-related technologies. In professional life he is a real Java expert holding couple of Sun Java certificates (Programmer, Developer, Web Developer) and Certified Scrum Master, of course.

Przemysław is a regular contributor to AgileSoftwareDevelopment.com and the author of "From Java to Java EE" blog. He now works as a Software Craftsman in an international company that is the leading Global Distribution System (GDS) and the biggest processor of travel bookings in the world. Contact Przemysław

Comments

Very good post. I can only

July 10, 2008 by groszek (not verified), 3 years 30 weeks ago
Comment id: 1652

Very good post. I can only add, that you must know the technologies that the framework abstracts, because sooner or later (rather sooner ;)) you'll get into trouble. That's because all the abstractions are leaky, they don't handle all the exceptions in all potential usage contexts, they sometimes assume some usage context and are optimized for it. Using all those fancy frameworks doesn't free you from learning everything down to tcp/ip, if you want to be a good web developer. The real fun starts when you reach some limitations of the framework or simply find some bugs in the framework. That's why you really want to use the frameworks that are popular (you can usually google your answers) or which provide their source code (you can fix it yourself) and not necessarily the ones that are new and cool (which you can't trust). I would also consider writing my own framework in a specific usage context requiring some fancy optimizations (frameworks are usually slower then using core technologies).

Abstraction and usability

July 10, 2008 by pbielicki, 3 years 30 weeks ago
Comment id: 1653

You are absolutely right that sometimes framework limits you because it hides some core technology features. I consider such frameworks bad :)

The really good frameworks (like Spring) ease your life providing you simplified API but also give you possibility to access core technology directly with fancy callback methods that will catch all crappy exceptions for you (you can also handle those exceptions by yourself).

Writing own frameworks make sense if you are the first one :) or you find such limitations that cannot be solved by already existing one.

In general I agree that even using frameworks it's better to know core technologies (but you cannot know all technologies you use without effort and TIME spent on learning) - you can then faster identify and solve problems.

Lean, agility and real word

July 10, 2008 by JSabatier (not verified), 3 years 30 weeks ago
Comment id: 1654

To be lean, all the chain must be lean (including suppliers) ;)

Using an external framework can be dangerous in the fact that it can break the reactivity. It can also diverge from your requirements etc. At the end the big risk is to be desynchronized from the original framework (fork). Thus, you have to maintain a big framework alone… (Where a small adapted one is enough)

You make a big dependency on an external supplier; Will it answer to all your requirements and hopes?

This is just a question of time and money!

not so sure ...

July 12, 2008 by terry (not verified), 3 years 30 weeks ago
Comment id: 1661

... that frameworks are justified.

the numberone problem is risk: there are dozens of fledgling framworks and most will bite the dust. Having moved into management from development i see the 'reverse angle', which is protection of investment, and have insisted on core technologies only (asp.net/java/php) be deployed for the companies I have worked for.

the other big problem can be summed up as 'swings and roundabouts' - the initial sense of marginal increase in productivity soon falls away as 'detail' that 'does not fit' is encountered.

r

Re: not so sure ...

July 13, 2008 by pbielicki, 3 years 29 weeks ago
Comment id: 1665

Using only core technologies means reinventing the wheel each time. Why would you for example write your own transaction handling code if it is already implemented in some open-source framework? Why would you write your own Object Relational Mapping stuff when there is already Hibernate, JPOX, iBatis, etc.?

Core technologies are cool and work fine but only until your project reaches critical mass i.e. frameworks make your project more extensible and maintainable. If you have 3 db tables and 5 web pages I would use JSP and pure JDBC by myself but if my project is is rather big monster I would consider Hibernate + some IoC container + maybe Struts + something more. I really wouldn't like to write my own stuff e.g. for generating reports in DOC, PDF, etc. :)

If your only option is to write core technology

July 14, 2008 by Bruno Lowagie (not verified), 3 years 29 weeks ago
Comment id: 1668

Almost 10 years ago, I was forced to write my own PDF generation tool because the available ones didn't meet my needs. My first reflex was to immediately publish the technology as Free/Open Source Software. I recommend every company that writes core technology to do the same.
If I hadn't published my (at that time very small) PDF library as a F/OSS library, it would have taken me a lot more effort to support really difficult stuff such as using exotic fonts, implementing digital signatures in PDF, and so on... By making my library a F/OSS product, other people started contributing code and ideas; I didn't need all that functionality at that time, but these features became important later on in my other projects involving PDF. So I was really happy to have those other developers 'on my team'.
And what's even more important (for the manager guy): it's impossible to test new software as thoroughly as letting the whole world use your core technology. That's my 'reverse angle'; if everybody had started writing his own PDF library, we'd all be doing the same job over and over again. That would be a really absurd situation, given the fact that good developers are scarce. (Please don't overlook the word 'good' in my previous sentence.)

By the way: thanks for mentioning iText in your article; that's the library I'm talking about ;-)

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <b> <i> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <br> <blockquote>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.

Best of AgileSoftwareDevelopment.com