RESTful Web Services » History » Version 7
chin-yeh, 10/12/2011 06:12 PM
1 | 1 | chin-yeh | {{toc}} |
---|---|---|---|
2 | |||
3 | h1. RESTful Web Services |
||
4 | 2 | chin-yeh | |
5 | 5 | chin-yeh | h2. System Overview |
6 | 1 | chin-yeh | !rest_json.png! |
7 | 5 | chin-yeh | |
8 | h2. Programming Guide |
||
9 | |||
10 | 6 | chin-yeh | Below is the overview of the *web service layers*: |
11 | 1 | chin-yeh | !component.png! |
12 | 6 | chin-yeh | _Detailed Description:_ |
13 | * *(1)* this is the only integration point for the client |
||
14 | 7 | chin-yeh | * *(2)* this is the service layer that contains business logic |
15 | 6 | chin-yeh | * *(3)* this is the persistence layer |
16 | * *(4)* this is the web service client, it could be web application, ajax application, batch program, as long as it can read or parse <code>JSON</code> formatted data |
||
17 | 1 | chin-yeh | * *(5)* all of the components share the same domain objects |
18 | 7 | chin-yeh | |
19 | h3. How to add new web service method |
||
20 | |||
21 | We use the *Shopper* service to demonstrate how to add new web service method into the existing web service. |
||
22 | |||
23 | The *Shopper* service provides: |
||
24 | * add new shopper |
||
25 | * update shopper profile |
||
26 | * retrieve shopper profile based on ID |
||
27 | |||
28 | In short, a new web service method should contains the following components(at least): |
||
29 | !component.png! |