Writing Maintainable Javascript Guidelines

Friday, April 3, 2009

We've been doing a lot of Javascript development lately, while writing an Ajax-based web application. Up until recently, my team's Javascript experience consisted mainly of the occasional disable-that-checkbox function inside an .aspx web-form. Nothing wrong with that, I guess, but it doesn't really count. If you're going to write a lot of Javascript, you have to do so in an organized and clean way, or you'll have a maintenance nightmare on your hands. This is not because Javascript is a bad language. It can be quite beautiful actually. But it does allow to work in ways that are...

Extending the ArcGIS Javascript API

Saturday, November 8, 2008

Working with the new Javascript API for ArcGIS Server 9.3, I am now writing quite a bit of javascript. If you try and write large amounts of javascript code (I would consider >200 lines as large enough) without using objects, soon enough you're going to have an unreadable nightmare in your hands. In order for the code to be maintainable, I've realized I have to take advantage of dojo's object-orientation capabilities, and especially inheritance. This allows me to extend ESRI's default objects, compensate for missing behaviors, and add logic of my own. Luckily, in javascript the can't mark their...

ArcGIS Server 9.3 Javascript API Impressions

Tuesday, September 30, 2008

After a long wait, I've finally been able to start using the new Javascript API that comes with ArcGIS Server 9.3. And the truth? It's pretty great. It was difficult to start with, though. I didn't realize that the actual API (.js files and images mostly) doesn't come with the AGS installation discs - you have to request that separately. I have no idea why they won't just let you download an installation zip, as anyone is free to use the API via this link here. Our internal network doesn't have an Internet connection, and even if it did,...
no comments

Careful with that FreeTextBox

Monday, August 13, 2007

I came in need of an ASP.NET text box control that allows the user to enter rich text. Quickly enough I found FreeTextBox, an awesome control that is widely used in several well-known projects (such as Community Server, which hosts the blog you're currently reading). And, as it name suggests, the basic version of the control (which is more than enough for my needs) is free. So I started playing around with it a bit, throwing it in a web-page, editing some HTML and posting the page. Boom. ...A potentially dangerous Request.Form value was detected fromthe client... Well, of course. ASP.NET...