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 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

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

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: , , ,