jared@protoscript.net


javascript :: Sajax the ASP ajax toolkit · 2006-09-17

Sajax is an open source tool to make programming websites using the Ajax framework — also known as XMLHTTPRequest or remote scripting — as easy as possible. Sajax makes it easy to call PHP, Perl or Python functions from your webpages via JavaScript without performing a browser refresh.

Thomas Lackner, of Sajax fame, was gracious enough to accept my JScript-in-ASP version of the Sajax toolkit. Sajax also has versions in Io, Ruby, PHP, Python, Lua, Coldfusion and Perl. The JScript port is still in beta, but I will be ironing out the oddities soon enough.

Essentially, you write server-side methods, choose which among them you’d like to be available from the client, and export them. The client-side code can then call the function and register a callback function. Sajax handles all of the client-server communication rather transparently.

Update (08/09/2006): Unfortunately, due to a misunderstanding, Thomas added my “beta” code into the release. There were some bugs and security issues* that I had not yet addressed and the ASP version was removed from the release. As I’m very busy now, I’d like to know if there is significant demand for the ASP version before I continue. If you would love an ASP Sajax toolkit, leave me a comment here.

Update (08/31/2006): I have completed a new alpha version of Sajax for ASP. If anyone is interested in testing it, please leave a comment here, or email me at jared@protoscript.net . I don’t want to release the files into the wild until I’m reasonably sure that everything is working.

Update (09/17/2006): I forgot to mention something. Sajax for ASP is written in JScript, Microsoft’s (mostly) ECMAScript compliant scripting language. Many people believe that writing ASP pages means writing only in VBScript. So why would I go against the grain and use JScript? That’s easy. It supports true closures; a powerful object model with the ability to use mutliple/dynamic inheritance; a convenient, powerful reflection mechanism; dynamically adding properties and methods to ‘classes’ and instances—at runtime; a nice, self-organizing, auto-growing native array type; a unified syntax for dealing with reference and value types (hence, no “set x = object” vs “x = 0”)—this vastly expands the expressivity derived from it being a dynamically typed language; Function.apply(); a terse, convenient syntax, especially for arrays construciton, regular expressions and, coolest of all, object and function literals… The list goes on and on. I cannot recommend highly enough the switch from vbscript to jscript. Once you get used to the new lanugage, and recognize that it is something alltogether different, you will find yourself far more productive.

* * *

Comment

  1. I would very much like an ASP version and wouldn’t mind helping out anyway you might need it. e.g. testing, code review, refactoring, etc
    Harvey    Aug 24, 11:47am    #
  2. Hello Harvey. I emailed you a new, working alpha version of Sajax for ASP. Did you receive it?
    Jared Nuzzolillo    Aug 31, 9:27am    #
  3. Please include ASP with SAJAX.
    David Jones    Sep 9, 8:22pm    #
  4. I’d really like the ASP version as well!
    Thanks, Marty
    Marty G    Sep 16, 7:43am    #
  5. Hello sir,
    I really need sajax to work with in asp because you know for those who works with asp technology its a bit hard to shift to php or .NET technology . please if its possible send me the sajax version for asp technology. You have no idea how much i may aprreciate it.
    Best Regards,
    Hamidreza Tavakoli
    Hamidreza Tavakoli    Sep 29, 4:02am    #
  6. Hi Jared,
    I am interested in trying Sajax for ASP too, can you send it to me as well?
    Thanks.
    Jim    Oct 24, 2:18pm    #
name Remember
email
http://
Message
  <?>

© Jared Nuzzolillo