Javascript / AJAX

DHTML Floating Resizable Content Panes

I’ve continued to look for a reusable DHTML floating content pane. During my searching I dug into, revisited dojo and came across something new. Here’s the quick lowdown on what I found.

Ajax Toolkits, Widgets and Rails

Originally I planned for this post to be a sort of how to for creating floating content panes in a Rails application. If you’re unsure what I’m talking about have a look at protopage or Winlike for decent examples. I didn’t want to write everything from scratch so I began a search for reusable code in the form of a widget that I could use that would make sense for the example. What I found was that there’s a lot out there and there are different approaches to web based widgets. What follows are a few of the things I found and an open question on what the best approach may be.

Web 2.0: Like a slice of lemon wrapped around a large gold brick.

For those of you who aren't familiar with my antics, I'm a regular over at Joel On Software. I participate in the forums, attempt to share something of value occassionally, and generally agitate the natives. I happen to respect what Joel Spolsky says even when I think he's wrong... but when he's right, he normally knocks it out of the park. And he was 100% right in his discussion of the Web 2.0 Hype in Architecture Astronauts Are Back.

I started CaseySoftware, LLC almost a year ago now. I was miserable at a deadend job and saw numerous opportunities arising. As a result, I took the leap and started doing it fulltime. The first thing I noticed was the sheer amount of money being thrown around and much of it at fundamentally stupid ideas. My first impulse was to trumpet the year that I had been doing AJAX and cash in but then I realized something... If our projects and by extension our customers were going to survive the next bust, there had to be something more.

AJAX and making Customers Feel Good

I've been working on a project for one my biggest customers now for many months. The system is huge, has automated a huge amount of work previously done by hand, and quite a bit on its own depending on specific business rules. One of the things it does is pull together various bits and pieces of information and puts it together into a single item for further processing.

The difficulty has been that there are so many rules, so many different conditions, and a variety of other things that affect the output, it gets to be quite difficult to test and preview the items. A few weeks ago, I had an idea... AJAX.

Simple AJAX or How I learned to start simple

I've been using the iframe data loading trick for a few years now. I first saw a use of HTTPXmlRequest about a year ago for a simple search engine which worked like Google Suggest. I thought that was cool, but was unsure if this was a feature that would remain in the browser or just a hack someone figured out which might be gone in the next release. When this methodology was finally named this year "AJAX" and everybody got all excited about it, I thought I should try some of this stuff. I followed this tutorial over at O'Reilly and saw this example over at Apple. I downloaded a few "packages" for php, javascript and ajax. I found them somewhat complex. Then thought I should make my own at least at first. I immediately started refactoring in my head how to make this a neat, packaged javascript class. I got lost because I started out too complex. I cut and pasted a bunch of code, added my own code. Tried running it, got strange errors and kinda gave up (at that point).

Why *you* need to learn Ruby on Rails

Editor's Note: For those of you who may have missed it, the Pragmatic Programmers have just launched a new series called "Pragmatic Fridays" and their first book was released last week. As an even more interesting note, the first one entitled "Rapid GUI Development with QtRuby" was written by our own Caleb Tennis.

In the movie "The Shawshank Redemption", after the character Brooks Hatlan got out of prison (after being cooped up for a very long time), he opines that: "...The world went and got itself in a big damn hurry". He wasn't able to cope in the outside world after living in prison for so long. He liked his old lifestyle better.

The same thing exists in software/tech world. In order to survive, you've got to stay afloat with knowing something about the latest and greatest happenings. No doubt you know that Microsoft is releasing a new version of Windows next year called "Vista". I'm sure you're aware of lots of the latest gadgets coming out of Steve Jobs' hands.

Well, if you're a web developer, no doubt you've heard of Ruby on Rails. But, more importantly, have you tried it?

Debugging JavaScript: an ASP.NET developer’s approach

As an ASP.NET developer I’ve always been averse to writing JavaScript. One of the reasons I shied away from writing JavaScript was because of my difficulty in debugging the code. Tossing in alerts to find errors in the code was always too reminiscent of the time I spent writing code before finding a decent IDE. Well for ASP.NET developers working in Visual Studio, there are great tools available to help you debug JavaScript. Microsoft details the methods here and here. The method I use is to simply pull up the running documents window and work from there. This gives you the standard Visual Studio debugging windows like Locals, Watch, and Command. You also get the added advantage of not having to jump into a different debugging environment when going from client side to server side code.

One of the problems I’ve found with this method is that it is IE centric. If I’m developing code that needs to work on Firefox in addition to IE, I need to use other debugging tools. Mozilla’s JavaScript debugger is code named Venkman. It’s fully featured and you have to love the Ghostbusters reference! Venkman has all the standard debugging features including Locals, Watch, and Command windows. One issue with this method is that you have to pull up the web page in Mozilla or Firefox and you’re debugging only the client side of the application. In order to debug the server side code at the same time you’ll need to attach the VS debugger to the server side process as detailed here.

The web applications I currently write have no requirements to support users of other browsers so I’m not sure what is available for those. What tools have you found for writing and debugging JavaScript that have made things easier?