Modular programming
Hi all,
I'm quite new to RL and I'm looking for a best practise to build
modular applications. In your knowledge base / best practise guide
is mentioned that "Modular programming will not be covered by this
document". Where can I find something more or who can point me in
the right direction? Is the module utils (http://github.com/Stray/robotlegs-utilities-Modular)
the right way?
Thanks.
I see i post it in the wrong section i guess! Is not a problem is a question. If someone could move this in the right section and edit. Sorry.
Comments are currently closed for this discussion. You can start a new one.
2 Posted by Stray on 21 Feb, 2010 02:53 PM
Hi Jadd,
I'm very happily building a modular app at the moment, it's all working fine.
Toland is doing some work to reconfigure the modular utils to have less manual set up and make more use of the RL framework, but the version on my github is definitely working and pretty easy to understand.
I've actually made a couple of very small changes since then that I haven't uploaded yet. I've added a ModuleContextEvent that lets you know that all your modules are 'ready' (ie have run startup) so that you can avoid race conditions, and a couple of extra helper functions.
I've also incorporated signals into the context because I'm using them in my app, so I have a module-signals-context, and have repackaged signals to live in the utilities folder, as well as making some changes (now duplicated in the signals github code) to allow a signals context to pass constructor parameters to the context.
I'm happy to share actual code of how I'm using it in my current app - can't do it publicly because it's client owned but they'd have no problem with me sharing the core with individuals.
I can't say my way is the *right* way - it might be done differently in future - but it's definitely working and is on the anal side in terms of best practices for easy-to-understand code.
Let me know if I can help - probably easiest to join the google group (***@googlegroups.com) and then we can chat a bit more experimentally there and you'll have my email etc.
Thanks,
Stray
3 Posted by jadd on 21 Feb, 2010 05:52 PM
Thanks for reply. I will join the group for sure! But whi is not the "modul" integrated with RL?.
4 Posted by Stray on 21 Feb, 2010 06:00 PM
Hi Jadd -
I think the intention was always to make RL as lightweight as possible.
All add ons - signals, modular, asynchronous commands, state machines and so on - are community generated utilities that you can pick and choose to add to your RL build. This also allows for more than one style of solution to common problems. For example - the current modular solution on my Github allows non-RL modules to be integrated with RL modules. That's good for some use cases and not necessary for others, where more of the bootstrapping can be handled by the injector.
Flexible FTW!
5 Posted by jadd on 21 Feb, 2010 06:13 PM
Yes I could agree with you, but this is one of those big unresolved programming?! problems! Manage all the the dependencies! and or add ons. It's not easy to maintain.
How about a simple "guide" to your "modular" approch. In any case Thanks.
Support Staff 6 Posted by Shaun Smith on 09 Mar, 2010 08:27 PM
Hi Jadd,
This blog post might be helpful:
http://www.sitronnier.com/blog/playing-with-robotlegs-modular
7 Posted by jadd on 10 Mar, 2010 06:16 AM
Hi Shaun and thx for the link.
jadd closed this discussion on 15 Nov, 2010 09:43 AM.