An exploration of the joys and frustrations when programming with Microsoft .NET. Taken with the perspective of working in a faith-based ministry, striving to release children from poverty in Jesus' name.

Introduction: How to use NetTiers in an SCSF Application

Posted 5.13.07 in Uncategorized

I’ve gotten a bit out of practice with NetTiers and the Smart Client Software Factory (SCSF) in the past year, so I think I am going to walk through the use of both NetTiers and the SCSF to build an application.

First, the basics

We need to gather all the various software bits to have them available for using in our application. There are a lot of prerequisites to gather, so I will list them here, with links to download them, and the order to install them.

The Software

First off, Visual Studio 2005 is required. I’ve build apps using SCSF on VS 2005 Professional and the Team System Software Developers editions. I don’t know if it will work on the Express edition or not.

Now, the download parade begins. You will need, not necessarily in this order, the following:

This list satisfies SCSF. For NetTiers, you need the following:

And last, but not least, to make testing easier (and much more fun):

OK, one more optional piece. I’m sure everyone is already using source control (just like we all back up our systems every night, right?), but I love this one:

and the best client I’ve found for Subversion:

For Enterprise Library, I’ve only used version 2.0 with the SCSF. I don’t know of a reason that version 3.0 won’t work, but I’m going to try it along the way. For CodeSmith, the standard edition is all that is required. The Enterprise edition is good if you are going to be developing a lot of your own templates. With NetTiers, you can either download the latest released version, or grab a nightly build. The templates are stable, and the nightly build generally are either adding new features, or providing tweaks to the templates that won’t affect most users.

Installation (required bits)

Alright, now for the fun times. This part is kind of dreary, but you really only have to go through it once, so find a cool beverage, maybe a little something to read, and prepare to exercise your install skills.

  1. Visual Studio. This will be the longest install of the bunch, but it’s likely that it’s already installed on your system, so that’s one freebie.

  2. Install Enterprise Library. You can probably take the defaults from the installer, but make sure to have the libraries actually built for you at the end of the installation.

  3. Install the Composite UI Application Block. Again, take the defaults. This time, you will have to open the Composite UI solution from the Program Menu after installing, and build the CAB assemblies through Visual Studio.

  4. Install GAX and GAT. I never remember which is first. I think it’s GAX, but the installer will tell you if you go backwards. Just take all the defaults.

  5. Install the SCSF. No surprises here; just take the defaults.

  6. Install CodeSmith. You may be asked about installing a Visual Studio add-in. It’s not necessary, but won’t hurt anything if you do install it.

  7. Extract the NetTiers templates. Doesn’t matter where you put them, just remember where it is. I install things like this in C:\Tools, in a subfolder for each tool. So, my NetTiers templates are found in C:\Tools\NetTiers.

Next time: Installation of the fun bits, and getting the development environment set up.

3 Responses to “Introduction: How to use NetTiers in an SCSF Application”

  1. CuriousCoder Says:

    Have you an example of using NUnitForms to test a SCSF application?

  2. freqken Says:

    I have several places where I did that. I need to get the code pulled out of cold storage and I will put something up.

  3. CuriousCoder Says:

    I hope this formats okay when posted. This is as far as I’ve got but it doesn’t launch the SCSF application correctly.

    public class MyViewUITest : NUnitFormTest
    {
        private Process process = new Process();
    
        [TestInitialize]
        public void MyTestInitialize()
        {
            base.Setup();
            ProcessStartInfo info = new ProcessStartInfo(@"C:\MyApp\bin\Debug\Shell.exe");
            info.UseShellExecute = false;
            info.UserName = "myUsername";
            info.Domain = "myDomain";
            info.Password = GetPassword("myPassword");
            process = Process.Start(info);
        }
    
        [TestMethod]
        public void MyTest()
        {
            MenuItemTester about = new MenuItemTester("_aboutToolStripMenuItem");
            about.Click();
        }
    }
    

Leave a Reply

About

This is a collection of the thoughts and ideas of a software developer and solutions architect with Compassion International. Topics of interest include software architecture, design patterns, software factories, team dynamics and the art of computer programming.

Meet Kenneth Scott

Categories

  • No categories

For "All flesh is like grass and all its glory like the flower of grass. The grass withers, and the flower falls, but the word of the Lord remains forever." And this word is the good news that was preached to you. (1 Peter 1:24-25)

Copyright © 2007 – 2008, Kenneth Scott.