top of page

Introduction to Java Enterprise Application Development

The Java EE platform is built on top of the Java SE platform and it provides an API (Application Programming Interface) and runtime environment for developing and running large-scale, multi-tiered, scalable, reliable, and secure network applications. Java EE platform is designed to help developers to create enterprise applications to solve the problems encountered by large enterprises. Such kind of Java Enterprise applications are useful for large corporations, agencies, and governments.

Multi-Tiered Applications

Java Enterprise Application Developers can concentrate on functionality as Java EE platform provides a development model, API and run-time environment which reduces the complexity of enterprise application development. In a multi-tiered application, the functionality of the application is separated into isolated functional areas, called tiers. Typically, multi-tiered applications have a client tier, a middle tier, and a data tier (often called the enterprise information systems tier). The client tier consists of a client program that makes requests to the middle tier. The middle tier's business functions handle client requests and process application data, storing it in a permanent data store in the data tier.


The Web Tier

The web tier consists of components such as Java Servlets which are used for control logic in your Java enterprise applications and template engines like Thymeleaf (is a modern server-side Java template engine for both web and standalone environments and it is an XML/XHTML/HTML5 template engine able to apply a set of transformations to template files in order to display data and/or text produced by your applications). Web components handle the interaction between clients and the business tier. Its primary tasks are the following:

  • Dynamically generate content in various formats for the client.

  • Collect input from users of the client interface and return appropriate results from the components in the business tier.

  • Control the flow of screens or pages on the client.

  • Maintain the state of data for a user's session.

  • Perform some basic logic and hold some data temporarily in JavaBeans components.


The Business Tier

The business tier consists of components ( a public interface describing the contract the component is offering and a hidden implementation) that provide the business logic for an application. Business logic is code that provides functionality to a particular business domain, like the financial industry, or an e-commerce site. In a properly designed enterprise application, the core functionality exists in the business tier components.


Example: public interface PartnerService { public Partner getPartner(long id);

}


public class Partner { private long id; private String name; // getters and setters omitted for readability }


Here, the "PartnerService" is a public part of the business components. The hidden part, the implementation of the services, is PartnerServiceImpl:

public class PartnerServiceImpl implements PartnerService {

@Override

public Partner getPartner(long id) {

Partner partner = null;

// TODO do something to get partner

return partner;

}

}

The MVC framework landscape

Java Web developers can choose from numerous MVC frameworks, for example Spring MVC. Servlets are great for writing Java code, acting as a central point for managing application flow and invoking business methods, but horrible at presentation; JSPs or other template engine like Thymeleaf, at the view layer of MVC-based web applications, are great at presentation but are a horrible place to embed all of your business logic. Thus was born the Model 2 architecture, which adheres to the MVC Smalltalk design pattern:

  • The model represents your data or the objects with which your application is interacting.

  • The view is a visualization of your model.

  • The controller manages application flow and makes calls into business objects.​

The MVC concept can be easily applied to form the basis for Java EE application architecture.





Featured Posts
Check back soon
Once posts are published, you’ll see them here.
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
Recent Posts
Archive
Search By Tags
No tags yet.
bottom of page