Showing posts with label Visual Studio 2008. Show all posts
Showing posts with label Visual Studio 2008. Show all posts

Sunday, 17 May 2009

Microsoft 70-568 exam study guide

Several years ago (maybe 5 now) when I was studying for my MCSD.NET, I stumbled upon a site for MS 70-316, which contains lots of links to help study for the Microsoft 70-316 exam. Back then you had a lot of excellent books for these exams, like Amit Kalani’s study guides, which I thought were the best around at the time.

Roll on several years later I find myself studying for Microsoft 70-568. Currently there are no specific books for this exam. I’m not a fan of doing courses- I prefer reading and experimenting. So this post is my own lists of links and recommended books that a test candidate may find useful.

It turns out that the upgrade exams are a combination of 3 separate MCTS/MCPD exams (Scroll down to Gerry's comment on the prep guides).

Background Reading

Before starting your study for the upgrade exam, I recommend you do some background reading on what is new in .NET 3.5 for ADO.NET, Windows Forms and ASP.NET. Here are some links to get you started:

Skills measured

This roughly ties up with the skills measured page (as of 17th May 2009) on the MS site (the tabs don’t seem to work in the version of Firefox I use, so it is probably best to use IE to visit this page). The majority of the links point to MSDN, with a few linking to some excellent articles that I found. Of course this information is not 100% complete and subject to my own interpretation of the requirements. You should supplement the missing sections with your own Google search/book reading.

The official books

You might want to get the official MS Press books to help you study for this exam. I didn’t, as I choose to read non MS books instead- for that reason I don’t have an opinion of them. For completeness, these are what I believe to be the official MS Press books for the components that make up the exam:

Unfortunately I can’t find any sample chapters for these books- from the reviews it looks like they may be useful for exam, particularly for candidates with little experience.

The books I used/think are useful

I read a lot of tech books in order to try and stay up-to-date with technology, so I didn’t read all of these books just to pass the exam. Also if like me you have access to O’Reilly Safari, then you can read some of these books on there.

ASP.NET books

  • ASP.NET AJAX in action (this is a .NET 2.0 book but still mostly relevant). A very good book, but unfortunately out of date. I still found it very useful both for the exam and using ASP.NET AJAX. You also might want to consider Professional ASP.NET 3.5 AJAX, as this targets ASP.NET 3.5- I didn’t buy it, but if I was looking for a book now I would probably favour this one over the “in action” range, simple because it is out of date.
  • Professional ASP.NET 3.5. This is a nice easy to read book on ASP.NET 3.5. It would probably be most useful for people who haven’t done much ASP.NET, but have some .NET experience.
  • Essential ASP.NET 2.0. Brilliant chapter on Health Monitoring and Web events- the chapter is called Diagnostics. This book looks like it aimed at more experienced ASP.NET developers. I only read the chapter on diagnostics, but the rest of it looks interesting.
  • Programming Microsoft ASP.NET 3.5. Good coverage of authorization and authentication.
  • Programming ASP.NET 3.5, 4th edition. Another book with good coverage of authentication and impersonation.

LINQ

Windows Forms

I didn’t use a Windows forms book to study for the exam, but I can recommend this one:

ADO.NET

I didn’t buy any specific books on ADO.NET. However I know this framework exceptionally well, as it use it on virtually every project I work on. A book I found useful when upgrading to .NET 2.0 was:

A book that looks like it could be very good is “Professional ADO.NET 3.5”, though I’ve not read it myself.

General .NET

  • CLR via C#. This is the one book I recommend to any .NET programmer. For the exam it has an excellent chapter on performing asynchronous operations.

Of course you don’t have to use books at all (or you might not have the budget to buy books), in that case the next section is the most useful.

Extra stuff

You don’t need to this stuff for the exam, but I stumbled across it whilst revising.

Completely off topic, but I found it interesting- distributed caching:

Other interesting stuff:

Finally there is lots of useful programming information on Stackoverflow.

Wednesday, 8 April 2009

Break execution on all exceptions

A colleague of mine informed me that she had been working on a hard to track down bug in an application written by another developer. After some investigation she discovered the bug was caused by invalid logic created by an exception that the original developer had decided to swallow.

This scenario is quite common and is documented as a common source of bugs in the excellent book Debugging Microsoft .NET 2.0 Applications by John Robbins. It would probably be better if the debugger breaks on all exceptions by default with Just My Code, that way those hidden bugs would become more apparent during development.

In order to get the debugger to break on all CLR exceptions all you need to do is the following:

  • From the Debug Menu choose Exceptions or CTRL-ALT-E (screenshot from VS.NET 2008):

image

Select Thrown for all CLR exceptions or expand the tree view to only break on specific exceptions. You can then debug your app and hopefully (if it is well written), the debugger shouldn’t normally hit anything that isn’t a breakpoint!

This Visual Studio debugger feature is useful for a number of scenarios, notably:

  1. Ensuring that the application is not catching overly general exceptions.
  2. Locating difficult to detect bugs (these can also be caused by 1).
  3. Optimizing performance.

Of these 3 scenarios optimizing performance is worth discussing. When I first learnt about this feature, I tried it out on a large application that I was assigned the task of maintaining (disclaimer- I wasn’t in the original programming team :-).

The application was a .NET 1.1 application (I was in the process of upgrading to 2.0- as I always strive to upgrade to the latest available framework/toolset where possible/feasible) that conceptually did something along the lines of:

string hopefullyANumber;

// Assign the string from somewhere...

 

int result = 0;

try

{

    result = int.Parse(hopefullyANumber);

}

catch (Exception)

{

    // Swallow   

}

return result;

This code would not of caused any real performance issues, were it not for the fact that it was being called over and over thousands of times!

Admittedly the original developers didn’t have access to Int32.TryParse (but they could of used other techniques such as regular expressions), however after modifying the code so that it used TryParse I managed to reduce the CPU usage of the application by over 20% (I profiled it before and after with dotTRACE)!

It is good practise to see if the TryParse or Tester-Doer pattern can be of benefit to the performance of your application.

In summary having the debugger break on all exceptions in applications is a useful technique to catch bugs early in development, to check for over generalized exception handling or to enhance performance.

Saturday, 14 March 2009

Visual Studio 2008 ASP.NET designer bug

Update: This has now been fixed. Please see my new post.

The ASP.NET designer in Visual Studio 2008 has a bug where the aspx code might not get updated when making changes in the design view- this only happens under certain conditions. Currently (14th March 2009), there is no fix for this known issue. When a fix is made available it will be posted to the Visual Web Developer Team Blog.

In the meantime as a workaround, I am performing any designer required work on a new page in the project, and copying the generated aspx code manually.