VBScript Class vs. COM


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: VBScript Class vs. COM

  1. #1
    Eric Guest

    VBScript Class vs. COM


    What is the advantage of using a VBScript class over using a VB COM object?
    Please give detailed examples if possible.
    Share on Google+

  2. #2
    Scott Mitchell Guest

    Re: VBScript Class vs. COM


    Hello Eric.

    Where to start? :-) COM objects have a number of advantages over script-created
    classes: for starters, they are compiled, which hides the source; COM components
    are also considered to lead to performance increases (see http://www.15seconds.com/Issue/001009.htm
    for an interesting article on COM/script performance... the lesson of the
    article? Always run performance tests to see what works best for you!).

    Despite its advantages, COM components are a pain to develop. A royal pain.
    Each small change requires a recompilation, a stopping of the Web server,
    and a regsvr32 to register the new version of the component. Sigh. That
    is annoying. Very annoying.

    The nice thing about VBScript classes is that they don't require the nasty
    recompilation and reregistration... just make a single change and you're
    ready to go! Granted, for a large site's production server, you should use
    COM components. But in the interim, when you're developing the site (or
    if you run a smaller site), I find VBScript classes (or Window Scripting
    Components (see: http://www.4guysfromrolla.com/webtech/050400-1.shtml ) to
    be the best solution.

    The main thing is that you use some form of class to encapsulate business
    logic and allow for code reuse... that's what I am trying very hard to hammer
    home in my book, Designing Active Server Pages.

    Thanks for a great question!

    Scott Mitchell
    mitchell@4guysfromrolla.com
    http://www.4GuysFromRolla.com
    http://www.ASPMessageBoard.com
    http://www.ASPFAQs.com

    * When you think ASP, think 4GuysFromRolla.com!



    "Eric" <edl2@hotmail.com> wrote:
    >
    >What is the advantage of using a VBScript class over using a VB COM object?
    > Please give detailed examples if possible.


    Share on Google+

Similar Threads

  1. Help with class/applet
    By none_none in forum Java
    Replies: 17
    Last Post: 04-28-2005, 04:00 PM
  2. Replies: 5
    Last Post: 10-17-2002, 02:58 PM
  3. Assembly class
    By Shailesh C.Rathod in forum .NET
    Replies: 2
    Last Post: 03-13-2002, 08:53 PM
  4. How To Do It - Shared Class Variables Part III
    By Patrick Ireland in forum .NET
    Replies: 5
    Last Post: 05-10-2001, 07:19 PM
  5. Calling base class methods
    By GR in forum Java
    Replies: 1
    Last Post: 11-09-2000, 06:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center