Apache Struts. J2EE Web Application using MVC design pattern Why MVC? Separate components = easier maintenance – Model component holds object data – View.

Slides:



Advertisements
Similar presentations
Java OSS Web Technologies By Dave Ford Introduction Purpose Describe Javas relationship to the OSS community Describe OSS tools used on recent project.
Advertisements

JSP and web applications
Web Development with Karsten Schulz Terp-Nielsen Master Principal Sales Consultant Oracle Denmark.
Apache Struts Technology
Spring, Hibernate and Web Services 13 th September 2014.
Web MVC-2: Apache Struts Rimon Mikhaiel
MVC Frameworks Alternatives to coding the MVC pattern.
Struts1 Apache Struts Dr Jim Briggs. Struts2 What is Struts? Struts is an open source framework for building Java web applications Supports MVC/Model.
DT211/3 Internet Application Development JSP: Processing User input.
Struts Basics SSE USTC Qing Ding. Agenda What is and Why Struts? Struts architecture – Controller: Focus of this presentation – Model – View Struts tag.
© 2005, Cornell University. Rapid Application Development using the Kuali Architecture (Struts, Spring and OJB) A Case Study Bryan Hutchinson
Web programming for project students Dr Jim Briggs.
Apache Struts Technology A MVC Framework for Java Web Applications.
Session-01. Layers Struts 2 Framework The struts 2 framework is used to develop MVC-based web application. Struts 1.0 was released in June The.
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
Introduction to Java web programming Dr Jim Briggs JWP intro1.
Struts 2.0 an Overview ( )
Introduction to Struts 2.0 Jenny Ni Joey Feng Winddays Wang Hewmmi Zhu Heather Lv Software School,Fudan University 1.
Struts. Agenda Preface Struts and its components An example The architecture required for Struts Applications.
UNIT-V The MVC architecture and Struts Framework.
Lecture 2 - Struts ENTERPRISE JAVA. 2 Contents  Servlet Deployment  Servlet Filters  Model View Controllers  Struts  Dependency Injection.
JavaServer Faces: The Fundamentals Compiled from Sun TechDays workshops (JSF Basics, Web-Tier Codecamp: JavaServer Faces, Java Studio Creator; IBM RAD)
Java Frameworks Indy Java Users Group January 29, 2003.
1 INTRO TO BUSINESS COMPONENTS FOR JAVA (BC4J) Matt Fierst Computer Resource Team OracleWorld Session
JavaServer Faces Jeff Schmitt October 5, Introduction to JSF Presents a standard framework for building presentation tiers for web applications.
Design Patterns Phil Smith 28 th November Design Patterns There are many ways to produce content via Servlets and JSPs Understanding the good, the.
Java Server Pages Lecture July Java Server Pages Java Server Pages (JSPs) provide a way to separate the generation of dynamic content (java)
Jakarta Struts Presented by Object Computing, Inc. (OCI) Written by Greg Elliott
® IBM Software Group © 2007 IBM Corporation J2EE Web Component Introduction
8/15/2003System Specialists Corporation How to implement BC4J with the Struts Framework Eugene Sicat Technical Architect/Project Manager System Specialists.
JSF Introduction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Struts J2EE web application framework “ Model 2 ” Model View Controller Controller Servlet Key features XML metadata Struts taglib Simplified form validation.
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
Case Study + MVC Lec Error Pages By means of the page directive, a JSP can be given the responsibility of an Error page An Error JSP will be called.
Spring Framework. Spring Overview Spring is an open source layered Java/J2EE application framework Created by Rod Johnson Based on book “Expert one-on-one.
J2EE Overview Web Programming CSCI J2EE multi-tier architecture Servlet: Java class loaded into Web server JSP page: enhanced HTML page that is.
Simple MVC. An example: join.jsp
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Java Web Development with NetBeans IDE -- Kai Qian Chapter 5 JavaServer Faces (JSF) Technology.
JAVA SERVER FACES ADITI RAJORIYA UNI – ar2630. POINTS TO BE DISSCUSED WHAT IS JSF? WHY JSF? ARCHITECTURE JSF VERSIONS UI COMPONENTS JSF STRUCTURE AND.
JSF Framework Java Server Faces Presented by Songkran Totiya (6/10/2014)
Struts Framework Anna Paščenko. What is Struts?  An open source framework for building Java web applications.
CSC 2720 Building Web Applications Frameworks for Building Web Applications.
Model View Controller Architecture of Java Web Applications Dr. M V S Peri Sastry, Ph.D.[BITS-Pilani]
Spring and DWR Frameworks for Rich Web Enterprise Application Thomas Wiradikusuma Presentation to the 20 th.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
Implementation Struts Framework for well-architectured web applications Model-View-Controller design pattern.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
APACHE STRUTS ASHISH SINGH TOMAR ast2124. OUTLINE Introduction The Model-View-Controller Design Pattern Struts’ implementation of the MVC Pattern Additional.
Chapter 2 Java Struct 2. Content Basic MVC Architecture Struts 2 Overview Struts 2 - Architecture.
SDJ INFOSOFT PVT. LTD. 2 BROWSERBROWSER JSP JavaBean DB Req Res Application Layer Enterprise server/Data Sources.
Apache Struts Technology A MVC Framework for Java Web Applications.
Java Web Development with NetBeans IDE -- Kai Qian Chapter 9 Case Study.
Struts 2 Development. Topics  Roles in Struts Development  Control Flow  Actions  Struts 2 Views and Target  Struts 2 Custom Tags  Validation 
Introduction to Jakarta Struts Framework Try NCCU Computer Center Mar 20,2002.
J2EE Platform Overview (Application Architecture)
The J2EE Framework Java Technologies External Application.
Unit 6-Chapter 2 Struts.
Design and Maintenance of Web Applications in J2EE
Introduction to Struts
Java Web Application Framework
Building an Integrable XBRL Portal Daniel Hamm German Central Bank
The Model Layer What is Model?
JavaServer Faces: The Fundamentals
Struts BY: Tejashri Udavant..
SDMX IT Tools SDMX Registry
Presentation transcript:

Apache Struts

J2EE Web Application using MVC design pattern Why MVC? Separate components = easier maintenance – Model component holds object data – View component handles rendering of JSP/html – Controller component handles business logic Each component can be tweaked without knowledge of how another is implemented.

Pitfalls Most developers are not architects – Tier Leakage Without proper care, some components can leak into others. Examples – Embedded Java code in JSP – Actually rendering HTML in Servlet How can we ensure that our web app adheres to a strict MVC approach?

STRUTS! Struts forces you to apply true MVC design principles to your application – Provides rich tag libraries to allow access to objects from the View component – Allows for well-defined Action/Form relationships for the Controller, via XML – Easy mapping back to POJO for the Model component

Form Handling Proper handling of forms – Using the taglibs and form beans, Struts eliminates messy servlet code and populates objects on its own Validating forms and displaying error messages – Client-side validation via XML files – Server-side validation via the Action class – Displays errors in View using tags from the libraries

Other features Centralized file-based configuration – Struts-config.xml Form beans – Useful to populate JavaBean from incoming request parameter from JSP, if necessary Bean tags – To output the values of JavaBeans from JSP HTML tags – Custom JSP tags to create forms associated with JavaBeans Consistent Approach – Enforces better compliance to MVC design approach

Struts Weaknesses Long learning curve Documentation exists (books, online help etc.), but less than the documentation for JSP and Servlets Less transparency – makes it harder to understand, benchmark and optimize.

How did we research the subject? Read articles Read a book on Struts Searched for references, opinions online (Apache website, blogs, forums) Downloaded Struts and played around with it

Our position The numerous benefits of using Struts definitely out-weigh the weaknesses Even with the long learning curve, it is a lot faster/efficient than developing a custom framework Documentation will broaden and get better, which will also help with the long learning curve Next time we will use Struts…

The Future of Struts ?

Questions?