JSF Framework Java Server Faces Presented by Songkran Totiya (6/10/2014)

Slides:



Advertisements
Similar presentations
Web Development with Karsten Schulz Terp-Nielsen Master Principal Sales Consultant Oracle Denmark.
Advertisements

Apache Struts Technology
 Copyright Wipro Technologies JSP Ver 1.0 Page 1 Talent Transformation Java Server Pages.
Using JavaServer Pages Harry R. Erwin, PhD CIT304/CSE301.
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
Internet Technologies 1 Master of Information System Management Java Server Faces Model/View/Controller Design Pattern for Web Development Slides.
JavaServer Faces. Objectives To implement dynamic web pages with JavaServer Faces (JSF) technology To learn the syntactical elements of JavaServer Faces.
Struts Basics SSE USTC Qing Ding. Agenda What is and Why Struts? Struts architecture – Controller: Focus of this presentation – Model – View Struts tag.
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 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.
Introduction to JavaServer Faces Jeff Swisher Director of Consulting Services Dunn Solutions Group.
Introduction to Java web programming Dr Jim Briggs JWP intro1.
Chính phủ điện tử TS. Phạm Văn Tính Khoa CNTT, ĐH Nông Lâm TP.HCM
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)
Java Server Faces Çağatay Çivici Apache MyFaces Team Member
IndicThreads.com Java Meet June 2006 Java Server Faces Presentation By - Raghu Charan.
Pittsburgh Java User Group– Dec Java PureFaces: A JSF Framework Extension.
CIS 375—Web App Dev II ASP.NET 2 Introducing Web Forms.
Shale and JSF Ken Sipe - Code Mentor. 2 Presentation Goal  Provide enough understanding for someone new to JSF and Shale to start coding…
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.
CSE446 S OFTWARE Q UALITY M ANAGEMENT Spring 2014 Yazılım ve Uyguluma Geliştirme Yöneticisi Orhan Başar Evren.
1 Lecture 24 George Koutsogiannakis Spring 2011 CS441 CURRENT TOPICS IN PROGRAMMING LANGUAGES.
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)
JSF Introduction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
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 ….
Introduction to Web Dimitar Nenchev Ivan Nakov
Java Web Development with NetBeans IDE -- Kai Qian Chapter 5 JavaServer Faces (JSF) Technology.
JavaServer Faces: Sample App + Life Cycle Compiled from Sun TechDays workshops (JSF Basics, Web-Tier Codecamp: JavaServer Faces, Java Studio Creator)
JAVA SERVER FACES ADITI RAJORIYA UNI – ar2630. POINTS TO BE DISSCUSED WHAT IS JSF? WHY JSF? ARCHITECTURE JSF VERSIONS UI COMPONENTS JSF STRUCTURE AND.
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
CSC 2720 Building Web Applications Frameworks for Building Web Applications.
JavaServer Faces (JSF) and Ajax Integration. Agenda 대강의 ( 정말로..) 개요 예제 아키텍트라면..
Chính phủ điện tử TS. Phạm Văn Tính Khoa CNTT, ĐH Nông Lâm TP.HCM
Apache Struts. J2EE Web Application using MVC design pattern Why MVC? Separate components = easier maintenance – Model component holds object data – View.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 41 JavaServer Face.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Spring MVC Essentials Getting started.
© 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.
3246 JSF Support in JBuilder 2005 Karl Ewald R&D Engineer Borland Software Corporation.
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.
Chapter 9 Web Application Design. Objectives Describe the MVC design pattern as used with Web applications Explain the role and responsibilities of each.
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.
By Jonathan Smith. Road Map Introduction Company Information Project Overview Java Web Design and Development Summary Relation to IUP Acknowledgments.
Apache Struts Technology A MVC Framework for Java Web Applications.
How to Leverage Java in Oracle Forms Web Applications Duncan Mills Application Development Tools Oracle Corporation.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
Struts 2 Development. Topics  Roles in Struts Development  Control Flow  Actions  Struts 2 Views and Target  Struts 2 Custom Tags  Validation 
Introduction to Java Server Faces (covered topics) ● Reasons to use „Java Server Faces“ ● JSF application structure ● JSF component model ● JSF managed.
Intro to JavaServer Faces Mimi Opkins CECS 493 Fall 2016.
Examples with Java Server Faces (covered topics)
ORACLE ADF ONLINE TRAINING COURSE
Unit 6-Chapter 2 Struts.
Enterprise Java Bean. Overview of EJB View of EJB Conversation Roles in EJB, Types of Enterprise Beans Lifecycle of Beans Developing Applications using.
Introduction to Struts
The Model Layer What is Model?
JavaServer Faces: The Fundamentals
JavaServer Faces: It is a server side component based user interface framework. It is used to develop web applications. It provides a well-defined programming.
Struts BY: Tejashri Udavant..
Presentation transcript:

JSF Framework Java Server Faces Presented by Songkran Totiya (6/10/2014)

Agenda What is and why JSF? Architecture Overview UI Component Model Development Steps Introducing Primefaces Q & A 2

JavaServer™ Faces (JSF) Framework Is… 3

What is JSF? A specification and reference implementation for a web application development framework - Components - Events - Validators & converters - Navigation - Back-end-data integration 4

Why JSF? (page 1) MVC for web applications Clean separation of roles Easy to use Extendable Component and Rendering architecture Support for client device independence Standard Huge vendor and industry support 5

Why JSF? (page 2) JSP and Servlet – No built-in UI component model Struts (I am not saying you should not use Struts) – No built-in UI component model – No built-in event model for UI components – No built-in state management for UI components – No built-in support of multiple renderers – Not a standard (despite its popularity) Struts and JSF can be used together 6

JSF Architecture [MVC] 7

Request processing Lifecycle 8

Request Processing Lifecycle Phases 9

Request Processing Lifecycle 10

Request Processing Lifecycle Phases 1.Reconstitute component tree phase 2.Apply request values phase 3.Process validations phase 4.Update model values phase 5.Invoke application phase 6.Render response phase 11

User Interface Component Model UI components Event handling model Conversion and Validation model Rendering model Page navigation support 12

UI Components UIComponent/UIComponentBase - Base class for all user interface components Standard UIComponent Subclasses - UICommand, UIForm, UIOutput - UIGraphic, UIInput, UIPanel, UIParameter - UISelectBoolean, UISelectMany, UISelectOne Example: 13

Validators and Converters Validators - Perform correctness checks on UIInput values - Register one or more per component - Enqueue one or more messages on errors - Standard implementations for common cases Converters - Plug-in for conversions: - Output: Object to String - Input: String to Object - Standard implementations for common cases 14

Converters and Validators Example: 15

Rendering Model Renderers-Adapt components to a specific markup language Decoding Encoding RenderKits—Library of Renderers Map component classes to component tags Is a custom tag library Basic HTML RenderKit 16

Events and Listeners Follows JavaBeans™ Specification design and naming patterns Standard events and listeners ▫ActionEvent—UICommand component activated by the user ▫ValueChangedEvent—UIInput component whose value was just changed 17

Navigation Model Application developer responsibility ▫Defined in Application configuration file(Facesconfig.xml) Navigation rules ▫Determine which page to go. ▫Navigation case 18

Navigation Model 19

Steps in Development Process 1.Develop model objects which hold the data 2. Add model objects (managed bean) declarations to Application Configuration File faces-config.xml 3. Create Pages using UI component and core tags 4. Define Page Navigation in faces-config.xml 5. Configure web.xml 20

Step1: Develop model Objects (Managed Bean) The model (M) in MVC A regular JavaBeans with read/write properties May contain application methods and event handlers Use to hold data from a UI (page) Creation and lifetime is managed by JSF runtime ▫application, session, request JSF keeps the bean's data in sync with the UI 21

Step 2. Managed Bean Declaration (Faces-config.xml) 22

Step 3: Create JSF Pages Must include JSF tag library ▫HTML and core tags All JSF tags must enclosed between a set of view tag Use JSF form and form component tags ▫ not May include validators and event listeners on any form components 23

Sample JSF™ Page (login.jsp) 24

Binding UI to Managed Bean 25

Step 4: Define Page Navigation Rules (Faces-config.xml) 26

Step 5: Configure (web.xml) 27

JSF Application directory structure 28

Introducing Primefaces Ready For PrimeTimePrimeFaces is a popular open source framework for JavaServer Faces featuring over 100 components, touch optimized mobilekit, push framework, client side validation, theme engine and more. 29

Our current web applications 30

Our current web applications 31

Our current web applications 32

Summary JSF: Server side UI component framework MVC Developing application in JSF Primefaces Ajax component framework 33

Reference

Q&A 35