Results 1 to 2 of 2

Thread: Classes

  1. #1
    Join Date
    Dec 1969

    Default Classes

    Does anyone have any advice or suggestions as to the advantages of using VBScript classes in my ASP pages?

  2. #2
    Join Date
    Dec 1969

    Default RE: Classes

    It&#039s a great question, but this is a lousy place to start a discussion, as the messages scroll off so fast.<BR><BR>I&#039d move this to the "Moderated Advanced ASP" forum, if I were you. It&#039s a discussion that could well go on for 10 to 20 postings.<BR><BR>My first response would be: Use classes for libraries. Imagine a class that constructs the HTML needed for dynamic drop down lists, for example. You could use it over and over, just altering parameters. You might use a class to describe a record set and its corresponding form fields. Advantage: You use the same class in the page that constructs the form as the one that reads the form and process it. I strongly suspect that classes will be overused for the wrong purposes in VBS, just as they have been in other languages. After all, each ASP page *is*, in some sense, already an object. Functions declared in the page already act as if they were methods on that "page object." Adding a VBS class on top of this extant structure is overkill, in many cases. So I would say be sure you can justify your use of a class; don&#039t toss one in just to make it look like you understand OO programming.<BR><BR>If you do post to the "Moderated" group, feel free to include my response and name in the initial post. Unfortunately, I&#039m leaving tomorrow PM for two week vacation, but several others there will undoubted contribute some good stuff.<BR><BR>Heck, this question is good enough that you could probably post it to the "ASP Advanced" mailing list at, and *it* is *very* tightly controlled. It&#039s a good general discussion point that should get many interesting responses when posted in the right place.<BR><BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts