Jsf

2,932 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,932
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
184
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • 1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.   2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes. 3). Controller:   Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.
  • Jsf

    1. 1. JavaServer Faces 0312064 – Huỳnh Văn Quốc 0412090 – Huỳnh Quốc Tuấn 0412289 – Phan Sĩ Trung 0412330 – Thái Nhật Quang 0512152 – Nguyễn Phúc Hải
    2. 2. Nội Dung Trình Bày Các Thành Phần JSF Giới Thiệu JSF Kiến Trúc JSF Ưu Điểm-Khuyến Điểm 1 2 3 4 5 1 Demo & QA
    3. 3. Giới Thiệu JSF <ul><li>Viết Tắt của JavaServer Faces </li></ul><ul><li>1 Framework nhằn làm đơn giản hóa việc phát triển giao diện </li></ul><ul><li>Một bước tiến trong việc phát triển web,nó xậy dựng trên servlet API và JSP </li></ul><ul><li>Craig McClanahan </li></ul>
    4. 4. Giới Thiệu JSF <ul><li>JSF Bao Gồm: </li></ul><ul><li>Tập hàm API để phát triển các UI,xữ lý sự kiện,kiểm tra dữ liệu đầu vào,qui định về phân trang và hổ trợ đa ngôn ngữ cho người dùng. </li></ul><ul><li>Một số thành phần(Component) có sẵn. </li></ul><ul><li>Hổ trợ thư viện thẻ phong phú </li></ul><ul><li>Khả năng quản lý các trạng thái tốt </li></ul><ul><li>Craig McClanahan </li></ul>
    5. 5. Giới Thiệu JSF <ul><li>Mục tiêu của JSF: </li></ul><ul><li>Tạo ra một bộ khung tốt để gắng các thành phần của GUI vào,nhằm làm đơn giản hóa việc phát triển giao diện </li></ul><ul><li>Tạo ra các lớp java cơ sở để quản lý các thành phần,sự kiện của các thành phần và chu kỳ sống của nó trong giao diện </li></ul><ul><li>Cung cấp các thành phần GUI chung bao gồm các thành phần HTML input. </li></ul><ul><li>Craig McClanahan </li></ul>
    6. 6. Nội Dung Trình Bày Các Thành Phần JSF Giới Thiệu JSF Kiến Trúc JSF Ưu Điểm-Khuyến Điểm 1 2 3 4 5 1 Demo & QA
    7. 7. Kiến Trúc JavaSever Faces <ul><li>Kiến Trúc MVC </li></ul><ul><li>Kiến Trúc JSF </li></ul>
    8. 8. Kiến Trúc JavaSever Faces <ul><li>Kiến Trúc MVC </li></ul><ul><li>Chia ứng dụng ra làm 3 phần: </li></ul><ul><ul><li>Model </li></ul></ul><ul><ul><li>View </li></ul></ul><ul><ul><li>Control </li></ul></ul><ul><li>Các thành phần có trách nhiệm duy nhất và không phụ thuộc lẫn nhau. </li></ul>
    9. 9. Kiến Trúc JavaSever Faces <ul><li>Kiến Trúc MVC </li></ul><ul><li>Thành phần Model: </li></ul><ul><ul><li>Lưu trữ dữ liệu xuống csdl </li></ul></ul><ul><ul><li>Kiểm tra dữ liệu trước khi thao tác với dữ liệu </li></ul></ul><ul><ul><li>Xữ lý hầu như tất cả các nghiệp vụ </li></ul></ul>
    10. 10. Kiến Trúc JavaSever Faces <ul><li>Kiến Trúc MVC </li></ul><ul><li>Thành phần View: </li></ul><ul><ul><li>Hiển thị thông tin cho người dùng </li></ul></ul><ul><ul><li>Nhận dữ liệu từ người dùng đưa vào </li></ul></ul><ul><ul><li>Dữ liệu nhận từ view sẽ được chuyển xuống model và kiểm tra trước khi xữ lý </li></ul></ul>
    11. 11. Kiến Trúc JavaSever Faces <ul><li>Kiến Trúc MVC </li></ul><ul><li>Thành phần controller: </li></ul><ul><ul><li>Tầng trung gian giữa Model và View </li></ul></ul><ul><ul><li>Nhận yêu cầu từ client </li></ul></ul><ul><ul><li>Sinh ra kết quả cho người dùng </li></ul></ul><ul><ul><li>Các thành phần của Controller là: ActionServlet,ActionForm…vv </li></ul></ul>
    12. 12. Kiến Trúc MVC Model <ul><li>Thể hiện dữ liệu tới người dùng </li></ul><ul><ul><li>Như JSP, HTML,…. </li></ul></ul><ul><li>Truy cập, tương tác với dữ liệu </li></ul><ul><ul><li>Như JavaBean, EJB, …. </li></ul></ul><ul><li>Kiểm soát yêu cầu, và lựa chọn View trả về </li></ul><ul><ul><li>Như JavaServlet </li></ul></ul>
    13. 13. Kiến Trúc JavaSever Faces <ul><li>Kiến Trúc JSF </li></ul>JSF Page HTML RenderKit WML RenderKit Front Ctrl App Back end Desktop browser Phone
    14. 14. Kiến Trúc JavaSever Faces <ul><li>Kiến Trúc JSF </li></ul><ul><li>Giống như kiến trúc MVC </li></ul><ul><li>Front Controller là 1 FacesServlet vai trò của Controller giống như người gác cổng </li></ul><ul><li>Cấu trúc của JSF giống như dạng cây. Mỗi node là 1 component. FacesServlet có trách nhiệm dịch componet sang mã HTML,WML </li></ul><ul><li>Các thành phần trên kết hợp với Backend Model gọi là Backing bean để XL sự kiện </li></ul>
    15. 15. Nội Dung Trình Bày Các Thành Phần JSF Giới Thiệu JSF Kiến Trúc JSF Ưu Điểm-Khuyến Điểm 1 2 3 4 5 1 Demo & QA
    16. 16. Các Thành Phần Của JSF <ul><li>Các Thành Phần Bao Gồm: </li></ul><ul><ul><li>UI Component </li></ul></ul><ul><ul><li>UI Componet Class </li></ul></ul><ul><ul><li>Mô hình Conversion </li></ul></ul><ul><ul><li>Renderer </li></ul></ul><ul><ul><li>Validators </li></ul></ul><ul><ul><li>Backing Beans </li></ul></ul><ul><ul><li>Event & Listent </li></ul></ul><ul><ul><li>Navigation </li></ul></ul>Model
    17. 17. Các Thành Phần Của JSF <ul><li>Thành Phần Ui Componet: </li></ul><ul><ul><li>Được sữ dụng trong việc phát triển giao diện web bằng JSF </li></ul></ul><ul><ul><li>Bao gồm các thành phần giản đơn như Button đến phức tạp như table và kết hợp các thành phần đó lại với nhau </li></ul></ul><ul><ul><li>Thêm hoặc bớt các component 1 cách đơn giản </li></ul></ul><ul><ul><li>Có thể truy cập đến thẻ tag của JSF thông Quan JSP </li></ul></ul>Model
    18. 18. Các Thành Phần Của JSF <ul><li>Thành Phần Ui Componet Class: </li></ul><ul><ul><li>Bao gồm các hàm xữ lý cho các UI Component </li></ul></ul><ul><ul><li>JSF cung cấp cho ta sẳn 1 bộ công cụ để xây dựng UI Componet Class.Do đó chúng ta có thể mở rộng UI Componet bằng cách tạo UI Componet riêng cho mình </li></ul></ul><ul><ul><li>UI Component Class được kế thừ từ UI Componet Base </li></ul></ul>
    19. 19. Các Thành Phần Của JSF <ul><li>Mô Hình Conversion: </li></ul><ul><ul><li>Mô hình cho phép kết hợp dữ liệu với mô hình Server-Side </li></ul></ul><ul><ul><li>Hai thành phần của dữ liệu gồm: </li></ul></ul><ul><ul><ul><li>Model View </li></ul></ul></ul><ul><ul><ul><li>Presentaion View </li></ul></ul></ul><ul><ul><li>Thành phần của dữ liệu có thể converted giữa model view và presentation view </li></ul></ul>
    20. 20. Các Thành Phần Của JSF <ul><li>Thành Phần Renderer: </li></ul><ul><ul><li>Hiển thị các component </li></ul></ul><ul><ul><li>Chuyển giá trị input thành giá trị của componet </li></ul></ul><ul><ul><li>1 Render có thể làm việc với 1 hoặc nhiều Component </li></ul></ul><ul><ul><li>Được tổ chức thành các renderkit tương ứng cho các output khác nhau. </li></ul></ul><ul><ul><ul><li>HTML </li></ul></ul></ul><ul><ul><ul><li>Wireless-Makeup Language(WML) </li></ul></ul></ul>
    21. 21. Các Thành Phần Của JSF <ul><li>Thành Phần Validator: </li></ul><ul><ul><li>Kiểm tra dữ liệu người dùng nhập vào </li></ul></ul><ul><ul><li>Một componet có nhiều validator </li></ul></ul><ul><ul><li>3 Cách: </li></ul></ul><ul><ul><li>Ở mức UI Component </li></ul></ul><ul><ul><li>Các phương thức Validator ở Backing Beans </li></ul></ul><ul><ul><li>Sử dụng lớp Validator </li></ul></ul>
    22. 22. Các Thành Phần Của JSF <ul><li>Thành Phần Validator: </li></ul><ul><ul><li>Kiểm tra dữ liệu người dùng nhập vào </li></ul></ul><ul><ul><li>JSF có 1 tập các Validator cơ bản. </li></ul></ul><ul><ul><li>Người dùng có thể viết thêm </li></ul></ul><ul><ul><li>Khi validator bắt được lỗi, nó add error message vào message list </li></ul></ul>
    23. 23. Các Thành Phần Của JSF <ul><li>Thành Phần Backing Beans: </li></ul><ul><ul><li>Mô hình bao gồm: </li></ul></ul><ul><ul><li>Tầng dữ liệu </li></ul></ul><ul><ul><li>Tầng giao diện </li></ul></ul><ul><ul><li>Controller: Giữa 2 tầng trên </li></ul></ul><ul><ul><li>JSF: Controller=Backing Beans </li></ul></ul><ul><ul><li>Bao gồm: </li></ul></ul><ul><ul><li>Các thuộc tính nhận từ người dùng </li></ul></ul><ul><ul><li>Event listener method </li></ul></ul>
    24. 24. Các Thành Phần Của JSF <ul><li>Thành Phần Backing Beans: </li></ul><ul><ul><li>Liên kết UI Componet và Backing Beans là JSF Expression Language </li></ul></ul>
    25. 25. Các Thành Phần Của JSF <ul><li>Thành Phần Backing Beans: </li></ul>
    26. 26. Các Thành Phần Của JSF <ul><li>Thành Phần Event & Listener: </li></ul><ul><ul><li>UI Componet phát sinh ra các sự kiện </li></ul></ul><ul><ul><li>Có 4 loại sư kiện cơ bản: </li></ul></ul><ul><ul><ul><li>Value-change events: xảy ra khi người dùng thay đổi giá trị component </li></ul></ul></ul><ul><ul><ul><li>Action events: xảy ra khi người dùng kích hoạt một component lệnh như button hay hyperlink (command component) </li></ul></ul></ul><ul><ul><ul><li>Data model events: xảy ra khi một data-aware component lựa chọn một dùng để xử lý. </li></ul></ul></ul><ul><ul><ul><li>And phase events: xảy ra khi JSF xử lý một HTTP request. </li></ul></ul></ul>
    27. 27. Các Thành Phần Của JSF <ul><li>Thành Phần Event & Listener: </li></ul><ul><ul><li>Các listener được đăng ký để lắng nghe sự kiện </li></ul></ul>
    28. 28. Các Thành Phần Của JSF <ul><li>Thành Phần Navigation: </li></ul><ul><ul><li>Khả năng chuyển trình duyệt sang trang khác </li></ul></ul><ul><ul><li>JSF có hệ thống Navigation mạnh mẽ kết hợp với các EventListenser </li></ul></ul><ul><ul><li>Khi một trong các thành phần được kích hoạt, ví dụ như bấn vào nút một ActionEvent được thực hiện </li></ul></ul><ul><ul><li>Nếu các ứng dụng yêu cầu Invoke thì các Actionlistener sẽ xữ lý yêu cầu này </li></ul></ul>
    29. 29. Nội Dung Trình Bày Các Thành Phần JSF Giới Thiệu JSF Kiến Trúc JSF Ưu Điểm-Khuyến Điểm 1 2 3 4 5 1 Demo & QA
    30. 30. Ưu-Nhược ĐiểmCủa JSF <ul><li>Vấn đề trình bày: </li></ul><ul><ul><li>Ưu điểm của JSF so với MVC </li></ul></ul><ul><ul><li>Nhược điểm của JSF so với MVC </li></ul></ul><ul><ul><li>Ưu điểm của JSF so với Struts </li></ul></ul><ul><ul><li>Khuyết điểm của JSF so với Struts </li></ul></ul>
    31. 31. Ưu-Nhược Điểm Của JSF <ul><li>Vấn đề trình bày: </li></ul><ul><ul><li>Ưu điểm của JSF so với MVC </li></ul></ul><ul><ul><ul><li>Dùng requestDispatcher </li></ul></ul></ul><ul><ul><ul><li>Dạng chuẩn </li></ul></ul></ul><ul><ul><li>Nhược điểm của JSF so với MVC </li></ul></ul><ul><ul><ul><li>Dùng requestDispatcher </li></ul></ul></ul><ul><ul><ul><li>Dạng chuẩn </li></ul></ul></ul><ul><ul><li>Ưu điểm của JSF so với Struts </li></ul></ul><ul><ul><li>Khuyết điểm của JSF so với Struts </li></ul></ul>
    32. 32. Ưu-Nhược Điểm Của JSF <ul><li>Ưu điểm dùng RequestDispatcher </li></ul><ul><ul><li>Custom GUI Controls </li></ul></ul><ul><ul><li>JSF cung cấp 1 tập hàm API và các thẻ tự tạo có thể gắn giá trị để tạo ra các HTML form có giao diện phức tạp </li></ul></ul><ul><ul><li>Event Handling </li></ul></ul><ul><ul><li>Giúp thiết kế Java code liên quan đến sự kiện submit dễ dàng hơn </li></ul></ul><ul><ul><li>Mã code tương tác dễ dàng hơn với button </li></ul></ul>
    33. 33. Ưu-Nhược Điểm Của JSF <ul><li>Ưu điểm dùng RequestDispatcher </li></ul><ul><li>Managed beans </li></ul><ul><li>Trong JSP, jsp:setProperty có thể ghi property=“*” để tự động gọi (truyền dẫn) tới một bean dựa trên tham số truyền vào. </li></ul><ul><li>JSF có thể mở rộng chức năng này và thêm vào một vài tiện ích để phục vụ cho việc đơn giản hóa tiến trình yêu cầu tham số </li></ul><ul><li>Expression Language </li></ul><ul><li>JSF cung cấp một ngôn ngữ ngắn gọn và mạnh mẽ để truy cập các thuộc tính của bean và các tập thành phần (collection elements) </li></ul>
    34. 34. Ưu-Nhược Điểm Của JSF <ul><li>Ưu điểm dùng Dạng Chuẩn </li></ul><ul><ul><li>Form field conversion and validation (sự chuyển đổi và hợp chuẩn hóa) </li></ul></ul><ul><ul><li>JSF được tích hợp các chức năng để kiểm tra các giá trị trong form đã đúng định dạng yêu cầu không và chuyển đổi từ dạng chuỗi sang nhiều dạng kiểu dữ liệu khác. Nếu giá trị bị bỏ trống hoặc sai định dạng, form có thể tự động hiển thị lại với thông báo lỗi và giá trị đã nhập vào trước đó. </li></ul></ul>
    35. 35. Ưu-Nhược Điểm Của JSF <ul><li>Ưu điểm dùng Dạng Chuẩn </li></ul><ul><li>Centralized file-based configuration </li></ul><ul><li>Thay vì code cứng các thông tin dữ liệu vào chương trình Java thì nhiều giá trị JSF được thể hiện dưới dạng XML hoặc các tập tin đặc tả. Do đó các thay đổi chỉ cần chỉnh sửa trên 1 tập tin duy nhất mà không cần chỉnh sửa code hay recompiling code </li></ul><ul><li>Consistent Approach </li></ul><ul><li>Khuyến khích cách làm đồng bộ, thống nhất của MVC trong xuyên suốt ứng dụng </li></ul>
    36. 36. Ưu-Nhược Điểm Của JSF <ul><li>Khuyến điểm dùng RequestDispatcher </li></ul><ul><ul><li>Bigger learning curve </li></ul></ul><ul><ul><li>Worse documentation </li></ul></ul>
    37. 37. Ưu-Nhược Điểm Của JSF <ul><li>Khuyến điểm dùng Dạng Chuẩn </li></ul><ul><li>Less Transparent </li></ul><ul><li>Với các ứng dụng JSF, có rất nhiều việc thực thi ngoài lề so với các ứng dụng Web viết bằng Java bình thường. Vì vậy nên: </li></ul><ul><ul><li>Khó hiểu </li></ul></ul><ul><ul><li>Khó đánh giá </li></ul></ul><ul><li>Undeveloped tool support </li></ul><ul><li>Có nhiều IDEs hỗ trợ mạnh cho standard servlet và JSP, hỗ trợ cho JSF chỉ mới bắt đầu xuất hiện </li></ul>
    38. 38. Ưu-Nhược Điểm Của JSF <ul><li>Ưu điểm So Với Struts </li></ul><ul><li>Custom components </li></ul><ul><li>JSF kết hợp các GUIs phức tạp vào trong một component đơn có thể quản lý một các dễ dàng và có tính liên kết. Struts thì không </li></ul><ul><li>Support for other display technologies </li></ul><ul><li>JSF không giới hạn đối với HTML và HTTP; Struts thì có. </li></ul><ul><li>Access to beans by name </li></ul><ul><li>JSF cho phép bạn đặt tên cho beans, sau đó gọi tên các beans trong forms. Struts có quá trình phức tạp với nhiều bước trung gian mà bạn phải nhớ form nào là đầu vào của hành động nào </li></ul>
    39. 39. Ưu-Nhược Điểm Của JSF <ul><li>Ưu điểm So Với Struts </li></ul><ul><li>JSF expression language (ngôn ngữ mở rộng của JSF dùng để binding giữa các thành phần của component với các thành phần của backing bean đó) ngắn gọn và mạnh hơn Struts bean: viết tag </li></ul><ul><li>Simpler controller and bean definitions </li></ul><ul><li>JSF không đòi hỏi các lớp bean và controller của bạn phải kế thừa tứ bất kỳ lớp cha(vd: Action) hay phương thức(vd: execute) nào. Struts thì bắt buộc. </li></ul><ul><li>Simpler config file and overall structure </li></ul><ul><li>Tập tin faces-config.xml dễ dùng hơn tập tin struts-config.xml file. </li></ul>
    40. 40. Ưu-Nhược Điểm Của JSF <ul><li>Khuyết điểm So Với Struts </li></ul><ul><li>Confusion vs. file names </li></ul><ul><li>Trang thực sự dùng trong JSF có đuôi .jsp . Nhưng trong URLs hiển thị đuôi </li></ul><ul><li>.faces hoặc .jsf. Nên khi gọi trực tiếp sẽ bị exception </li></ul><ul><li>Khó truy cập đến trang non-faces trong tập tin faces-config.xml </li></ul><ul><li>Self-submit approach </li></ul><ul><li>Trong Struts, form (vd: blah .jsp ) và handler (blah .do ) có URLs khác nhau; trong JSF thì giống nhau </li></ul>
    41. 41. Ưu-Nhược Điểm Của JSF <ul><li>Khuyết điểm So Với Struts </li></ul><ul><li>Less current tool support </li></ul><ul><li> Struts được hỗ trợ bởi nhiều IDEs; JSF thì chưa </li></ul><ul><li>Much weaker automatic validation </li></ul><ul><li>Struts kiểm tra tính hợp lệ của địa chỉ email, mã thẻ tín dụng, regular expressions,và nhiều thứ nữa. </li></ul><ul><li>JSF chỉ kiểm tra giá trị rỗng, chiều dài và giới hạn các số </li></ul><ul><li>POST only </li></ul><ul><li>JSF không hỗ trợ phương thức GET nên không thể bookmark các trang kết quả </li></ul>
    42. 42. Nội Dung Trình Bày Các Thành Phần JSF Giới Thiệu JSF Kiến Trúc JSF Ưu Điểm-Khuyến Điểm 1 2 3 4 5 1 Demo & QA
    43. 43. Demo & QA
    44. 44. Thank You

    ×