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.
Re: VBScript Class vs. COM
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!
* When you think ASP, think 4GuysFromRolla.com!
"Eric" <email@example.com> wrote:
>What is the advantage of using a VBScript class over using a VB COM object?
> Please give detailed examples if possible.
By none_none in forum Java
Last Post: 04-28-2005, 04:00 PM
Last Post: 10-17-2002, 02:58 PM
By Shailesh C.Rathod in forum .NET
Last Post: 03-13-2002, 08:53 PM
By Patrick Ireland in forum .NET
Last Post: 05-10-2001, 07:19 PM
Last Post: 11-09-2000, 06:38 PM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center