Tuesday, July 3rd, 2007
Ajaxed: Ajax for classic ASP
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:
-
-
<!--#include virtual="/ajaxed/ajaxed.asp"-->
-
<%
-
set page = new AjaxedPage
-
page.draw()
-
-
sub init() : end sub
-
-
sub callback(action)
-
if action = "add" then page.return(add(page.RF("a"), page.RF("b")))
-
end sub
-
-
function add(a, b)
-
if not isnumeric(a) then a = 0
-
if not isnumeric(b) then b = 0
-
add = cint(a) + cint(b)
-
end function
-
-
sub main() %>
-
-
<script>
-
function added(sum) {
-
$('c').value = sum;
-
}
-
</script>
-
-
<form id="frm">
-
<input type="Text" name="a" id="a"/>+
-
<input type="Text" name="b" id="b"/>=
-
<input type="Text" name="c" id="c"/>
-
<button onclick="ajaxed.callback('add', added)" type="button">calculate</button>
-
</form>
-
-
<% end sub %>
-












Just who the hell is having to use Classic ASP still?… oh.. wait.. thats me! Thanks, Dion!
Oh… and me too BTW.
me too, why not
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?
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
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
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!
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.
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!
me too
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
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.
I am using Classical ASP for some time now, but I am thinking of moving to .NET !
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. :)
A quote of mine:
“Give me a Request & a Response object, let me shake the Internet!”
Classic ASP rullaz! :)
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.
Thanks!
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.
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…
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
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.
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
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
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
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…
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.
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.
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 :-)
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
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
Goode coding techniques
Great info
Its great i always used it..
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.
Hello Great posting on Ajax
zeeshan
http://zeeshan.modelschool.co.in
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.
ILiyas Iliyas PatelSeo Expert IndiaSEO Master India
Thanks.Good article
.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.
Yay for classic asp! :)
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….
@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.
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 :)