WebWork in Action An introduction to WebWork Patrick A. Lightbody.

Slides:



Advertisements
Similar presentations
Castafiore platform Consists or intend to consist of 1.Advanced Web framework 2.Advanced Graph database 3.Designer studio (something like visual basic)
Advertisements

Struts 2.0.
Apache Struts Technology
Internet Technologies 1 Master of Information System Management Java Server Faces Model/View/Controller Design Pattern for Web Development Slides.
JavaServer Faces Dr Jim Briggs 1JavaServer Faces.
Dynamic Web Pages Bert Wachsmuth. Review  Internet, IP addresses, ports, client-server, http, smtp  HTML, XHTML, XML  Style Sheets, external, internal,
Java Server Faces Model/View/Controller Design Pattern for Web Development Slides adapted from “Core JavaServer Faces” by Geary and Horstmann and the J2EE.
{ Apache - Click By, By, Anupam Mundale. Anupam Mundale. Viraj Kulkarni. Viraj Kulkarni.
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.
Session-02. Index. Jsp in Struts 2 Web.xml File in Struts 2.
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
Java Enterprise Edition Java Web Development Structure of a web project Introduction to Web Applications The first project Introduction to Java Web Development.
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.
© 2006 by IBM 1 How to use Eclipse to Build Rich Internet Applications With PHP and AJAX Phil Berkland IBM Software Group Emerging.
Chapter 6 DOJO TOOLKITS. Objectives Discuss XML DOM Discuss JSON Discuss Ajax Response in XML, HTML, JSON, and Other Data Type.
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.
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.
Java Server Pages (JSP) Presented by: Ananth Prasad & Alex Ivanov May 10, 2001.
Ori Calvo, 2010 “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,
Java Server Faces Çağatay Çivici Apache MyFaces Team Member
Pittsburgh Java User Group– Dec Java PureFaces: A JSF Framework Extension.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
BEST PRACTICES - Java By Configuration Use global-forwards/results Helps to avoid duplicate jsp files and redundancy forward mapping.
11 Getting Started with C# Chapter Objectives You will be able to: 1. Say in general terms how C# differs from C. 2. Create, compile, and run a.
WebWork + AJAX A winning combination Patrick A. Lightbody.
Design Patterns Phil Smith 28 th November Design Patterns There are many ways to produce content via Servlets and JSPs Understanding the good, the.
Basic Struts Architecture Client Server Database Request Response Control View Model Server Struts Framework.
Java Server Pages Lecture July Java Server Pages Java Server Pages (JSPs) provide a way to separate the generation of dynamic content (java)
Extending ArcGIS for Server
Struts2 Plugin Development - Extending Struts2 Justin Yip.
JSF Introduction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
® IBM Software Group © 2007 IBM Corporation JSP Expression Language
JSTL Lec Umair©2006, All rights reserved JSTL (ni) Acronym of  JavaServer Pages Standard Tag Library JSTL (like JSP) is a specification, not an.
Peter Laird. | 1 Building Dynamic Google Gadgets in Java Peter Laird Managing Architect WebLogic Portal BEA Systems.
Introduction to JavaServer Pages. 2 JSP and Servlet Limitations of servlet  It’s inaccessible to non-programmers JSP is a complement to servlet  focuses.
Java Web Development with NetBeans IDE -- Kai Qian Chapter 5 JavaServer Faces (JSF) Technology.
A Presentation By V AIBHAV S AHARAN Web-enHanced Information Management COMS E6125.
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 2 introduction. Struts 2 framework Struts 2 A full-featured web application framework for the Java EE platform The Java Servlet API exposes the.
REVOLUTION TO NEXT GENERATION Struts2.0 20/02/ Avishek Arang ::
Chính phủ điện tử TS. Phạm Văn Tính Khoa CNTT, ĐH Nông Lâm TP.HCM
Copyright AlphaCSP Israel 2008 – Web Framework Playoff Seminar 1 Struts2 Reinventing Struts1 Wheel Ori Dar Consultant and Architect, AlphaCSP.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Spring MVC Essentials Getting started.
Katari Globant 2008 (update to 2010). Katari  Katari is a framework to use as a starting point to develop new web applications.  Incorporates architecture,
-SRINIVAS REDDY. Struts 2 Tutorial Introduction to Struts 2.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
Chapter 6 Chapter 6 Server Side Programming (JSP) Part 1 1 (IS 203) WebProgramming (IS 203) Web Programming.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
APACHE STRUTS ASHISH SINGH TOMAR ast2124. OUTLINE Introduction The Model-View-Controller Design Pattern Struts’ implementation of the MVC Pattern Additional.
Singleton Academy, Pune. Course syllabus Singleton Academy Pune – Course Syllabus1.
Chapter 2 Java Struct 2. Content Basic MVC Architecture Struts 2 Overview Struts 2 - Architecture.
Apache Struts Technology A MVC Framework for Java Web Applications.
WebWork 2.0 Strutting the OpenSymphony Way. What is OpenSymphony? An open source project encompassing quality enterprise Java components Many well known.
Model View Controller. MVC is the separation of model, view and controller. It's simply a paradigm; an ideal that you should have in the back of your.
Lecture Transforming Data: Using Apache Xalan to apply XSLT transformations Marc Dumontier Blueprint Initiative Samuel Lunenfeld Research Institute.
Struts 2 Development. Topics  Roles in Struts Development  Control Flow  Actions  Struts 2 Views and Target  Struts 2 Custom Tags  Validation 
Technologies For Creating Rich Internet Applications Presenter's name
Creative Commons Attribution- ShareAlike 2.5 License Sakai Programmer's Café Sakai Oxford Tetra ELF Workshop Comparative Display Technologies in Sakai.
Angular 4 + TypeScript Getting Started
Best Struts 2 Training By TOPS Technologies.
Unit 6-Chapter 2 Struts.
MSIS 655 Advanced Business Applications Programming
The Model Layer What is Model?
SPL – PS1 Introduction to C++.
Presentation transcript:

WebWork in Action An introduction to WebWork Patrick A. Lightbody

Introduction WebWork: an OpenSymphony project  What is WebWork?  What is OpenSymphony? Who is Patrick? Comparison to other web frameworks  Struts  Tapestry  JSF

eBook now available Print version ready “any day now” Ask questions - get a free copy!

“Wow” example Getting started has never been easier Demonstration of:  Inversion of Control  Template library  Type conversion  Validation

Demo…

Overview: WebWork… Is built upon the Command Pattern Works with POJOs Uses OGNL for expression language and type conversion Has an advanced validation framework Includes an extensible widget system Supports many view technologies: JSP, FreeMarker, Velocity, JasperReports, XSLT, etc

Core concepts Three key pieces:  Actions (POJOs, ActionSupport)  Results  Interceptors No “form beans”: the action is the model Value stack allows loose coupling Interceptors: “AOP lite”

Getting started Two options:  Standard servlet (2.3) container  New “prototype” quick start Both methods are compatible  develop in “prototype” and deploy in a standard servlet container

Servlet container Everything starts with the FilterDispatcher The FilterDispatcher is responsible for:  Executing actions  Serving static content (AJAX-related files)  The inversion of control “request” scope  Cleaning up the ActionContext (ThreadLocal)

web.xml webwork ….FilterDispatcher webwork /* ….LifecycleListener

“Prototype” Is the quickest way to get started Is inspired by AppFuse, Ruby on Rails Is powered by a built-in Jetty server Automatically compiles your source files Gets your started in three steps:  Unzip webwork-2.2.zip  cp -R webapps/starter webapps/javazone  java -jar launcher.jar prototype:javazone

xwork.xml Configuration for actions, results, and interceptors Support for packages and package inheritence  Optional mapping to namespaces Additional files can be included using

xwork.xml Example <package name="default” extends="webwork-default"> listPeople.ftl

Value stack All expressions work against the value stack Actions are pushed on the stack before anything else happens Additional objects, such as those in an interator or action chaining, can be pushed down

Type conversion HTTP is not aware of data types…  … but Java is!  WebWork helps by letting you work with your raw POJOs rather than typeless intermediate objects (form beans). Helps with simple conversion (primitives) as well as complex (POJOs and collections)

Type conversion examples String -> int  String[] -> List  Complex types 

Validation Abstracts validation rules from core code Common rules available (required, regex, date range, etc) Sames rules work with client-side validation (using AJAX -- see my other presentation for more info)

Template library Platform to create reusable UI widgets Form controls provided out of the box Groups of templates form “themes” The “xhtml” theme is simple two-column layout Themes can extend each other  ajax -> xhtml -> simple

The xhtml theme extends the simple theme and provides a standard two-column layout…

Uses of interceptors Provide very core features for WebWork:  Logging  Applying HTTP request parameters  Invoking IoC  Invoking the validation framework Also provide advanced functionality…

Advanced features Action chaining  Lets you glue together smaller actions to form more complex workflows  CreateUser -> Login Automatic “wait” pages  Great for complex search operations Prevent double click problems (without relying on JavaScript!)

Demo…

Wrapping up Prototype is a great way to get started Utilize the templates; create your own themes Type conversion bridges the gap between HTTP and Java Use the validation framework (especially with AJAX) Utilize interceptors when appropriate

Questions?