Article Preview
Buy Now
| Print: | |
| PDF: |
Review
RBScriptPluginManager
Issue: 2.1 (August/September 2003)
Author: Jim Rodovich
Article Description: No description available.
Article Length (in bytes): 3,707
Starting Page Number: 10
RBD Number: 2106
Resource File(s): None
Related Link(s): None
Known Limitations: None
Full text of article...
Plugins can be used to extend the functionality of many different types of modern applications, from web browsers to paint programs, and even operating systems themselves. RBScript is one way that REALbasic programmers can add such plugin functionality to their applications.
10
No description available.
REALbasic takes care of most of the "hard stuff" like parsing and compiling when working with RBScripts, but programmers still have to implement a system to open, compile, keep track of, and execute the individual plugins.
RBScriptPluginManager is a group of classes that handles the tasks of managing RBScripts in a REALbasic application. With RBScriptPluginManager, an application can have a "Plugins" folder containing various RBScript sources saved as text files. RBScriptPluginManager simply loads and compiles each of the scripts in the plugins folder and lets you run the individual scripts.
After fixing a syntax error in the RBScriptPluginException class (oops), the example project runs and works correctly. The example project contains two simple test scripts. The "good" script calls a few methods and prints a couple lines, and the "bad" script calls a nonexistent method in order to show off the framework's exception handling system. (It should be noted that because of the "bad" script, the example project will quit with an exception when it is first run. This is not a problem with the framework, although a real application would handle the situation more gracefully.)
Since RBScriptPluginManager is open-source, users can add and modify features to meet the needs of an individual project. The code in each of the classes is thoroughly commented; for the most part, each line of code is preceded by a comment. In fact, commenting is almost excessive, as many lines really do not require comments. Still, it is easy to tell what each line of code does which would aid in modifying the framework to fit a project.
RBScriptPluginManager requires the Einhugur CoreClasses plugin to handle some menial tasks like string tokenizing and array management. These tasks are nothing that could not be done in REALbasic code, so those who are wary of using plugins could probably modify the framework to avoid using the plugin without much trouble.
RBScriptPluginManager is a simple tool for a fairly uncomplicated task. Writing a similar framework from scratch is nothing that would come frightening to most people familiar with REALbasic and RBScript. However, this is part of what makes RBScriptPluginManager appealing, as it can be a good way to get some of the relatively boring programming out of the way so users can get to work on the more fun and challenging parts of writing an application a little bit sooner.
In Brief Product RBScriptPluginManager Manufacturer Brendan Murphy Price Free / Open Source Contact Info einhugur.com/Html/free3rd.html Pros Open source and easy to use, Code is well-commented Cons Requires CoreClasses plug-in, which some users may not be familiar with Rating (1.0-5.0): 4.0
End of article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|










