Monthly Archives: September 2005

Microsoft Architecture Podcast

Microsoft seems to be focusing more on architecture these days.  There is a new podcast available on the Microsoft Architecture site.  The site has some great content and have also created a blog too.

Visual Studio 2005 RC1

I downloaded the recent Release Candidate 1 (RC1) from the Microsoft MSDN Universal Subscriber site over the weekend to get it installed on my Windows 2003 Server VPC.  I also decided to down SQL Server 2005 Developer Edition as well.

When I setup a VPC I make sure the VPC files are located on a totally separate disk than the operating system to maximize performance.  I installed Windows 2003 with Service Pack 1.  This comes as a nice ISO image from the MSDN site as well.

The installation of Windows 2003 in the VPC is pretty straight forward.  Once installed it is best to run an update to make sure all of the most recent patches are installed.  This is not mandatory but I think it’s a good idea.  It’s important to install IIS on the server as well since SQL Server will require it.

I decided to install Visual Studio 2005 with the default options checked, SQL Express is installed by default, you may or may not want this if you plan to install SQL Server.  After choosing the default setup I had second thoughts on whether I should have installed SQL Express or not.  The Visual Studio 2005 installation went on without a hitch, unlike some of the other CTP’s that have been released.

Next was the SQL Server 2005 install which was pretty straight forward.  I did a custom install and left things out like Analysis Services.  This install went well until it got to the point when the Workstation tools get installed.  The install told me it was already installed and obviously not needed.  I assumed this software was for Enterprise Manager.  After the install completed I tried to run Enterprise Manager and it wasn’t there.

It appears the Workstation Tools the install is referring to was for some SQL Express use.  I re-ran the SQL Server install and asked just for the Workstation Tools, but this time when it asked if I wanted to overwrite the existing ones I said yes.  The install continued but suddenly prompted me for Disk 2.  What??  There is a Disk 2 for tools?  Sure enough, checking the MSDN download site there is a tools download.  I downloaded the ISO, mounted it and let the install continue.  The process finished and was complete.

After spending some time with RC1 I can report that it is pretty good.  The features work well and the overall performance is much better than the other CTP’s or even Beta 2.  I am a bit disappointed that there is no go-live license with this release candidate.  Oh well, we only have another 6 weeks before we get the release.

Atlas Project Site Opened

Microsoft has opened up a new web site for the Atlas Project.  In case you haven’t heard the Atlas Project is Microsoft’s answer to AJAX technology.

Pretty interesting technology and worth a look.

New C# 3.0 Features Announced

In case you are like me and NOT at the PDC, Microsoft has obviously been making some big announcements.  One announcement was around the new features planned for C# 3.0

The LINQ Project was also announced at the same time.  This gives C# developers some language extensions.  It appears this includes set operations, transform operations and some query technology.  I am sure we will hear a lot more of this over the coming months.

UPDATE : Here is a great source on the LINQ Project.  It seems to be stirring quite a buzz.

On a side note, Microsoft has posted the Visual Studio 2005 RC1 to the MSDN Subscribers area.  This is a big step in getting it in our hands.  The interesting thing I noticed is the Beta 2 Go-live license is not supported with RC1.  In my opinion this makes RC1 just another CTP.

Dynamically Adding User and Web Controls

I often make use of user controls for my web applications.   User controls are nice componentized chunks of HTML and .NET web controls combined and delivered as chunks of reusable code.

Much of the time these controls are dropped on a form much like using a server control.   In my current project I had the pleasure of using user controls dynamically.   Dynamically adding user controls to a form is a bit different than dynamically adding a standard server control.

Dynamically adding a web control:

        public class WebForm1 : System.Web.UI.Page
        {
            // Added by hand; will create instance in OnInit.
            protected System.Web.UI.WebControls.TextBox TextBox1;
            protected System.Web.UI.WebControls.TextBox TextBox2;
 
            override protected void OnInit(EventArgs e)
            {
                // Create dynamic controls here.
                TextBox1 = new TextBox();
                TextBox1.ID = "TextBox1";
                Form1.Controls.Add(TextBox1);
 
                TextBox2 = new TextBox();
                TextBox2.ID = "TextBox2";
                Form1.Controls.Add(TextBox2);
            }        
        }
    }

Dynamically adding a user control:

        private void Page_Init(object sender, System.EventArgs e)
        {
            int index=0;
            foreach (ProgramOptInQuestion poq in poi.Questions)
            {
                TableRow r = new TableRow();
 
                // load the user control. 
                QuestionUI question = (QuestionUI)LoadControl@"~\Common\UserControls\Components\QuestionUI.ascx"); 
 
                // This table cell is run server-side and has a Control Collection associated with it.
                // Add the control to this collection.  
                // Could be done in the Page class but done here to allow for positioning.
                TableCell c = new TableCell();
                c.Controls.Add(question);
                r.Cells.Add(c);
 
                // append a new row to our table
                this.QuestionTable.Rows.Add(r);
            }
        }

The purpose of this code is to iterate through a collection of questions and load each question dynamically.

Notice the difference between the  two pieces of code.  Dynamically adding the user control requires the control to be loaded using the LoadControl method.

If you have never added web controls or user controls dynamically, it’s worth noting that the controls are actually added in the OnInit() and added to the Controls collection of an object.

Note – we use the OnInit() to load each web and user control because the Page object has all it’s controls added each time the page is rendered.  The first example adds the Textbox controls to the Controls collection of the form object.  The user controls are added to a cell that has the RunAt="Server" set and therefore has a Controls collection to work with.  This is subtle, but a detail worth noting.

Information Overload

This is a subject that has been haunting me of late.  I see so many new technologies that look interesting or may be needed in the future.  Is this a struggle I have alone?

There have  been several great posts lately from people in the industry that I view as some of the more prominent figures in our field regarding information overload.

Each of these gentlemen have their own individual views on the current flow of information coming in from Microsoft alone, never mind Sun, IBM and everyone else.

Now that we have Visual Studio.NET 2005 and the .NET Framework 2.0 on the horizon with their plethora of changes, this is a task all in itself to learn what’s new and how to make use of these changes.   Some of the parts of the new framework are areas of expertise that need attention all in themselves – profiles & membership, themes & master pages, ADO.NET 2.0, web parts and others.  Each aspect of the framework takes time.  I have been working with VS 2005 since last summer and I don’t feel I have even scratch the surface.

What about other technologies that was cannot avoid in our field if we plan to stay competitive:

  • SQL Server 2005
  • Windows Vista
  • Avalon
  • Indigo

There is not enough time in the day to work with all of these technologies and be proficient to any level with all of them.  One could spend all of their non-working (meaning non-money making) time, exploring new technology 7 days a week but it would lead to certain burnout.  What about family time and the work-life balance?  Forget it.

I think with more and more new technology being released,  we will need to take a step back and focus on our core competencies or interests and leave the rest to others.  As a consultant we will have to bring in other consultants to share the work load and function as a team and not as an individual.  Our network of consultants with complimentary skills will be more and more important to leverage.

Microsoft Architecture Journal – Issue 5

The latest edition of the Microsoft Architecture Journal #5 is out now.   This is one of the best sources of the current state of systems architecture around and the price is right.

The Microsoft Architecture Resource Center hosts this journal and also has a lot of great information on architecture subjects and links some blog worth reading.