Struts Petstore Struts University Series. Abstract Struts has always shipped with a simple example application. But for many teams, MailReader is a bit.

Slides:



Advertisements
Similar presentations
Introduction to the Spring Framework
Advertisements

Lecture plan Information retrieval (from week 11)
Apache Struts Technology
1 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Building Frameworks With Patterns “An Active Object-Model For A Dynamic Web-Based Application”
Spring, Hibernate and Web Services 13 th September 2014.
An Agile Approach for Web Systems Engineering A Presentation of an Article by V.E.S. Souza and R.A. Falbo.
An architecture for webb applications, J2EE
Object-Oriented Enterprise Application Development J2EE Blueprints.
The Jukebox Orian Paz & Yair Cleper Instructor: Viktor Kulikov Semester: Spring 2009 Final Presentation.
© 2005, Cornell University. Rapid Application Development using the Kuali Architecture (Struts, Spring and OJB) A Case Study Bryan Hutchinson
Pragmatic Application Building: Step by Step Jay Sissom Principal Systems Analyst Indiana University
J2EE vs..NET Nigam Patel. Topics Background –Web Services, J2EE and.NET Similarities Differences Conclusion –Pros and Con (J2EE and.NET)
Apache Struts Technology A MVC Framework for Java Web Applications.
JavaServer Pages TM Introduce by
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.
Session-01. Hibernate Framework ? Why we use Hibernate ?
Intro to Servlets Lec 26. Web-Based Enterprise Applications in Java Figure shows a simplified view of one application and its layers.
Emmanuel Cecchet et al.  Performance Scalability of J2EE application servers.  Test effect of: ◦ Application Implementation Methods ◦ Container Design.
Who am I? ● Catalin Comanici ● QA for 10 years, doing test automation for about 6 years ● fun guy and rock star wannabe.
Intro to Spring CJUG - January What is Spring? “The Spring framework provides central transaction control of various objects.” This means that any.
The Spring Framework A quick overview. The Spring Framework 1. Spring principles: IoC 2. Spring principles: AOP 3. A handful of services 4. A MVC framework.
Data Persistence and Object-Relational Mapping Slides by James Brucker, used with his permission 1.
Clinton R. Begin 2 Dealing with Enterprise Database Challenges Featuring the Apache iBATIS Data Mapping Framework Clinton Begin
Struts 2.0 an Overview ( )
Struts. Agenda Preface Struts and its components An example The architecture required for Struts Applications.
UNIT-V The MVC architecture and Struts Framework.
JavaServer Faces: The Fundamentals Compiled from Sun TechDays workshops (JSF Basics, Web-Tier Codecamp: JavaServer Faces, Java Studio Creator; IBM RAD)
1 INTRO TO BUSINESS COMPONENTS FOR JAVA (BC4J) Matt Fierst Computer Resource Team OracleWorld Session
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
UPortal Developers MIT August 2004 Persistence Strategy for uPortal 3 Mike DeSimone the r-smart group
Compuware Corporation Business Driven SOA Edwin Schumacher Director of Product Management
Traditional Web Based Application Structure Frameworks define how the application is designed, organised and deployed across various tiers.
Java Petstore : A Case Study Rohit Nambiar July 2005.
® IBM Software Group © 2007 IBM Corporation J2EE Web Component Introduction
Opus College - overview. OpusCollege - background First project: ICT Capacity Building Mozambican Higher Education Institutions Partners: RUG Groningen,
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
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.
Webcommerce Computer Networks Webcommerce by Linnea Reppa Douglas Martindale Lev Shalevich.
Alcatel-Lucent CDC Workshop, Coaching & Knowledge Transfer Architecture.
Hibernate 3.0. What is Hibernate Hibernate is a free, open source Java package that makes it easy to work with relational databases. Hibernate makes it.
1 Mapping to Relational Databases Presented by Ramona Su.
A Presentation By V AIBHAV S AHARAN Web-enHanced Information Management COMS E6125.
Struts Framework Anna Paščenko. What is Struts?  An open source framework for building Java web applications.
Model View Controller Architecture of Java Web Applications Dr. M V S Peri Sastry, Ph.D.[BITS-Pilani]
{ Online Dating Popa Adrian Prejbeanu Samir Stefan Andrei Urziceanu Stefanita.
Java EE Patterns Dan Bugariu.  What is Java EE ?  What is a Pattern ?
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
1 Copyright © 2004, Oracle. All rights reserved. Oracle Application Development Framework.
Fundamentals of MyBATIS
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
Introduction to ORM Hibernate Hibernate vs JDBC. May 12, 2011 INTRODUCTION TO ORM ORM is a programming technique for converting data between relational.
Text 16 de mayo de 2009 Spring Framework Part III. Portable Service Abstractions and Spring MVC Buenos Aires, June 2009.
Apache Struts Technology A MVC Framework for Java Web Applications.
CS 440 Database Management Systems Stored procedures & OR mapping 1.
Java Programming, 3e Concepts and Techniques Chapter 1 Section 56 – An Introduction to Java.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
Best 3 Software Development Languages. Hibernate Training Hibernate is a high-performance object-relational mapping tool and query service. Hibernate.
The Holmes Platform and Applications
New Technology: Why, What ,How
Structure of a web application
A very brief introduction
Haritha Dasari Josue Balandrano Coronel -
Unit 6-Chapter 2 Struts.
Design and Maintenance of Web Applications in J2EE
Intro to Spring CJUG - January 2013.
Introduction to Struts
MSIS 655 Advanced Business Applications Programming
Building an Integrable XBRL Portal Daniel Hamm German Central Bank
JavaServer Faces: The Fundamentals
UFCEUS-20-2 Web Programming
Presentation transcript:

Struts Petstore Struts University Series

Abstract Struts has always shipped with a simple example application. But for many teams, MailReader is a bit too simple. Struts Petstore is a full-featured, production-grade Struts application inspired by the infamous Java Pet Store. Struts Petstore uses a professional architecture that hooks up to Apache iBATIS for data access. Let's have a look...

Struts PetStore

A little background Sun creates J2EE Pet Store Demonstrates patterns Microsoft creates.NET Pet Shop Demonstrates performance Clinton Begin creates JPetStore Demonstrates iBATIS

iBATIS and Struts iBATIS Data mapping framework for SQL Compares to Hibernate and OJB Struts Web application framework Compares to WebWork and Tapestry Clinton Begin Inventor of iBATIS and author of JPetStore

The Purpose of JPetStore Clinton Begin wrote JPetstore to show Java is easy Java is low cost Java is highly productive Java enables choice Java enables change

The Purpose of JPetStore Clinton Begin wrote JPetstore to show Java is easy Java is low cost Java is highly productive Java enables choice Java enables change iBATIS is cool

Advantages without Tradeoffs JPetStore uses superior design and architecture Clearly defined application layers Uses known best practices and patterns Avoids known worst practices No stored procedures No SQL embedded in Java code No HTML in the database No generated code

Presentation Model View Controller Pattern Well know and proven (GOF) Simple and maintainable Apache Struts Freely available, open source Based on JavaBeans

Domain JavaBeans Components with properties and behavior Plug into presentation and persistence layers Compatible with many frameworks GUI tools available (IDEs, et cetera) Logic Classes None/Verb separation More maintainable than prior versions

Persistence Data Access Objects “Pluggable” persistance components Proven abstract factory pattern (GoF) Improves maintainability and flexibility SQL Maps Reduces/eliminates repetive JDBC code Improves performance with caching Portable across many databases Based on JavaBeans

Link to a category query JavaServer Page: Struts Config: <action path="/shop/viewCategory" type="com.ibatis.struts.BeanAction" name="catalogBean" scope="session" validate="false" >

CatalogBean public String viewCategory() { if (categoryId != null) { productList = catalogService.getProductListByCategory(categoryId); category = catalogService.getCategory(categoryId); } return "success"; }

CatalogService public PaginatedList getProductListByCategory(String categoryId) { return queryForPaginatedList("getProductListByCategory", categoryId, PAGE_SIZE); } public Category getCategory(String categoryId) { return (Category) queryForObject("getCategory", categoryId); }

SqlMaps select CATID, NAME, DESCN from CATEGORY select CATID, NAME, DESCN from CATEGORY where CATID = #value#

ResultMap

Cache Model

Cache Model

Dynamic SQL select CATID, NAME, DESCN from CATEGORY select CATID, NAME, DESCN from CATEGORY where CATID = #value#

Dynamic SQL select CATID, NAME, DESCN from CATEGORY where CATID = #value#

Struts University Series