ShowUsYour<Blog>

Irregular expressions regularly

Classic ASP Page Framework

The other day I asked a question on a list about the perf. Implications of using VBScript classes in classic ASP applications.  After participating in that thread I was reminded that, a while back I actually wrote an object oriented, event-driven classic ASP Page model which mimics some of the services which are built into the ASP.NET pages - such as Authentication, Users/Identities and Page properties.  The page automagically serializes it's state (which could be abstracted by implementing a Provider model).  The model also contained an in-built AuthenticationProvider which handles re-directs when secured resources are requested.

The whole framework weighed in at less than 350 lines of code!  You can see the code for it here:

    http://flws.com.au/AuthenticateModel.html

For me one of the big things about abstracting things into object models is that, because people relate to objects well object - such as Person.MiddleName - they enable you to easily build robust frameworks by pushing essential services down a layer.  It's only through building reliable frameworks that you can achieve true manageability - especially when project sizes need to be be scalable.

Comments

ron richardson said:

this would be something great to add to the Classic ASP Framework (by Chris Calderon), if it's not already in there.

see:
-http://www.gotdotnet.com/Community/Workspaces/Workspace.aspx?id=69b08b15-d456-4cf9-8b12-d4642ef0c22e
-http://www.codeproject.com/asp/ClassicAspFW.asp

# July 28, 2004 8:37 AM

Todd Moon said:

You might know this, but Andy Smith developed a very nice Classic ASP framework a number of years ago. It ended up as a compiled COM object. I forget if it had authentication or not, but the ViewState, postback events, and all sorts of fun stuff was in there.

And of course, Andy being Andy, he developed a slew of databound web controls. Even an editable datagrid! Everything used xml and xslt for rendering.

It was a lot of fun to work with. I used it for probably a year, just before .Net came out.
# July 28, 2004 10:24 AM

Christian Calderon said:

The Classic ASP Framework does have something very similar... it has a PageController that implements Forms Authentication with Role Level authorization...

I will be releasing version 2.0 next week and I expect it to be the last release, since there isn't anything else that I can think about that can be added. I would like to see how Andy implemented his framework, that would be cool. I didn't use COM because from COM you cannot call VBScript functions, so the whole thing would just not work (the framework is event driven, and a COM component cannot notify callback a VBScript).

Anyway, I will look at the code in the link "http://flws.com.au/AuthenticateModel.html" to see if there is anything cool that I can use for the framework :-)

Cheers,

# July 31, 2004 11:58 AM

Darren Neimke said:

Hi Christian, I think that the coolest part of my framework is its simplicity. As I wrote earlier, it's about 350 lines of code and has the essentials needed to implement User, Page, Roles and Authentication.

I presume that yours is much more complete (and therefore much larger) than this; I'll see if I can read up on your article at CodeProject.
# July 31, 2004 6:21 PM

Darren Neimke said:

...also, in a follow-up blog I showed how you would code against the Framework:

http://weblogs.asp.net/dneimke/archive/2004/07/28/199291.aspx
# July 31, 2004 7:10 PM

Christian Calderon said:

I see the benefit of your framework. I think is kind of cool. I believe that the main benefit of ASP.NET is the knowledge and ideas that gave us all. Now, even if we didn't had ASP.NET I'm sure that we all would be writting better applications just because of that knowledge gained. Youre framework is an example that it is posssible to write something that works nice with just a few lines of code.

The CLASP Framework is thousands of lines of code! (the core control alone is 1400 lines, many of them not rocket science however) ...

My goal was to resemble the ASP.NET Framework as much as possible and to also provide a framework to write user controls. The Authentication and Authorization is just a small part. Right now it supports plugable Viewstate (implementations for in session, in hidden variable and SQL Sever are in place), it has almost all Server controls found in ASP.NET (and some more thanks to the ppl that is currently contributing to expand it), it provides an event model similar than .NET (page init, load viewstate, load, save viewstate, terminate) and a similar event model for server controls (init, load, read viewstate, saveviewstate and render)... it also supports pluggable authentication and authorization and skinning... :-) it was a minor effor that became bigger as it started to take shape. I currently use it and is extremely fast and reliable. I ran a few load tests and it can run in an average computer at 25-30 RPS no wait time for pages with 40-50 controls accessing the database... :-)

You can see it running at: http://clasp.csharpjunkie.com/help/help.htm

Regards,
# July 31, 2004 9:25 PM

Christian Calderon said:

Something I forgot. The sample site is old and used v1.8. v2.0 is way better and faster and its event model was enhanced and expanded to resemble even more ASP.NET :-P
# July 31, 2004 9:27 PM

Darren Neimke said:

Thanks for the feedback Christian, your framework sounds very cool. I know how something like this can turn into a labour of love - which yours seems to have :-)

I deliberately kept the scope of mine minimal so that I just had something which added a small amount of value; after that I pretty much stopped writing ASP applications. Had I continued with classic ASP though, I have no doubt that I would have needed to do a similar thing to what you've done because, as you say, .NET taught us the importance of being able to rapidly develop from a stable base of controls and services.

As I said, I'll take a look at your stuff and recommend it to any classic ASP'ers that I come across.
# July 31, 2004 9:32 PM

Christian Calderon said:

Thanks Darren.

You are very right in that something you didn't expect to be a big deal can become sort of something addictive/ a passion that can take some (a lot) of your time...

I just hope that it is of use to some people... anyway it was fun doing it and I learned a lot the "why" of the way many things were done in ASP.NET...
# August 2, 2004 2:26 PM

reliable steam mop said:

Are you serious? I am not so sure about the legitimacy of your facts. Seems kinda bogus.

<a href=www.steammopsforsale.com/.../>best rated steam mop </a>

# January 7, 2012 12:25 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)