DPS907 WSA500 Lab 2

Lab 2 enables you to demonstrate that you can code and use all of the HTTP operations that are typically found in a web service.

.

DPS907 WSA500 Lab 2 – due Fri Oct 4

Assigned: During Week 4

Due date: Friday, October 4, at 9:00am ET

Grade value: 3% of your final course grade

Grading method: The following will be checked:

  • Your Lab 2 project, which is an ASP.NET Web API
  • Results from Fiddler tests
  • Correct implementation of the specifications
  • Code writing quality, including commenting

.

Objective(s)

Prove that you can implement concepts and techniques from weeks 3 and 4 of the course:

  • Use a project as a template
  • Implement PUT, POST, and DELETE handling
  • Activate Entity Framework Code First Migrations
  • Change your app domain data model
  • Activate the ‘help’ page

.

Introduction to the problem that you will solve

You will use your existing Lab 1 as a base for this lab’s work.

Then, you can add functionality, and enable it to handle HTTP requests that modify data (i.e. POST, PUT, DELETE).

.

Specifications

Here are some general comments about the tasks you must complete. Make sure that your code is well-commented.

.

Use a project as a template 

As discussed and demonstrated in class, using an existing project as a template can help you create new web services with less effort.

Use the procedure that you learned, and create a “lab2” project that’s based on your “lab1”.

.

Implement PUT, POST, and DELETE handling 

Your Lab 1 implemented get-all and get-one functionality for two entities.

In this lab, implement the remaining popular HTTP methods, POST, PUT, and DELETE.

That means updates to the controllers, view models, and repositories.

.

Activate Entity Framework Code First Migrations 

As discussed and demonstrated in class, activate Entity Framework Code First Migrations.

Remember to disable the execution of your store initializer (by commenting out, or removing, the startup code in the Global.asax class).

.

Change your app domain data model

After activating migrations, change your app domain data model in a meaningful way.

You should add a few new properties. You should also add a few data annotations.

.

Activate the ‘help’ page

As discussed and demonstrated in class, activate the ‘help’ page.

This means that, at a minimum, you must fully document your controller methods with ‘XML documentation’ comments.

.

Testing your work 

Use Fiddler to test your results. After Fiddler loads, press F12 to stop auto-capturing.

Use the “Composer” tab to create your queries. After you test your work, you will be saving the results by using Fiddler’s ‘export sessions’ command.

Work with BOTH of your collections. This time, we care only about JSON results:

Add a new object to each entity collection.

Modify an existing object in each entity collection.

Delete an existing object in each entity collection.

.

Fiddler’s left-side list of “Web Sessions” will now be ready to be saved.

In Fiddler, choose File > Export Sessions > All Sessions…

The export format will be “HTTPArchive v1.2″. Click the Next button to choose a save location and specify a filename. Name the file by using your My.Seneca name (and the suggested filename extension). For example, your professor’s file is named “pmcintyr.har”.

After saving, copy that “har” file into your project’s root (so that your professor can view it during grading).

.

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 “Lab2″ project files.

2. Make a copy of the folder, and name it by using the following format:
Lab2_MySenecaUserName
For example, your professor’s folder name will be “Lab2_pmcintyr”

3. Remove the “packages” folder from this folder (it’s too big to email, and I don’t need it to grade your work); also, remove the “bin” and “obj” folders

4. Compress/zip the folder. The zip file SHOULD be about 1MB 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.

.

.

.

.

.

.

.

.

.

.

  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: