Assignment 5 – Customizing Views

Assignment #5 Customizing Views

Objectives

Customize scaffolded views based on user specifications

Support Outcomes #1 and #2

Assignment

In this assignment we will be creating some custom views for your data model that you created in the last assignment. In the last assignment you needed to create the basic CRUD screens to create new instances of an object. In this assignment – you will create 2 custom views to display the data.

Displaying 1:n Data – Example

The first view will deal with your 1:n data set from the previous assignment or a different 1:n assignment. Here is an example – you will need to extrapolate this example to the your data and show the same functionality. Using the example of a student course schedule – you will need a screen that shows a list of students – this can be all students, no need to filter. If you click on a student (or a button you create associated with a student) – it should display all the courses in that student’s schedule. You should do this in the same page as the list of students. Here is an example of a list of students each of which has a 1:n relationship with a list of classes. This is a demonstration of a custom view of the the student class lists based on this interface.

List of Students

 

> Joe Smith

> John Doe

> Betty Boop

 


List of Students

 

> Joe Smith

< John Doe

    MAC2311 – Calculus I

    COT3100 – Discrete Analysis

    CET3116 – Digital Technology

> Betty Boop

Displaying n:n Data – Example

In the second view you will create a custom screen for a many to many relationship. Again, this will be in addition to the basic CRUD that you use for your objects. Again we will use the example of an assignment roster. In our example a single assignment can have grades, each associated with a student.  A student can have completed many assignments, each with an associated grade. In this example – the grade is the relational table with a 1:1 to a student, and a 1:1 to assignment – however it joins students and assignments in a many to many relationship. Your task is to create a simple grade table for a course with students on left column, and assignments on top row. You can use your data example, you simply have to demonstrate the ability to handle an N:N relationship (students:assignments) displayed as a table. A table is a natural way to demonstrate this relationship, however any custom view that demonstrates the use of n:n is acceptable here.

Remember – your objective is to create an interface that meets an objective and demonstrates your ability to create a customized view that handles 1:n and n:n data.

Information

To be able work with Views you will need to be able to use the language of Views – Razor.

Here are some RAZOR resources to help you get started;

W3Schools RAZOR tutorial – http://www.w3schools.com/aspnet/razor_intro.asp .

Introduction to ASP.NET Programming using the RAZOR Syntax – https://www.asp.net/web-pages/overview/getting-started/introducing-razor-syntax-c 

In reality you can do all of this without RAZOR – but RAZOR is a good server side language that really can help you produce results quickly. You can use all of your ability to program with html and Javascript – which is one of the reasons programmers really like Views, RAZOR just adds the ability to process server side commands that generate real code when processed by the server.

Estimated Completion Time

This will take 20 or more hours to complete.

Supporting Lectures 

Now learning to build Views – we will start with the tutorial at http://www.asp.net/mvc/overview/older-versions-1/views/asp-net-mvc-views-overview-cs 

Questions and Answers

You will want to use the discussion boards extensively for this assignment.

External Resources

Overview of Views in MVC – http://www.asp.net/mvc/overview/older-versions-1/views/asp-net-mvc-views-overview-cs 

W3Schools RAZOR tutorial – http://www.w3schools.com/aspnet/razor_intro.asp

Introduction to ASP.NET Programming using the RAZOR Syntax – https://www.asp.net/web-pages/overview/getting-started/introducing-razor-syntax-c

Grading Criteria

5 points for a 1:n relationship view

5 points for a n:n relationship view