Friday, April 27, 2012

Avoid EF code first

Entity Framework 41 introduces “code-first” which will infer a database design from your plain old CLR objects (POCO). It’s a nice idea, but doesn’t handle changes to the model well. You either have to do them manually (which means learning how it maps POCOs to tables, etc) or let it drop and recreate an empty database.

That’s fine for tests, demos and toy systems, but no use for anything serious. Personally I prefer the database-first approach where I can create my tables and define referential integrity constraints then then have EF create the data model objects for me.

This side-steps the drop-and-recreate issue as I can choose to add columns and keep my data.

Tuesday, April 24, 2012

Windows Phone 7

Some quick thoughts having used Windows Phone 7.5 (Mango) for a few months.

I recently found out that holding the back button opens fast application switching, which shows you all the open application windows in a list so you can jump between them. Which is handy as I had been going back to the main menu a lot.

The built in status updater (Me > Post a Message) will post to Facebook, Twitter & Windows Messenger, but only does text status updates (not photos for example) and doesn’t cache so if you are not online it errors rather than saving and updating when next online.

Angry Birds (free trial version) is utter shit. Probably the dullest game I’ve every played. Plants v Zombies is excellent, but I already own it on Xbox and I’m not paying again to have it on the phone.

The built-in maps don’t cache so won’t work when offline and the major sat nav providers are staying away so it can’t really be used as a sat nav.

Office OneNote is great for taking notes. Syncs to Windows Live. Shame it doesn’t have a doodling mode for sketches.

Podcast downloads via Zune (the Mark Kermode & Simon Mayo film review for example) is great. Auto-syncs them to the phone whenever I plug it in to charge off the laptop. The phone remembers which have been played and it’s marked in Zune so I can delete them or not without them cluttering the list up. The max volume is a little quiet, not sure if that’s to preserve battery life, so traffic announcements or incoming mobile calls on a car radio are super loud.

Not sure I really need or see the point of it though (or any of the alternatives). I’m at a computer all day at work and have one at home so it’s only useful when travelling (but as I drive it’s of little use then).