Weekplan Software Construction SWC 1.1

Semester: 1.sem., fall 2014
Teacher: Henrik Høltzer
Email: heho@easj.dk

Literature/Material:
HFC#: Head First C#, O'Reilly 2013, 3rd Edition
C#-note: Note by Per Laursen
Exercises: SWC1 Exercise Set
NewBoston: Video tutorial

NB: The plan is preliminary and will properly be changed during the semester! (Last updated: 17. December 2014 - 11.00am)

Week Topics Literature/Material Exercises
36 Introduction / Greenfoot
Upgade to Windows 8.1
Installation of Visual Studio 2013

Greenfoot
Upgrade to windows 8.1 from windows 7
Pair programming video
Vejledning til Fronter

 
37 Studieteknik onsdag d. 10/9
kl. 9.10-11.45 i Auditoriet lok. 202 se: Omtale


Introduktion til Visual Studio

Installation of ReSharper - a plugin to Visual Studio

Variables, operators, and expressions

HFC#: Chap. 1

Computer Bacis: https://skoda.emu.dk/skoda-cgi/britannicaw/EBchecked/topic/130429/computer

Introduction to HW: slides
Introduction to SW: slides

ReSharper - Downloads (NB: Productkey available in Fronter)
ReSharper - ShortCuts
ReSharper - Videos


C#-note: p.3-19


NC_1

Homework:

Build something cool, fast
HFC#: Chap. 1

I skal udvikle jeres første APP: "Save the Humans" ved at gennemgå kap. 1 i Head First C#.

Det er vigtigt at I har gennemgået hele Kap. 1 hjemme til onsdag og nået så langt som muligt med "Save the Humans" !

Bemærk i skal forvente at det tager minimum 3 timer!

Save_The_Humans

Exercises: 1,2,3,4,5,6

C#-Projects:
Sandbox
CarVersion1
Aritmetic
LogicExp

Solutions:
Ex.1 (CarVersion1Solved)
Ex.2 (SandboxEx2Solved)
Ex.4 (SandboxEx4Solved)
Ex.6 (SandboxEx6Solved) 

38

Using classes and objects
Creating objects
Using methods on objects
Defining classes
Method definitions

Notice:
Before the class/lessons: I expect that you have skimmed through the C#-note.
After the class/lessons: I expect that you read the chapter thoroughly again and if there are topics you don't understand - please ask!!

Before next week: I expect that you have read and understand the literature and solved all the exercises, either in the class or at home.

Same procedure in the comming weeks ;-)


C#-note: p.19-34
HFC#: Chap. 2

Homework:
Under the hood
HFC#: Chap. 2

Det er vigtigt at I har gennemgået hele Kap. 2 hjemme til onsdag

Bemærk i skal forvente at det tager minimum 2-3 timer at læse og forstå!


Exercises: 7,8,9,9a,9b,10,11,12

C#-Projects:

CarVersion2
StudentManager
Library
TinyFacebook
SuperMarket
DiceGame
BankVersion1
Geometry

Solutions:
Ex. 8 (StudentManagerSolved)Ex. 9 (LibrarySolved)
Ex 9a (TinyFacebookSolved)
Ex 9b (SuperMarketSolved)
Ex 10 (DiceGameSolved)
Ex. 11 (BankVersion1Solved)
Ex. 12 (GeometrySolved)
39 Methods and scope,
Decisions (If-statements)
More Objects

TuristApp ver. 1
C#-note: p.35-41
HFC#: Chap. 3 + p.436-439 (switch)

Homework:
Making code make sense
HFC#: Chap. 3

Det er vigtigt at I har gennemgået hele Kap. 3 hjemme til onsdag

Bemærk i skal forvente at det tager minimum 2 timer at læse og forstå!


Exercises: 13,14,15, 16

CheckExercisePart1
CheckExercisePart2


C#-Projects:
CarVersion3
BankVersion2
Numerology
MedicalAnalyser

Solutions:

Ex. 14 (BankVersion2Solved)
Ex. 15 (NumerologySolved)

Ex. 16 MedicalAnalyserSolved)

40

Iterations (Loops)
Types and references
Arrays
foreach-loop
Encapsulation

 

C#-note: p.42-45, p.49-52
HFC#: Chap. 4-5


Homework:
Do you know where your data is?
HFC#: Chap. 4

Det er vigtigt at I har gennemgået hele Kap. 4 hjemme til tirsdag

Homework:
Keep your privates ... private
HFC#
: Chap. 5

Det er vigtigt at I har gennemgået hele Kap. 5 hjemme til onsdag

Exercises:
17,18,19,20
Extra: 18a, 18b, 19a (if (timeLeft))
Arrays Part1
Arrays Part2


C#-Projects:
WhileLoopsPart1
WhileLoopsPart2
CorrectChangePart1 (extra)
BeastBattle (extra)
ForLoopsPart1
DrawShapes (extra)
SmallMathLibrary

Solutions:
Ex. 17 (WhileLoopsPart1Solved)
Ex. 18 (WhileLoopsPart2Solved)
Ex. 18a (CorrectChangePart1Solved)
Ex. 18b (BeastBattleSolved)
Ex. 19 (ForLoopsPart1Solved)
Ex. 19a (DrawShapesSolved)
Ex. 20 (SmallMathLibrarySolved) ArrayPart1Solved
ArrayPart2Solved

41
MVVM
Versionsstyring GIT
(én bruger løsning)

TuristApp ver. 2
HFC#: Chap. 10 (Designing windows store apps with xaml)
HFC#: Chap. 16 (Architecting apps with the mvvm pattern)

 

Exercises:


Solutions:

 

Ekstra Project SlotMachine Programming Project - Slot Machine Simulator C#-Projects:
CasinoSimulator

Solutions:

CasinoSimulatorSolved
42 Efterårs(læse)ferie

Project SlotMachine
Hvad I mangler af opgaver
evt. lidt repetition :)

 
43 List/Dictionary
Enums and Collections
C#-note: p.52-54
HFC#
: Chap. 8

Git: Source-Code-Control

List vs Dictionary Speed Demo

Homework:
Storing lots of data
HFC#: Chap. 8

Exercises:
21,22,23,24,25

C#-Projects:
ListExamples
BookCatalog_v1
CarPoolManager
BookCatalog_v2
StudentInfoManager

Solutions:
Ex. 21 (ListExamplesSolved)
Ex. 22 (BookCatalog_v1Solved)
Ex. 23 (CarPoolManagerSolved)
Ex. 24 (BookCatalog_v2Solved)
Ex. 25 (StudentInfoManagerSolved)

 

44 Properties
Bindings
MVVM Design Pattern

Designing windows store apps with xaml


Databinding Part1
Databinding Part2

MvvmExamples.docx

Other Interesting MVVM-links
A-Totally-Simple-Introduction-to-the-MVVM-Concept
MVVM-Pattern-in-WPF-A-Simple-Tutorial-for-Absolute-Beginners
WPF-MVVM-Quick-Start-Tutorial
wpf-mvvm-pattern-a-simple-tutorial-for-absolute-beginners
http://wpftutorial.net/DataGrid.html
WPF Apps With The Model-View-ViewModel Design Pattern
Simple MVVM Walkthrough – Part I
MVVM Made Simple
How to Listen to Property Changes of Items of an ObservableCollection
Controls by function (Windows Store apps using C# and XAML)
Homework:
Taking your apps to the next level
HFC#: Chap. 10

Exercise:

m-v-vm project



C#-Projects:

MvvmSimple2.zip

45 Bindings
MVVM Design Pattern

MSDN: Commands, RelayCommands and EventToCommand
EventToCommand is now built into Windows 8.1!

Other Interesting XAML-links (about ListView and GridView)
Quickstart: adding ListView and GridView controls (XAML)
How to group items in a list or grid (XAML)
Data Templating overview (DataTemplate, ItemTemplate)

Designing Your XAML UI with Blend Jump Start:
01 | XAML Development in Visual Studio 2013, Part 1
02 | XAML Development in Visual Studio 2013, Part 2
03 | XAML Design and Styling in Blend, Part 1
(Especially from 33min ->)
04 | XAML Design and Styling in Blend, Part 2
05 | Building Windows Store Apps with Blend
(Especially from 11min ->)
06 | Developer Candy
Homework:
Great apps on the inside and outside
HFC#: Chap. 16

C#-Projects:

ERASongCollections.zip
46.1

Version control (GitHub)

 

 

 

TuristApp ver. 3

Git and Software control:

Videos:
Fundamentals of Softvare Control (video - lynda.com)
Introduction to Git using VS tools from Microsoft
Git Branching and Merging Strategies

MSDN: Use Visual Studio with Git

Slides: IntroGit (PowerPoint)


Book:

Git Pro, Scott Chacon, Ben Straub, Apress, 2ed 2014
1.1 About Version Control
1.3 Git Basics
2.2 Recording Changes to the Repository
3.1 Branches in a Nutshell
3.2 Basic Branching and Merging
6.1 Account Setup and Configuration

Downloads
GIT: http://git-scm.com/
GIT-Extensions: http://sourceforge.net/projects/gitextensions/

Kdiff3: http://sourceforge.net/projects/kdiff3/?source=typ_redirect

Code Scool - Try Git (Online training):
https://try.github.io/levels/1/challenges/1

Exercise:
GitHub
46.2 Unit Test

Unit Test (MSTest in Visual Studio)

Videos:
Channel 9:
Improving quality with unit tests and fakes
Channel 9: Unit testing your metro style apps built using XAML

Introducing the Unit Test Generator for Visual Studio 2012 and Visual Studio 2013: http://www.youtube.com/watch?v=GD2xxRSwgkI

MSDN: Unit Test Basics
MSDN: How to: Create a Unit Test Project
MSDN: Using Code Coverage to Determine How Much Code is being Tested


Downloads:
Unit Test Generator (a plug-in for Visual Studio)


Slides:
Unit testing (PowerPoint)

 

Exercise:
UnitTest

C#-Projects:

Car UnitTest
(code demonstrated in class)
47



Persistens:
Filer/Serialisering




HFC#: Chap. 8
MSDN: Basic Serialization

Windows App Store:
MSDN: StorageFolder

Exercise:
SerializationTest

Bemærk:
I windows 8 App er der ikke adgang/rettigheder til filsystemet direkte, dvs der kan ikke umiddelbart streames (serialiseres) til en hvilkårlig fil. I stedet kan benyttes localstorage, der fås adgang til via class StorageFolder/StorageFile.

Følgende skriver localdata til filen Data.txt i localstorage:
StorageFile localFile = await ApplicationData.Current.LocalFolder.CreateFileAsync("Data.txt", CreationCollisionOption.ReplaceExisting);
await FileIO.WriteTextAsync(localFile, localData);

Filen kan findes på harddisk her: C:\Users\{user}\AppData\Local\Packages\7bbfef26-f6ac-4a10-9fed-4abfefafca86_18sn2ae6rna7w\LocalState.



C#-Projects:
SerializationTest.zip
WindowsAppSerializeTest.zip

48.1

Async, Task, Await

HFC#: Chap. 11

MSDN: Asynchronous Programming with Async and Await
CodeProject: Asynchronous Programming in C# 5.0 using async and await

Don't Block on Async Code

Slides: ProcessesAndThread (PowerPoint)
Slides: AsynchronousPrograming (PowerPoint)
C#-Projects:
GuiExampleAsyncAwait
SimpleBrowserAsync
48.2 Exceptions
Interfaces
Inheritance

TuristApp ver. 4
Buckys Room Try, Catch, and Finally (video)
Buckys Room Throwing Exceptions (video) MSDN Exceptions and Exception Handling (C# Programming Guide)
Exceptions (PowerPoint)


HFC#
: Chap. 12 + C#-note: p.61-68
HFC#: Chap. 6 + C#-note: p.59-60
HFC#: Chap. 7 + C#-note: p.55-59
Exceptions and Exception Handling in C#

InheritanceDemo
Exercises: 26, 27
Exceptions-Stack
ExceptionTextFiles


The Bank Job

C#-Projects:
WindowsAppSerializeTestV2.zip
(nu med håndtering af FilNotFoundException)

TryingUseing
Company_v1
Company_v2 The Bank Job Steps 1 to 3

Solutions:
Ex 26 (Company_v1Solved)
Ex 27 (Company_v2Solved)
MyStack.zip

49 Exam App Project    
50 Exam App Project

51 Exam App Project Projektaflevering: 18. december
Projektfremlæggelse: 19. december
 
52- Exam preparation    
2 Eksamen: 6-7 januar

Eksamensspørgsmål

Pensumliste