Showing posts with label microsoft. Show all posts
Showing posts with label microsoft. Show all posts

Sep 11, 2014

Azure DocumentDB at Sydney Alt.Net, August 2014

At last month's meeting of the Sydney Alt.Net group I did a talk on Azure's new DocumentDB offering. That video is now available on ReadifyTV and here as well.


Azure DocumentDB Preview at Sydney Alt.Net, Aug 2014 from Richard Banks on Vimeo.

Enjoy!

Nov 6, 2012

//BUILD 2012 Wrap Up

This was an editorial for the Australian MSDN newsletter that got bumped for various reasons so I’m posting it here for your edutainment.

----

By now you’ve no doubt heard that both Windows 8 and Windows Phone 8 have been released to consumers and I’m sure many of you are looking forward to getting your hands on the exciting new Windows 8 tablets and ultrabooks or checking out the awesome new Windows Phone 8 handsets. When you do, I don’t think you’ll be disappointed!

You may also have seen that attendees at //BUILD were given a Microsoft Surface RT and a Nokia Lumia 920 to build applications for. Having used both devices extensively for the past few days you can colour me impressed! These are wonderful pieces of kit! I’ve also spent time with some of the other offerings from Microsoft’s hardware partners and these devices have some serious competition.  Check out Steve Ballmer’s keynote to see some of these other devices in action.

I’m also confident that the prophets of doom in the press predicting the end of the world as we know it will be proven wrong in time. I say this because I visited one of Microsoft’s retail stores in Bellevue a number of times this week to watch how “average consumers” interacted with the new Windows offerings. The store crowded every time I visited, which was great, though my confidence comes from seeing people pick up devices with some initial trepidation, play with them for a few minutes before cracking into a grin as they got how Windows 8 worked and then handing over their cash and walking out of the store with newly purchased devices!

What this means is that the consumer demand is here, now and it’s huge! The question you need to ask yourself now is “what apps can I build to meet that demand?”. You already have the development skills you need; just learn the specifics of building Windows Store and/or Windows Phone apps and you’re all set to go.  Nothing is stopping you.

Oh, that isn’t all that has happened this week either. There have been a slew of announcements from the ‘other’ Windows (Azure). Windows Azure web sites now support .NET 4.5, there are updates to Windows Azure Mobile Services, the Azure hosted Team Foundation Service has RTM’ed and it was announced that Halo 4 will be using Azure to scale out and meet the demands of the millions of gamers all wanting to frag each other.

This week the Windows ecosystem has taken an evolutionary leap forward and the future is bright so if you haven’t already done so, go and check out the session recordings at Channel 9 and then get started building great apps for both Windows 8 and Windows Phone 8 today.

Finally, if you want learn about building modern apps using Visual Studio 2012 tooling then you should definitely check out the Microsoft and Readify Modern Apps, Modern Processes road show happening this month.

Happy coding!

Sep 27, 2012

Where are all the new desktop keyboards for Windows 8?

With Windows 8 being RTM’ed and a slew of new devices to be launched on October 26 (just a few weeks away) I can’t help but wonder where the new keyboards are.  Sure, Microsoft has announced some new keyboards and mice, but they’re not gesture enables and have no charm keys on them.  The keyboard is just a fairly standard keyboard with the new Windows logo on it.  Boring!

Windows 8 Bluetooth keyboards and mice announced

I was expecting something to be announced that supports the touch style gestures and the Windows 8 Charms. The Logitech K400 is has potential with it’s inbuilt touchpad but is still missing the key elements.

image

So, what do I want on my keyboard?

Firstly, I want the charms on my keyboard, mirroring what’s on screen.  Sure, I can press Win+C just like everyone else, but I’d rather a single key press. I’m lazy.

I also want a mini-display on my keyboard that mirrors my current display so I can do swipes, pinch and zoom, and so on simply by using gestures on the in-keyboard display instead of reaching out across my desk to touch the screen and looking like a fool. Plus too much of that and I’d get a tired arm.

I want something a little like this and I’m willing to pay for it:
SNAGHTML2ce30ce

Maybe something has already been announced, but if so I can’t find it.

UPDATE

I just came across the DeathStalker keyboard from Razer.  This looks really promising. Here’s the main thing that could make it work – the Switchblade UI.  I could definitely see the charm keys up along the top of the trackpad and the trackpad itself looks like it has the display and multitouch capabilities sorted already.  Looks like all we need is a Windows 8 app written for it.  Does anyone have some rock hard C++ skills? :-)

image

Jul 2, 2010

I’m a Visual Studio ALM MVP

I was very pleasantly surprised today when I received an email from Microsoft stating that I have been awarded MVP status for my contributions over the last year.

Here’s the proof – my MVP Profile.  Happy days!

Jun 22, 2010

Implement Interfaces and #Region

This is a quick one for a few guys I was talking with today.

One of the PITA things about Visual Studio 2008 / 2010 is that when you choose to have Visual Studio implement an interface for you it will generate the code inside a #region block.  And why is that bad?  Because regions suck! Feel free to start a religious wars over it, but let me just say that if I can’t see all the code when opening a source file and you make me click or press a hot key just to see a few lines of code it then I’m likely to go postal on you.  With a rotting halibut and a cork.

So, if you want to avoid the ire of the region police then let me suggest a small settings change in Visual Studio.  This one right here: (VS2010 screen shot shown)

image

Is that obvious enough for you? Good! Now go ahead and make that change and start being nice to your fellow developers.

That will be all :-)

Nov 17, 2009

PDC09 Pre Conference Workshop

I’m currently at PDC (follow my tweets for on the spot thoughts and impressions) and today I went to a pre-conference workshop on VSTS.  I wasn’t sure what to expect and was kind of hoping to be reasonably hands on and have a chance to chat a bit closer to a few more of the team.

It turns out that it was much more like an all day VSTS 2010 breakout session and it was presented by Chris Tullier and Todd Girvin from Improving Enterprises instead of the VSTS team.  Chris and Todd did a good job (including when the demo gods tied to smite them a few times) and I know the effort that goes into prepping for a whole day of this stuff, so a big well done to them.

The theme of the workshop was building quality applications with VSTS with the basic flow of the day working from requirements, through to code and build automation and finally through to testing.  Much of the content was similar to, though more in depth than what I presented at the RDN Dev Day just recently.  There wasn’t anything presented that I didn’t know but that wasn’t the point for me.  I was there to either confirm my understanding (and make sure I wasn’t leading people astray with what I thought was right) and to fill in any gaps I may have had.

The main gap that got filled in for me was around the new Architecture features.  Diagrams are one of those areas I’ve glossed over in my VS2010 learning as I tend to avoid them.  In VS2008 they were complete rubbish and I avoid Visio since I find using it akin to self flagellation.  That said, seeing Chris and Todd run through things at greater depth than I have personally gone to showed me a few things I wasn’t aware of and highlighted the value of them in the overall requirements and initial design process.  Chris and Todd also went to pains to make it clear that they thought the usage scenario for the diagrams was around the high level design only and that detailed design work really falls into the usual class designer and code itself. The UML class diagram in the architecture projects has a much different purpose than the class designer in code projects with the former being  a modelling design tool and the latter being a development and implementation design tool.  Questions about code generation from the floor were met with answers along the lines of "Microsoft is moving away from model driven code generation” which I personally applaud.  The conceptual model and how it’s implemented in code are always going to be different so trying to unify them via code generation and reverse engineering will only lead to bad code, a messy model polluted by implementation details or in all likelihood both.

The walk through of the use case UML diagram also made me take stock and reassess wether I should be using them in the agile requirements gathering process. I think I have tended to ignore them because of the tooling pain but now that VS provides these diagrams out of the box and because they form a nice visual way of grouping clumps of user stories together and can provide a clean visual way of understanding the overall system interactions I’ll have to reconsider.  I’m pretty sure that I’ve been skipping an important part of my requirements gathering and high level design process until now and that needs to change.  Mea culpa.

Apart from that everything else was pretty much on par with my understanding – a few little bits and pieces here and there and some fleshing out of my understanding of some of the more esoteric things, but nothing major.  It was still worthwhile being there and I got to meet and chat with some people who have quite different experiences to mine as well as one of the guys on the TFS team about the future of source control.

Tomorrow PDC kicks off in earnest.  Let’s see what the announcements out of tomorrow are.  Hopefully something big and not just the launch of Azure and betas for the upcoming Office, xRM and MOSS products.

Aug 3, 2009

Windows 7 Virtual Machines and Host Networking

Let’s assume you’ve got a Windows 7 Virtual Machine and you want to do networking between the Host and the Guest operating systems with it.

I’m going to give you a run through of how I set this up on my laptop using the loopback adapter.  There may be other ways, but this works quite well for my needs.

1. Install the Loopback Adapter

Go to device manager (in Control Panel) and select the Add Legacy Hardware option

image

In the ensuing wizard select: Install manually –> Network Adapters –> Microsoft Loopback Adapter

image

2. Setup the Loopback Adapter

Once the installation is complete we need to configure the loopback adapter.  My preference is to use fixed IP addresses for this so that I can use machine names to identify the VM easily, just make sure you pick an address range that isn’t used :-)

So go to the Networking and Sharing Center and select “Change Adapter Settings” on the left. You should see something like this:

image

Now go to the Loopback Adapters properties and then go to the properties of the IPv4 TCP/IP settings:

image

Simply set the IP address you wish to use for communicating with the VM.  I normally use a 10.x.x.x address range with the Class C subnet to minimise conflicts with other networks I may be connected to.

Not that I normally disable the IPv6 settings on the loopback adapter to make the configuration simpler.

3. Configure the Virtual Machine Networking

Assuming you already have a virtual machine configured you now need to go to your virtual machines settings and set up the networking as follows:

image

Set adapter 1 to be the loopback adapter and adapter 2 to be your physical network adapter so that I can access the internet and other networks from the VM should I need to.

4. Configure the VM’s Operating System

Now we need to start the VM and change some settings in the networking to use the fixed IP for the loopback adapter in much the same way as we did for the Host Operating System.

image

You may notice that in the network adapters it’s hard to tell which adapter is which since they are all the same type (i.e. the virtualised network).  The trick is to remember which network adapter is which in the VM settings – Adapter 1 is “Local Area Connection”, Adapter 2 is “Local Area Connection 2”, etc.

5. Don’t Forget Your Firewalls

So if we were to try pinging the Host OS from the VM we would probably find we don’t get a response, and the same would happen if we did it the other way around.  If that’s the case you probably forgot to adjust your firewall settings.

Here’s how it’s done in Windows 7 on the Host:

Go to Control Panel –> Windows Firewall then choose “Advanced Settings”

Select the Inbound Rules from the left side and then choose the New Rule action from the right.

image

Choose “Custom” in the dialog and then in the scope step add the IP address for the VM in the Remote settings area (as shown).  For extra security you should also ensure that the local address is set to the IP address of the loopback adapter on the host (10.2.1.1 in my case).

image

Allow all connections through on that rule and don’t forget to give it a meaningful name such as “Windows VM Loopback” or something like that.

You’ll also need to do that same in your guest operating system (assuming it also has a firewall enabled).

Once that’s done you should then be able to ping the Host from the VM as shown and do the same in the reverse direction.

image

6. One Last Step

Trying to use IP addresses can be somewhat of a pain, especially if something you’re accessing is wanting you to use host names instead.  The way to improve this situation is to edit the HOSTS file and add entries for the remote machines in both the Host OS and also in the Guest OS (the VM).

On Windows 7 start Notepad as Administrator since you need Administrator privileges to edit the HOSTS file.  The Hosts file can be found in C:\Windows\System32\drivers\etc.  Note that there is no extension on the Hosts file so you may have to change the filter in the Open File dialog to show all files before you’ll see it.

Once you have it open add an entry at the end of the file on a new line in the format of <ip address> <machine name>.  For example I use:
10.2.1.2    tfs2008-vm

Save the file and check that things are working by opening up a command prompt and pinging the virtual machine using the name you just gave it:

image

Don’t forget to do the same on the Guest OS in the Virtual Machine.

Once that’s done you should be all set to go and your Windows 7 Host and you Virtual Machine should now be able to talk to each other without a problem.

Enjoy!

May 28, 2009

Attention to Detail

Sometimes you just have to wonder how the things that show a lack of attention to detail can make it to production.  Especially when there are sooo many eyeballs that would have looked over something before it’s release.

Notice anything suspect about the latest Zune HD marketing shots?  Hint: It’s inside the circled area :-)

image

A font clipping problem? Seriously?! Why wouldn’t you just reduce the font size by a tiny fraction so that the default text actually fits cleanly.  It’s not that hard a problem surely?  And now that I’ve seen that I’m wondering if the device is actually too narrow and whether other software will also experience the same clipping problem.

And then I start wondering, why on earth would you use an image with clipping problems as a promotional picture?  I can’t imaging Apple letting something like that slip through.

May 3, 2009

Windows 7 RC: Blank “All Programs” After Upgrade

I performed an upgrade on my Vista SP1 based laptop today to the Win 7 Release Candidate and after the upgrade everything looked OK, except for the All Programs folder under the Start Menu being blank, empty, vacant, non-existent.

What was strange though is that I could search for programs via the Start Menu and it would still find them and I could run them.  A quick bit of hunting around on Google led me to Greg Duncan’s post where he explained the problem and a workaround.

So, if you’re having the same problem, head over there and try it out.  The workaround/fix resolved the issue for me.  Hopefully it’ll do the same for you.

Dec 17, 2008

DataDude 2008 Impressions

DataDude, or as it’s more formally known – Visual Studio Team System 2008 Database Edition GDR (*phew*) has been released for a few weeks now and I spent part of today showing a number of people how it all fits together.

By the way, if you already have the 2005 edition installed, go get this version right now.  The improvements it makes over the 2005 version are massive – this product is now a useable and worthwhile addition to your toolbox, plus it supports SQL2008 databases.

Projects

The project system is now quite different.  The biggest (and I think the most needed) change was the separation of the build process from the deployment process.  You can now build the project to make sure that your SQL is correct without creating a deployment script.  When you build you get a DBSCHEMA file with you database definition in it.  Deployment is also improved with the option to just create the deploy script to target a database or you can create the script and run it against your target database in one operation:

image

The project file itself is now structured in a simpler manner with specific configuration files for various aspects of the configuration and deployment:

image

Oh – I should also mention this one : no more design time database!  Yay!!  DataDude now uses the SqlServerCE data engine for checking syntax and no longer creates those temporary databases with the GUIDs in the name.  Of course it does mean you need SqlServerCe (3.5 SP1) installed otherwise you might run into errors opening database projects with “Could not load assembly…” errors.

Code Analysis

Another very cool addition to DataDude is the inclusion of FxCop style code analysis rules.  While you can’t ensure that your SQL code is brilliant, you can at least be sure it doesn’t completely suck and break common rules.  As you can see it includes checks for things like the use of @@IDENTITY and SELECT * … etc.

image

The Schema View window

One of the other painful things about the 2005 edition of data dude was the schema management.  With 2005 by far the easiest way to edit your schema was to make changes via management studio and then do a schema comparison to bring the changes you wanted into your project.  While you can still do this it’s now pretty easy to manage the schema inside visual studio since there is a Schema View window with all the various things you might expect.

image

You still edit the table definitions using SQL (no designers) but it’s pretty simple to manage this stuff now.

What’s also nice is the improved things you can do in the schema view window as seen here:

image

Apart from much improved database refactoring support, there is now also the ability to view the dependencies of an object – both the things depending on it, and the things it depends on.  This really helps in understanding what you’ll be breaking when you make those crazy schema changes your thinking of :-).

Unit Testing

Woo-hoo!! Unit testing for stored procedures is very, very nice now.  To get started with a unit test hit the Create Unit Tests… button

image

Run through the dialogs and you’ll end up with a generated test that looks something like this:

image

See all that SQL code calling the proc?  What’s it doing inside a *.cs file?  Well, DataDude has added a designer experience to the database unit tests.  You can now write some SQL and add your test conditions from a list.  Test conditions are adjusted through the properties pages for each condition.

image

You can also do pre & post test scripts as well which can be very handy.

image

Behind the scenes you have normal code so if you really wanted to you can always go and add further code to assert and test conditions to suit whatever the specific needs are that you have

 

There’s a whole slew of other changes in the new version of DataDude and all of them are valuable and probably deserver a blog post in their own right, but these three areas of improvement are to me the changes that make the most difference.  If you want to know what the other changes are, go and check Gert’s blog where he gives a run through of each of them or go and grab the documentation and have a read of it for yourself – even better, go download it and have a play with it yourself and discover the improvements.

Reactions to Oxite

So you might have heard that Oxite was released recently.  You know the one – it’s the all new, all shiny, singing and dancing blog engine that is meant to show off how great ASP.NET MVC apps should be built.  The system used to run the MIX web site.  Yeah, that’s the one.  And it’s meant to be a great example of good architecture, appropriate use of design patterns and clean code as well, isn’t it?

Hmmm.  It appears not.  Check out this review by Karl…

http://codebetter.com/blogs/karlseguin/archive/2008/12/15/oxite-oh-dear-lord-why.aspx

It’s quotes like this that worry me: “Actually, I seriously think I'm missing a project, because there's no way the team built all this functionality and only 51 tests - apologies if I'm missing a part of the project” or this comment from a review on the project’s Codeplex site - “You have three total test classes, and one test class that is 1400 lines long.”  Whoa!  Shouldn’t testing and quality be a prime concern of a well written project?  I would have thought so.

All I can say at the moment is “Ouch!”  Now in all fairness I haven’t seen the code myself yet so I’m going to download it and have a look at the code myself and make up my own mind.  You should too, and when you do see if you can spot why some people are ripping into it as (yet another) really bad Microsoft example of how to develop applications.

Oct 29, 2008

Unity 1.2 is Available

In case you haven't seen the news yet with all the other PDC hoohah about Windows 7 and Azure going on, Unity 1.2 (and EntLib 4.1) were released today.  You can get all the bits you need from www.codeplex.com/unity.

Here's a quick "What's New" as far as Unity is concerned (stolen from Grigori's blog):

  • Added an interception mechanism (extension);
  • Added two instance interceptors (TransparentProxyInterceptor, InterfaceInterceptor) and one type interceptor (VirtualMethodInterceptor);
  • Improved support for generics;
  • Added support for arrays;
  • Registered names are now available as an ObjectBuilder policy so that you can do a ResolveAll from within the strategy chain. The container automatically registers itself with itself;
  • Added PerThreadLifeTimeManager;
  • Bug fixes;
  • Performance improvements.

The best thing has to be the Aspect Oriented Programming (AOP) support that is now available with the inclusion of interceptors.  Awesome!  You can use interceptors either with the EntLib Policy Injection Application Block and/or you can roll your own.

I haven't had time to play with it yet but the syntax for creating custom interceptors looks very similar the way the other IoC containers implement interceptors which should make transitioning between them fairly simple.

The new per thread lifetime manager is something that should have been in the 1.1 release so it's a very welcome inclusion.  Now we have a way to ensure that we won't get objects created by other threads when we call Resolve<T>() (think web applications, etc).

Documentation has also been added to MSDN so go have a look and see how some of this stuff works.

Sep 18, 2008

Choosing an ORM When You Can Only Use Stored Procedures

I've been working through some architectural choices with a team starting a new project recently and the ever running debate over database access philosophies came up (as it was bound to).

Personally I'm in favour of letting an ORM manage all the CRUD operations as I see very little benefit in writing CRUD stored procedures (as do others). However I'm also pragmatic and can see some value in the sprocs argument, though the purported benefits of security and performance don't wash with me (but that's for a blog post).

Anyhoo, this particular team decided they wanted stored procedures for ALL data access.  That means CRUD procedures for every table and no direct table access whatsoever.  Yet at the same time they wanted to use an ORM for the .NET side of the equation as coding ADO.NET can be painful at the best of times.

Now, as part of the architecture we had decided early on to use the Repository pattern for data access and ensure we had persistence ignorance for all our data classes.  This lets us isolate the data access plumbing from the rest of the application which helps with the persistence ignorance in the rest of the app, and lets us work with POCO objects everywhere except in the repositories.  However it doesn't solve what to actually use in the repositories themselves.

So what to do? Some of the team wanted to use Linq To Sql, others wanted to use Microsoft's new Entity Framework and others suggested NHibernate.  Too many opinions meant there was only one real way to decide.  We decided to have an ORM to SProcs smackdown - may the best working code win!

The rules were simple... Take a very simple, 3-property, POCO business class and persist it to/from a database using nothing but stored procedures and an implementation of the repository pattern in the ORM of your choice.  Get it done in 4 hours or less.  The team would then vote for their preference.

Here's the results:

Entity Framework

The entity framework has support for stored procedures for data access.  Surely it would be simple to match things up, right? Wrong!! The developer who got the EF mission tried his best to get the tool to do what we wanted but mapping the classes was a problem.

The stored procedure support is best described as simplistic, at it's worst it's probably described using words not suitable for children to hear.

Even when the developer got something almost working, it still required creating a class that duplicated the POCO class and then manually mapping fields from one class to another.  Gah! This is pretty much the same as using ADO.NET and mapping to parameters.

Also, the steps required to get the Entity Framework code "working" were so convoluted and confusing it would be a maintenance nightmare, even if it did work.

No vote was required for this.  Everyone hated it.

Linq To Sql

There was some hope here - a working implementation was shown, however there are some major limitations.

First, Linq to Sql wants access to tables.  Without table access you don't get any change tracking in your data context negating many of it's benefits.

Secondly, the designer support for stored procedures without is limited.  Sure you can drag the procs onto the designer surface, but it only helps a little as the select stored procedures don't actually return classes you can easily use, but rather ISingleResult<T> objects.  To get these into our business layer POCO's we needed to manually map them using either a linq projection or through standard property assignments in code.

Updates via stored procedures were also a problem.  Not having table access means that you won't get any value from implementing the partial UpdateXXX() methods that the linq data context provides as they'll never be called.  Instead you have to call the update stored procedures directly and you have to manually map your objects properties to the stored procedure's parameters.

Further, if you use an insert procedure and database generated primary key fields then you have to remember to get the new value of the key from the database and update the POCO's properties with the new value.

It's workable, but no one in the team was that impressed with it.  It received zero votes.

NHibernate

The implementation using NHibernate was also shown to be workable.

A hibernate mapping file was created that had a class definition with specific overrides for the update, insert and delete methods so they called out to stored procedures.  There was also an override for the object loader to use a select stored procedure.

The only change to the POCO was that the properties needed to be changed so that they were virtuals.  We need to investigate this a little more but I'm going to assume it's something to do with NHibernate creating proxy versions of the classes for internal use.

Other than that the actual repository implementation was very simple.  Pass an object to NHibernate's session and call Flush at the appropriate times.

When a vote was called for everyone went for this method.  If I get some time I'll try and explain how it all works (or you could just do a Google search for it!).

 

Conclusion

So NHibernate method wins, but the scenario was simplistic.  There may be some further issues that we need to deal with such as complex procs, optimistic concurrency and so forth, but even so there is more confidence that NHibernate will deliver the goods.  It has a large user base, it's been around for quite some time now and we're pretty sure other people have tried this before.

On the other side of the equation, Linq to Sql and the Entity Framework are surprisingly and embarrassingly inept at this.  If you don't have direct table access then you might as well forget about using these tools and stick with ADO.NET or code generation.  The simple fact that data access via just stored procedures is such a common requirement in enterprise databases and that these two "modern" offerings from Microsoft just don't work is downright perplexing.  Seriously, Microsoft recommends for years that people use stored procs and the release tools that are only partially functional in a pure stored procedure environment. What gives?!

Well, I think that's enough of a rant for now - time to get some back to doing some real work now!

Sep 6, 2008

Tech.Ed Australia 2008

Tech.Ed Australia is over for another year and for me this Tech.Ed was very different to the others I have been to.  Previously I have attended as a delegate an I've simply gone to sessions and absorbed as much information and opinions from the presenters as I could.

This year I was fortunate enough to be given a breakout session on the Architecture track in which I talked about Dependency Injection, Inversion of Control and Unity (the IoC container that is part of enterprise library 4).  I also had a "chalk and talk" session where I gave a 20 minute version of my agile agile presentation.

Both sessions were well attended and for everyone who came and especially to those who gave me constructive feedback, I'd like to pass on a big thank you.

Apart from my sessions I also spent time getting the TFS environment and automated build and deployment scripts set up for the Tech.Ed DevGarten project where we were redeveloping the UNICEF web site, and I spent a fair bit of one-on-one time with some of the conference delegates who wanted to talk about either unity or agile development.

As for the other breakout sessions I only made it to a handful - I went to Scott Hanselman's presentation on ASP.NET MVC so I could pick up some tips on presentation style, a session on dynamic languages (Iron Python, Iron Ruby, etc) and one on F# so I could get expand my thinking beyond C# and VB.NET, and also one on managing complex development as I've worked with one of the presenters and was curious to see what would be said.

All up I thought it was a great tech.ed and I'd like to thank Microsoft and the DPE/Marketing teams for organising such a great event. Well done to all!

Aug 20, 2008

An Introduction to Microsoft's ALM (Application Life-cycle Management)

Last year Microsoft launched the "Microsoft Application Platform".  The application platform is Microsoft's vision for how businesses can use Microsoft technology to improve information & knowledge management within their organisation and focuses on 5 key areas as follows, each of which wraps a number of Microsoft product & services offerings:

  • Business Intelligence
  • SOA & Business Process
  • Development
  • User Experience, and
  • Data Management

I'm not going to iterate through the various products that sit under each umbrella, instead I'm going to drill into the Development area as that's the one I find most interesting.

Development Platform

The Development area of the application platform is actually called Development & Application Life-Cycle Management, and normally gets tagged with the ALM acronym.  The good news is that this isn't just an attempt by Microsoft's to sell you on their tools (though obviously that's a major element of it) but it's also an acknowledgement that good processes and practices need to be followed to ensure that applications don't cost an arm and a leg to not only develop, but also to maintain in the future.

From a Microsoft ALM whitepaper comes this little gem: "Acquiring tools to support ALM, such as Microsoft® Visual Studio® Team System (VSTS), is straightforward. Introducing and driving an ALM strategy within your organization, and understanding the necessary changes required within your business, is more difficult."

The introduction section of the same whitepaper talks to the fact that project failures can be traced to a limited number of root causes described as:

  • Lack of visibility into project status
  • Ineffective Team Communication
  • Balancing Business Demands with Project Risk
  • Unpredictable Delivery Times and Quality

These are all valid and legitimate issues.  Issues which both traditional and agile development methodologies attempt to resolve.

What is ALM?

Microsoft's ALM offering is a combination of both development processes and supporting software to help automate whichever ALM provided process you follow.  In the ALM offering Microsoft have included processes for both agile and traditional development models.

Because technology is always on the move a normal development methodology won't specify what technology a team should use, just the processes and practices to follow.  A team can be using .NET, Ruby, Java, PHP, Cobol, whatever.  The difference with ALM is that even though it includes methodologies to follow, it also includes tools and technologies to support those methodologies - namely Visual Studio Team System (VSTS).

Knowing that VSTS is part of the Microsoft ALM offering it might be easy to fall into a trap of thinking that ALM is just VSTS by another name. It's not.  VSTS in and of itself does not require any specific development process.  It is designed to help you automate your development activities now matter what they might be.  How a team then uses VSTS is up to them.  In fact, you can easily find teams using VSTS that have a development process as loosely defined as "write code and see if it works".  That's not something that can be considered as ALM, simply because it fails to address the project management aspects of application development.

How Does VSTS support ALM processes?

So, knowing that VSTS is part of the ALM offering, how does it help? What should the ALM support tool offer us?

According to Wikipedia, ALM offerings are generally expected to cover the following features:

  • Requirements Visualization
  • Requirements Management
  • Feature Management
  • Modelling
  • Design
  • Project Management
  • Change Management
  • Configuration Management
  • Build Management
  • Testing
  • Release Management
  • Deployment
  • Monitoring and Reporting
  • Workflow

And VSTS offers support for all of these items.

Project Management, Requirements Management, Change Management, etc are all process/methodology related items and Team Foundation Server includes process templates for both agile and traditional development methodologies (the MSF Agile and MSF CMMI templates) as well as letting you plug in your own process templates if you wish to use an alternative methodology (e.g the Scrum template).

For more info on VSTS and how it supports ALM have a look at the Team System site.

 

It should be noted that Microsoft has an online assessment tool to help you gauge how well you are performing Application Life-Cycle Management.

Jun 19, 2008

What's Wrong With Traditional Software Development

I was just reading some posts on the scrumdevelopment mailing list and saw this from Roy Morien about traditional software development:

 

Traditionally software development processes have been predicated on the following assumptions:

1. It is possible, efficient and effective to create a thorough and complete analysis of the requirements for a system, at the start.

2. Is it possible to plan in detail the development project, even 2-3 years ahead.

3. It is possible to provide accurate estimates of the cost of the project, and of the development time and completion date.

4. Requirements are stable and will remain unchanged during the project period.

5. Following the plan is the best way to ensure project success.

6. A serial or linear phased development approach is the best , most efficient most effective approach to software development.

7. Software development is fundamentally a technical activity that is repeatable, and can be planned and managed according to a preconceived plan.

8. Software projects can be undertaken in the same way as civil engineering projects, which is orderly, linear and sequential.

9. Certainty of outcomes can be achieved if only we properly, correctly and comprehensively plan, analyse, estimate, document and properly manage the project.

10. Project success is counted in terms of 'Within Budget, Within Time, Within Scope'

I then made the statement  "On every count, these assumptions have been demonstrated to be incorrect", and I proceeded to discuss why, and the evidence of that.
Basically I discussed the simple fact of 'Future Uncertainty". This really is the core problem that all of these 10 assumptions fail on.
I was a bit surprised at the audience reaction ... It was almost like many of them had never really thought about this in this way. To have their basic underlying project management principles shown as almost totally flawed seem to come as a bit of a shock to them.

Personally, I'm not at all surprised.  I see the same reaction over and over again in almost every place I go.  Almost every single project manager is taught a one size fits all project management methodology (typically PMBOK or PRINCE2) by an esteemed educational institution and no alternate options are ever discussed, so why would they think that the methodology they've been taught can't work for software development?  Especially if they've never actually done any development themselves.

Hopefully the increasing awareness of the problems with traditional software development and the alternative of agile methodologies will finally result in educational institutions teaching prospective PM's something that actually works in the real world.

May 27, 2008

StyleCop is Released

Microsoft recently released a new tool in the vein of FxCop for analysing source code (instead of compiled assemblies) named, not so imaginatively, Microsoft Source Analysis for C#.  There's a blog entry with an overview from the team about it at http://blogs.msdn.com/sourceanalysis/archive/2008/05/23/announcing-the-release-of-microsoft-source-analysis.aspx 

In summary the tool will check the consistency and layout of your code to help ensure that all team members are working to the same standards.  The intent being to ensure code is easily readable by anyone else on the team, helping to reduce code debt and improve team productivity (as it takes less time to read/grok code you haven't seen before).

When you install StyleCop you will see a new option in the Visual Studio tools menu and also when you right click a file in Solution Explorer.

image

image

Running it will then open an output window looking something like the following:

image

Quite nice, but how do you configure the rules?  Simple - right click the project file and you'll see a separate option for the configuring which rules will be applied:

image

Selecting this brings up a dialog where you can then enable/disable the rules - here I've turned off the "no tabs" rule.

image 

One other good thing is that the team has already posted a guide on how to perform these rule checks as part of your MSBuild projects (ie inside a TFS Team Build or CC.NET build).  See http://blogs.msdn.com/sourceanalysis/pages/source-analysis-msbuild-integration.aspx for more details.

 

So what are you waiting for? Go get it from https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis and start making your code more maintainable today :-)

May 23, 2008

MSDN Revamped

Looks like MSDN just got a face lift (according to Soma it's to make it more useful).  It's too early to tell on that front, but what I can say is that Microsoft should have figured out multilingual testing processes by now.  Seriously, this shouldn't happen:

clip_image002

Who wants to bet that the testing team is based in China...

May 13, 2008

Unity vs Castle Windsor

Recently I did a post on breaking dependencies which used the Castle Windsor container as the Inversion of Control container.  I thought I'd also have a look at doing the same thing with the Unity container from Microsoft's Patterns & Practices team, which was version 1.0'ed last month.

The good news?  It's pretty much just some slight syntax changes and that's about it.  The only problem I found was that after installing the Unity help file for VS2008 my Visual Studio help is now broken and now I have to go and repair my Visual Studio installation.  I'd suggest sticking to the CHM file instead.

Here's the only differences between the two applications:

1. References (duh!)

Castle Windsor
using Castle.Windsor;
using Castle.Core.Resource;
using Castle.Windsor.Configuration.Interpreters;

Unity
using System.Configuration;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.Configuration;

2. Instantiating the Container


Castle Windsor
            IWindsorContainer container = new WindsorContainer(new XmlInterpreter());

Unity
            IUnityContainer container = new UnityContainer();

UnityConfigurationSection section = (UnityConfigurationSection)ConfigurationManager.GetSection("unity");
section.Containers.Default.Configure(container);

3. The .config files


Castle Windsor
<?xml version="1.0" encoding="utf-8" ?>
<
configuration>
<
configSections>
<
section name="castle" type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler, Castle.Windsor" />
</
configSections>

<
castle>
<
components>
<
component id="prompt.input" service="SalesPrompter.IInputControl, SalesPrompter"
type="SalesPrompter.PromptInputControl, SalesPrompter" />
<
component id="console.display" service="SalesTax.IMessageDisplay, SalesTax"
type="SalesTax.ConsoleMessageDisplay, SalesTax" />
<
component id="input.parser" service="SalesTax.IInputParser, SalesTax"
type="SalesTax.InputParser, SalesTax" />
<
component id="salelinefactory" service="SalesTax.ISaleLineFactory, SalesTax"
type="SalesTax.SaleLineFactory, SalesTax" />
</
components>
</
castle>

</
configuration>

Unity
<?xml version="1.0" encoding="utf-8" ?>
<
configuration>
<
configSections>
<
section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration" />
</
configSections>

<
unity>
<
typeAliases></typeAliases>
<
containers>
<
container>
<
types>
<
type type="SalesPrompter.IInputControl, SalesPrompter"
mapTo="SalesPrompter.PromptInputControl, SalesPrompter"/>
<
type type="SalesTax.IMessageDisplay, SalesTax"
mapTo="SalesTax.ConsoleMessageDisplay, SalesTax"/>
<
type type="SalesTax.IInputParser, SalesTax"
mapTo="SalesTax.InputParser, SalesTax"/>
<
type type="SalesTax.ISaleLineFactory, SalesTax"
mapTo="SalesTax.SaleLineFactory, SalesTax"/>
</
types>
</
container>
</
containers>
</
unity>

</
configuration>

 


Note that there was nothing different in the resolving of references.  Both containers have a Resolve<T>() method that does exactly the same thing.


So, how easy is that? :-)  The P&P team have done a pretty good job with this container.  Admittedly I haven't really looked into some of the more advanced options, but it looks quite good and being from the P&P team it's likely to get more traction that the Castle Windsor container in the corporate development world.

Mar 12, 2008

Firefox 3 Beta 4 - A Mini Review

With IE8 Beta 1 finally getting out the door at Mix08 last week I figured I’d check on the competition and spark up FF3 Beta 4.

Here’s a quick summary of what’s new (from a visible perspective)

1. Speed – it’s sooo much quicker to use.  You’ll notice the difference in ajax heavy apps (google reader, etc) as well as in general rendering.

2. Downloads now get virus checked.  Nice.
clip_image002

3. New address bar – very funky.  Not only address search, but titles as well
clip_image004
clip_image006

4. Most FF2 add-ons don’t work.  You’ll need to find updates.  Here’s Firebug 1.1 beta (FireFtp has a beta you can get as well)
clip_image008
You can see the parallel loading has increased to 6-7 items instead of 2, which explains some of the speed boost.

5. Bookmarking is a little different – note the tagging.  Very cool.
clip_image010

6. IE8 Activities work and are available from http://www.kaply.com/weblog/2008/03/07/microsoft-activities-for-firefox-new-version/
Adding activities from the IE8 activity gallery works, but Mitch’s Wikipedia activity doesn’t due to the use of IE8 specific javascript.  Even so...
clip_image012
results in
clip_image014

7. IE8 style Webslices can be got from http://www.glazman.org/weblog/dotclear/index.php?post/2008/03/10/WebSlices-in-Firefox-who-wants-to-try- but they’re still halfbaked (it’s obviously a quick hack and more work is needed)

clip_image016
When you try to mouse over the icon so you can add it, it disappears because you've left the webslice (doh!).  I’m sure there’ll be an update soon enough, but in the meantime you can right-click to add a “webchunk” which then looks like this:

clip_image018

Oh- before you make any comments on the content this is all legit ebay search results and all stemmed from the selection on the SMH web site.

8. Oh - it does occasionally crash L  But at  least the crash reporting is OK, and when you restart you can try and restore your sessions which is OK (unless the offending page always causes the crash).
clip_image020

Overall– a really good experience, but being beta I’d expect that there are still issues with it I haven’t seen in the short time I’ve used it.  Is it better than IE8?  Some people think so - http://blogs.computerworld.com/battle_of_the_betas_firefox_3_beats_ie8