Monthly Archives: February 2006

Starting to use AJAX

The current project I am working on is an ASP.NET (C# 2.0) application that is a specialized eCommerce system. 

Our approach is to look at our system and determine where AJAX belongs and where it doesn’t.  AJAX is not a new technology but is a newly branded old-technology.  Any time you find a “craze” such as this it’s easy to think it’s an end-all solution to all problems.  This is not the case.  Rick Strahl has some great insight into AJAX in a post from August 2005.  All of his views are right on if you step back and think about AJAX as a technology and ignore all the “me too” people out there.

I believe AJAX can be used successfully in well-planned-out areas of our application used by your customers that potentially have the biggest impact.  The biggest impact in my mind is making a better user experience, not for marketing to use the term “AJAX” to help with a sale and make it sound like we are trendy.

We are implementing AJAX in simple items at first to replace the usual postback in changing a selection in a drop down list to remove the usual behavior of a postback to make the interface much smoother.  An example of this is choosing a country in a drop down and filling the states/province associated drop down behind the scenes.  This is a simple and subtle example but it really makes a difference.

I am planning on using AJAX in our shopping cart application when an item quantity is changed to update totals and such.  This can also apply when removing an item.  These types of nuances to make the user interface smooth with no postbacks is the perfect spot. 

Other areas we are considering using AJAX is to pull down panels to edit information.  The information doesn’t need to show until you want to edit it, so why show it.  I will report back later and show some examples of how we are using it in the future.

Technorati Tags : ,

What will be new in Rails 1.1

I found this great overview from Scott Raymond about what is coming in the new Rails 1.1 release.

I am new to Rails and Ruby and these additions look great.  It’s nice to see these guys putting out updates on a regular basis. 

Technorati Tags : ,

Application_Start not firing and the Global.asax

I am working on a project in which we converted an existing Visual Studio 2003 C# web application to Visual Studio 2005. I can and probably post a series of entries on all of the issues we faced converting this project but that is for another time.

The converted application has been running fine on our development systems pretty well since the conversion occurred. We recently put together some build scripts so we could get our build machine into action. Our build system integrates to our Sourcegear Vault repository, gets the latest code builds from the command line and deploys to a staging server.

We got the kinks worked out of our build and deploy process and decided to start testing the application on our staging server. The application fired up and we were able to login without any problems but when going to a page that had controls from Peterblum.com the page would not render and complained about the location of the license files. If any of you have not used the Peter Blum controls they are great controls and Peter offers great support. The only real drawback to them is getting the right files in the right directory and setting a license property on the controls to get his licensing scheme to work. It is a pretty straight-forward task if you do it all the time but we install and forget about it.

I went back through the Peter Blum documentation (very good by the way) and tried to see if something was missing in our deployment scripts that would put the license files in the wrong location. This checked out Ok. After a careful debugging session we determined what was happening.

The Problem

In order to properly setup Peter Blum controls you need to set a license key propery on the controls we are using. This can be done in the Application_Start of the global.asax OR in a place like the Page_load of every page using the controls. The obvious place to set this key is in the Application_Start if you are using these controls in more than one form. This is how we have our configuration.

In this configuration our application works fine on our Windows XP development systems but when deployed to a Windows 2003 server running IIS 6 the Application_Start fails to fire. What? You may ask. Yes, it’s true the event we need to fire is not firing.

Since we don’t have any real way to debug such a problem on the staging system I changed the place the license key was being set, the Page_Load event. Upon doing this the form loaded fine and the Peter Blum controls worked as before. How can this be happening is the question I had.

The Solution

It turns out that the problems starts in our .NET 1.1 version of the application and how 1.1 handled the global.asax. This file has a code-behind page named global.asax.cs and all the code you would use for global events such as the Application_Start would be setup in there. This is how we setup ours.

As I mentioned, we used the conversion tool in Visual Studio 2005 to convert our web application to .NET 2.0 this way. The conversion ran fine but put the global.asax.cs file in the new App_code directory. This is a bad thing, for some reason the conversion thought it needed to be in there and on development it worked fine so we left it in there. All things pointed to this as the problem. We took the code in the global.asax.cs file and put it in the global.asax removing the gloabal.asax.cs file from our project and re-ran the build scripts, tested and all was good. The Application_Start fired once again.

As of ASP.NET 2.0 the global.asax is only one file with no code-behind.

I don’t know why the project ever worked as it was but this fixed the problem. Apparently there is a bug in the VS 2005 web application conversion tool that Microsoft should take a look at.

Technorati Tags: , , ,

Axosoft Giving away $500 Version of Software for $5!

Axosoft is doing a social marketing experiment where they’re selling a $500 copy of their OnTime Small Team bug tracker and project management tool for just $5 and donating the proceeds to the American Red Cross. The experiment expires Friday.

read more | digg story

Using ActiveState Komodo IDE

Komodo.Jpg
In my continuing effort to find a decent Ruby IDE under Windows or Mac OSX I decided to try the Ruby IDE from ActiveState known as Komodo. This is an IDE geared toward dynamic languages such as Perl, PHP and Python. Only until recently has it supported Ruby.

The install was a standard install but when first starting Komodo for the first time it asked me what language I was using, I chose Ruby. It appeared to be searching my Ruby install directory for libraries. After about 5 minutes it was done and the IDE was ready for a test. I created a blank Ruby file and started typing which to my surprise and amazement when typing a Ruby language construct like “Time” and following it with a “.” it gave me a list of methods and properties of Time.

This is the basic type of feature I am looking for. I would expect all relevant IDE’s to be able to give me this basic bit of information. It would be nice to be able to put the Rails libraries into the IDE’s dictionary as well. Maybe I am asking too much. Is this possible in Komodo? I have a support call into Komodo to find out.  I will post an update here.
Komodo does support Rails debugging but have not tried this feature yet. I plan to give Komodo a solid test very soon in conjuction with my testing of RadRails and future tests on the TextMate, which many Rails developers use. I want to see what the big fuss is all about.

All-in-all Komodo looks to be the most mature Ruby IDE I have tested so far.  I am looking forward to finding out more.

Technorati Tags: , , , ,

Rails rant on Joel on Software Forums

I am a frequent reader of Joel on Software. I am also very intent on learning Ruby and Ruby on Rails for as a way to write new software. There is an interesting post, I mean rant, over on the JOS site about one developers experience recently with Rails.

I think it’s worth taking a look at and hopefully drive some discussion. Since I have been a Microsoft developer and have taken on Ruby and Rails as a learning process it’s good to see someone has problems with this framework. If the framework was thought to be perfect by everyone then striving to make it better would be less of a goal. IMHO.

Technorati Tags: , , ,

Using RadRails

RadRails.Jpg
I have been on a frenzy lately trying to find a good development environment for doing Rails development on Windows XP as well as on my Mac. I downloaded and unzipped RadRails to see how well this environment works. RadRails is based on the opensource editor and development system Eclipse. It uses Eclipse as it’s base and adds a Ruby editor called RDT (Ruby Development Tools). This combination sounds like a great combination but I found the experience lack luster.

I am able to create controllers, models and scaffolds from the system but didn’t really see the value I was supposed to receive from using it. I am coming from a Visual Studio back ground and tought I might be seeing some VS-ish features such as “Intellisense”, as in VS. Unless it was turned off by default then I must have missed it.  RDT does list auto completion as a feature but I did see it working as I expected.
RadRails runs on Windows, Linux and Mac OSX, so it looks like a potentially nice Rails development system.  Has anyone been able to find completion or other features not a default in RadRails?

Technorati Tags: , , ,

Instant Rails Tutorial

InstantRails
I found this great tutorial on getting started with Instant Rails. I used this tutorial to get started. It is a great summary of all the parts and pieces tossed into Instant Rails, what they are and how to know your way around them. I highly recommend this as a great place to start.

Technorati Tags: ,

Are all software bugs worth fixing?

I am a subscriber and fan of Jeff Atwood’s blog. Jeff has an interesting post worth checking out if you deal with the same things I do on a daily basis, dealing with bugs and fixing them…or not.

Jeff’s post outlines some standard procedures for going from giving your code to a test team and deciding the level of severity of the bug, the risk involved, the cost to fix and exactly how often the bug happens.

In my current position I work on a very small team and we do not have an official QA test team, we rely on internal developers, internal users and worse, our customers. I know this is a bad way to do things but this is what we have to work with. Our major problem is not finding the bugs, but more what to do about them when we find them. As I said I am on a very small team and we are spread thin as it is.

According to Jeff, his bug fix criteria is this:

  1. Severity: When this bug happens, how bad is the impact?
  2. Frequency: How often does this bug happen?
  3. Cost: How much effort would be required to fix this bug?
  4. Risk: What is the risk of fixing this bug?

Ethics say we fix all bugs we find, no matter how small and no matter how long it takes. In reality we can’t do this and we don’t do this.  Our method of fixing bugs has come down to:

  1. Severity: When this bug happens, who noticed? This is the real question, if no one notices then maybe it doesn’t get fixed.
  2. Frequency: How often has the customer reported it?  Can we even reproduce it?
  3. Cost: How much business will we lose vs. the time it will take to fix? When we are fixing we are not working on new software.
  4. Risk: What is the risk of fixing this bug? What are we going to break since we don’t have a real SDLC process to test a fix. Yes, this will change but right now not an option.

Since our team is so small the process of tracking a bug down can be very time consuming, often to the point of feeling like a detective instead of a developer. Our existing legacy system is an ASP application originally written 5 years ago with enhancements and bug fixes occurring since then. The complexity of the system makes the process of tracking a bug down a very long one.

Whether your team is large or small the bugs still pop up but regardless of what we know the process of fixing or not fixing is the same. Our team does not have a tester or a currently a test process to put software into production but they are coming ONLY if the team grows.

Isn’t this problem, I mean scenario, pretty standard? I think it is. I don’t know of anyone bootstrapping a project who has a solid team with proper QA/testing and the procedures we know we should have. So how are others ensuring software quality? What is the extreme of not fixing known bugs?

Technorati Tags:

New podcast, HanselMinutes

I subscribe to many podcasts in my iTunes client, subscribing to one here and there and dropping just as many. I have yet to find many that stick because many don’t get it, I don’t want to hear idle chit-chat.

A new podcast by Scott Hanselman called HanselMinutes has just released it’s fifth show and all have been excellent. I have been a follower of Scott’s blog for a year or so now and all of his posts are well thought out and informational, so I figured his podcast would be the same. I was not wrong.

Topics include the Mono Project, Continuous Integration, blogging, Ubuntu, ASP.NET as well as other tidbits of knowledge. Scott style is solid, no fluff like so many other podcasts out there. The shows are co-hosted by Carl Franklin who is a seaoned podcaster. All of the shows are a good length running 30-40 minutes.

Other software development podcasts I find useful and interesting are:

Another podcast I recently was turned onto is Security Now!, a show focusing on security issues on the Internet by security expert Steve Gibson and Leo Laporte.

Technorati Tags: ,