Register to post in forums, or Log in to your existing account
 

This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.     Home » Forums » General zApp Discussion
Rainchild
Wizard


Joined: 10 Oct 2000
Posts: 1551
Location: Australia

PostPosted: Thu Mar 11, 2004 12:30 am   

Scripts, DLL's and Byte Code (Oh My!)
 
I really opened this topic to say 'are we sure that WSH is going to be powerful enough'.

I undestand that using the scripting host for vbscript is great for small macros like moving a mail to one or other folder and tagging it with a comment or something... so for the small customization jobs it'll be just fine and as such is a must.

For plugins on the other hand or heftier customization, I'm not so sure. If someone's going to take it on themselves to write a plugin to do read web forums or news groups then they're going to need at minimum a way to fully integrate with the interface (inserting buttons/folders/icons/message fomats/etc) and override default event handlers on the clicks.

Depending on how tightly integrated they want to be (eg getting their little status bar in the send/receive window) they might even need control at a socket level (eg ZuggMail.ConnectTo( host, port )) and provide handlers for the various connect, disconnect, read data, etc events.

Those handlers definately couldn't be coded to be fast enough in vbscript. Now I don't get the whole COM/DLL thing (never had to use it before), but can it be used in that fashion to go 'OnConnect = MyDLL.OnConnectEvent( )' and 'PreviewPane = MyDLL.NewPreviewPane( )'... how will that kind of customization of the interface work?

The other thing to consider is supporting a script engine that does compile, for example LUA (www.lua.org). That way ZuggMail can compile the scripts for each of the plugins on plugin load and maintain a much faster response for the heavy customization.

LUA's quite heavily used for scripts in game development, so it is definately a fast language. I'm considering throwing out the current script engine in my MUD but the only thing that's pausing me from doing that is we'd have to rewrite a lotta scripts :)

And LUA's free for commercial use (which is great). Bioware uses it in Neverwinter Nights, just as an example of a big name.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Mar 11, 2004 1:08 am   
 
If you haven't really learned about COM, you are missing a lot! COM is extremely cool.

To answer your question, you definitely will *NOT* want to use MS Scripting for anything complicated. What you will do instead is create your own COM object using your favorite compiler. It can be a DLL file or an EXE file. Then, as you said, you assign various events in ZuggMail to call "methods" in your COM object.

ZuggMail will basically define some parent object "classes". For example, there will be a "user interface panel" class, and a "folder" class, and a "message" class. When you write a plugin COM object, your COM object will be required to implement the functionality needed by the class.

In a way it's a lot like a zMUD COM plugin. For example, zMUD depends upon your plugin to have a "Register" method. In ZuggMail, a user interface panel class will be required to have a "Name" property, and a "Left", "Top", "Width", "Height" property, etc. It will have a "create" method and a "destroy" method.

A "data store" class will have a method to retrieve a "collection" of messages. (A collection is a pre-defined Windows COM object).

I'll actually be trying to mimic the class structure used by Outlook as much as possible to make it easy for people to code plugins. If you take a look at a book on using VBScript with Outlook, for example, you'll see their class for messages, folders, etc, and the various properties and methods of those objects.

I'm definitely NOT going to replace the MS Scripting engine with anything else, nor any compiled scripting. You'll use normal MS Scripting for simple stuff, and write COM Plugins for more complex stuff. But I'll have a LOT of examples on how to do this. Since ZuggMail itself will use plugins itself, it will work a whole lot better than the zMUD plugins.

Remember that zMUD plugins were added much later. zMUD was never designed from the beginning to be a COM server or to handle plugins. Since ZuggMail is being designed from scratch to work like this, it will be a lot cleaner and easier to use.
Reply with quote
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Home » Forums » General zApp Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2009 Zugg Software. Hosted on Wolfpaw.net