JSF Presentation"2"

1,314 views
1,259 views

Published on

Published in: Education, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,314
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
32
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

JSF Presentation"2"

  1. 1. www.devoxx.com
  2. 2. Java Server Faces (JSF)
  3. 3. Agenda <ul><li>Design Pattern </li></ul><ul><li>MVC Design Pattern </li></ul><ul><li>What is JSF? </li></ul><ul><li>How to build JSF project? </li></ul><ul><li>JSF tags </li></ul><ul><li>Demo1 </li></ul><ul><li>Demo2 </li></ul><ul><li>Demo3 </li></ul>
  4. 4. <ul><li>Each pattern describes a problem which occurs over and over again in our environment, </li></ul><ul><li>and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over </li></ul>Design Pattern
  5. 5. <ul><li>Pattern Name </li></ul><ul><li>Problem </li></ul><ul><li>Solution </li></ul><ul><li>Consequences </li></ul>Elements of Design Patterns
  6. 6. Model-View-Controller pattern goals <ul><li>There are often many ways to present the same problem </li></ul><ul><li>requirements on how a problem is displayed tend to change. </li></ul><ul><li>The MVC design tries to separate the code that represents the problem from the code that presents the problem to the user </li></ul><ul><ul><li>this allows the “presentation” part to be change more easily </li></ul></ul>
  7. 7. Model (Business process layer) <ul><li>Models the data and behavior behind the business process </li></ul><ul><li>Responsible for actually doing </li></ul><ul><li>● Performing DB queries </li></ul><ul><li>● Calculating the business process </li></ul>
  8. 8. View (Presentation layer) <ul><li>Display information according to client types </li></ul><ul><li>Display result of business logic (Model) </li></ul><ul><li>Not concerned with how the information was obtained, or from where (since that is the responsibility of Model) </li></ul>
  9. 9. Controller (Control layer) <ul><li>Serves as the logical connection between the user's interaction and the business services on the back </li></ul><ul><li>Responsible for making decisions among multiple presentations </li></ul><ul><li>A request enters the application through the control layer, it will decide how the request should be handled and what information should be returned </li></ul>
  10. 10. MVC Diagram
  11. 11. What is JSF? <ul><li>is a Java-based Web application framework intended to simplify development of user interfaces for Java EE applications. </li></ul>
  12. 12. Tags Libraries <ul><li>● JSP page need to declare them </li></ul><ul><li><%@ taglib uri=&quot;http://java.sun.com/jsf/html/&quot; prefix=&quot;h&quot; %> </li></ul><ul><li><%@ taglib uri=&quot;http://java.sun.com/jsf/core/&quot; prefix=&quot;f&quot; %> </li></ul>
  13. 13. <ul><li>All component tags on the page must be enclosed in the view tag </li></ul><ul><li><f:view></f:view> </li></ul><ul><li>An input form with child components representing </li></ul><ul><li>data that is either presented to the user or submitted with the form </li></ul><ul><li><h:form></h:form> </li></ul>
  14. 14. <ul><li><h:commandLink value=&quot;Second Page&quot; action=&quot;second&quot;/> </li></ul><ul><li><h:commandLink value=&quot;Go To index&quot; action=&quot;index&quot; /> </li></ul><ul><li><h:commandButton id=&quot;submit&quot; value=&quot;Submit&quot; action=&quot;success&quot; /> </li></ul><ul><li><h:outputText value=&quot;JavaServer Faces&quot; /> </li></ul>
  15. 15. How to build JSFproject?
  16. 16. How to build JSFproject?
  17. 17.
  18. 18.
  19. 19. <ul><li>Demo 1 </li></ul>
  20. 20. Demo 1
  21. 21. Demo 1
  22. 22. Demo 2
  23. 23. Demo 2
  24. 24. Demo 2
  25. 25.
  26. 26. Demo 3
  27. 27.
  28. 28.
  29. 29. <ul><li>http://www.arabteam2000-forum.com/ </li></ul><ul><li>http://forums.sun.com/forum.jspa?forumID=427 </li></ul><ul><li>http://www.javapassion.com/j2ee/#JavaServer_Faces_JSF </li></ul>

×