DPS907 WSA500 Lab 4

Implement link relations and related features.

.

Read/skim all of this document before you begin work.

.

DPS907 WSA500 Lab 4 – Due Tue Oct 7

Due date: Tuesday, October 7, 2014, at 8:00am ET

Grade value: 3% of your final course grade

If you wish to submit the lab before the due date and time, you can do that.

.

Objective(s)

Implement link relations.

Add support to handle the HTTP OPTIONS method, and web service root documentation.

Deploy to a public Microsoft Azure web site.

.

Introduction to the problem to be solved

(For this assignment, you can either build upon your Lab 3 work, or use a professor-provided project as a base.)

The work done for Lab 3 needs to be fixed. Modern web services should be hypermedia-driven. Therefore, you will add support to enable hypermedia as the engine of application state.

.

Specifications and work plan

As noted above, you can either build upon your Lab 3 work, or use a professor-provided project as a base.

The professor-provided base has been posted in the “Assignments” area of My.Seneca course (nearby the submit link).

All responses that include data must include link relations. Therefore, rewrite the controller methods so that normal request URIs (without query string key-value pairs) will generate responses that include link relations.

Your web service must support the HTTP OPTIONS method, using the technique that was covered during a recent class session. You have permission to use the professor-provided HttpOptionsMethodHandler class as-is.

Add support to enable a user to send a request to the web service’s ‘root’ URI, and get a response that helps them discover the web service’s features and functionality.

Similar to Lab 3, the Artists and Albums controllers must implement:

  • Get all
  • Get one by its identifier
  • Add new

The Songs controller must also implement:

  • Get one using a search (e.g. name of the song)
  • Edit existing
  • Delete existing

.

Getting started

The name of your project will be “Lab4″.

Make a copy of the project base (your work, or the downloaded work), and (as noted above) name it “Lab4″.

As you perform each step, test your work, to ensure that you’re making error-free progress:

  • Build/compile
  • Where appropriate, use Fiddler

.

Component configuration

As you learned recently, implement link relations. Also add support for the HTTP OPTIONS method. And, add a controller that will enable users to discover the functionality of your web service.

An overview of the design and coding tasks follows.

Add a source code file (in the Controllers folder) named Links_vm. Write classes as you learned recently.

Next, edit the resource model classes, to include support for link relations.

To support the HTTP OPTIONS method, you have permission to use the ‘handler’ that you learned recently. Then, enable its use, and test its functionality.

To support web service discovery, add a ‘root’ controller, with an HTTP GET handling method that will tell the user what they can do with your web service.

DO NOT copy-paste my code. Write your own code. Write your own comments. 

.

Testing your work

Use Fiddler.

Ensure that it has been configured to save the message bodies in requests and responses.

Test all scenarios (use cases). Make sure that you test error conditions too.

Remember – when sending the entity body with a PUT request, you must include the object’s identifier.

Saving – ‘exporting’ – your tests

On the left side list of requests, you can delete items that you don’t want included in the export.

When you’re ready to save, choose File > Export Sessions > All Sessions…

The export format will be “HTTPArchive v1.2″. Click the Next button to choose a save location (your project’s root, in the same folder as the “packages” and “lab4″ folder) and specify a filename. Name the file by using the project name (e.g. “lab4.har”).

.

Deploy to Microsoft Azure

Please visit the September 11 notes page for instructions.

If you have done the right configuration actions, this current “Lab4″ project will completely replace the “Lab3″ project that you published earlier.

During grading, your professor will attempt to interact with your web site by using the ‘customname’ value (see the Sep 11 notes page instructions).

.

Reminder about academic honesty

You must comply with the College’s academic honesty policy. Although you may interact and collaborate with others, you must submit your own work.

.

Submitting your work

Here’s how to submit your work, before the due date and time:

1. Locate the folder that holds your “Lab4″ project files.

2. Make a copy of the folder. This is the data that you will be uploading.

3. Remove the “packages” folder from the copied folder; also, remove the “bin” and “obj” folders.

4. Compress/zip the folder. The zip file SHOULD be about 1MB or less in size. If it isn’t, you haven’t followed the instructions properly.

5. Login to My.Seneca. Open the Web Services Architecture course area. Click the “Assignments” link on the left-side navigator. Follow the link for this lab. Submit/upload your zip file. The page will accept three submissions, so if you upload, then decide to fix something and upload again, you can do so.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: