Study guide

profileWael123
final_exam_project.docx

BACS 488 Review Project for Final Exam.

You should be familiar with and understand the code in the CoffeeDecorator project.

RouteConfig.cs

Understand the purpose of the MapRoute code.

Why do we need routes. -- See MapRoute( "Wrap",

BundleConfig.cs:

Know what bundles are

Know how JQuery and JQuery are referenced in bundles.

How are JQuery and JQueryUI used in this project?

How is _Layout.cshtml used to load bundles and scripts?

What optimizations for bundles are available in MVC?

Global.asax.cs

Explain the purpose of a SimpleInjector and its purpose.

What are the advantage of Dependency Injection?

How do you use NuGet to add the SimpleInjector liraries

HomeController.cs

The constructor for a HomeController needs a repository - Where is it created and supplied?

What does the Controllers Order method do? The NewOrder method?

What is the purpose of the Wrap method? Where is it called?

EnumHelper.cs

What are enumerations?

Explain the LINQ code in the GetExtras method? GetDrinkOption?

Model Layer Class Hierarchy

Explain the purpose of the interface IBeverage.cs

Explain the purpose of the Abstract class CondimentDecorator.cs?

Explain why CondimentDecorator is “protected”

What is the purpose of abstract methods “ GetDescription” & “Cost” CondimentDecorator

Explain in word how the model layer classes support the Decorator Pattern

Factory Layer / BeverageFactory.cs

What is the purpose of the BeverageFactory CreateBeverageFactory(String beverageAndSize)

Explain how reflection works in the factory example method

public static IBeverage WrapBeverage(String theCondiment, IBeverage aBeverage)

ViewModel Layer /BeverageViewModel.cs

What is the pupose of BeverageViewModel.cs?

Explain the GetDescription() methods purpose.

What does the following accomplish:

String orderedDescription = sortedResult.Aggregate(" ", (current, s) => "" + current + "--" + s + "--");

Repository Layer

What are the advantages of using IBeverageRepository and two concrete Repositories? ( BeverageRepository and MongoDbRepository)

How would you tell the system to use an instance of the BeverageRepository rather than the MongoRepository

Explain in words the operation of the following method in the in MongoDbRepository.cs

public void UpdateBeverageExtra(string name, string condiment)

Views Layer – Order.cshtml

Understand the Razor notation in Order.cshtml

1. @model CoffeeWeb.ViewModels.BeverageViewModel

2. using (Html.BeginForm("Order", "Home", FormMethod.Post, new {id = "my-form"}))

3. <td id="initial"> Fixing your @Model.DrinkOrder() would you like any extras</td>

Explain the JQuery function – specifically selectors, ajax calls etc. Explain the following

1. $("#extrasdropdown").change(function()

2. What is an Ajax Call? Where is the call processed? Where are the results of the call returned?

3. Review the JQueryUI dialog function and explain JQueryUI code in Order.cshtml where the dialog is defined and used