Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > User-defined classes in Global.asa

Reply
Thread Tools

User-defined classes in Global.asa

 
 
Brad
Guest
Posts: n/a
 
      11-09-2004
Hi,

I've read that one shouldn't include ADO objects in the Global.asa for the
sake of performance, but would user-defined classes cause the same kind of
performance hit? Assuming that they wouldn't, is it possible to do it?

I can't seem to figure out how to include them, nor find any reference to it
in msdn.

Is there a way to do this? Or should I create a slew of Session variables?
Yuck.

<script language='VBScript' runat='server'>
public obj
class Something
public Name
public Value
Sub Class_Initialize()
Name = "Joe"
Value = "Blow"
end Sub
End class
Sub Session_OnStart()
' This won't work
set obj = new Something
' Either will this
set Session("obj") = new Something
End Sub
</script>

Thanks.
 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      11-09-2004
Brad wrote:
> Hi,
>
> I've read that one shouldn't include ADO objects in the Global.asa
> for the sake of performance, but would user-defined classes cause the
> same kind of performance hit? Assuming that they wouldn't, is it
> possible to do it?
>
> I can't seem to figure out how to include them, nor find any
> reference to it in msdn.
>
> Is there a way to do this? Or should I create a slew of Session
> variables? Yuck.
>
> <script language='VBScript' runat='server'>
> public obj
> class Something
> public Name
> public Value
> Sub Class_Initialize()
> Name = "Joe"
> Value = "Blow"
> end Sub
> End class
> Sub Session_OnStart()
> ' This won't work
> set obj = new Something
> ' Either will this
> set Session("obj") = new Something
> End Sub
> </script>
>
> Thanks.


http://groups.google.com/groups?hl=e...%40cppssbbsa05


http://groups.google.com/groups?hl=e...6btnG%3DSearch

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
 
Brad
Guest
Posts: n/a
 
      11-10-2004
Thanks Bob.

"Bob Barrows [MVP]" wrote:

> Brad wrote:
> > Hi,
> >
> > I've read that one shouldn't include ADO objects in the Global.asa
> > for the sake of performance, but would user-defined classes cause the
> > same kind of performance hit? Assuming that they wouldn't, is it
> > possible to do it?
> >
> > I can't seem to figure out how to include them, nor find any
> > reference to it in msdn.
> >
> > Is there a way to do this? Or should I create a slew of Session
> > variables? Yuck.
> >
> > <script language='VBScript' runat='server'>
> > public obj
> > class Something
> > public Name
> > public Value
> > Sub Class_Initialize()
> > Name = "Joe"
> > Value = "Blow"
> > end Sub
> > End class
> > Sub Session_OnStart()
> > ' This won't work
> > set obj = new Something
> > ' Either will this
> > set Session("obj") = new Something
> > End Sub
> > </script>
> >
> > Thanks.

>
> http://groups.google.com/groups?hl=e...%40cppssbbsa05
>
>
> http://groups.google.com/groups?hl=e...6btnG%3DSearch
>
> Bob Barrows
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
>

 
Reply With Quote
 
Stephanie Stowe
Guest
Posts: n/a
 
      11-10-2004

"Brad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I've read that one shouldn't include ADO objects in the Global.asa for the
> sake of performance,


One should not store ADO objects on Session or Application variables. I see
no reason not to use them in the Global.asa file.


> but would user-defined classes cause the same kind of
> performance hit? Assuming that they wouldn't, is it possible to do it?
>
> I can't seem to figure out how to include them, nor find any reference to

it
> in msdn.
>
> Is there a way to do this? Or should I create a slew of Session

variables?
> Yuck.
>
> <script language='VBScript' runat='server'>
> public obj
> class Something
> public Name
> public Value
> Sub Class_Initialize()
> Name = "Joe"
> Value = "Blow"
> end Sub
> End class
> Sub Session_OnStart()
> ' This won't work
> set obj = new Something
> ' Either will this
> set Session("obj") = new Something
> End Sub
> </script>
>
> Thanks.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Classes within classes David ASP .Net 2 07-22-2005 07:13 PM
What is the difference between nested classes and inner classes ? Razvan Java 5 07-27-2004 07:59 PM
Modifiers applied to attributes, local variables, member functions, classes and inncer classes ! Razvan Java 11 07-17-2004 08:57 PM
Can I using reflection to get all child classes or classes undera package dynamically? Carfield Yim Java 1 05-31-2004 05:33 PM
How to access inner classes variables & methods from outer classes lonelyplanet999 Java 1 11-13-2003 01:54 PM



Advertisments