How To Understand The Architecture Of Java 2Ee, J2Ee, And J2E (Java) In A Wordpress Blog Post



Similar documents
Java EE Introduction, Content. Component Architecture: Why and How Java EE: Enterprise Java

Web Container Components Servlet JSP Tag Libraries

How to Build an E-Commerce Application using J2EE. Carol McDonald Code Camp Engineer

SSC - Web development Model-View-Controller for Java web application development

Developing an EJB3 Application. on WebSphere 6.1. using RAD 7.5

Glassfish, JAVA EE, Servlets, JSP, EJB

Client-Server Architecture & J2EE Platform Technologies Overview Ahmed K. Ezzat

Course Name: Course in JSP Course Code: P5

Creating Java EE Applications and Servlets with IntelliJ IDEA

Application Security

Commercial software development with the help of J2EE architecture and MVC

Java Technology in the Design and Implementation of Web Applications

Model-View-Controller. and. Struts 2

Java Server Pages combined with servlets in action. Generals. Java Servlets

Complete Java Web Development

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

Introduction to J2EE Web Technologies

Customer Bank Account Management System Technical Specification Document

Web Application Programmer's Guide

A Comparative Study of Web Development Technologies Using Open Source and Proprietary Software

J2EE Web Development. Agenda. Application servers. What is J2EE? Main component types Application Scenarios J2EE APIs and Services.

Simplify Your Web App Development Using the Spring MVC Framework

Java Web Programming. Student Workbook

Java (J2SE & J2EE) and Web Development Training Catalog

What Is the Java TM 2 Platform, Enterprise Edition?

Java 2 Platform, Enterprise Edition (J2EE) Bruno Souza Java Technologist, Sun Microsystems, Inc.

Development. with NetBeans 5.0. A Quick Start in Basic Web and Struts Applications. Geertjan Wielenga

DTS Web Developers Guide

CrownPeak Java Web Hosting. Version 0.20

NetBeans IDE Field Guide

PHP Web Authoring for Database Management based on MVC Pattern

MVC pattern in java web programming

Contents. Client-server and multi-tier architectures. The Java 2 Enterprise Edition (J2EE) platform

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

Liferay Enterprise ecommerce. Adding ecommerce functionality to Liferay Reading Time: 10 minutes

Oracle WebLogic Server 11g: Administration Essentials

OUR COURSES 19 November All prices are per person in Swedish Krona. Solid Beans AB Kungsgatan Göteborg Sweden

Developing Java Web Applications with Jakarta Struts Framework

Design Approaches of Web Application with Efficient Performance in JAVA

2012 LABVANTAGE Solutions, Inc. All Rights Reserved.

A framework for web-based product data management using J2EE

Virtual Credit Card Processing System

The Design of B2B E-commerce System Based on MVC Model and J2EE

ACM Crossroads Student Magazine The ACM's First Electronic Publication

An introduction to creating JSF applications in Rational Application Developer Version 8.0

Java Servlet Tutorial. Java Servlet Tutorial

Oracle Application Development Framework Overview

Web Applications and Struts 2

Database Applications Recitation 10. Project 3: CMUQFlix CMUQ s Movies Recommendation System

Penetration from application down to OS

An Easy, Secure and Reliable Online Shopping & Payment System

Implementing the Shop with EJB

Configure a SOAScheduler for a composite in SOA Suite 11g. By Robert Baumgartner, Senior Solution Architect ORACLE

CSI 2132 Lab 8. Outline. Web Programming JSP 23/03/2012

JEE Web Applications Jeff Zhuk

Client/server is a network architecture that divides functions into client and server

Tutorial c-treeace Web Service Using Java

Web Applications. For live Java training, please see training courses at

Stock Trader System. Architecture Description

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

WebSphere and Message Driven Beans

Internet Engineering: Web Application Architecture. Ali Kamandi Sharif University of Technology Fall 2007

}w!"#$%&'()+,-./012345<ya

SSC - Web applications and development Introduction and Java Servlet (II)

Struts Tools Tutorial. Version: M5

Core Java+ J2EE+Struts+Hibernate+Spring

Web Programming II JSP (Java Server Pages) ASP request processing. The Problem. The Problem. Enterprise Application Development using J2EE

Mastering Tomcat Development

Servlet 3.0. Alexis Moussine-Pouchkine. mercredi 13 avril 2011

HPC PORTAL DEVELOPMENT PLATFORM

An introduction to web programming with Java

Brocade Virtual Traffic Manager and Oracle EBS 12.1 Deployment Guide

Japan Communication India Skill Development Center

Intellicus Single Sign-on

Software Development Kit

A Java Framework for Multi-Tier Web-Centric Applications Development

Arjun V. Bala Page 20

Client-server 3-tier N-tier

Japan Communication India Skill Development Center

<Insert Picture Here> Betting Big on JavaServer Faces: Components, Tools, and Tricks

Introduction to Sun ONE Application Server 7

zen Platform technical white paper

Getting Started with Web Applications

BAPI. Business Application Programming Interface. Compiled by Y R Nagesh 1

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Performance Comparison of Persistence Frameworks

SOFT 437. Software Performance Analysis. Ch 5:Web Applications and Other Distributed Systems

Japan Communication India Skill Development Center

Web Application Development

This training is targeted at System Administrators and developers wanting to understand more about administering a WebLogic instance.

Design and Implementation of J2EE-based Online Examination System Yingjie Fu

Research Article. ISSN (Print) *Corresponding author Lili Wang

Supplement IV.E: Tutorial for Tomcat. For Introduction to Java Programming By Y. Daniel Liang

IBM Rational Rapid Developer Components & Web Services

Transcription:

Understanding Architecture and Framework of J2EE using Web Application Devadrita Dey Sarkar,Anavi jaiswal, Ankur Saxena Amity University,UTTAR PRADESH Sector-125, Noida, UP-201303, India Abstract: This type of research represents an architectural procedural approach to design a Web application using Java framework. This framework is used to develop MVC to separate business logic and presentation logic. Java has three different platforms, or flavors, and each addresses certain programming requirements. The J2EE provides the environment to develop enterprise applications or services using multitier architecture. In this highly intensified technology the need for scalable, efficient, faster solutions for information management has increased. The JEE technology is rightly apt for meeting these requirements. Our research study show that applying multiple frameworks to design the Java application using MVC concepts makes applications easier compare to a single framework. In recent trends, more research papers have been proposed which employ a new and fast process to implement Web architecture and to avoid framework. Keywords Architecture,J2EE, JSP, framework, MVC,,Servlet I INTRODUCTION Java is one of the most commonly used and mature programming languages for building enterprise applications. Over the years, Java development has evolved from small applets run on a Web browser to large enterprise distributed applications run on multiple servers. Now, Java has three different platforms, or flavors, and each addresses certain programming requirements. J2EE (Java 2 Platform, Enterprise Edition) is Sun's preferred Java platform for multi-tier enterprise applications. It simplifies enterprise applications by basing them on standardized, modular components, by providing a complete set of services to those components, and by handling many details of application behaviour automatically, without complex programming [1]. J2ee uses a multi-tier distributed application model. There are three tiers in the typical J2EE application model: Web presentation tier, business logic tier and data tier. [2]. Java Platform, Enterprise Edition or Java EE is Oracle's enterprise Java computing platform, the platform provides an API and runtime environment for developing and running the enterprise software. It also includes network and web services, and other large-scale, multi-tiered, scalable, reliable, and secure network applications. Java EE extends the Java Platform, Standard Edition (Java SE) which provides an API for objectrelational mapping, distributed and multi-tier architectures, and web services. The platform incorporates a design based largely on modular components running on an application server, the software for Java EE is primarily developed in the Java programming language. The platform emphasizes convention over configuration and annotations for configuration in which optionally XML can be used to override annotations or to deviate from the platform defaults. Web is the very complex issues these days. Since the desire of the companies and organizations are increasing so the complexity and the performance of the Web programming matters. Complexity with the different types of communication devices is increasing [3]. The business is demanding applications using the Web and many communication devices so that many of the companies use frameworks for making the development of their applications easier. The business today demands Web applications to advertise its company so it is very important to take care of the architecture used in development of the application. Framework can be considered as a set of functions helping the developers in creating the applications [3]. So with the increase load of the data on the internet we have to take care of the architecture issue [4][3]. MVC: Model-View-Controller ("MVC") is architectural design pattern for interactive applications. MVC organizes an interactive application into three separate modules [5] [5].it is a design pattern originally pioneered in the olden days of smalltalk. Successful use of the pattern isolates business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business logic without affecting the other. The MVC divides the application into three associated parts: Model, View and Controller, which makes the system development simple [6][6]. Controller: Handles navigation logic and interacts with the Service tier for business logic2. Model: The contract between the Controller and the View Contains the data needed to render the ViewPopulated by the Controller 3. View: Renders the response to the request Pulls data [7][7]. In this architecture (figure 1.2) browser send a request to jsp and jsp check setter and getter method inside JavaBean. Bean map the data from database and finally jsp send a response to browser [8][8]. www.ijcsit.com 1253

Figure 1.1 MVC Architecture VIEW CONTROLLER MODEL JSP Custom tag Libraries Xml Configuratio n File Beans EJB XML Servlet Databa se Figure 1.2 MVC2 Model www.ijcsit.com 1254

Figure 1.2 Architecture of Cart II RELATED WORK Web and Internet is ever growing area and the demands for the applications are growing. A single framework is not capable to handle the architecture of the application. To meet the currents requirement of the applications it s necessary to design a architecture to implement the Frameworks. Struts Framework have been designed and developed for the front end control of the Web applications. It provides the various features for the applications that interact to the users. It also follows the MVC 2 design features. Spring Framework is the designed to handle the various tasks. The spring work for the desktop and internet based applications also. It follows the principals of the MVC 2. [9] The simultaneous use of the Struts and spring frameworks in the single application with the applying the MVC Design principals so that we can Improve the performance of the applications. Struts Framework consists of three major blocks, Described in brief as follows First is The View Block which controls the presentation part of the complete model. This contains following JSP files which you write for your specific application set of JSP custom tag libraries Resource files for Internationalization Second Block is representing the Controller. This is for navigation the complete application. This contains XML configuration files; it contains the tags for the navigation of the paths. Third Block is the Model. This part do the work of the Business Logic, Fetching and storing data to the database.this contains following Java Beans Enterprise Java Beans Database. Following figure shows the working of the components in the Struts framework [4]. In this section a computer components distribution system has been designed using the architecture proposed in the foregoing sections. The business features include user authentication, online product catalogs, shopping cart, special functions, order generating, checkout features and Email confirmation. [10]According to system requirements the following Servlet and JSP documents are defined: login page, home page, product catalog page, the product details page, View Cart page, order confirmation page. The framework is shown in Figure1.4. The MVC pattern is adopted in Figure 1.4, that is, business logic tier represents the Model, JSP documents are the View, and Servlet serves as the Controller. There re no direct calls among JSP documents. The Servlet receive all HTTP request, and call the appropriate business logic model, then run different JSP documents according to the processing results. End clients can receive HTML response which can be seen in a browser. In Figure.1.4 the steps of accessing the database are: firstly Servlet calls the Session Bean, then the Session Bean calls entity beans, finally the database is operated by the Entity Bean. This approach not only separates the business logic from the data persistence logic and simplifies the development process, but also develops a stronger e-commerce system with scalability and maintainability [11]. III IMPLEMENTATION A web application framework is a software framework that is designed to support the development of dynamic websites, Web applications and Web services. The framework aims to alleviate the overhead associated with common activities used in Web development. A Web Application Framework (WAF) is a reusable, skeletal, semi-complete modular platform that can be specialized to produce custom web applications, which commonly serve the web browsers via the Http's protocol. WAF usually implements the Model-View- Controller (MVC) design pattern, typically in the Model 2 architecture to develop request-response web-based applications on the Java EE and.net models. www.ijcsit.com 1255

Virtually all web applications have a common set of basic requirements, such as user management e.g., secure user login, password recovery), group management, and access authorization. A Web Application Framework usually includes all these functionalities, refined through hundreds of production deployments, freeing developers to focus on the needs of their specific application. WAFs store important data in a relational database and they interact with users via a web-based user interface. Any application written on top of a Web Application Framework can transparently and immediately take advantage of these basic services. IV SAMPLE WEB APPLICATION 1) index.jsp a page that gets input from the user. 2) ControllerServlet.java a servlet that acts as a controller. 3) login-success.jsp and login-error.jsp files acts as view components. web.xml file for mapping the servlet. index.jsp <form action="controllerservlet" method="post"> Name:<input type="text" name="name"><br> Password:<input type="password" name="password"> <br> <input type="submit" value="login"> </form> Controller import java.io.ioexception; import java.io.printwriter; import javax.servlet.requestdispatcher; import javax.servlet.servletexception; import javax.servlet.http.httpservlet; import javax.servlet.http.httpservletrequest; import javax.servlet.http.httpservletresponse; public class ControllerServlet extends HttpServlet { protected void dopost(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException { response.setcontenttype("text/html"); PrintWriter out=response.getwriter(); "); String name=request.getparameter("name"); String password=request.getparameter("password LoginBean bean=new LoginBean(); bean.setname(name); bean.setpassword(password); request.setattribute("bean",bean); boolean status=bean.validate(); if(status){ RequestDispatcher rd=request.getrequestdispa tcher("login-success.jsp"); rd.forward(request, response); else{ RequestDispatcher rd=request.getrequestdispa tcher("login-error.jsp"); rd.forward(request, response); LoginBean.java package app1.devanasan; public class LoginBean { private String name,password; public String getname() { return name; public void setname(string name) { this.name = name; public String getpassword() { return password; public void setpassword(string password) { this.password = password; public boolean validate(){ if(password.equals("admin")){ return true; else{ return false; File: login-success.jsp <%@page import="ank.loginbean"%> <p>you are successfully logged in!</p> <% LoginBean bean=(loginbean)request.getattribute("be an"); out.print("welcome, "+bean.getname()); %> File: login-error.jsp <p>sorry! username or password error</p> <%@ include file="index.jsp" %> File: web.xml <servlet> <servlet-name>s1</servlet-name> <servlet-class>app1.devanasan ControllerServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>s1</servlet-name> <url-pattern>/controllerservlet</url-pattern> </servlet-mapping> </web-app> www.ijcsit.com 1256

IV FUTURE WORK Open technologies are the best to attract the academic and research scholar to work. J2EE is the vast field now a day, its open technologies also. Architecture is never fixed its goes on changing with the change in the technology. There are many frameworks available to work with J2EE technologies, Single frame is never sufficient to provide the complete solution with all essential features of the application. There is a lot of scope to work further with many other frameworks to implement and enhance the MVC architecture. CONCLUSION This paper identifies the primary role of J2ee and its applications and also the role of MVC architectural framework. In the MVC framework, the controller mediates the flow of data between model and view objects in both directions. View objects use the controller to translate user actions into property updates on the model. In addition, changes in model state are communicated to view objects through an application's controller objects. Multiple framework architecture works better as compare to any single framework architecture with the effective of the multiple frameworks for the development of the large scale applications. REFERENCES [1] A. Saxena, "Web Based Custom Validation Using Framework in Java," International Journal of Computer Science Trends and Technology (IJCST), 2015. [2] Y. Wang, C. Guo and L. Song, "Architecture of E-Commerce Systems Based on J2EE and MVC Pattern," IEEE Computer Society, 2009. [3] M. G. P Gupta, "MVC Design Pattern for the multi framework distributed applications using XML, spring and Struts framework," International Journal on Computer Science and Engineering, pp. 1047-1051, 2010. [4] R. Garg, Y. Sood, B. Kottana and P. Totlani, "A Framework Based Approach for the Development of Web Based Applications," World of Computer Science and Information Technology Journal (WCSIT), pp. 1-4, 2011. [5] A. Saxena, "Struts based Approach for the Development of Java Applications," Journal of Software Engineering Tools & Technology Trends. [6] T. Dey, "A Comparative Analysis on Modeling and Implementing with MVC Architecture," International Conference on Web Services Computing (ICWSC), vol. 44, 2011. [7] G. P and G. M, "Spring Web MVC Framework for rapid open source J2EE application development: a case study," International Journal of Engineering Science and Technology, vol. 2, no. 6, pp. 1684-1689, 2010. [8] A. Saxena, "Java Server Pages," MJP, pp. 341-342, 2012. [9] D. Brown, M. C. Davis and S. Stanlick, "Struts in Action," DreamTech, 2010. [10] R. J. A Saxean, "Securing Confidential Data using Java/J2EE," nternational Journal of Science Technology and Management, vol. 2, no. 3, 2011. [11] A. Saxena, "Handling of Synchronized Data using Java/J2ee," International Journal of Management, IT & Engineering, vol. 1, no. 7. www.ijcsit.com 1257