7
1) The Restlet Framework, Part II: restlet-contactservice Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii

The Restlet Framework, Part II

Embed Size (px)

DESCRIPTION

More on restlet, using the restlet-contactservice example system.

Citation preview

Page 1: The Restlet Framework, Part II

(1)

The Restlet Framework, Part II:

restlet-contactservice

Philip JohnsonCollaborative Software Development

LaboratoryInformation and Computer Sciences

University of Hawaii

Page 2: The Restlet Framework, Part II

(2)

Agenda Restlet Concepts:•Operations:

-GET, PUT, DELETE

•Representations:-XML

Restlet-DateService:•Download distribution•Command line usage•build.xml•The server-side code•The client-side code• JUnit tests + Jacoco•Building the jars

Page 3: The Restlet Framework, Part II

(3)

In our last episode Restlet-timeservice•Only implements GET•Data passed is simple strings•Uses only the core restlet jar file.

Page 4: The Restlet Framework, Part II

(4)

A contact service Server supports addition, deletion, and retrieval of "contacts".

Contacts are objects with the following fields:•First Name•Last Name•Info•Unique ID

The system represents Contacts two ways:•As Java classes•As XML

Page 5: The Restlet Framework, Part II

(5)

System structure org.hawaii.contactservice.server•Server-specific code (in server jar file)

org.hawaii.contactservice.client•Client-specific code (in client jar file)

org.hawaii.contactservice.common•Code for both client and server (in both jars)

Page 6: The Restlet Framework, Part II

(6)

Playing with the system Using jar files:•Run server jar file in one command shell•Send/retrieve contact data using client jar file in another shell.

Using ant commands:•Compile, run unit tests, see coverage, build jar files.

Using Eclipse:•Inspect code, invoke unit tests.

Page 7: The Restlet Framework, Part II

(7)

On to the demo.