realbasic-nug
[Top] [All Lists]

Re: REALbasic Application Plugin Architecture - Possible??

To: REALbasic NUG Network Users Group <realbasic-nug@lists.realsoftware.com>
Subject: Re: REALbasic Application Plugin Architecture - Possible??
From: Thomas Tempelmann <tt@tempel.org>
Date: Tue, 30 Dec 2008 11:25:51 +0100
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <5CA713B9-E4BF-4455-BE5D-D98A508F13C1@mac.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
Thread-index: AclqaPz3O38+pNZcEd2mPAAdT0hFXA==
Thread-topic: REALbasic Application Plugin Architecture - Possible??
User-agent: Microsoft-Entourage/11.3.6.070618
On 30.12.2008 11:05 Uhr, "Tom Benson" wrote:

> I'm guess what I'm asking is "Is it possible to create an application
> that can be functionally extended by plugins (created in REALbasic),
> similar in concept to photoshop, OS X mail etc.?"

Well, I've done this many times by using RbScript:

The plugins are written in RbScript, which I then load. As the RbScript
compiler turns them into non-interpreted machine code, there's practically
no speed loss in that compared to other script languages like JS and PHP.

I wrap the scripts into xml files in which I can then have several scripts
for different functions, and even embed pictures in it (using base64
encoding, for instance).

Also, Scripts don't have to run as pure subroutines of a RB app. On my
website, I've documented a way how scripts call back into the app and then
be suspended there until some event activates them again
(http://www.tempel.org/rb/#sleep). That way, you can even have the script
have an "event loop" waiting for input.

Not using Rbscript but compiled RB apps would mean that you:
- get much much bigger "plugins", each at least 5 MB in size, probably,
blowing your app up.
- can't have the plugin call back into your app - you'd have to use some way
of talking with each other via files, sockets or TCP, making it all a bit
slower.
- To get the picture you talked of, you'd either launch the plugin as an app
and then use the communication path to ask it for a picture, or you'd
require that the pic appears in the plugin's folder along with the plugin
itself, under a certain name.

Thomas



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>