DMU 2015 - 3. semester - oeadm15edD, oeadm15eiCWeekly plan for Programming
|
Sidst ændret: 2016.10.03
Uge 38 | |||
Goals for this week:
Preparation: Read
the materials written in the plan and grab on concepts (details
for fotocopies - see fronter) - if you can manage to se the
videos from previous lectures you might be ready for the
exercises in classroom - you might have some question so prepare
those at home.
|
|||
Dag | Tidspunkt | Emne | Literature / Exercises |
Thursday | 08:15 - |
Prepare yourself by
reading the material at left igennem and grab on concepts Vi We will not walk through all the concepts, but only pick up where something is unclear and possible briefly discuss these. Intro to webservice |
Distributed object communication (Wikipedia) Fotocopies (semesterstart - fronter) C#(*) kap 18.3 (side 884-885) (web-service) .NET app (**) - Side 403-409 kap 7.1 Overview - Side 413-415 kap 7.3 SOAP (intro) - Side 415-417 kap 7.3.1 SOAP formats - Side 429-430 kap 7.4.4 Life Cycle of a Web Services (session) - Side 430-433 kap 7.5 WSDL - Side 433-434 kap 7.6 UDDI / DISCO Additional material fromWikipedia About WebServices About XML Schema About SOAP protokollen About WSDL The Remote Facade pattern is also relevant in
this context
Slides for the lecture:
Extra readings (DK) from Digitaliseringsstyrelsen about
IT-Arkitecture. |
Short demo - client using webservices: We will try to use some webservices (wcf and the older asmx) - using WcfTestClient.exe - using Windows klient program Video from teaching (previous
session) for eventual repetition (DK) |
Pp_WCF_Basic_Client_ENG.ppt -
(dansk udgave) Webservices for exploring - for use in client: - http://webservicedemo.datamatiker-skolen.dk/ - http://wcfdemo.datamatiker-skolen.dk/ Good "link": WcfTestClient is a program that by using the WSDL dockument can make it posibly to test a WCF-service without programming. You will normal find the WcfTestClient here: "file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/WcfTestClient.exe" (VS2015) |
||
Exercise - client
using webservices:
Try to get data from the following WcfService (webservice) witch can return objects - PersonWcfService.svc
1) You might begin using the WcfTestClient.exe program to get
data, witch can show the result directly. |
If more info needed for the exercise check out this description: - How to: Create a Windows Communication Foundation Client |
||
2) If you are done, you
can continue to make a few small windows programer using some of
the webservices at this sites
|
Webservices for exploring - use services in a client: - http://webservicedemo.datamatiker-skolen.dk/ - http://wcfdemo.datamatiker-skolen.dk/ |
||
Short intro - Simple
WCF webservice on webserver WCF service methods - endpoint(.svc) - interface (ServiceContract and OperationContract) - the implementation (code behind) Short demo - Simple WCF webservice on webserver: We will make a simple WcfService (webservice) from the beginning Video from teaching (previous session) for eventual repetition (DK) C# SDP14F uge11On WCF intro opret simpel service og klient der bruger den Associated solution: 201403120912_ServerSolutionMedConsoleKlient.zip One more video if needed C# SDP12E - WcfService - del1 |
Pp_WCF_Basic_Server_ENG.ppt -
(dansk udgave) -
|
||
Exercises - Simple
WCF webservice on webserver: 1) Start making an empty web-project and create a wcf service (new item) with the name CircleSevice, witch has the following accessibly methods ---- CalcDiameter - witch take radius as input and return the diameter ---- CalcCircumference - witch take radius as input and return the diameter Circumference (omkredsen) ---- Make a small client windows program (wpf/winform) - witch use your CircleService |
If more info needed for the exercise check out this description: - Getting Started Tutorial - Host the service on WebSite instead of selfhosting - se slides/demo abowe |
||
Short intro - WCF
data objects WCF service that exchange objects - Data Transfer Object (serialiszing using DataContract and DataMember) Short demo - WCF data objects: We will make an small example witch exchange objects |
Pattern: - Data Transfer Object http://msdn.microsoft.com/en-us/library/ff649585.aspx
|
||
Exercises with support
from theacher - WCF webservice - discuss and compare results and helt each other, but also take care of doing individual coding Exercise WCF-Valuta task a+b+c (Dansk udgave) Solve the exercise as simple as possibly - in the exercises there is no updates and therefore you might ignore problem about concurency (threading) and the problems accessing same resources. |
|||
- 15:30 | Possibly. summarizing and student(s) presentation of solutions for the exercies |
MsVC#(*) Microsoft Visual C#.NET Programming, af Doyle .NET app (**) .Net Application Development, Hanspeter Mössenböck et al |
Uge 39 | |||
Goals for this week:
Preparation:
|
|||
Dag | Tidspunkt | Emne | Literature / Exercises |
Thursday | 08:15 - |
Follow up on last weeks content Possibly. student(s) presentation of solutions for the exercies
from last week |
|
Prepare yourself by
reading
material on left side
and grab the concepts WCF Service continued (Statefullnes and offline concurency) Serverside (and demand for session on clientside): We will
have a look on how to make data survive in memory (at server) in
our WCF services From previous year:
|
Slides: Pp_WCF_Session_ENG.ppt - (Dansk udgave) Example of a WCF service with a user session (ASP.NET) from previous lessons: - Video (DK) - Vs_WcfSolution_ASPNET_SESSION_20111125.zip About
Application state object:
Application State
We will use ASP.NET Session, but if some you would like to hear
comment how to uses WCF instanstypes (Single,
PerSession and PerCall) - speak about slides on top
|
||
10-12 |
Exercises without support
from theacher - WCF webservice - discuss and compare results and helt each other, but also take care of doing individual coding Exercise WCF-Valuta rest of the tasks (Dansk udgave) Solve the exercise as simple as possibly - in the exercises a+b+c+d there were no updates and therefore you might ignore problem about concurency (threading) and the problems accessing same resources - in task e you might still have no concurency problem if user is supposed only to convert one amount at the time. In the last two, where all user works on the same data, you must think about concurency. If you are done you might eventual try
to make a solution with the service with the same methods, but
using a database instead of data is kept in memory. |
If you are in complete halt, of cource first use your study
group, but if that's not enough you might here have a posibly
solution and then restart on your own a couple of time, until
you can fulfill a solution without looking at the given
solution. - - C# SDP12E - WcfService - valutaopave (solution example - DK Speak) - Vs_ValutaSolution_20141023.zip (code) Remember it is not the solution that is important, but that you have learned what you need and not at least get routine so you can do the job in a short time. This means sometimes you have to do the job all over again several times to get the training. '' |
|
12:30 |
Possibly. student(s) presentation of solutions for the exercies Theacher will not be in for this part - you must organize this yourself |
||
13:30 ? |
Prepare yourself by
reading
material on left side
and grab the concepts WCF Service continued |
Relevant pattern from Fowler - about service layer: http://martinfowler.com/eaaCatalog/serviceLayer.html - about Optimistic Offline Lock: http://martinfowler.com/eaaCatalog/optimisticOfflineLock.html - about Pessimistisk Offline Lock: http://martinfowler.com/eaaCatalog/pessimisticOfflineLock.html |
|
Eventual if time - otherwise you have to clear up afterwards
with the video / sample programs - Simple optimistic offline lock when using a database - Service with database access Speak from previous year (DK): C# SDP12E - WcfService og transaction scripting |
Solution using a database: - Enkelt Console-eksempel på optimistic offline lock (database) - Example of WCF service using database - transactionscripting: WcfService_SimpelPersonService_MedDatabase_Solution.zip
|
||
Exercise WCF-Valuta
rest of the tasks
(Dansk
udgave) You might still use ofline lock when just having data in memory - it is needed when the last two task is added If you are done you might eventual try to make a solution with the service with the same methods, but using a database instead of data is kept in memory. |
|||
- 15:30 | Possibly. summarizing
and student(s) presentation of solutions for the exercies |
WCF - more links to tutorials including how to keep state
and making WCF restful - http://dm-webdev.blogspot.dk/2016/10/wcf-links-to-tutorials-including-how-to.html |
Uge 40 | |||
Goals for this week:
Preparation: Prepare yourself by watching the first part of the video
below - what's going on and take some notes. Read briefly about WCF versus WebApi:
https://msdn.microsoft.com/en-us/library/jj823172(v=vs.110).aspx
Next tutorials might be a supplement if you need more |
|||
Dag | Tidspunkt | Emne | Literature / Exercises |
Thursday | ||
08:15 -
|
Possibly. summarizing and student(s) presentation of solutions for the exercies from last week | |
Short discussion about terms for WebApi |
||
Demo med simpel Web API - test client using GET with browser - test client using Fiddler - C# client using WebClient |
Pp_WebApi_Basic_Server_og_Client_ENG.ppt - (Dansk
udgave) To reduce complexity of VS template for WebApi
|
|
Exercise - WebApi webservices: Make webservice for Curency exercise WCF-Valuta - (Dansk udgave) - this time using WebApi - test your WebApi using Fidler You might eventual drop execices witch needs Session, as you normal will try to prevent session when using REST / Web API |
Se preparation | |
12:15 | WebApi continued - common data for more clients - Simpel javascript client for test of WebApi services - Routning og Action (eventual first next week) |
Routing in ASP.NET Web API Slides about routing, Action, simpel WebApi tester, Session - Pp_WebApi_ActionRoutning_og_TestClient_Session_ENG.ppt - (Dansk udgave) Template for client to testing WebApi (insert html file on web-site with WebApi and correct for your test) - WebApiTestRequestTemplate.html.zip A posibly solution if you get halt in your exercise WebApiSolution_BasicGetPutReposityLock_MedTest_20151021.zip Remember it is not the solution that is important, but that you have learned what you need and not at least get routine so you can do the job in a short time. This means sometimes you have to do the job all over again several times to get the training. '' |
If you want go deeper this will contain more reading about attribute routing - http://www.asp.net/web-api/overview/web-api-routing-and-actions/attribute-routing-in-web-api-2 |
||
- 15:30 | Possibly. summarizing and student(s) presentation of solutions for the exercies |
WebApi - more
links to tutorials - http://dm-webdev.blogspot.dk/2016/10/webapi-links-to-tutorials.html |
Uge 41 - preliminary | |||
Goals for this week:
Preparation: Prepare yourself by writing questions you need an answer of
regarding WCF and WebApi primary based on the need to finish the
exercises. |
|||
Dag | Tidspunkt | Emne | Literature / Exercises |
Torsdag | 08:15 - |
Students presentation of solutions
for the exercies from last week and WCF We will split class in english / danish (eventual 2) so you should not present for all and we can keep presentation and discussion in danish for danish students - and of course english for the international students While one class is presenting the other will work with finish the exercise and if finish with your project. |
|
WepApi continued - ErrorHandling |
https://www.asp.net/web-api/overview/error-handling/exception-handling | ||
Exercise - WebApi webservices
from last week continued You should try some of your WebApi with - Fidler (se last week) - WebClient (se last week) - JavaScript template (se last week) |
|||
- 15:30 |