March 2003 - Posts

Smart/Rich clients or HREF Exes

I like the HREF Exe one, it says what I want to do.

The app at work uses a modified version of this to download newer winforms and other components.  I thought this worked pretty well but hadn't written anything myself.  My tools are most console apps meant to be run from the computer they reside on.

But I need to re-write the console deployment tool as a winapp.  We also are being forced to limit the number of users that can terminal services into the build machine.  A problem on qa deploy day.

It was suggested that I write it to run as an HREF exe.  I like the idea and have started down the path to Code Access Security, etc.  As I usually do, I found a bunch of articles and example apps.  Wahoo http://www.sellsbrothers.com/wahoo/ for example is very useful.

I am starting pretty much from scratch so as to learn as much as I can.

I created a simple windows app.  Created a vdir for the bin\debug directory and starting clicking on it from another machine.  The UI opens fine - no security problems.

Next I added a button to create a file - this fails with a security exception as expected.

Then I added a button to delete the file by first checking if it exists. I manually copied the file to the client machine so that it would exist.  The code calls File.Exist.  Surprising to me is that no security exception is thrown but the framework just says the file doesn't exist.

Next I am creating an security policy installer to add permissions, one at a time to see what happens.

The nice thing about writing these kinds of tools is that I get a chance to learn a lot.  I could have just writen something that works - give my app permissions to do anything but I need to learn this stuff and am.

Posted by cloudycity | with no comments

C# string and the @ symbol

I knew that you could use the @ symbol like this:

"c:\\temp\\temp.txt" ==> @"c:\temp\temp.txt" to make paths, etc more readable but I didn't know this:

 

Console.Writeline(@"bozo

   breath and

rubber noses");

will print out exactly as written.  I write a lot of console tools so this will simplify formatting the "usage" or help output.

Anyway, I thought it was cool...

 

 

Posted by cloudycity | 2 comment(s)
Filed under:

Confused by ws-xyz specs ...

I have been trying to get somewhat up to speed on some of the various web service specification that seem to be touted by MS.

I have been partial to spec and standards for most of my career.  I hate to re-invent the wheel and prefer to "steal" code and specs.  I think I do know when standards are being created for reasons other than usefulness, at least in industries I am familiar with - the Hydro business recently.  The main reason to be on IEEE committees seemed to be political - to sell your self, etc.  There were a lot of "standards" being pushed that never saw the light of day because they were never intended to or written by committees of people that really didn't know what they were doing.

I look at the web service specifications, look at the names of the companies and people and thought that these standards would be something to be aware of but ...

I was reading Blogfarb's Goldblog "Writing specs just for the spec of it?" http://radio.weblogs.com/0121172/2003/03/10.html which has a link to an infoworld article http://www.infoworld.com/article/03/03/05/HNmanyspecs_1.html quoting Don Box.  He is critical of the number of specs being written and the reasons.  I see his name on the ws-xyz specs.   I am confused.

I am trying to approach .NET from the point of view that I don't want to just be a coder or programmer.  I have been working and studying aspects other than how to create a good winform or webform.  I am more interested in how to create application that are testable, buildable, maintable and with "standard"s if possible.  Not only am I more interested in a more "systems" view I would like that kind of experience to differentiate me from some of the "kids".

Anyway, I plan to keep on studying these "standards", following weblogs and mail lists and trying to differentiate between what is real and what is not.

Posted by cloudycity | 3 comment(s)

I need some "It worked on my Computer" tee shirts

Or is it "it worked on my pc/machine"?

I am the "build master" for a medium size .net application.  The project get built from VSS from scratch.  This has created problems for some programmers.  Some seem to prefer working with VS.NET disconnected from VSS.  This means that if a new file is added to the project, or a new reference added or ... the changes don't automagically get updated in VSS. Which of course means that they "break the build". 

The excuse always is "it worked my my computer/pc/machine/workstation" 

At our project meetings the management hands out paper awards for achievement based on votes from others on the team.  We need tee shirts or certicates for those who claim that "it worked on my ..."

Anyway, yet another whine or rant, but it is related to my recent postings about the build process :-)

Posted by cloudycity | with no comments
Filed under:

NUnit, NDoc, NAnt, Draco.net

To continue on this topic:

My immediate problem has been to provide a nightlybuild process for an ongoing, fairly large project.  Currently their are >250 assemblies each built with their own .csproj file and ~20 developers/analyst/programmers.  The project also isn't partitioned very well - there are a lot of dependencies.   It is common for a change in one "base" library to effect a dozen other assemblies.  The nightlybuild needs to rebuild the entire application each night.

I have been reading the MS document "Team Development with Visual Studio .NET and Visual Source Safe" http://www.microsoft.com/downloads/details.aspx?familyid=94fdb8c8-5a87-4545-af75-6053f32c7eca&displaylang=en and have downloaded the MS BuiltIt tool ( http://microsoft.com/downloads/details.aspx?FamilyId=B32497B0-77F7-4831-9C55-58BF3962163E&displaylang=en  )- mostly to look at the documentation.

It is impossible to provide the MS "single solution model".  Even creating a solution with subsets of 20 or 30 projects is difficult.  We do use a common project/VSS structure: $\Application\Project1 maps to c:\Application\Project1.  I created an xml file (changing to a database) that lists the projects and where to get them from VSS.  My process first gets all these projects, then builds a dependency graph from the .csproj files.  I also create nmake compatible makefiles from the .csproj files and other app requiremnts.  I then run nmake in build order on all the projects.  The VSS get takes about 25 minutes, and the build takes an additional 20 minutes.  A complete build takes about 45 minutes.  The complete build normally happens only at night so who cares ...

There are a bunch of other tools for "bless", build verification testing and deployment.

Nant comes in during the last step.  I go to a fair amount of work to create a makefile.  I include a standard master.mak from MS example projects but have a lot of special cases.  I still haven't figured out how to add ComponentOne webchart control licensing.  Using lc.exe and embedding the resultant .licenses file doesn't seem to work but that's on my "todo" list.

I want to replace this part with Nant.  I have an xslt file that will convert .csproj files to NAnt .build files but will have to modify it some. Not very familiar with xslt but I can learn.  Using Nant would give me the advantage of relying on others to supply the tools to do the actual project builds.  There is good support and I really hate supporting this part.

The last piece that I use is "stolen" from Draco.net ( http://draconet.sourceforge.net/  ).  I really like this project, but didn't really see it as useful on this project, by itself.  It would be nice to start an application with the build and testing tools in mind but ...

The part I took was a piece that goes to VSS and finds the changes since the last build and produces a web page.  This has been very useful and required very little change. 

 

Posted by cloudycity | 1 comment(s)

NUnit, NDoc, NAnt

I see what I'm doing wrong.  This is about the Nth time I've tried to get this in here.  I keep clicking on my google like to find urls.  When I come back the text I've entered is gone.  I guess that's what the Post button is for.

Anyway, about Nunit ( http://nunit.org/default.htm  ).

I discovered this a while ago and made a committment of sorts to use it as part of my everyday process.  I have always know that, for me, that I need to write tests early ("Test Driven Design" by Kent Beck) but an organized testing process has often gotten lost in the "heat of the battle" - get the code done. I pretty much always kick my self later of course. Modifying existing code and verifying that it still works is a lot of fun :-)

Nunit make is much easier, especially with the last version.  Plus this VS.NET addin http://sourceforge.net/projects/nunitaddin/ makes it fairly painless.  I still don't know how to do some things - testing async code for example but it sure helps.  All new projects have Nunit tests, old code gets tests before I start any refactoring or bug fixing.  After changing a bunch of code it is nice to see the "green bar".

I want to write more about Nunit, Ndoc and Nant but that will have to wait a bit.

Posted by cloudycity | with no comments
More Posts