These words are buzz for java newbie programmer when you start to learn pure java with little research you get familiar with these new buzz words and you want to know exactly what it really do and what are the difference between them, don’t worry you are not alone I was also in the same position when I get introduce to these words here in this post I would like to enlighten you about these technology in the java world.

Before we even go deep into this I would like to mention here that you need to know Java to understand these concept, or else it would be difficult for you to understand this post if you still have any question then let me know I would be glad to help you out.

Spring vs Struts General comparison

This java framework is collection of services that help you in developing your online application from database to transnational management and it uses depending injection to wire everything together, this framework is developed by Rod Johnson in the year 2003.

As in spring you can do all your stuff under one framework but in in Struts you can only use that for your front end application not for all other like transnational management or to use it for database this is not build for that, but in the new version of frame work they have added these ability so if you compare those two you will be having that right now but when it’s started there was little feature available in struts.

Spring is developed to fill the gape of Stratus but now days you rarely find any difference between them but still they are comparable, I have explained here why Spring is better than struts and the reason and yes these are all not the only features that we can compare these two frameworks there is many other if you do a little research you can find out.

  • Spring is non-invasive which means it does not force you to extend local Spring class, you can create your own class without using Spring local classes that is provided to your by Spring API, this does not means it will not allow you to extend local class but it gives you an option if you want you can extend local Spring class or you can create your own but in Struts you have to extend its local class
  • As we were saying in Struts you must extend the base class that is provided by Struts API.
  • Spring is light weight framework because of its POJO model “Plain Old Java Object” whereas Struts is not light weight
  • Spring Framework made J2EE application development little easier, by introducing POJO model

Above is couple of important difference between these two frameworks, the reason why spring is that much popular is because of:

  • Simplicity
  • Testability
  • Loose Coupling

If you want to know more or compare their features you can check out this spreadsheet which compared both these two framework side by side and it comes with change log as well as the reference along with logic of comparison.

click here to look into the sheet