Posts From January, 2005

Nashville Visual Studio .NET Users Group 

Sunday, January 23, 2005 3:30:00 PM Categories: Development mojoPortal Mono
Rate this Content 0 Votes

I'll be giving a presentation about mono on Thursday Feb 10,  2005 at the Nashville Visual Studio .NET User's Group meeting hosted at Tek Systems.

I plan to give an introduction to mono with an emphasis on developing ASP.NET applications in Visual Studio for deployment on mono.  I've learned a lot about mono through my work with mojoPortal and hope my presentation will help other .NET developers get started using mono.

Getting to Know the ins and outs of Virtual PC 2004 

Sunday, January 16, 2005 4:07:12 AM Categories: Development Software Technology
Rate this Content 0 Votes

I spent a good bit of friday evening and all day yesterday working with Virtual PC 2004 and learned quite a bit the hard way.  I had no problems setting up virtual pcs with MS OSes. I setup a virtual xp pro machine and installed the newest beta of Team Studio 2005. I'm looking forward to playing around in the new version of .NET.  I also setup a virtual Windows 2000 server and all went smoothly. Then I got the wild idea, hey I can setup a few virtual linux machines and use them for testing mono, maybe I can make one small enough to fit on a DVD and share it to make it easy for others to test mono.  Thats when the difficulty began.  I really wasn't expecting any problems because last year I had setup a Mandrake 9.2 virtual pc using the version of vpc that was out when MS bought the company from Connectix and I figured the new version probably works even better.  Nevertheless, I killed most of the day trying to get various flavors of linux (fedora core 2 and 3, Suse 9.1) installed and working to no avail.   I was beginning to suspect a conspiracy by MS to prevent anyone using their product to try linux.  By  the evening I decided to try Mandrake 10.1 since I had luck with previous version of Mandrake under the older version of VPC so I started the bit torrent download. Unfortunately this morning it is still a long way to go on the download so I decided to do some more googling to find out if anyone else has solved these problems and luckily I found this vpc.visualwin.com site  which is an unofficial compendium of which OSes work under VPC and how to get them working. Wish I had seen this before I started so I thought I would blog about it and maybe save some pain for others.  According to the site there are various things that must be done to get the versions I was trying yesterday to work so I will have to start all over.  It does say that Mandrake 9.2 works with no issues (as it did when I tried it with the older version of VPC) so I did an install of that this morning and it works so I'm convined there is no conspiracy afoot.  I would really like to get an installation of linux/mono with mojoPortal installed on a small enough virtual disk to store on DVD so I can make copies and share with my friends and anyone else who is interested.

Virtual PC 2004 with SP1 is the cure 

Friday, January 14, 2005 3:46:08 PM Categories: Development Technology
Rate this Content 0 Votes

I downloaded a new version that includes SP1 and now it runs fine on wireless machines.

Virtual PC 2004 breaks my wireless connections 

Friday, January 14, 2005 3:11:39 PM Categories: Development Technology
Rate this Content 0 Votes

I've had this happen on 2 different wireless machines. Install Virtual PC 2004 and it can't find the wireless network , uninstall it and you get the network back.

If anyone knows the solution let me know. I've googled with no luck.

MSDN Event 

Thursday, January 13, 2005 5:10:39 PM Categories: Technology
Rate this Content 0 Votes

Went to my first ever Microsoft event today. Got the t-shirt and the DVD, you can never have too many of those.

Ron Cundiff was the speaker and he covered some cool WinForms stuff like how to do unusal shaped forms and buttons. Pretty easy when you know how but I learned something new since I do mostly web development. Next he covered ASP.NET debugging and tracing which was nothing new to me but there seemed to be at least a few beginners in the crowd that were probably benefiting. Next he covered the big picture on the upcoming Team Studio 2005. I have to admit it looks like some really good tools for running software projects in a Microsoft shop but I have a feeling that using the full suite will be extremely expensive. I hope I'm wrong and the pricing hasn't been released yet but the fact that it integrates with Project and Project Server for the full shebang makes me think this will be expensive because Project Server is expensive not to mention client licenses for Project.

The highlight for me was the automatic generation of unit tests for methods. It stubbs out the unit tests but you still have to enter the expected values which makes sense. I know the purists will cringe at this and say you must write your tests first. I just know that I do rapid development and write a lot of good code without a net because it would take a lot longer for me if I was writing test for every bit of code. I use code generation tools and a lot of copy paste code re-use that allows me to create large chunks of functionality at a time not just units. I certainly see the benefits of having a suite of tests you can run to test whether your code functions as intended but myself, I have not yet been able to integrate test driven development in my work without also introducing a productivity killer. Having a way to automatically stub out the tests after I write the methods may be just what I need to get started in unit testing without killing my productivity and as I gain more understanding of the testing framework perhaps I can ease into test first development.

Whats so cool about having a set of unit tests that you can run is that it gives you more confidence in re-factoring code because you get immediate feedback whether you broke anything. This becomes more and more valuable the larger the project. In my current position I often have to try and re-factor very badly written code without any safety net other than backing up files before starting and doing functional testing before and after my changes. I can succeed at this most of the time because I have a lot of experience and can usually decipher the intent of even very poorly written code if I understand the business logic of the application. Having unit tests introduces a whole new level of confidence in the code but so far no project I have ever had to take over has had unit tests available to make my job easier but as this practice becomes more widespread perhaps that will happen. Making it easier to create unit tests is a step in the right direction.

ASP.NET Validation Difficulties with dynamic controls 

Sunday, January 02, 2005 8:51:14 AM Categories: Development
Rate this Content 0 Votes

The RegularExpressionValidator control works pretty well as long as your browser is Internet Explorer but it doesn't work well with  Firefox and other browsers that MS considers "down level".  The client side validation doesn't work at all in these "down level" browsers because MS chose to use IE specific javascript like Document.All in the client side implementation.  Not to worry in most cases you can and should follow up with server side validation which is also built into the control. You just call Page.Validate() and Page.IsValid to validate and determine server side whether the input was valid.  However if you are adding controls to the page programmatically in the code instead of declaratively (using markup) you run into an additional problem.  Lets say you add a TextBox control and a RegularExressionValidator to validate it. It works fine in IE, the client script validates as expected but in Firefox it doesn't work and server side calling Page.Validate() and Page.IsValid does not work for the dynamically added controls.
I ran into this and thought no problem, I'll implement my own server side validation using the Regex class, but in actual practice this also turns out to be problematic in some cases. Regex.IsMatch(inputstring, patternstring) only cares if there is a match in any part of the string, not whether the whole string matches the pattern. In IE I can use a pattern like \d+ to ensure a non-negative integer. Client side in IE, if you enter something like 10mmmmm it will fail validation as it should but server side Regex.IsMatch("10mmmmm","\d+") will return true because the first part of the string matches. There is no setting on the Regex that I could find to tell it to require the whole string to match. Instead I had to change to a pattern like this ^[1-9][0-9]{0,2}$

Copyright 2003-2010 Joe Audette
Donate Money to support the mojoPortal Project. View Joe Audette's profile on LinkedIn View Joe Audette's profile on The Guild of Accessible Web Designers site