Java Web Application Framework (WAF) Melek OKTAY 50050403

Slides:



Advertisements
Similar presentations
Apache Struts Technology
Advertisements

2136: Developing Web GUI Using JSF  Vishy Kasar.
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
JSP: JavaServer Pages Juan Cruz Kevin Hessels Ian Moon.
Internet Technologies 1 Master of Information System Management Java Server Faces Model/View/Controller Design Pattern for Web Development Slides.
28/1/2001 Seminar in Databases in the Internet Environment Introduction to J ava S erver P ages technology by Naomi Chen.
Java Server Faces Model/View/Controller Design Pattern for Web Development Slides adapted from “Core JavaServer Faces” by Geary and Horstmann and the J2EE.
Java Server Team 8. Overview What is a Java Server? History Architecture Advantages Disadvantages Current Technologies Conclusion.
Application Architectures Vijayan Sugumaran Department of DIS Oakland University.
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
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.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
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.
Java Server Pages (JSP) Presented by: Ananth Prasad & Alex Ivanov May 10, 2001.
JavaServer Faces: The Fundamentals Compiled from Sun TechDays workshops (JSF Basics, Web-Tier Codecamp: JavaServer Faces, Java Studio Creator; IBM RAD)
11. Java-Based Web: JSP, JSF. 2 Motto: Rule 1: Our client is always right Rule 2: If you think our client is wrong, see Rule 1. - Anonymous.
Java Server Faces Çağatay Çivici Apache MyFaces Team Member
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
Web Applications Harry R. Erwin, PhD University of Sunderland CIT304/CSE301.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Java Beans.
CIS 375—Web App Dev II ASP.NET 2 Introducing Web Forms.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
JDeveloper 10g and JavaServer Faces: High-Performance UIs on the Web Avrom Roy-Faderman Senior Programmer May, 2006.
JavaServer Faces Jeff Schmitt October 5, Introduction to JSF Presents a standard framework for building presentation tiers for web applications.
JSF road map (NI) Clientside validation Show problems
CSCI 6962: Server-side Design and Programming Introduction to Java Server Faces.
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
J2EE Structure & Definitions Catie Welsh CSE 432
Apache Struts RIFE Ruby on Rails Harry R. Erwin, PhD University of Sunderland CIT304/CSE301.
JSF Introduction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
CHEF II / Sakai Architecture. CHEF II Changes uPortal replaces Jetspeed –jsr 168 portlet, servlet compliant Spring replaces Turbine component framework.
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.
Fall CIS 764 Database Systems Design L8. Web ….
Webcommerce Computer Networks Webcommerce by Linnea Reppa Douglas Martindale Lev Shalevich.
Java Server Faces Introduction Harshavardhan M. Karkar Project Manager Info-Spectrum India Pvt. Ltd.
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)
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
Struts Framework Anna Paščenko. What is Struts?  An open source framework for building Java web applications.
JavaServer Faces (JSF) and Ajax Integration. Agenda 대강의 ( 정말로..) 개요 예제 아키텍트라면..
Apache Struts. J2EE Web Application using MVC design pattern Why MVC? Separate components = easier maintenance – Model component holds object data – View.
Markus Hjort Reaktor Innovations Java Web Development T WWW-palvelun HUT
CS562 Advanced Java and Internet Application Introduction to the Computer Warehouse Web Application. Java Server Pages (JSP) Technology. By Team Alpha.
© 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.
1 Copyright © 2004, Oracle. All rights reserved. Oracle Application Development Framework.
JavaServer Faces framework Craig McClanahan is presented that created Struts web framework and based on experience gathered designed JavaServer.
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.
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.
Presented by Alexey Vedishchev Developing Web-applications with Grails framework American University of Nigeria, 2016 Intro To MVC Architecture.
Introduction to Java Web Programming Gregg Sporar
Intro to JavaServer Faces Mimi Opkins CECS 493 Fall 2016.
Patterns and Frameworks for Managing Dynamic Views in Web Applications
Unit 6-Chapter 2 Struts.
Design and Maintenance of Web Applications in J2EE
Introduction to Struts
MSIS 655 Advanced Business Applications Programming
The Model Layer What is Model?
JavaServer Faces: The Fundamentals
Enterprise Java Beans.
Presentation transcript:

Java Web Application Framework (WAF) Melek OKTAY

Outline □Introduction □Java Web Aplication Framework □Conclusion

Outline □ Introduction □What is Framework □What is WAF □Java Web Aplication Framework □Conclusion

What is Framework? □Introduction □ What is Framework □What is WAF □Java Web Aplication Framework □Conclusion

What is Framework? □In information systems environment, a framework is a defined support structure in which other software applications can be organized and developed. □A software framework is a reusable design and building blocks for a software system and/or subsystem

What is Framework? (cont.) □In an object-oriented environment, a framework consists of abstract and concrete classes. Instantiation of such a framework consists of composing and subclassing the existing classes □Software frameworks rely on the Hollywood Principle: "Don’t call us, we’ll call you."

What is Framework? (cont.)

Why we use Framework? □The software frameworks significantly reduce the amount of time, effort, and resources required to develop and maintain applications.

What is Framework? □Introduction □What is Framework □ What is WAF □Java Web Aplication Framework □Conclusion

What is WAF? □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.

What is WAF? (cont.) □Model 1 Architecture

What is WAF? (cont.) □Model 2 Architecture

Model-View-Controller

Why we use WAF? □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.

Why we use WAF? □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.

□Introduction □Java Web Aplication Framework □Conclusion

Java Web Aplication Framework □Introduction □ Java Web Aplication Framework □Request-based Framework □Component-based Framework □Hybrid – Meta Framework □RIA-based Framework □Conclusion

Request-based Framework □Introduction □Java Web Aplication Framework □ Request-based Framework □Component-based Framework □Hybrid – Meta Framework □RIA-based Framework □Conclusion

Request-based Framework □A Request-based Framework is very close to the original CGI specification. □It uses controllers and actions that directly handle incoming requests. □Each request is essentially stateless.

Request-based Framework □Introduction □Java Web Aplication Framework □Request-based Framework □Struts □WebWork □Beehive, Stripes □Component-based Framework □Hybrid – Meta Framework □RIA-based Framework □Conclusion

Request-based Framework □Introduction □Java Web Aplication Framework □Request-based Framework □ Struts □WebWork □Beehive, Stripes □Component-based Framework □Hybrid – Meta Framework □RIA-based Framework □Conclusion

Struts □Struts was originally developed by Craig McClanahan and donated to the Apache Foundation in May □Struts has been a de facto framework with a strong and vibrant user community.

Struts (cont.) □Struts uses and extends the Java Servlet API to adopt the "Model 2" approach, a variation of the classic Model-View-Controller (MVC) design pattern.

Struts (cont.) MVC Design pattern

Struts Tag Libraries □HTML Tags □Bean Tags □Logic Tags □Template Tags □Custom Tags

Struts HTML Tags □The tags in the Struts HTML library form a bridge between a JSP view and the other components of a Web application. □Since a dynamic Web application often depends on gathering data from a user, input forms play an important role in the Struts framework

Struts HTML Tags □ HTML "form" tags □button □cancel □checkboxes □file □hidden □image □multibox □password input fields □radio buttons □reset buttons □ HTML "form" tags □select lists with embedded □option □options □submit buttons □text input fields □textareas

Project Refinery, Inc. 28 HTML Tags – Typical HTML Form □ □ First Name □ □ Street Address □ □ City □ □ State □ □ Postal Code □

Project Refinery, Inc. 29 HTML Tags – Typical Struts Form □

Project Refinery, Inc. 30 Application Set-up Jar files Tag libraries Struts-config dtd Application.properties Apache vhost file Web.xml Struts-config.xml

Project Refinery, Inc. 31 Some Struts Sites: Travel

Project Refinery, Inc. 32 Some Struts Sites: Government

Project Refinery, Inc. 33 Conservatives and Liberals Use It

WebWork □Introduction □Java Web Aplication Framework □Request-based Framework □Struts □ WebWork □Beehive, Stripes □Component-based Framework □Hybrid – Meta Framework □RIA-based Framework □Conclusion

WebWork □WebWork was originally developed by Rickard Oberg in 2001, and released as an open source project on SourceForge in March □WebWork provides robust support for building reusable UI templates, such as form controls, UI themes, internationalization, dynamic form parameter mapping to JavaBeans, and robust client and server side validation.

Component-based Framework □Introduction □Java Web Aplication Framework □Request-based Framework □ Component-based Framework □Hybrid – Meta Framework □RIA-based Framework □Conclusion

Component-based Framework □A Component-based Framework abstracts the internals of the request handling and encapsulates the logic into reusable components, often independent from the web medium □The state is automatically handled by the framework, based on the data that is present in each component instance. □Together with some form of event handling, this development model is very similar to the features offered by desktop GUI toolkits.

Component-based Framework □Introduction □Java Web Aplication Framework □Request-based Framework □Component-based Framework □JSF □Tapestry □Wicket □Hybrid – Meta Framework □RIA-based Framework □Conclusion

Component-based Framework □Introduction □Java Web Aplication Framework □Request-based Framework □Component-based Framework □ Jave Server Faces (JSF) □Tapestry □Wicket □Hybrid – Meta Framework □RIA-based Framework □Conclusion

Jave Server Faces (JSF) □JavaServer Faces (JSF) is a server-side user interface component framework for Java-based Web applications. □JSF contains an API for representing UI components and managing their state ; handling events, server- side validation, and data conversion ; defining page navigation ; supporting internationalization and accessibility ; and providing extensibility for all these features

JSF Solutions  UI components  State management  Event handling  Input validation  Page navigation  Internationalization and accessibility.  Custom tag library

JSF Life Cycle

UI Components (Standard) Some of the standard JavaServer Faces Components

UI Components (Custom) Some custom JavaServer Faces Components

UI Components (Open Source) Some open source JavaServer Faces Components

UI Components (Third Party) Some third-party JavaServer Faces Components

UI Components (Code) Syntax for a text box component: Syntax for a calendar component: Syntax for a bean backed calendar component:

State Management □JSF maintains the state of components over several requests. □Example 1 □Example 2 □Code: □None Required

Event Handling □Method Bindings □Value Change Listeners □Command Actions □Action Listeners

Input Validation □Standard Validators □ □ f:validateDoubleRange □ f:validateLongRange □ f:validateLength □Custom Validators

Input Validation - Errors □Validation Errors □

Input Validation - Converters □Standard Converters □ □ f:convertNumber □ f:convertDateTime □Custom Converters □

Page Navigation □Struts-like config file navigation /index.jsp Success /thankyou.jsp Error /error.jsp

Internationalization and accessibility □Components and Converters support multiple locales □Resource Bundle Support □ □Define supported locales resources en fr es

Custom tag library □You have already seen it □html-basic.tld □jsf-core.tld

Gotchas  Deployment  Embedding HTML  Components and Renderers  Validation  Bundle Keys “x.y.z”

Deployment □BEA WebLogic Server 8.1 SP3 □The JavaServer Faces required jars □commons-beanutils.jar □commons-collections.jar □commons-digester.jar □commons-logging.jar □jsf-api.jar □jsf-impl.jar □jstl.jar (must be version 1.0) □standard.jar (must be version 1.0)

Embedding HTML □HTML within JSF tags does not work without f:verbatim html □Use Exadels htmLib.jar instead

Components and Renderers □Building custom components □No simple task □Separate the renderer (easy to do)

Validation □If validation or conversion fails nothing happens □Action method bindings do not execute □Page just comes back □Most common JSF forum post □Use h:message or h:messages

Bundle Keys “x.y.z” □Resource Bundles are loaded as maps □ #{bundle.userslastname} – works □ #{bundle.user.name.last} – fails □ #{bundle[ ‘ user.name.last ’ ]} – works □For properties: □ #{bean.user.address.street} – works

Tool Support □Most IDEs have limited JSF support □The following IDEs provide the ability to drag and drop components onto a page: □IBM WSAD □Borland JBuilder □Oracle JDeveloper □Sun Java Studio Creator Eclipse*IntelliJ*JBuilderNetbeans* IBM WSADStudio CreatorJDeveloperNotepad**

MyEclipse – Drag and Drop

Political Support □Sun □Oracle □IBM □…and a bunch of little people but after those three it really doesn’t matter

Recommended Reading (the end)

Books Books I can recommend: □ Core JavaServer Faces by David Geary, Cay Horstmann □ JavaServer Faces in Action by Kito D. Mann Other books □ JavaServer Faces by Hans Bergsten □ Mastering JavaServer Faces by Bill Dudney, Jonathan Lehr, Bill Willis, LeRoy Mattingly □ JavaServer Faces Programming by Budi Kurniawan □ Javaserver Faces Kick Start (Kick Start) by James Turner, Craig McClanahan, Kunal Mittal

Sites □Sun Official JavaServer Faces Page □Sun Official JavaServer Faces Forum □Java Community Process JavaServer Faces Page □Sun Official JavaServer Faces implementation project □Components and resources □ □

Component-based Framework □Introduction □Java Web Aplication Framework □Request-based Framework □Component-based Framework □Jave Server Faces (JSF) □Tapestry □Wicket □Hybrid – Meta Framework □RIA-based Framework □Conclusion

Component-based Framework □Introduction □Java Web Aplication Framework □Request-based Framework □Component-based Framework □Jave Server Faces (JSF) □ Tapestry □ Wicket □Hybrid – Meta Framework □RIA-based Framework □Conclusion

Component-based Framework □Introduction □Java Web Aplication Framework □Request-based Framework □Component-based Framework □ Hybrid – Meta Framework □RIFE □Spring Framework □RIA-based Framework □Conclusion

Component-based Framework □Introduction □Java Web Aplication Framework □Request-based Framework □Component-based Framework □Hybrid – Meta Framework □ RIA-based Framework □Conclusion

Component-based Framework □Introduction □Java Web Aplication Framework □Request-based Framework □Component-based Framework □Hybrid – Meta Framework □ RIA-based Framework □DWR □Echo2 □JSON-RPC-Java □Conclusion

Java EE and.NET tiers

Java EE frameworks

References □T. C. Shan, W. W. Hua, “ Taxonomy of Java Web Application Frameworks,” in Conf. Rec IEEE Int. Conf. on e-Business Engineering, pp. 378–385. □M. Fowler,” Patterns of Enterprise Application Architecture ”, Addison-Wesley, □Melek Oktay, Ayşe Betül Gülbağcı, Mustafa Sarıöz “ Architectural, Technological and Performance Issues in Enterprise Applications”, not published yet...

Thanks