Hey all,
So I recently started pulling out a lot of the "features" that I initially added to Moksha into seperate isolated "apps" that can easily be packaged up and installed seperately. The goal of this was to not only slim down the "core" of Moksha, but to also figure out how we want our basic skeleton apps to look.
From here, I will be working on a quickstart template that will allow
people to run one command and have it spit out a basic Hello World-ish Moksha app that can easily integrate with an existing TG2/Moksha/FComm instance, or be run in isolation.
You can see the new `moksha.apps` module here:
https://fedorahosted.org/moksha/browser/moksha/apps
One of the more solid examples of the app layout is the moksha.metrics app, which can be found here:
https://fedorahosted.org/moksha/browser/moksha/apps/metrics
The core of an 'app' is it's pavement.py file, which uses Paver (as opposed to the old school setup.py setuptools method). Here is what the metrics pavement.py looks like:
https://fedorahosted.org/moksha/browser/moksha/apps/metrics/pavement.py
As you can see at the top, it pulls in moksha.lib.paver_tasks, which contains a few helper methods that I created to easily generate an RPM for an app, and install it. This will allow us to easily script tedious tasks that can be shared across all apps.
https://fedorahosted.org/moksha/browser/moksha/lib/paver_tasks.py
Once a user spits out a new app, they can run `paver rpm`, and spit out an RPM of their application. This has been working great for me so far.
So, I'm open to comments, criticisms, suggestions to this new layout. So far, I find it to be extremely modular and fairly clean, and using Paver will allow us to make it extremely simple to work with the apps.
I'm hoping to hack out the app quickstart template along with some HOWTO documentation this week, so please chime in if you have any suggestions.
Cheers,
luke