DMU 2015 - 3. semester - oeadm15edD, oeadm15eiC

Weekly plan for Programming
 - please notice: this plan does not include all exercices / project work (normal wednesday and friday)

Theme: Web Programming (MVC, WCF & WebAPI)  - Go to week: 43, 44, 45, 46, 47, 48, 49, Exam training: 50, 51

Sidst ændret: 2016.12.07

 

Uge 43
Goals for this week:
  • you will have knowledge about basic elements in HTML to be able to use HTML in ASP.NET MVC solutions.
  • you will have some kwowledge about CSS styling to be able to understand and modify templates in ASP.NET MVC solutions.
  • you will have a bit of knowledge about JavaScript and how it allows you to run parts of the code in the client's browser instead of running on the server.

Preparation: see in plan below
 

Dag Tidspunkt Emne Literature / Exercises
Wednesday   Preparation: Get an overview of HTML and CSS by studdy this pages (just keep to the 2 pages and not all the links). Getting started with HTML (Mozilla)
How CSS works (Mozilla)
08:15 - Short introduction to webpages and the tutorrials
 
 
  Paralell with the students are working with the tutorials one group at time are supposed to make presentation og WCF and WebApi work from project 2 - so be ready when your turn.
 
 
  To get the basic of HTML pages
work with this HTML tutorials
HTML Tutorial (w3school)
this might give an overview for html tags
Comparing HTML4 and HTML5 Tags
  When programming we often use FORMS
These tutorials are inportant to reach
HTML Forms (w3schools)
  Styling the pages is often done by CSS CSS Tutorial (w3school)
 
    Optional: TheNewBoston - Video tutorials (if prefered)
- XHTML and CSS Tutorials Playlist (css from 16)
 - 11:30    
Friday

 

08:15 - Preparation: Get an overview of what DOM and javascript is by studdy this pages (just keep to the 3 pages and not the all links). Introduction to the DOM & javascript (Mozilla)
The HTML DOM Document Object (w3school)
JavaScript basics (Mozilla)
Extra - optional
Some slides in danish from previus javascript cource
Pp_KortOmJavaScript - Pp_KortOmJavaScript2
  Short introduction to CSS3, javascript and the tutorrials
 
 
  Paralell with the students are working with the tutorials one group at time are supposed to make presentation og WCF and WebApi work from project 2 - so be ready when your turn.
 
 
  Continuing work with tutorials about HTML and CSS from wednesday - you might also take a short look at CSS3 including animation of elements CSS3 Introduction (w3school)
  When programming ASP.NET some code might be genneratede as javascript and running in browser on clientside.
You must know a bit of javascript to understand what is goint on
 

JavaScript Tutorial (w3school)

    Optional: TheNewBoston - Video tutorials (if prefered)
- JavaScript Tutorials Playlist
Alternative tutorials for HTML, CSS & JavaScript
- HTML Tutorial (tutorialspoint)
- CSS Tutorial (tutorialspoint)
- Javascript Tutorial (tutorialspoint)

 

Uge 44
Goals for this week - will follow later:
  • you will have some knowledge about ASP.NET MVC elements: Controler, Model and View
  • you will have some skills with ASP.NET and can make simple user interface for simple model to view and update data including list of objects keept en memory (no database)
  • you will have some skills about making validation and display attributes on model for using in the user interface

Preparation: .....

 

Dag Tidspunkt Emne Literature / Exercises
Monday   Preparation: 
  • Se first 20 minuts of this video
  • Read briefly about Razor witch we we use in MVC
 

Introduction to ASP.NET MVC  (MVA)
Introduction to ASP.NET Web Programming Using the Razor Syntax (C#)
  Short introduction to ASP.NET MVC  
  Demo of making simple start to MVC (no database, no Entity framework - just as simple as possibly)
- Simple calculator
- Controlers and Views for some maintaining of persons - using Razor templates for model
Pp_MVC_START_ENG.ppt

Demos made in classroom this day - inserted after lecturer

  C# Prog16E Startup with MVC made simple part 1-5

WebApplicationDemoCalculatorNoModel_20161031.zip
WebApplicationDemoCalculatorWithModel_20161031.zip
WebApplicationDemoMaintainPersonUsingWCF_20161031.zip

  Paralell with the students are working with the the tutorials one group at time are supposed to make presentation og WCF and WebApi work from project 2 - so be ready when your turn.
 
 
  Exercise
  1. Try to make a simple MVC calculator with functions for add, subtract, multiply and division
  2. Try to make a simple MVC Curency converter (like the WCF and WebApi)
  3. Try to make CRUD function for a list of students (see links for model classes for student and repository)
    Expand the student class with an adress and change controler actions and views to handle this adress
     


 



WebMVCAppDemoCalcSolution.zip Source for example of calculator

StudentAndStudentRepository.zip (content for Models)
CourseFacultyStudent.docx (another model if you want a bit more)

These small intrroduction might also help for starting
- Introduction to ASP.NET MVC (dotnettricks.com)
- Understanding ViewModel in ASP.NET MVC (dotnettricks.com)
- MVC which submit button has been pressed (stackoverflow)

More materials if needed - also to get a bit more in the deept
- Getting Started with ASP.NET MVC 5 (skip database and use model in memory)

- http://channel9.msdn.com/Series/Introduction-to-ASP-NET-MVC/04 (om Controler)
- http://channel9.msdn.com/Series/Introduction-to-ASP-NET-MVC/05 (om View)

- ASP.NET Session State Overview (keep data on server for client)

  Follow up on exercises - presentation of a solution
- maby programming together (if needed)
 

 

 
Thursday   Preparation: 
  • Read briefly about how to set up validation names and UI display names at the model classes.


Using Data Annotations to Customize Data Classes

Extra link inserted after lecture
08:15 - Follow up on basic MVC from monday
Eventual short demo for old and new stuff
 
 
  Paralell with the students are working with the the tutorials one group at time are supposed to make presentation og WCF and WebApi work from project 2 - so be ready when your turn.
 
 
  Exercise
  1. Continue the exercises from Monday, but for the model try to incoperate validation rules and display names for fields/properties
  2. You might expand your Student class, so postdistrict is a seperate class, and eventual try to get the district/town form a webservice (WCF)
     
 

Using Data Annotations to Customize Data Classes

http://webservicedemo.datamatiker-skolen.dk/PostWcfService.svc
http://webservicedemo.datamatiker-skolen.dk/PostWcfService.svc/RESTjson/Help

13:00-14:00 posibly GITHUB course by Morten Bo Nielsen (se news in fronter)  
 - 15:30 Exercise continued
eventual student presentation of solutions for the exercises / solving some of them together
 
     
 

 

 

Uge 45
 

No normal programming lecture this week - project work

 

 

Uge 46
Goals for this week
  • you will have basic knowledge about Razor and HTML to make forms with basic component
  • you will have knowledge about about parsing data from view to action in different ways
  • you will have knowledge about about technic to keep a state by using both data on client and on server.
  • you will be able to make small MVC solutions interaction with more than one view and use basic komponent including ListBox

Preparation: You must make a list of basic needs for stuff you whish to include in your project code

 

Dag Tidspunkt Emne Literature / Exercises
Wednesday 08:15 - MVC continued
- We will start with a follow up on week 44
  Using ListBox and ComboBox

From todays lessons:

  Parsing and "remember" data between views / actions
- 11:30 We might continue with the curency converter example, as it have most of the basic needed for coding to prepare the exam.
 
 
12:15 - 13:45 Follow up on presentation of project 2 - and more presentation

 

 
  Last 2 lessons will be moved to Friday to guide and end presentation of project 2  
Friday      
     
     
     
     
More links that might help you

 

Uge 47
Goals for this week - will follow later:
  • You be able to make a solution using MVC with WCF / WebApi as Service layer

Preparation: Recapture stuff about WCF, WepApi and MVC from past lessons

 

Dag Tidspunkt Emne Literature / Exercises
Thursday 08:15 - Follow up on last week

Demo:
Using a ViewModel for the curency example with dropdown listbox

Using MVC with a service layer (WCF)
 

Startup project:

From lecturer:

  Parsing and "remember" data between views / actions

 

 

  Eventual using WebApi from MVC and parsing objects (serializing json/xml)

Example for callling a WebApi service from MVC - using JSON format
- WebApplicationWithWebApi_JsonSer_20151123.zip
- The important code: 
-- Class for serializing (Student expanded - more objekts)
-- MVC controler with serialisere og deserialiserer

About JSON serializing (MSDN):
- https://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer%28v=vs.110%29.aspx

Extra with examples with Json serializing (stackowerflow)
- http://stackoverflow.com/questions/5502245/deserializing-a-json-file-with-javascriptserializer

 
  Setting up WCF for Json and pure Xml (REST) Simple service (counter & string list) with soap,json,pure xml
-
WebServiceStringList_Rest.zip

Example from
http://webservicedemo.datamatiker-skolen.dk/
-
Source from this site - Visual Studio Solution
     
     
 14:00- 16:00 Be aware of the time
Company visit on Hesehus, Englandsgade 24, 5000 Odense C
- Ahmad Akhmiev will talk and make demos of ASP.NET MVC core

We expect all 3. semester students will participate.
If you are not participating you must inform Bjørk before Monday 13:00, as Hesehus want a list of the participants

 
 

 

Uge 48
Goals for this week:
  • You will have practical experience with MVC and Web services (WCF / WebAPI) from your project work 

Preparation: Project work & Curency converter exercise (make MVC solution)

 

Dag Tidspunkt Emne Literature / Exercises
Thursday

Danish
Class
08:15 - Follow up on last week  
  Setting up WCF for Json and pure Xml (REST)  Simple service (counter & string list) with soap,json,pure xml
- WebServiceStringList_Rest.zip

Example from http://webservicedemo.datamatiker-skolen.dk/
- Source from this site - Visual Studio Solution 
  WCF service form the day WCFCorencyWebApplication_20161201.zip
- 11:30 Tips and tricks using helpers, html and single javascript method for post back to server action with data.  Experiment_WebApplicationPersonAdvancedHelper_20161201.zip 
     
     
Friday

Int.
Class

08:15 - Follow up on last week  
  Setting up WCF for Json and pure Xml (REST)  Simple service (counter & string list) with soap,json,pure xml
- WebServiceStringList_Rest.zip

Example from http://webservicedemo.datamatiker-skolen.dk/
- Source from this site - Visual Studio Solution 
  Tips and tricks using helpers, html and single javascript method for post back to server action with data. Se Thuesday class
- 11:30    
     
     
 

 

Uge 49
Goals for this week:
  •   Preparation for the exam

Preparation: Prepare question acording to need for the exam

 

Dag Tidspunkt Emne Literature / Exercises
Wednesday

Danish
Class
08:15 - Follow up on last week
 
 
10:00 Short presentation of  Technology Denmark - Talent Program
by Louise Daugbjerg - Pedersen (Technology Denmark)
 
 
  Question for project 3 and exam  
- 11:30 Help for the project 3  
Thursday

Int.
Class

08:15 - Follow up on last week
 
 
10:00 Short presentation of  Technology Denmark - Talent Program
by Louise Daugbjerg - Pedersen (Technology Denmark)
 
 
  Question for project 3 and exam  
- 11:30 Help for the project 3   
 

 

Uge 50
Goals for this week:
  •   Preparation for the exam

Preparation: Prepare question acording to need for the exam

 

Dag Tidspunkt Emne Literature / Exercises
       
     
     
 

 

Uge 51
Goals for this week:
  •   Preparation for the exam

Preparation: Prepare question acording to need for the exam

 

Dag Tidspunkt Emne Literature / Exercises
Tuesday
 
  Exam training without theacher present
- Pratice exam question will be available in fronter
 
     
     
Thursday 08:15 - 13:00 Pratice exam with teacher present

Switching between danish and english classs.
  • Students make presentation of their pratice exam solutions (se fronter) and questioned by the teacher and othere students.
  • Students prepare by programming
 
     
Friday

 

08:15 - 13:00 Pratice exam with teacher present

Switching between danish and english classs.
  • Students make presentation of their pratice exam solutions (se fronter) and questioned by the teacher and othere students.
  • Students prepare by programming