de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Feature Suggestion: Simple "Module System"
PostPosted: Wed Dec 28, 2011 5:36 pm 
Offline
Shy
I just discovered this software, and I think it's great, it really looks like PCM and CM done right.
By using a scripting language, you avoid a lot of work implementing your own and don't have all those useless limitations CM, PCM and Milovana have.

There is one architectural flaw though, that will bite you in the ass at some point, as it did CM.
Scripts and there data are just installed by unpacking them into the common directory hierachy.
That made updating CM and complex CM-Scripts a pain in the ass.
I would suggest to introduce a very simple module system, where modules are organized like this:

modules/<modulename>/<version>/init.groovy
modules/<modulename>/<version>/main.groovy
modules/<modulename>/<version>/images/
modules/<modulename>/<version>/whatever/

After that, remove the "open" menu item form the program, on start the software just checks the module directiory, and loads all init.groovy scripts of the newest versions.
There should be no need for a script to ever replace any files of the software. Registering hooks, adding toys to the toylist, setting initial values in global storage, checking for other scripts being available, and whatever other feature you can think of, can be done by API-Calls from the init-scripts. Even if you introduce something like the main scripts CM had, this should be done this way.

It seems Sex Scripts doesn't have a global data storage yet, but once you do, make sure the API forces people to use Namespaces, so an API could look like this:
Object getData(String ns, String id);
void setData(String ns, String id, Object data);
with getData(String id) = getData(moduleName, id); and setData(String id, Object data) = setData(moduleName, id, data);

I hope it doesnt come across as rude, making suggestions like theese, without having contributed anything.
But it was one of the most annoying aspects of CM and PCM.


Top
 Profile Send private message 
 
 Re: Feature Suggestion: Simple "Module System"
PostPosted: Wed Dec 28, 2011 9:05 pm 
Offline
Site Admin
User avatar
Hello ; thank you for posting
I'm not sure what are your habits about it, but it looks a lot like python modules managment, or somewhat less like .net assemblies ; also, the mess with linux kernels (I have 6 successive kernels on my system. It is not normal, nor practical). SexScript has not been seen needing it because :
- update are erasing standard files, always. People who change system files (that include intro script for example) are burned. It is discouraged
- update of scripts are also erasing their own files. If not, script are not valid.
- nobody erase the data file
NB : Sexscript is not a modular software.

There is a global storage, with save(key, value), loadInteger(key), loadString(key)... NS is not mandatory, only recommanded


Top
 Profile Send private message 
 
 Re: Feature Suggestion: Simple "Module System"
PostPosted: Fri Dec 30, 2011 10:58 pm 
Offline
Shy
Ok, you mostly solved that issue by enforcing some rules on the scripts.
It'll be harder to check for problems, as soon as you want to do that automatically, especially as scripts not only mustn't overwrite system files, but also files of other scripts.
But I guess your approach works and is just simple to implement.


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 16 guests


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 post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.