Home » Blog » Software » Java Frameworks

Java Frameworks

posted in: Software 0

Although there are numerous frameworks constructed on Java, right here are a few very typically used frameworks of various types – net applications, community applications, logging, testing, ORM etc. Note that every of those has its personal blessings and might paintings nice for unique enterprise use cases. We can not say that’s higher due to the fact they’re all desirable in unique scenarios.

1. Spring


With its idea of Dependency Injection and aspect-orientated programming functions, Spring took the improvement global with the aid of using storm. It is an open-supply framework used for Enterprise packages.

With Spring, builders can create loosely coupled modules wherein-in dependencies are treated with the aid of using the framework in preference to relying at the libraries withinside the code.

Spring framework is exhaustive and covers numerous functions inclusive of protection and configuration, which might be smooth to examine. Further, given that it’s miles the maximum famous net framework, you may locate numerous documentation and an energetic community.

With the whole thing configured, your code may be smooth and smooth to comprehend.

Main principles:

  • Dependency Injection (DI) (Inversion of Control) – In this principle, in preference to the software taking manipulate of the waft sequentially, it offers the manipulate to an outside controller who drives the waft. The outside controller is the activities. When a few occasion happens, the software waft continues. This offers flexibility to the software. In Spring, IoC is achieved with the aid of using DI which might be of 3 types – setter injection, approach injection and constructor injection.
  • Beans and Spring Context – In Spring, items are known as as beans and there may be a BeanFactory that manages and configures those beans. You can consider the beanfactory as a field that instantiates, configures and manages the beans. Most packages use xml (beans.xml) for the configuration. ApplicationContext which a superset of BeanFactory is used for extra complicated packages that want occasion propagation, declarative mechanisms and integration with aspect-orientated functions of Spring.
  • Read approximately a few extra principal spring principles here.

2. Struts


Apache Struts is every other sturdy open-supply framework for net packages. It follows the MVC (Model-View-Controller) version and extends the JSP API. In a conventional servlet-JSP method, if a consumer submits let’s say a shape together along with his details, the facts then is going to a servlet for processing or the manipulate is going over to subsequent JSP (Java Server Pages – wherein you may write Java code in an HTML). This turns into puzzling for complicated packages as the ‘View’ or presentation layer ought to preferably now no longer have enterprise logic.

Struts separate the View, Controller and the Model (facts) and gives the binding among every via a configuration record struts-config.xml.

The controller is an ActionServlet wherein you may write templates for the View and the consumer facts is maintained the usage of ActionForm JavaBean. The Action item is accountable for forwarding the software waft.

The View is maintained with the aid of using a wealthy set of tag libraries.

Struts are smooth to installation and gives lots extra flexibility and extensibility over the conventional MVC method the usage of servlets and JSP alone. It may be an excellent place to begin to your profession as an internet developer.

3. Hibernate


Though Hibernate isn’t a complete-stack framework, it absolutely modified the manner we checked out the database. Implementation of Java Persistence API (JPA), Hibernate is an Object-Relational-Mapping (ORM) database for Java packages. Just like SQL, queries in Hibernate are known as HQL (Hibernate Query Language).

Hibernate without delay maps Java training to corresponding database tables and vice versa.

The principal record in hibernate is the hibernate.cfg.xml record that carries facts approximately mapping Java training with database configuration.

Hibernate solves the 2 principal issues with JDBC – JDBC doesn’t help itemstage courting and in case you ever determine emigrate to a specific database, the older queries might not paintings – which means numerous changes – i.e. time and money!

Hibernate gives an abstraction layer in order that the code is loosely coupled with the database. Stuff like setting up a database connection, appearing CRUD operations are sorted with the aid of using Hibernate – so builders want now no longer enforce that, consequently making the code unbiased of the database used.

Choose one or extra from those newbie and superior courses to get a entire evaluation of Hibernate and JPA.

4. Apache Wicket

Apache Wicket

If you’ve got got already labored with JSP, the gaining knowledge of wicket may be a cakewalk. A easy Java net frameworks, Wicket has a aspectorientated shape and all you want to understand is Java and HTML. Absolutely no XMLs or configuration files!

The principal function of Wicket is it POJO version in which additives are easy (Plain Old) Java Objects having OOP functions. These additives are bundled collectively as reusable programs with images, buttons, forms, links, pages, containers, behaviours and extra in order that builders can personalize them.

Wicket is lightweight and you may construct packages truly speedy. It is likewise smooth to unit check code written in Wicket.

5. JSF (Java Server Faces)


Don’t confuse JSF with JSP, that’s only a textual content record which could have static and dynamic content material. JSF is advanced with the aid of using Oracle as part of the Java Enterprise Edition 7.

It is a aspectprimarily based totally MVC framework and has reusable UI additives for server-primarily based totally packages. The principal concept is to encapsulate numerous client-facet technology like CSS, JavaScript, and HTML so as to permit builders to create UI with out understanding any of those technology in-depth. They can simply drag and drop UI additives and cognizance extra on their presentation layer specifics.

The default templating machine in JSF is the FaceLets. JSF is pretty much like Struts.

JSF may be in addition seamlessly included with AJAX-enabled additives to complement the consumer revel in with the aid of using including Ajax activities for validations and approach invocations.

Check out this LinkedIn course to understand extra approximately JSF.

6. Dropwizard


Another Java framework real to its name – wizard. This lightweight framework helps you to entire your software very speedy due to it is out of the field help for superior configurations, logging, software metrics and lots extra. You can create RESTful net packages that deliver excessive overall performance, are solid and reliable.

Dropwizard is particularly magical as it brings collectively a bunch of libraries like Jetty, Guava, Jersey, Jackson, and Metrics among many others from the Java environment into one framework and offers you a lightweight and lean software.

Since there are included libraries for all of the configurations, protection and overall performanceassociated tasks, all you want to do as a developer is constructing your enterprise logic.

Dropwizard is an open-supply framework this is bundled with libraries and you may effortlessly set it up with Eclipse IDE and create a easy undertaking to examine (Believe me, you may examine Dropwizard in your personal!). The simple academic from Dropwizard internet site will assist you via every step.

7. Grails


Grails is an smooth to examine complete-stack framework lots appropriate for folks who are simply starting their programming profession. While Grails is an internet framework written in Groovy programming language, it runs on Java platform and is flawlessly like minded with Java syntax. This framework is primarily based totally at the MVC layout sample.

Groovy is much like Java which a few extra functions brought while in comparison to Java. It may be very smooth to examine Groovy in case you already understand Java.

Similar to JSP, in Grails, the rendering era is GSP (Groovy Server Pages). Creating tags for the View in Grails is straightforward and smooth. It additionally makes use of GORM which as you may have guessed is the ORM implementation utilized in Grails. You also can without delay use Hibernate in place of GORM. Grails has integrated help for RESTful APIs consequently making it smooth to create such services.

Here comes the nice part – you may combine your current java code with Grails. If you’ve got got a mixture of Groovy and Java code for your software – it’ll paintings simply fine!

The nice manner to examine Grails is to installation your personal improvement surroundings the usage of any Java IDE like Eclipse, NetBeans etc… and observe any of those tutorials to construct your first net software.

8. ATG


ATG is an internet trade platform written in Java. It is a customizable and configurable framework, specifically beneficial for web sites associated with e-trade. The product is owned with the aid of using Oracle and helps each B2B and B2C packages which can be complicated and big. For small scale packagesit is able to be costly, however. If you’re entering into growing e-trade web sites, ATG is a great framework to examine and could improve your technical in addition to area knowledge.

ATG platform can run on 3 servers – Oracle Weblogic, IBM Websphere, and JBoss.

There are three principal layers withinside the framework –

  • The Dynamo Application Framework – it’s miles the bottom layer that gives a improvement surroundings primarily based totally on JavaBeans and JSP. There are popular ATG training for all of the not unusualplace functionalities or even custom Java code may be created and assembled out of aspect beans with the aid of using linking them via configuration files.
  • The Personalization module – This is wherein the content material for every consumer is custom designed dynamically. This module allows manipulate and keep consumer-profiles and enterprise regulations that outline what content material is to be proven to a specific consumer. This layer additionally helps centered emails.
  • The Scenarios module – This module in addition complements the abilties of the personalization module with the aid of using introducing time-sensitive, occasionpushed campaigns that control interactions among webweb page site visitors and the content material for a duration of time. For example, restrained time offers, extraordinary offers for sure individuals etc…

ATG is an intensive framework and also you want time and endurance to examine it. Several large organizations like Walmart, Macy’s, BestBuy, ASDA and extra have their internet site constructed on ATG.

9. Play


Play is a barely traditional and specific sort of framework that follows the method of conference over configuration. It is primarily based totally at the MVC sample and is an open-supply net software framework. Apart from Java, you may write Play net packages in Scala.

Play is much like Django or Ruby on Rails or ASP.NET structure and doesn’t always observe J2EE net standards.

Some functions of Play are –

  • High overall performance due to the asynchronous processing
  • No field, no states and constructed on reactive principles
  • Uses statically-typed language, so maximum mistakes are stuck all through collect time saving numerous errors early withinside the improvement life-cycle.
  • Scala explores real OOP together with a few practical programming principles. Its compatibility with Java makes for an amazing and effective machine.
  • With Play2, a brand new effective construct machine sbt has been launched which makes it smooth to combine with Maven initiatives in addition to create easy JAR files.
  • Extensive relational database get admission to libraries for not unusualplace functionalities are in-constructed.

10. Apache Hadoop

Apache Hadoop

Though Apache Hadoop isn’t a complete-stack framework, it gives a software program framework and works at the MapReduce programming version. These utilities can effortlessly manage big volumes of facts (Big Data), store, examine and system them to offer quicker and extra green results.

I even have covered Hadoop on this listing due to the fact it’s miles the ‘thing’ of these days with Big Data gaining prominence.

Hadoop allows in allotted facts garage and processing the usage of the grasp slave layout sample. The Hadoop HDFS (Hadoop Distributed File System) layer of the grasp node (specifically NameNode) has the facts node. The MapReduce layer has the JobTracker and the tasktracker. The slave nodes have the Data node and the taskTracker respectively.


There are many different java frameworks which aren’t complete-stack or net improvement frameworks however are beneficial in each software – like log4j for logging, Junit, and Selenium for checking out and so on. It is important to understand approximately those aleven though you may simply examine them at the go together with the opposite frameworks which you have visible withinside the above listing.

The nice framework to your software ought to meet your enterprise requirements, offer a sure stage of pliability and superior overall performance, and be smooth to keep and take in changes.

For example, for a complete stack net improvement framework, if some thing wishes to be modified, it ought to effect the software least i.e. you ought to now no longer ought to construct and install the software once more for small changes. Just a configuration extrade ought to do the magic. Such packages keep down-time and offer flexibility.