We built a learning delivery system a few years ago in Flash that has a plug-in environment. It is all driven by XML files so you never touch the Flash. You can write a new plug-in and have it dynamically loaded if the XML calls it. The XML has a flexible structure that allows the designer of the plug-in to specify the custom data structure that it requires. When the top level engine finds a course page that uses a plug-in it loads the plug-in (a swf of course) and passes it the complete XML sub-node that it extracted from the course file.

When the plug-in is done, it calls well defined functions to return information to the main flow. This is mostly used for tests. There are existing plug-ins for multiple choice, true false and matching. These can return a mark as well as some feedback in the case of wrong answers(The student picked #3 when the #4 was the correct answer). This helps the instructors to detect poorly written questions. A flash developer can create a custom test plug-in. For example, one course required a piping diagram of a chemical flow wherein the student was required to put arrows on the pipes to indicate which direction the chemicals flowed through the reactors and pumps. The plug-in returns a right wrong as well as a list of the choices. At the end of a marked test (there are formative tests as well), the results can be e-mailed to the student and the course administrator.

Instructional plug-ins do not return test results. They just signal that they are done and the main engine kills them and moves on. There are plug-ins for multiple bullet slides, with and without images. These typically describe the font, size, colour and style of the text. they also say at what time the bullet or image is to appear so that you have synchronization with the sound file. This gives the look of a custom animation at the cost of a Powerpoint. There is also a place to define how(type of transition and time to complete the transition) the images are to transition in. This lets the instructor mix images, animations and text pretty freely, all synchronized to the sound.

The main flow can handle simple pages (image or swf and a sound file) without a plug-in. The main flow is responsible for the navigation (previous slide, next, help, chapter index), page control (stop, play, rewind) and the sound controls (volume, mute). Rewinding plug-ins is possible in some cases - it makes no sense to rewind a test.

In short, yes it is possible to do this. This was done in AS1 and converted to AS2 a few years ago.

Ron

Hans Wichman wrote:
Hi Jer,

we have been dealing with the same kind of questions (and still are now and
then).

We have a course engine out there, which has a very simple setup/interface
(although the inner workings are not that simple).
But we ran into the same problem, adding content required us to recompile
the engine now and then.

We thought about going the plugin way, and we even had most of the design
ready.

It involved something like loading a plugin which existed of a number of
classes defining the plugin, request/result types, registration to one
service bus or another etc. In the end a request wouldnt know which service
satisfied it, which plugin handled the result etc.
Basically it didnt involve a lot more than usual I think in terms of
patterns, using the command, businessdelegate, service, valueobject,
request/response (if you can call that a pattern), abstractfactory,
registries etc.
BUT the biggest problem at the moment is that the gap in terms of
refactoring between our current system and the 'utopia' system is too wide
to call it refactoring. Better to call it a complete rewrite. In addition,
the question we were asking ourselves was whether we were going to do this
because it would be uber cool to build such a plugin system, or that the
functionality required really demanded such as architecture.

In the end we chose to follow a different route at the moment and that is
refactoring our current system step by step. Not that it is a bad system, it
is pretty good as it is, but in order to be able to maintain/extend it etc
some refactoring is necessary. Maybe if the requirements require it (:-S)
and the refactoringsprocess has gone far enough, the plugin system will find
its way in eventually.

Maybe it is of any use to you if I describe the current system:

the current system has a few part, a controlpanel, a dialog panel and a
locationpanel
These parts supports different commands, eg loadSwf, showDialog,
addTabButton etc
All these commands are supplied by the backend.

So basically an empty interface starts up and sends a systemstart event to
the backend.
The backend says load location A, show dialog B, and adds these 3 buttons.

The location can be anything, for example we have an fake email application,
a notepad, panorama's etc, but the most basic location type is simply an
image with hotspots. If you click on a hotspot, an event goes back to the
server and the server tells us what to do again such as load another
location, remove some buttons, add some tabs.

In the end its a complete elearning/adventure style kind of engine.

HTH
JC




On 8/22/07, Jer Brand <[EMAIL PROTECTED]> wrote:
AS2 / Flash 8 project and needing help with the design. I'm probably going
into way too much detail for the question but...

I'm working on course template or engine (for lack of a better term) to
deliver content swf's. The problem in our shop is the massive amount of
change in basic functionality for each course have meant (before I worked
here) the template code has to change every course. This, to me, is a very
bad thing.

My solution is to build the core template to be almost slide show simple,
but loads classes from external swfs as "plugins" and broadcasts a number
of
events.  Each of the plugins's implements an interface that tells the main
app what events the plugin should be subscribed to.

Nearly all the functionality is contained in the plugins: LMS
communication,
layout, accessibility, the actual interface, etc. Plugins have to be able
to
modify or add content to the main app and the loaded content pages.
Plugins
also have to be able to tell the main app when they're done doing
performing
their edits at each event.

Now, I have a working solution, It does the job, and does it well.
However,
the design of the app and plugins are heavily interconnected. To get the
job
done, the main app has to constantly pass around pieces of itself and
other
plugins (like the display area or the UI), the interface to keep things
working smoothly.

Obviously it's not good design, but the prototype is out of the way, and I
know it's not an invalid path to use something like this.  Now I'm looking
for a better way. Is there a Pattern or common practice for designing a
plugin scheme? My first thought was "Hey, isn't there a Plugin pattern?"
but
my google skills are failing me on finding anything about it, or how
anyone's done this in the past.

Any help to be had or is this such a specific thing that general "this is
the best pattern" isn't a valid question.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to