On 4/5/06, Alan Gauld <[EMAIL PROTECTED]> wrote:

Sounds like creating each app as a class which can be instantiated on
demand by the master application would be a possible design option.

I guess writing the master program (or some simplified version of it) would be required from the start in order to make launching the separate design programs possible (for testing, debugging etc..).

The class approach coupled to a config XML file would do this.
Define a file that looks something like

<applications>
    <application>
        <displayName>My Foo App</displayName>
        <className>Foo</className>
        </icon src="">         <params>
             <param>
                   <name>MyName</name>
                    </value default="15">
             </param>
             <param>
                   <name>AnotherName</name>
                    </value default="0">
             </param>
       </params>
   </application>
    <application>
        <displayName>My Bar App</displayName>
        <className>Bar</className>
        </icon src="">        <params>
             <param>
                   <name>SomeName</name>
                    </value default="None">
             </param>
       </params>
   </application>
</applications>

Then you can read that and use it to construct a menu or set of buttons
or toolbar or whatever.


So for the master program this makes sense. However, what about the input/output data of each individual design app. All the different programs will share some common data but each one may have different components, and some will be large arrays of numbers, is XML still applicable for that type of file data?

I think my first task will likely be settling on what I need each component of the system to do and how they will interact. It's becoming more complex the more I discuss it.. ;)

 

> Obviously this won't happen right away, I would likely develop each
> small design app as a standalone and then when I've got 3 or 4 done
> I would tie them together with the project app.

Why wait for 3 or 4 just add them one by one! Its just aase of editing
the config file... In fact you could eveb make a config applet to create
the xml entries as your first project!


Ease myself into it. ;)

 

Investigate ElementTree - its much easier than the standard xml dom
and sax parsers that ship with Python.

I have the documentation printed out for study. Thanks for the help.


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to