Again, I have let the blog slip instead of keeping up with it. I have been busy with the development of some tools for a new site. After we finished the 4-week version of the last site, we decided to make some major changes to the way it works and invest a lot more in the architecture of the application.
So I’ve spent about 3 weeks developing a javascript library for the new application. And I decided to, from the beginning, test the js file in a set of browsers: FF2 & 3, IE 6 & 7, Opera 9.5+, Chrome Beta, and Safari 3.1 Win.
It has been a bit of a learning curve to get used to very short development cycles where you have to build one small lego-sized piece of your library and then test it in all the browsers, refining over and over until all of the browsers show the same thing (or at least close enough in all the relevant cases). But as I got into it, I learned how to approach the problem and get a handle on the complexity of all of the different constraints that come from each browser. As I just mentioned, I learned that it worked the best for me to build really small “lego” sized test pages and run them through all the browsers over and over until I understood what each one could and couldn’t do. Really, all it requires is patience until you get the hang of it. So I have one completely separate development environment (project environment) where all of the js development happens, and then I move the javascript over to the mainline source on a semi-regular interval. This allows me to isolate out all of my test pages (and there are lots of them) into the javascript test environment.
One of the things I learned from the process is that of the browsers in my above set, I really like the way javascript debugging works through Firebug/Firefox. I already liked Firebug, but I did not know about the profiler built into Firebug until I worked on this project, and it has made it easy to learn many new things about the performance of different operations in Firefox. Second place goes to Visual Web Developer Express (I’m a PHP developer instead of .Net).
With the profiler in Firebug I was able to take one of my test pages and trim the load time down from 1.2 seconds to about .6 seconds. (This particular page is a unit test for my date/time functions.) It was exciting to be able to quickly see where the performance was going, and really make a few minor changes in structure to speed the test page up.
To test the suite of browsers, I setup a virtual machine on Virtual PC 2007 (microsoft) and downloaded their hard disk images here. Then I installed my test-versions of all the browsers I wanted on the virtual machine. This way I can boot the virtual machine, run any browser tests I want and then close it and “erase the changes” so that the browser cache and all the settings are cleared back to their original state. This makes the development process a lot easier for me – no cache clearing, cookie clearing, etc. And I have all of the versions of browsers I could want to have, available to me when I need them.
Right now, I’m working on a new demo section of our site where we will place some of the better prototypes & mockups to be publicly viewed. Up to this point all of the development has been kept internally because it took too much effort to polish it up for the public. But now we need to start putting our work out there so that people can give us feedback and criticism. And hopefully get a job out of it?
So I’m going to go back to work now. I hope that I will write more often, I think it would be good to discuss some of the things I learn about the different browsers as I go.