Ensure the Scalability of the Code Base
The title comes from one of the students, when asked why we should choose an MVC approach to building simple UI. After he said that I repeated that six or seven times, I like this term.
As an aside, I am having a lot of fun just pumping out all the odd & ends that I have tried, and it is interesting to see have to explain to beginners the reasoning behind what drive me decisions.
By the way, the code for the sample application is here:
And you can see what we have done so far here:
This is an approach that I took in order to expose the students to as many ideas (vs. knowledge) on the framework and design. Nothing like throwing recursive delegates at someone to keep them on their toes :-)
Please remember that this is a work in progress and is not meant to represent what I consider best practices or correct way to code, it is code that is written partially by me, partially by the students, and I don't have R# at class* so I am limited to what I can do. Also, keep in mind that the PDF (and the presentation in the same directory) are intended for people who have been through the previous lessons, so it may not make much sense on its own.
* On purpose, I don't really have much control over the speed I am writing code, and having R# there would make understanding how the code work very hard.
Comments
Just had a look at your code...
you need to refactor your tests. They violate the DRY principle all over the place.
@Keith,
Yeah, the tests there aren't really good tests, they are a way to get the students to just see tests, and as a quick way to make sure that we wouldn't break things when we make changes to the rest of the stuff.
Fair enough, however I do think its important to get into the habit of keeping things tidy, creating test fixtures per common setup (eg, one testfixture for LibraryWithOneBook) etc.
At the very very very least killing the "new Book" of war and peace and actually using the create method thats already there that makes war and peace would be good.
Comment preview