DPS907 WSA500 Lab 3

Associations, using a repository pattern. Hosted on Azure Services.

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

.

DPS907 WSA500 Lab 3 – Due Mon Oct 5

Due date: Monday, October 5, 2015, at 8:00am ET

Grade value: 6% of your final course grade (partially graded in-class on Mon Sep 28)

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

Yes, your project can earn part marks if a feature is missing. 

.

Objective(s)

Work with associations, using a repository pattern, deployed to Azure.

.

Introduction to the problem to be solved

We continue the theme that was introduced in Lab 2: Working with a web service for data in the music business.

In the previous assignment, you worked with the Artist entity. In this assignment, you will also work with the Album and Song entities.

Your work will be hosted publicly on Microsoft Azure Services.

.

Specifications and work plan

The following specifications apply to all of your work:

  • Follows best practices
  • Implements the recommended system design guidance
  • Uses Entity Framework and Code First technology

For this assignment, here’s what we’re looking for:

  • Implement the typical data service tasks for the Album entity, using a new-to-you “repository” pattern
  • Also for the Song entity
  • Deploy to Microsoft Azure Services

.

The in-class grading will look at your new repository for the Album entity.

.

Getting started

Your professor has created a project that you can use as a base for your work. It is named RepositoryIntro, and it is in the Week 4 folder on GitHub. Get the code, and study it.

In class, and in today’s class notes, you will learn about the repository pattern, and how to use it.

.

Work with the Album entity

Study the existing Artist_repo class, and use its implementation as a design template.

Create a repository class for the Album entity. It inherits from the Repository abstract base class. It needs a constructor that calls the base class constructor.

Then, add custom public methods. As you have learned, these methods accept and deliver resource model objects and collections. They enable you to customize the calling pattern (to the base class methods), and the delivery format of the data.

As you do this work, you will have to create some resource models, and a controller. Go ahead and do that too.

Which use cases should you support?

  • Add new
  • Get all (which includes some Artist data)
  • Get one (which includes associated data)
  • Delete one

After you add support for Song (below) you will also need to support:

  • Configure a song-album association
  • Clear (remove) a song-album association

This task must be done as a command, and implement a use case that you must describe in a comment just above the code in whatever controller you place it in.

.

Work with the Song entity

The work you just did (above) to support the Album entity can be repeated for the Song entity.

Plan to support the same use cases. (Except for the song-album association use case, because that work does not need to be repeated, right?)

.

Deploy your work to Microsoft Azure Services

Working with Microsoft Azure Services is described in another document. This Lab 3 will be the first assignment that will be hosted on Azure.

Deploy your work to your “labs” web site on Azure, into the “lab3” virtual application. How?

Study this document, and watch its how-to videos.

If you are unable to deploy your work to Azure, then we can help during Monday’s class. Do not worry about “losing marks”, because Azure deployment is only one of twelve items on our checklist.

You must still submit your work (to My.Seneca/Blackboard) before the due date.

.

Testing your work

Use Fiddler.

Ensure that it has been configured to save the message bodies in requests and responses. (A default installation does not do this.) If you are using a College computer, this has already been configured. If you installed Fiddler on your own computer, follow the instructions on this document.

Test all scenarios (use cases), using your Azure-hosted web site.

.

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 “lab3” folder) and specify a filename. Name the file by using the project name (e.g. “lab3.har”).

(You can test whether the export was successful. How? First, close then re-open Fiddler. Choose File > Import Sessions. Select “HTTPArchive” as the import format. Navigate to the folder that holds “lab3.har”, and select it. Finally, browse through the request-response sessions.)

.

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 project files. (It has about four items, a Visual Studio “solution” file, a folder that has your project’s source code, a “packages” folder, and the Fiddler tests.)

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 copied 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.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

%d bloggers like this: