Glue your component-based-software together with Javascript
How many times have you heard of component based software ? Plugin
architectures ? Modularity ?
Loads.
So what's the problem with them ? None.
So why should your application be different ? It should not. End of the story
!
I know ... I know you have been too busy building your application that you forgot to think of its foundation.
So what exactly is a module in seppia ?
A module is that "piece" in your software that provides certain functionalities via some javascripts.
The javascript code can access the classes of the jars associated with the module and easily perform its task. It can also delegate some of its work to other javascripts or other modules (more precicely other javascripts in other modules).
Did you get it ? Probably not... don't fool yourself. Read it again:
A module is that "piece" in your software that provides certain functionalities via some javascripts.
The javascript code can access the classes of the jars associated with the module and easily perform its task. It can also delegate some of its work to other javascripts or other modules (more precicely other javascripts in other modules).
Now at this point there is the most frequenly askes question: Why javascript to define the functionality of a module why not to use XML ?
We like XML but we are not XML addicted. We like using XML when we need to use it but not when it's not its natural
place*.
If you want to glue a few jars together and provide a new service we want to achieve this by
1) placing the jars in one folder
2) write one or few javascripts that create java objects, interrogate them and handle naturally any conditional step.
Too often people are over-eager to use XML configuration files, while a scripting language makes a straightforward and powerful configuration mechanism.
Have you read this far ? Thank you very much dear reader. We hope you will enjoy
Seppia as much as we enjoy writing it (that means a lot). All The
best.
* For example so many people are trying to write frameworks to configure swing application via xml files, good luck to them but they are doomed to fail. XML can be great to describe some data but it does not work
well where a scripting language is more suitable.