.NET Developer Virtual Conference - Update 9/30/2008

Just wanted to update everyone on a couple of things related to the .Net Virtual Conference.  In my previous post, I explained the idea of the conference and discussed all the great content that is available.  In these hard economic times, getting access to this type of content for $100 is a great opportunity to save some money without compromising the bottom line.  Well, things have gotten even better!  Announcing a change to the .NET Developer Virtual Conference.  Now the .NET Developer Virtual Conference also provides access to the SharePoint, Business Intelligence and the SQL Server virtual conferences.  Read the details here.  Now you pay the same price ($100) and get access to over 120 session.  Pretty awesome.  PLEASE NOTE THE DATE CHANGE FOR ALL CONFERENCES.  THE CONFERENCES WILL NOW OCCUR ON NOV. 5th, 6th and 7th.  Here is the registration link.  Do not miss out on this opportunity to be in the know!

On a personal note I recorded my sessions last week and I think they went pretty well.  My WPF talks are not the flashy, shiny WPF sessions you've seen in the past.  These sessions will help you with the actual guts of doing a useful WPF application.  Leave all that flashy, shiny stuff to those artsy designers and their black turtlenecks.

I was also subjected to an interview that was posted by Chris Shaw.  If your interested in my answers to the tough questions in the interview please click here.  Please do not be scared away by my ugly mug at the top of the article.  If you look around on Chris Shaw's blog you will find some of the interviews with the other presenters.

Method Error 500 and AJAX

I'm using the cascading drop down provided by the AJAX control toolkit.  I started getting a "[method error 500]" in one of my drop downs a few months ago.  At the time I thought it was bad data and after I removed some of the dups all was fine.  Well, the problem came back recently and I determined all the data was accurate.  So, I began debugging through the problem.  After I got some more details from Fiddler and debugging, I was able to find this post that fixed the issue.  Kudos to Simon Harriyott.

My work here is done.

Posted in Labels: , | 0 comments

Using Fiddler To Debug Locally

Fiddler is an invaluable tool for seeing what is actually being sent over the wire in your web application.  Fiddler runs without issue when using it to track chatter that is occurring over the normal HTTP channels.  However, it will not log traffic when running your ASP.NET application in debug mode locally.  There is an easy trick to fix that.  Here is the post that describes the fix.  Enjoy!

Now play that Fiddler boy and give the devil his due...  When are they going to release the Golden Fiddler?  (Sorry for the "Devil went down to Georgia" reference.  I just couldn't help myself)

Posted in Labels: , | 1 comments

.NET Developer Virtual Conference : Oct. 28 - 30

Just wanted to let everyone know that I am lucky enough to be a presenter at this years SSWUG.org .Net Developer Virtual Conference in October.  This is a really cool idea where all the sessions are pre-recorded and on the days of the conference you can login and watch from the comfort of your ergonomically correct cubicle chair.  Maybe you can talk your boss into giving you the days off and you can watch in your PJs from your couch.  Either way you don't have to incur the time or the cost of traveling to an in-person conference.  This is a plus for those of you that are "Dungeon" coders.  You can get all the great content of the conference without leaving the "Dungeon" and being forced to socialize with other people.  That can be uncomfortable...

Seriously, there is some great content from some of the top presenters in the industry on deck for this conference.  I'm just glad I get a free login so I can attend some of the other presenters sessions.  Speaking of cost, you get all three days for just $100.  If you can't sell this to your boss you're never getting any training EVER.

Again there are some great topics and presenters so please use this link to check out the sessions and the presenters for this conference:

.NET Developer Virtual Conference

There are also 3 other Microsoft related virtual conferences scheduled for the fall.  Use this link to find out about all the conferences from SWWUG.org:

www.vconferenceonline.com

David Yack's CRM as a Rapid Development Platform Book

Don't let the letters "CRM" in the book title fool you, this is a book heavy on content regarding the latest .NET Framework technologies.  Microsoft Dynamics CRM version 4.0 is a great CRM tool, but it can be used for much more.  That is the purpose of this book.  To inform the developer community about the benefits CRM 4.0 gives you right out of the box along with the many customization points that allow you to turn the product into literally any line of business application you want.  Not only do you get great content in the book, but when you purchase the book you also get a base framework built on top of CRM 4.0 to get you up and running fast.  This book has tons of great real world examples of how to use Workflow, Silverlight and C#.

Being a friend and co-worker of Dave's, I've been a witness to all the hard work and long hours he put into writing this book and creating the base framework that comes with it.  I've also seen all the hard work and support given from many of Dave's friends, family and co-workers.  One person who is all three of these things to Dave is his wife Julie Yack.  She was editor and publisher on the book.  She spent many hours reading through and editing long chapters that included tons of code and examples.  Another friend and co-worker, Cathy Hardman, also put in long hours helping edit the technical content of the book.  In addition, she helped write many lines of code included in the base framework as well as contributing her talents to the book web site.

Me, I helped edit a couple of the chapters, but most of the process I watched from the sidelines.

Obviously, I recommend the book and since I know "people" I have a discount codes for purchasing the book.  Below is the URL to the book site where you can purchase the book and my discount codes.  The codes are good for $10 off.  The discount codes can only be used 20 times so please hurry.  Enjoy!

Book Site: http://www.thecrmbook.com

Discount Code (Printed Version): benblog

Discount Code (E-Book Version): benblogebook

You can also keep up with David Yack at his two bogs.  Developer Related stuff is at http://blog.davidyack.com/ and his CRM stuff is at http://crm.davidyack.com/.

Posted in Labels: , , , | 1 comments

Jeff Atwood on Project Management

I had to share Jeff's recent post related to project management.  To me managing a software project is one of the hardest jobs out there.  Especially when it comes to evaluating your team members performances.  Some team members write tons of lines of code, while the architects that really designed the system barely write any.  So, who is more valuable to the team?  It's even harder when you are using a collaboration methodology like Extreme Programming, Scrum or Agile that really promote sharing and working together.  Jeff's post talks to this and other things so check it out.  If you don't subscribe to Jeff's blog I recommend it.  I don't always agree with Jeff's thinking, but at least he puts himself out there.  By doing that he get's me thinking...

Posted in Labels: | 0 comments

Are ADO.NET Datasets dead?

If you are plugged in at all to the Microsoft world you have been seeing more and more LINQ and ADO.NET Entity Framework buzz.  You can't go to a conference or attend a User Group meeting without discussing one of these new data access technologies.  I'm not saying that's a bad thing... Unless you are a Dataset, Datatable or Dataview.

I wrote a post back in May trying to shed some light on when to use which technology.  You might want to read that post and the comments before reading on.  In that post I stated that if you are creating new applications or just adding on features to your current app I would use LINQ or EF instead of ADO Datasets.  There are many reasons.  Here are the most compelling reasons to use LINQ and EF.

  • Objects - The nicest thing about LINQ and EF is they provide some of the foundations for Object Oriented programming.  They literally force you to think and work in terms of objects and collections of objects instead of rows and tables of rows.  By setting up this foundation, these technology allow for the application to grow and use some of the more complex OO concepts without doing tons of work to fill and save objects from Datasets.  So, start simple and as the requirements on your application change you can use some more complex OO topics to solve those problems.
  • Memory - There are two schools of though on this topic.  Some people like to pull all the data back into memory and then work with it there.  Others don't like to fill memory with data that might not ever be used.  LINQ and EF allow for both.  When you build your LINQ and EF models you can use stored procedures same as you used to with Datasets and bring back the whole table if you desire.  Or you can use the LINQ syntax to do filtering and sorting, which uses the power of the relational database engine to get only the row(s) you need.  To me it is compelling to have the flexibility that LINQ and EF give me.
  • Performance - We can go round and round about the performance implications here.  People say stored procedures are faster because they are pre-compiled, but with the new technologies these LINQ queries are cached and optimized and the difference is often minimal.  To me this is the 80\20 rule.  80 percent of my queries will run the same or faster in LINQ and EF than they do in a SP.  The other 20 percent of my queries will run faster in stored procedures.  So, use both.  LINQ and EF allow for using SP or the LINQ syntax.  Plus, with LINQ you can bring back only the columns you need which can improve performance as well.  I'm not saying quit using stored procedures, but instead of just blindly using them because that's what you've always done, step back and analyze your requirements to see if it's worth it. 
  • Interop with Other Object Collections - The other benefit of working with LINQ and EF is that you can join your data objects with other object collections.  If you've seen my talk on LINQ and the demo related to joining my SQL data with file data retrieved using the System.IO objects.  It is so easy and would require lots of work with Datasets.

There are many more reasons out there, but these are a few of the ones that are most important to me.  Any one else want to add?

The Most Popular Computer Languages

This is a shout out to all my VB readers out there.  First check out this article on the most popular languages.  At first I was surprised to find that C# is number 8 and VB is number 4.  However, it looks like they are grouping all versions of VB into the same category.  This makes more sense since VB has been around for way longer than C#. 

I love sitting around with some of the old timers talking about when they used to use punch cards to program.  To me VB is that legacy.  One day I'll be sitting around with some young whipper snapper right out of college saying:

"I remember back when I used VB 3 and I had to choose the option of creating a 16 bit or 32 bit application when creating a new project."

Today, VB.NET is a powerful Object Oriented language and is used in some of the most advanced software packages out there.  I just remember the days when it wasn't....

LONG LIVE Visual Basic!

Posted in | 1 comments

Useful Design Patterns

I'd like to thank the Northern Colorado .NET User Group for giving me the opportunity to speak to their group last night.  We had a good discussion about Design Patterns.  The patterns we discussed were Singleton, Command, State, Strategy, Provider, Plug-In and Module.  Although my demos are pretty simple and cut some corners, I think you can get a good idea of how to use these in your applications.  The take away from the discussion was that these patterns are great and provide some great guidelines, but they may need to be modified slightly to fit the problem you are trying to solve.  The 2 keys are to always code to an interface or base class and try to use aggregation in place of long complicate inheritance trees.  Again it was a great talk and I hope everyone in the group learned something.  I know I did.

Below is a zip that contains the slides, which explain these patterns, and all the demos.  There is also a DB script for SQL Server to create my sample DB.  The only change you need to make is the connection string for the DB.  Enjoy!

UsefulDesignPatterns.zip

Posted in | 0 comments

Returning XML from an ASPX page

Today I needed to make an ASPX page return a simple XML document with some basic server information.  The example below is over simplified but I think you can get the point.  This is pretty easy as it turns out.  Here are the steps:

  1. Create a new ASPX page in your solution just like you would any other page.
  2. Next remove everything from the markup except the @Page tag.  It should look like this an have nothing more:

 

  1. Here is a code snippet of the page load event that returns a simple XML element:

That's it.  I also found a nice post here that shows how to read XML from file and stream it back through the browser.  Pretty simple and useful.

Posted in | 3 comments

South Colorado .NET User Group Meeting is Postponed

FYI the South Colorado .NET User group meeting has been postponed due to some unforeseen scheduling conflicts.  The meeting will be next Tuesday July 8th.  Regional Director David Yack will be presenting on the new Dynamic Data functionality from the ASP.NET team.  It's a great topic from an exceptional speaker so don't miss it.  For more information please visit the South Colorado .NET Users Group web site.

Posted in | 2 comments

I never knew Software Architecture was a Democracy

I always thought it was a dictatorship run by Microsoft.  I came across this article about "A vote of no confidence" in the ADO.Net Entity Framework this morning.  I recommend spending some time reading the article and also following all the links to other related articles.  The issues are great concepts to understand. 

I'm not going to get into the specifics or defend one side or the other.  However, I want to express my position that there are 100 ways to skin a cat, or in this case architect a software application.  So, if you don't like the EF V1 don't use it.  If the issues being discussed are important to you and effect your application then by all means use whatever ORM or data access technology you like.

I joked about software architecture being a dictatorship, but the bottom line is will the end user care if you used EF, NHibernate or straight ADO.Net Datasets?  Probably not as long as the system works.  So in the end it is a dictatorship.  You (or your team) and only you decide what architecture to use.  However, keep in mind you are also the one that has to make it work and scale.

Signs that I'm doing ok as a (Geek) parent

My friend and co-worker Julie Yack posted about this subject on her blog here.  Her signs are probably more normal.  It made me think that my signs are geared towards the Geek (mainly Star Wars) culture.  Here are some signs that I'm doing OK as a (Geek) parent.

  1. My 5 and 3 year old children can hum both the theme song for Star Wars as well as the theme song for the Empire.
  2. When I say to my 3 yr old son "I am your Father" he responds with "No!" ala Luke in Empire Strikes Back.
  3. My 5 yr old daughter's favorite shirt is her green Yoda shirt.
  4. The kids favorite CD to listen to in the car is the soundtrack to Phantom Menace
  5. My son's room is decorated in Transformers decals.
  6. My kids both need a PC so they can go to their ".coms"
  7. And finally this says it all:
  • IAmYourFather
  • SpeederBike
  • Empire

Posted in Labels: | 0 comments

Too many moving parts!

I love design patterns.  Especially the extensibility patterns like provider and plug in.  Microsoft uses these patterns all over the place in the .Net Framework.  In fact, they are in the config files for every application we write.  That being said I think things might be getting a bit too extensible.  It seems these days I'm spending more time tweaking config files than actually coding.

For example, I've converted a handful of ASP.NET applications to the 3.5 Framework lately.  The change inside of Visual Studio 2008 on my development machine is pretty simple.  Visual Studio takes care of updating the web.config file for me.  However, I don't deploy my web.config files from my dev machine to the test and production servers because the config files contain environment specific settings.  So, I have to manually update the web.config files on these servers.  This is a major pain and takes a lot of trial and error to get it right.  Time I'd rather spend pulling out my finger nails.

Another example is what it takes to get a WCF service working.  Matt Brown did a presentation at the South Colorado .NET User Group on WCF earlier this month.  He did some great demos, but about half his time was spent tweaking the config files of his applications.  I think Matt has the most experience with WCF of any one I know.  Even he had to look a few things up and ran into some config issues.  This is not a knock on him by any means.  It's just another example of how reliant we are on config files these days.

I'm not saying I'm going to quit using these patterns.  In most cases I have no choice because it's just part of the Framework.  I will, however, take extra time in the design phase of my projects to determine where extensibility fits and where a re-compile and deploy might be a better simpler option. 

Posted in Labels: , | 2 comments

Data Access Technologies - Should I use ADO, LINQ, nHibernate or the Entity Framework?

I came across this blog post today that explains the differences between these data access technologies.  However, it does not give a definitive answer on when to use which technology.  That's because it depends on so many factors.  My advice is to keep it simple. 

Let me expand on the different technologies and provide some guidelines on when to use them:

Classic ADO.Net - In my opinion ADO.Net is a dying breed.  As a developer you need to know it for maintenance purposes, but any new features or products should be designed using LINQ or EF\nHibernate.  Some people might not agree with me here, but again this is my opinion.  The only caveat is to make sure the target environment supports the 3.5 Framework.  If the systems people will not let you install 3.5 on the server or end user's machine then LINQ and EF will not work. 

LINQ (LINQ to SQL) - As the blog post on this states, LINQ currently only supports SQL Server.  There are tons of open source projects that do LINQ to other things, but the only MS supported database backend is SQL Server.  For many of us, that is just fine.  If you know you need to support other DB platforms you can move on to EF\nHibernate now.  If you're pretty certain the only DB backend is going to be SQL Server then the decision between LINQ to SQL or EF\NHibernate comes down to architecture.  EF\nHibernate are full blown ORM tools, meaning they include many additional features (Inheritance, complex types, multiple data sources, etc) over and beyond what LINQ to SQL provides.  So, if you are using SQL Server and the application design is not overly advanced or complex.  I'd use LINQ to SQL.

EF\nHibernate - I lumped these two tools together because they are both ORM tools.  They provide support for many advanced and complex concepts in software design.  Using these advanced features is great if you are building a large enterprise, public facing or consumer use application.  However, for many applications these tools can be overkill and end up taking too much time to design.  That being said there is one thing that often gets overlooked, the fact that you can use these tools to do one to one mapping similar to the way LINQ to SQL does.  So, if you need to support mulitple DB backends, but you don't want to use the advanced features you can do so.

In summary, if you are building a simple application that is going to use SQL Server as the DB backend, use LINQ to SQL.  If you are building a simple application that needs to support a DB backend other than SQL Server, use EF or nHibernate and do one to one mapping between your entities and your DB tables.  If you are building a large application that requires some complex architecture, use EF or nHibernate.  Don't use ADO.Net for any new projects unless the target environment does not support the .Net 3.5 Framework.  However, I don't think it is necessary to go back and rip out all your ADO.Net code and replace it with something else.  Just be patient and use the new stuff with new projects.

Visual Studio 2008 SP1 Beta 1 Released

I know... I know... Many of you haven't installed the RTM version of VS 2008 yet.  These things are really starting to come out fast.  I guess Microsoft is finally realizing that most people don't install their products until after SP1 is released. 

This is still a beta, but it looks like it has some previews of some cool stuff.  It also looks like the install can mess up some of the other Beta\Alpha\RCs you have installed on top of VS 2008 currently.  So, check out these posts from the Scotts and actually read the release notes on this one before you install.

Scott Guthrie's Post

Scott Hanselman's Post

Posted in | 1 comments

Cloud Computing. Your Thoughts?

I just ran across this article out on Yahoo related to cloud computing and IBM and Google's plans for it.

http://news.yahoo.com/s/cmp/20080502/tc_cmp/207404265

Obviously I'm a huge Microsoft supporter.  I use Yahoo don't I.  If you don't use Yahoo, try it for awhile.  I recently decided to switch a couple weeks ago and I actually like it better than Google now.

Anyway, the article mentions they are planning to sell the use of Google Apps and Lotus Notes on this "cloud" network.  I'm just curious if anyone is using Google Apps or Lotus Notes currently?  If not would you switch from Office and Outlook if these apps where offered at a lower price through the cloud network?

Please submit you answers via comments.  I'd like to know what people think.

Posted in | 5 comments

LINQ Demo from Heroes Community Launch

Sorry for the lack of post lately.  My family just finished moving into a new house and my life has been a whirlwind.  Hopefully, we are on the downside and I can start focusing on Technology related stuff again.  Honestly, hanging curtain rods is not my idea of a great weekend...

Anyway, I wanted to drop the demo code, DB script and slides out here so people can take a look.  I had a great time doing the presentation with Eric Johnson.  Even though Eric is a DBA he is still a good guy.  Who knew that some DBAs actually have a soul?  Seriously though, I've been hanging out with the Springs SQL Server User Group for awhile now and they are a great resource when I come across SQL related issues.  Check them out if you haven't already.

Here is the Zip of all the materials from my session:

LINQHeroesLaunch.Zip

Posted in Labels: , | 0 comments

TFS Error - Command "exited with code 1" during build

We recently made some modification to our Team Foundation build server.  Ever since then my automated builds started getting this random error.

error MSB3073: The command ""C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\..\tf.exe" workfold /map /workspace:"CTCTFSBUILD1_23" /server:http://servername:8080/ "$/myproject/Current2008/LumenWorks.Framework.IO" "c:\builddir\myproject\IB - Workflow\BuildType\..\Sources\myproject\Current2008\LumenWorks.Framework.IO"" exited with code 1.

It was a weird error because usually if I just started the build again it would complete successfully the next time.  It finally got annoying enough that I did some research and solved the problem.  It was a timeout issue.  So, if there was a heavy load on the build server my build would fail.  Here is the command that was causing the issue.

<Exec WorkingDirectory="$(SolutionRoot)" Command="&quot;$(TfCommand)&quot; workfold /map /workspace:&quot;$(WorkSpaceName)&quot; /server:$(TeamFoundationServerUrl) &quot;%(Map.Identity)&quot; &quot;%(Map.LocalPath)&quot;" />

Turns out there is "Timeout" property you can set.  I think the default is 30 seconds, but I upped it to 2 minutes just to make sure I didn't timeout due to server load.  Here is the command after I fixed it.

<Exec Timeout="120000" WorkingDirectory="$(SolutionRoot)" Command="&quot;$(TfCommand)&quot; workfold /map /workspace:&quot;$(WorkSpaceName)&quot; /server:$(TeamFoundationServerUrl) &quot;%(Map.Identity)&quot; &quot;%(Map.LocalPath)&quot;" />

I'm not sure how many people are running into this issue, but it was hard to track down so I posted it here and hopefully it will save some other people some time.

Posted in | 8 comments

CS Techcasts - SQL Server and LINQ Webcast\Podcast

Last Thursday at PASS Camp in Denver I participated in a live webcast\podcast related to SQL Server topics.  Why was a developer involved?  Well I don't want to spoil the surprise so you'll just have to watch.  Wether your a SQL Server expert or just know enough to be dangerous this is a great informational cast.  Check it out!

http://www.cstechcast.com/home.aspx?Episode=15