Tuesday, July 3rd, 2007

Ajaxed: Ajax for classic ASP

Category: .NET, JavaScript, Library

<>p>Are you writing classic ASP pages and want to join in the Ajax revolution too? Really? Well, Ajaxed is for you. The framework is simialr to xajax for PHP, in that it allows you to tie in to a named function on th eserver side.

It looks like this:

javascript
< view plain text >
  1. <!--#include virtual="/ajaxed/ajaxed.asp"-->
  2. < %
  3. set page = new AjaxedPage
  4. page.draw()
  5.  
  6. sub init() : end sub
  7.  
  8. sub callback(action)
  9.     if action = "add" then page.return(add(page.RF("a"), page.RF("b")))
  10. end sub
  11.  
  12. function add(a, b)
  13.     if not isnumeric(a) then a = 0
  14.     if not isnumeric(b) then b = 0
  15.     add = cint(a) + cint(b)
  16. end function
  17.  
  18. sub main() %>
  19.  
  20.     <script>
  21.         function added(sum) {
  22.             $('c').value = sum;
  23.         }
  24.     </script>
  25.  
  26.     <form id="frm">
  27.         <input type="Text" name="a" id="a"/>+
  28.         <input type="Text" name="b" id="b"/>=
  29.         <input type="Text" name="c" id="c"/>
  30.         <button onclick="ajaxed.callback('add', added)" type="button">calculate</button>
  31.     </form>
  32.    
  33. < % end sub %>

Related Content:

  • Putting ASP.NET AJAX into action
    Alessandro Gallo is a Microsoft MVP in ASP.NET, an active contributor to the ASP.NET AJAX Control Toolkit and one of three authors of "ASP.NET AJAX in...
  • ASP.NET AJAX released
    Microsoft's toolkit for incorporating Ajax functionality into ASP.NET applications has been released. The company is also giving ASP.NET AJAX full...
  • ASP.NET Ajax Tutorial
    This reference introduces developers to Microsoft's ASP.NET Ajax framework with a plethora of tips, tutorials and...
  • Hotskills: ASP.Net Ajax for developers
    ASP.Net Ajax skills, training and salary information details for...
  • Tips for Ajax with ASP.NET
    Patterns for creating Ajax applications using ASP.NET is discussed in a podcast with Brad Abrams, group program manager for the UI Framework and...

Posted by Dion Almaer at 4:40 am
37 Comments

++++-
4.3 rating from 154 votes

37 Comments »

Comments feed TrackBack URI

Just who the hell is having to use Classic ASP still?… oh.. wait.. thats me! Thanks, Dion!

Comment by Ian — July 3, 2007

Oh… and me too BTW.

Comment by Kris G. — July 3, 2007

me too, why not

Comment by pepa — July 3, 2007

It’s worth noting that Ajax for Classic ASP has been around for some time in the more sophisticated form of CLASP – the Classic ASP Framework (see http://www.claspdev.com). Who needs .net?

Comment by John — July 3, 2007

LOL Ian,

The Canadian Government still uses Classic ASP, so if I get the job I applied for my career will have gone from ASP developer to .Net Developer back to ASP Developer :D

Comment by justin — July 3, 2007

Nothing wrong with ASP, really. It’s not like we have to worry about future patches screwing up old applications: there won’t be any patches. :p

Comment by Marcel — July 3, 2007

Good joke Marcel!

ASP.Net is too overbloated for websites, I mean, who really wants to re-compile thier website, everytime the make a little bug…. ;-)

And I NEVER make bugs in MY code!
Excellent idea WEB DEV BROS!

Comment by David — July 3, 2007

Not exactly late to join in the Ajax revolution, JSRS was originally written for ASP when released in 2000, and (still) works with either VBScript or JScript on the server side.

The remote procedure call pattern was the model in common use before Ajax was named.

JSRS still uses hidden iframes for compatibility with older browsers – there are many great libraries that have exceeded it in current functionality, so I haven’t made the effort to release an XMLHttp version.

Comment by Brent Ashley — July 3, 2007

So nice to know I’m not the only one refusing to jump to .NET. “ASP.Net is too overbloated for websites” I thought I was the only one who thought this way! ASP RULES!

Comment by Bill Szczytko — July 3, 2007

me too

Comment by CHris — July 3, 2007

respect for all you guys who still use classic ASP….. probably you have to consider converting to dotNet :) it helped me a lot and saved a lot of nerves

best

Comment by ajaxus.net — July 4, 2007

Move to .net? yeah you COULD do that.. or you could give Rails a whirl.. Its definately worth a try. Plus there’s a decent amount of dev work out there for it.

Comment by Alexei — July 4, 2007

I am using Classical ASP for some time now, but I am thinking of moving to .NET !

Comment by kanenas.net — July 4, 2007

Hehehe ! I have been refusing to do .net too. I really thought I may have been the only one that WILL NOT touch .net . My kinda folks here!
I use a lot of AJAX meant for PHP with Classic ASP. Just change couple things around & VOILA! it works. :)

Comment by NT — July 5, 2007

A quote of mine:
“Give me a Request & a Response object, let me shake the Internet!”

Classic ASP rullaz! :)

Comment by Hüseyin Tüfekçilerli — July 6, 2007

Well for the next 3 months I’m stuck maintaining a classic ASP site (Yuck, Patooey!!) which was written by idiots. And after working for years in ASP.NET this is not fun at all. But it pays the bills so I’m glad I found this site.

Comment by .NET kicks classic ASP butt — July 6, 2007

Thanks!

Comment by Alvin — July 6, 2007

hehe, I thought I was alone in ASP! Good to hear there are some others like me out there ;)

I have started to move over to .net. I’m using c# instead of vb as I think there is a bit more help and support out there for c#. It’s interesting to try something else but I think I’ll be using classic asp for a while.

Comment by Richard Reddy — July 7, 2007

what is ASP.NET?
hehehe…
Microsoft still uses ASP on 50% of their sites… check some of the MSDN (?!) pages… 3 months ago, i renewed my MSDN subscription, on a complete ASP driven platform…

Comment by Pieter — July 11, 2007

hmm.. actually we’re in indowebservices just moving to ASP.NET, but personally i love classic asp most of all, more lightweight and yeah no need to compile the code again and again. Vote for classic ASP

Comment by ariel — July 11, 2007

I am so relieved to see this site and people who still have positive things to say about classic ASP. I am a self taught ASP programmer at a large corporation and everyone loves my work… and it does what it needs to do! I have felt like a big loser because I haven’t forced myself to learn .NET….after all it took my non programming mind a long time just to get to where I am now with ASP….as long as the client is happy who cares what you use. I have found that understanding how to build and write powerful SQL along with ASP gives me everything I need.

Comment by Robayb — July 13, 2007

I use classic ASP at work…i’m actually the ONLY one there using it while everyone is working in C# .NET

I am going to migrate over sometime this year but OOP is an entirely different way of thinking. I recently purchased a book that specifically discusses HOW to think in object oriented ways. very interesting stuff.
People do have a point about .NET being too much for websites; unless you’re doing enterprise level financial web applications then there’s no need for it

Comment by Cesar — July 19, 2007

I have used .net. and tried for days to do something i can do in asp classic in 5 minutes. And whats with all those different classes? protected, public etc. Yeah sure you can drag and drop stuff and build stuff the easy way the way .net wants it. But what if you need to use a excisting database (like oracle) and use rulesengines in between. Back to the hand work it is and there .net is the most irritating thing to use. It actualy takes more code to do something simple then asp

Comment by Philip — August 1, 2007

Amen to that brother…I mean .net technologies really is the future for enterprise solutions but you’re right…for simple things, php and classic asp are simply better solutions.

I just wrote a cute little cms in classic asp over the weekend…since I’m not a .net developer I can’t comment on how long it would have taken…
I am looking forward to getting into .net though…I’ll be migrating over soon

Comment by Cesar — August 5, 2007

You guys are crazy. Classic ASP is so much slower to code for. I do both in my current work environment and we get so much more done much more quickly under ASP.Net than we do Classic ASP. That and ASP.Net runs better on the server and play nice with your database request bandwidth. Refusal to move to ASP.Net is a career death wish if you want to stay with the Microsoft platform. You do know that with Server 2008 IIS is no longer configured standard to run ASP code right? The writing is on the wall…

Comment by Kressilac — August 16, 2007

BS, classic asp WILL be supported in WS 2008, just have to install it…

blogs.iis.net/metegokt/archive/2007/06/26/administering-iis7-on-server-core-installations-of-windows-server-2008.aspx

Using classic ASP since it’s inception. I agree on the bloated .NET stuff but think it’s much faster for enterprise development. I work at an ad agency doing small sites and classic ASP is perfect.

Comment by Jon — August 21, 2007

As long as classic ASP is supported and my hosting company will host classic ASP pages, that’s what I will use. For the work I do, it gets the job done and so far it has never failed me.

Comment by Andy — October 3, 2007

I’m a classic ASP programmer and I really enjoy using it. I’ve tried using .NET and ran thru some tutorials, etc. Bottom line for me was that .NET was way too complicated and bloated. Yet another steep learning curve!

[rant]
Frankly, I’m a bit tired of spending years gaining experience on a platform only to have it ripped out from under me and being forced to use yet another new product that costs big bucks and is supposedly so much better. I’ve been developing code for about 30 years now (Basic, Fortran, Pascal, Ada, C, C++, DOS, Windows, Visual C, Visual Basic, Visual Studio, MFC, Win32, COM, ASP, etc.) and with each “new and better” product that’s released, I end up having no more experience than the average 20 year old. We’re cutting our own throats here by signing up for each new product that MS develops! I suppose younger readers will learn this soon enough when in a few years all their .NET experience counts for nothing and they find their jobs vanishing.

I see these new platforms as just another way for MS to hold developers and companies hostage. I enjoy programming…not clicking checkboxes and dragging objects around. To me that’s not programming. At any rate, I don’t see ASP going away anytime soon since there’s about 100 million websites using the stuff and MS would be nuts to stop supporting it. Of course…this is MS w’re talking about here…..
[/rant]

Ok…I feel better now :-)

Comment by Pete — October 13, 2007

i’m a classic ASP developer for some years now and i’ve tried the .NET platform and what you guys say it’s true: too much complicated. but the BIG reason to stay in ASP, the REAL one is the fact that you can integrate new code and edit existing one EASILY. i mean, in my job there’s a lot of maintaining job to the aplicattions, so, it’s pretty cool to open the .asp file, fix the bug, and voilá!… in this type of environment (a lot of changes pretty often) it would be nasty to re-compile the entire app in order to work… ¿or am i missing some ASP.NET feature that avoid this?… anyway… my vote it’s for classic ASP

Comment by Sebastian Gomez — October 25, 2007

i’m a classic ASP developer and i love it. with just a Notepad it’s very handy and you can update it any pc.

Comment by dan fad — November 19, 2007

.NET full of problems as a web develop tool, not like PHP or JSP.
Make project then solution (day is over)
Make classes and redit some classes (day is over)
I’m in vacation can i redit my website (no i dont think so, no cyber have .NET IDE ofcourse)
DLLs is away slower than any Javascript functions ofcourse !! it applies too to the AJAX.

Comment by Johnny82 — June 3, 2008

Yay for classic asp! :)

Comment by dylanj — June 7, 2008

Yeah ASP rocks!! I’ve got several sites and large systems still working great and still easy to modify that are 7 years old or so.

I’ve realised latetly i think it might be precisely because microsoft STOPPED adding features to ASP that everything still works!

I can’t image what maintenance and upgrade nightmares i would have had if i had chosen to use the then flavour of the month .NET 1.0 – man that was real pile of shite. I keep checking and they just keep piling on more layers of the stuff….

Comment by mikenz — June 24, 2008

@Kressilac – i have a large system running on Server 2008 in classic ASP and it runs sweet. The only thing i can’t get to work is CDONTS (no particular reason for using cdonts, but hey it ran ok for 8 years).
Interesting you say .net is quicker but i can’t really see how .net can be quicker to develop under unless you don’t need to customise any aspects of your UI. Anything slightly different seems to require a whole different approach.

Comment by mikenz — June 24, 2008

I’m just commenting about the “Valid XHTML and CSS” thing at the bottom of this page. It’s a load of rubbish – go to validator.w3.org and enter the URL of this page.

Anyway, yes. Classic ASP is still going – “I keep checking and they just keep piling on more layers of the stuff” – Exactly :)

Comment by dylanj — October 9, 2008

Yes, ASP still out there. Check out this new ASP CMS
http://www.dmxready.com/dmxreadyv2/index.asp?page=catalog&product=cms

Comment by sarqdaniel — September 29, 2009

I could not agree more about what is being said about ASP. I hired a .NET programmer for a fairly simple project that should have taken about 2 months. 6 months later, the guy (supposedly quite good) was still pointing and clicking and delivering nothing. My client getting really impatient, I had to get down to business and tried to fix the mess. After 6 hours of looking at useless (mostly automatically generated) code, I bit the bullet and re-wrote the app from scratch in Classic ASP in about 3 weeks. BTW: I liked .Net but only for large corporations where the benefit of corporate-wide standards and re-usable components outweight the complexity. So big corps can have talented designers coming up with the real stuff and code-monkeys pointing and clicking all day, re-using the components.
Just in case you need a quick leg-up on JS-based AJAX, you can pick up a free library on our web site: http://www.digitalthings.net/techforum.htm

Comment by digithings00 — December 17, 2009

Leave a comment

You must be logged in to post a comment.