Re: Object oriented




"Adam" <atr@xxxxx> wrote in message
news:fn345f$mfl$1@xxxxxxxxxxxxxxxxxxxxxx
Hi,

I am looking for good explanation of the main
terms used in the object oriented approach.

Here is a start, based on my own opinions.

Object-oriented programming has to do with packaging.
That is, you package up some code and data, either for
convenience or for re-usability.

You put a name on your package, and then call on your
code elements or data elements by invoking the object's
methods or properties. The syntax (at least in vbs) is
object-dot-method/property, as in:

fileObject.Copy newLocation (a method)
fileName = fileObject.Name (a property)

You can get some flavor of this without purchasing a book
by reading the microsoft scripting documentation (the class
object), or slightly more advanced -- the Microsoft Script
Component (wsc) documentation.

Thank you very much.
Your information answers to my request - good explanation
of the main terms. That's what I was looking for in the Internet
but unfortunately without success because the only explanations
I found were based on OO languages examples. In such case
I started to look for any book on it but of course it would be
better if I could grasp the idea of OO approach without studying
fat books. Not because I am lazy but because I would like to start
learning VBS as soon as possible. However I realise that I should
understand the main OO terms first.

You got questions? WE GOT ANSWERS!!! ...
Please send more information explaining the OO approach if you
have time. It is very useful for me.:-)

Regards,
Adam

Hi, Adam
Tell us what programming experience you have. No experience is OK,
but there will be a lot of wasted words if you have some or a lot of
programming experience in some version of BASIC or any other
programming language.

VBScript can't do much without accessing objects. It can do math,
manipulate time and dates, manipulate multidimensional arrays of
numbers or strings, get simple input from a user, write simple output
to the screen, and it can manipulate character strings. Without
accessing objects it cannot read or write a file, or even let you know
if the computer has any hard drives.

Microsoft provides a wealth of objects that VBScript can access to do
all the stuff you really want to do. VBScript can be considered the
glue that hold various objects together to build an application. For
instance, your script might use the file system object to do almost
anything you might want to do with files, except binary and random
access reads and writes. That same script might use the ADO family of
objects to create and read and write various types of database and
spread*** files, such as those produced by Excel, Paradox, Access,
and other programs. You don't need Excel or the other programs
installed on the computer; the ADO object gives VBScript the ability
to manipulate most, but maybe not all features of the data in the
file. That same script might use the Internet Explorer object to
provide a user interface,

Your computer probably already has the scripting help file,
Script56.chm. This one help file is written for both VBScript and
JScript, which can be confusing at times. I think various flavors of
javascript became the defacto standard for Web page scripting, and
Microsoft hoped to VBScript would become a standard too. It did not;
Internet Explorer is the only major browser that can use VBScripts
within web pages. Many, perhaps most, sample scripts in the help file
are aimed at being used within a web page, not in a stand-alone
script. Most sample scripts can be easily adapted to stand-alone
scripts. Stand-alone VBScripts are used extensively for login scripts
and computer and network management. The help file also covers a the
file system object and the shell object.

Your best resource for finding info on how to use VBScript with some
object is groups.google.com. This limits results to one or a targeted
group of newsgroups. For example, from groups.google.com, you might
enter a search like this: itunes group:*.scripting.vbscript, to get
information on how to manipulate the itunes object with VBScript.

You can get used books about VBScript quite cheaply. Go to Half.com,
and search by book title for the word vbscript. Many of them are
aimed at embedding VBScript within web pages, which of course doesn't
work when viewed in most browsers except IE, but could be useful if
you want to use IE as your user interface for a stand-alone VBScript.

-Paul Randall


.


Loading