Tech.Ed Day 2 Roundup

Posted 06 December 2008, 11:23 | by | Perma-link

DAT203: Learning the Entity Framework

In light of the whole "LINQ to SQL is dead, long live LINQ to SQL" issues floating around at the moment, I'd taken a look at EF a few weeks ago, and found that it did address some of the limitations I'd started to come up against in LINQ to SQL - such as multiple references to the same table (E.g. an author field and an editor field, both referencing the Users table - in LINQ to SQL these came out with rather ambiguous, unhelpful names, but in EF I can edit the relationships and call them "Editor" and "Author" - handy).

One thing that had been confusing me was the concept of the Set - I'd not really worked out what the Set objects were for and what they should be named - clearly the default of EntityTypeSet wasn't ideal - however pluralising the set tended to make sense - the set "SalesPeople" contains entities of type "SalesPerson"; "Customers" contains "Customer"; etc.

The inheritance model in EF is also quite nice:

  1. One Table for multiple classes: use a discriminator column - e.g. ExpiryDate column with a value in the past creates an Expired Item.
  2. Table per Type: The table has all the fields required for a lookup.
  3. Table per Class: This would probably end up with duplicated data - e.g. Address data.

The architecture of EF is layered, and you can access it from any layer that you like, from the entities right down to direct database access.

In version 2 stored procedures will be properly supported.

Other nice features in Version 2:

Model First: You can model your objects in the design surface, and generate the database from the model.

Lazy Loading: It's been added, and you can toggle it on and off as required.

Unit Testing: There's been a lot of work with the community to ensure that this is all testable.

MBL201: Windows Mobile Smackdown!

How many mobiles can one person have synced with OneNote? Clearly quite a few. Anyway, this was mostly a selection of cool demos of things you can do with an HTC Diamond Touch Pro (because it has an accelerometer) and other phones (that don't), and so my notes were mostly a list of URLs:

  • MyMobiler - Remote Control your mobile from the desktop
  • TinyTwitter - If I could keep my Facebook status up to date, I guess this would be useful to me
  • DashWire - An online dashboard for all your mobile use
  • GRemote - this is one of the HTC Diamond ones - control the mouse on your desktop using the accelerometer in your phone.
  • SlingBox Mobile - if you've got a slingbox, you can access the content on it over the web on your phone…
  • Imagination - These people are doing some very interesting things with "Augmented Reality" and the like - see their Invisible Train for example.
  • Fake Call - get out of meetings nice and easily - schedule a call in the middle of it, and away you go.

TLA326: Web 2.0 Goes Game Development - XNA Game Studio

This was a walkthrough of the new Platformer Starter Kit that comes with XNA Game Studio 3.0 - my main take home was the message that you should create your objects/types as "Drawable Game Components" and then the engine will call LoadContent, Update, Draw, etc on them for you - keeps your main Game class fairly lightweight.

DVP02-IS: An Agile Talk on Agility

This was an interactive session run in an Agile style - so we started by coming up with a list of questions (the Back Log), ranked them by priority, and started discussing them for 15 minutes, checked for completeness, new questions, re-prioritised, rinse and repeat.

Stack rank: float most important issues to top - the order is the priority - there are not multiple items at the same level.

Q) How long is this going to take/cost and how many people will we need?
A) Assumes we know all requirements up front.
T-shirt sizing estimates: XL is broken, need more of a conversation, but gives an idea of size. Large = 2/3 weeks, Medium = ~week, Small = few days, XS = few hours.
Doing this gives you a better idea of how much you have to spend. If you have an idea of cost you can change priority - something uber important that's going to take 4 months and mean you're not going to get 6 other features, might not actually be that important.
Need trust - getting into the first iteration generally wins the project.
Fully stack ranked: not grouped, order is priority.

Q) Does this work with fixed price contracts?
A) Becomes a series of smaller fixed price contracts - that either side can cancel.

Q) Time slicing between support and new development?
A) Ideally a developer is either on or off the development team - ROTATE. However if something happens such as the CEO/Client comes in and says "you must all work on X": It should be explained that the original quote was an estimate, not an absolute commitment. The CEO/Client must be made aware of impact - you can change/scrap the current iteration if needs be, if the dialog is there between the development team and stakeholders.

Q) Does this work with fixed resource bids?
A) Pre-agile: Profit by change request (obviously dishonestly) - lock in to contracts with no deviation. Alternatively, tell them the actual cost, but give exit conditions up front: we'll deliver something every 2-4 weeks if you like it you pay for it, if you don't want to pay us any more then that's fine, you get what we've built so far.

Q) How do you deal with a late discovered design flaw?
A)
Probably caused by a new feature. Do not like to put "redesign business layer" as a backlog item - it's probably not true anyway - estimate for work should include redesign work - may become lower priority again. If not feature based, it's probably a newly discovered requirement (performance/scalability/reliability). Spikes must be time bound. If business decides to add a new thing right now, you can choose to throw away all current work in the sprint and start over: prefer small iterations as reduces waste in these situations; however that's up to you.

Q & A

Should review estimates each iteration, as customer needs that information to properly prioritise.
Planning: Iteration ratio: 2 weeks = 4 hours; ~month = ~2 days. Also be aware that you have an iteration tax: check-ins, builds, client meetings, etc are going to take the same amount of time in each iteration, and will eat into the iteration time.

Filed under: Conferences, Tech.Ed