Download presentation
Presentation is loading. Please wait.
Published byCory Pitts Modified over 9 years ago
1
Chapter 9 Session
2
Contents A.Problem: Phone Book Searching B.Problem: Phone Book Management
3
A. Problem: Phone Book Searching Develop a Phone Book system. The phone book keeps many phone contact A phone contact including: name, phone number and address This phone book allows users search phone contact by name, phone number or address
4
Search by address
8
Solution 1.Developing the view 2.Developing the model 3.Developing the controller 4.View Search Result
9
1. Developing the view Page name: search_ui.jsp Page title: Phone Book Searching Table: Label “Search”; keywordTextBox; label “Search by”; searchBySelectBox, value: Name, Phone Number, Address; searchButton Table: No., Name, Phone Number, Address
10
keywordTextBox searchBySelectBox searchButton
11
2. Develop the model
14
3. Developing the controller
15
4. View Search Result
16
B. Problem: Phone Book Management Extend the Phone Book problem above so that it can be able to do the following tasks: View all of phone contacts Add a new phone contact Edit a phone contact Delete a phone contact
17
List all phone contacts Click “Add new contact”
18
Add a new phone contact Click “Truong Minh Ngoc”
19
Edit a phone contact
20
Delete a phone contact Click “Delete”
21
Search Phone Contact Click “Search”
22
Solution 1.Developing the view 2.Developing the model 3.Developing the controller
23
1. Developing the view The index.jsp page: searching and viewing all phone contacts The addedit_ui.jsp : adding new or editting a phone contact
24
Index.jsp Page title: Phone Book Table: Label “Search”; keywordTextBox; label “Search by”; searchBySelectBox, value: Contact Name, Phone Number, Contact Address; searchButton, value “Search” Table: No., Name, Phone Number, Address, Delete
25
Index.jsp
26
addedit_ui.jsp
27
Title: Phone Book Table: Label: Label “Contact Name”; nameTextBox Label “Phone Number”; phoneTextBox Label “Address” ; addressTextBox submitButton, value:
28
2. Developing the model 2.1. Edit PhoneContact class 2.2. Edit PhoneBook class 2.3. Add PhoneBookInstance class
29
2.1. PhoneContact
30
2.2. PhoneBook
31
2.3. PhoneBookInstance
32
3. Developing the controller 3.1. SearchPhoneContactServlet 3.2. AddEditPhoneContactServlet 3.3. DeletePhoneContactServlet
33
3.1. SearchPhoneContactServlet
34
3.2. AddEditPhoneContactServlet
35
3.3. DeletePhoneContactServlet
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.