Java Frameworks

Framework is set of reusable software program that forms the basis for an application. Frameworks help the programmers to build the application quickly

Most web application frameworks are based on the model–view–controller (MVC) architectural pattern.

Model–view–controller (MVC)
Many frameworks follow the model–view–controller (MVC) architectural pattern to separate the data model with business rules from the user interface. This is generally considered a good practice as it modularizes code, promotes code reuse, and allows multiple interfaces to be applied. In Web applications, this permits different views to be presented, such as web pages for humans, and web service interfaces for remote applications.

Push-based vs. pull-based
Most MVC frameworks follow a push-based architecture. These frameworks use actions that do the required processing, and then "push" the data to the view layer to render the results. Struts, Django, Ruby on Rails, Symfony, Yii and Spring MVC are good examples of this architecture. An alternative to this is pull-based architecture, sometimes also called "component-based". These frameworks start with the view layer, which can then "pull" results from multiple controllers as needed. In this architecture, multiple controllers can be involved with a single view. Play, Struts2, Lift, Tapestry, JBoss Seam, Wicket and Stripes are examples of pull-based architectures.

Three-tier architecture
In Three Tier Architecture, applications are structured around three physical tiers: client, application, and database. The database is normally an RDBMS. The Application contains the business logic, running on a server and communicates with the client using HTTP. The client, on web applications is a web browser that runs HTML generated by the application layer. The term must not be confused with MVC. Unlike in three-tier architecture, it is considered a good practice to keep business logic away from the controller, the "middle layer" in MVC.

Apache Struts is an open-source web application framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model-view-controller (MVC) architecture.

The goal of Struts is to separate the model (application logic that interacts with a database) from the view (HTML pages presented to the client) and the controller (instance that passes information between view and model).
Struts is categorized as a request-based web application framework.
Struts also supports internationalization by web forms, and includes a template mechanism called "Tiles" that (for instance) allows the presentation layer to be composed from independent header, footer, and content components.

Features of Apache Struts Framework:

  • Simple POJO based Actions
  • Simplified testability
  • Thread Safe
  • AJAX Support - jQuery Plugin, Dojo Plugin, AJAX Client Side Validation
  • Template Support
  • Support for different result types
  • REST Plugin (REST based Actions, Extension-less URLs)
  • Convention Plugin (Action Configuration via Conventions and Annotations)
  • Spring and Hibernate Plugins

The framework includes a set of custom tag libaries and their associated Java classes, along with various utility classes. The most powerful aspect of the Struts framework is its support for creating and processing web-based forms.

The Spring Framework is an open source application framework that aims to make J2EE development easier. Unlike single-tier frameworks, such as Struts or Hibernate, Spring aims to help structure whole applications in a consistent, productive manner, pulling together best-of-breed single-tier frameworks to create a coherent architecture.

The core features of the Spring Framework can be used by any Java application, but there are extensions for building web applications on top of the Java EE platform. Although the Spring Framework does not impose any specific programming model, it has become popular in the Java community as an alternative to, replacement for, or even addition to the Enterprise JavaBean (EJB) model.
You can use all of Spring's functionality in any J2EE server, and most of it also in non-managed environments. A central focus of Spring is to allow for reusable business and data access objects that are not tied to specific J2EE services. Such objects can be reused across J2EE environments (web or EJB), standalone applications, test environments, etc without any hassle.

Features of Spring Framework:

  • Modern Web — Complete support for modern applications including REST, HTML 5, conversations and AJAX.
  • Mobile — Web support for mobile client platforms including Android and iPhone.
  • Cloud Ready — Spring applications are supported on all popular cloud platforms like Cloud Foundry, Google App Engine and Amazon EC2.
  • Data Access — Supports traditional RDBMS as well as new NoSQL solutions, map-reduce frameworks and cloud based data services.
  • Social — Integration with Facebook, Twitter, LinkedIn, TripIt and other prominent social networks.
  • Integration — Enterprise orchestration and adapters for distributed applications, asynchronous message-based applications, and batch applications.
  • Security — Authorization control for all tiers and authentication integration to dozens of providers.

The Spring Framework helps you build Java Applications faster because it allows you to focus on your business problem rather than the plumbing code that connects components and systems.

Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications. Its goal is to enable productive development of high-performance web applications without the developer having to be an expert in browser quirks, XMLHttpRequest, and JavaScript. GWT is used by many products at Google, including Google Wave and the new version of AdWords. It's open source, completely free, and used by thousands of developers around the world.

Google Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications like Google Maps and Gmail easy for developers who don't speak browser quirks as a second language. Writing dynamic web applications today is a tedious and error-prone process; you spend 90% of your time working around subtle incompatibilities between web browsers and platforms, and JavaScript's lack of modularity makes sharing, testing, and reusing AJAX components difficult and fragile.GWT lets you avoid many of these headaches while offering your users the same dynamic, standards-compliant experience. You write your front end in the Java programming language, and the GWT compiler converts your Java classes to browser-compliant JavaScript and HTML.Project Home and More features.

Features of GWT:

  • Write AJAX applications in Java and then compile the source to highly optimized JavaScript that runs across all browsers, including mobile browsers for Android and the iPhone.
  • Productive AJAX applications thanks to a higher level of abstraction on top of common concepts like DOM manipulation and XHR communication.
  • The GWT developer plugin spans the gap between Java bytecode in the debugger and the browser's JavaScript.
  • No compiling of code to JavaScript to view it in the browser. You can use the same edit-refresh-view cycle you're used to with JavaScript, while at the same time inspect variables, set breakpoints, and utilize all the other debugger tools available with Java.
  • GWT compiler performs comprehensive optimizations across your codebase — in-lining methods, removing dead code, optimizing strings, and more.

GWT Designer lets you create user interfaces in minutes with tools for intelligent layout assist, drag-and-drop, and automatic code generation.

Know More

we are Social geeks