[Tutor] preliminary app design question
alan.gauld at freenet.co.uk
Thu Apr 6 13:36:06 CEST 2006
>> The class approach coupled to a config XML file would do this.
> > Define a file that looks something like
>> <displayName>My Foo App</displayName>
>> </value default="15">
>So for the master program this makes sense. However, what about the
>input/output data of each individual design app.
OK The params can be used to point at some common database
> will share some common data but each one may have different
> components, and some will be large arrays of numbers, is XML
> till applicable for that type of file data?
Personally I wouldn't use XML for content data which is
repeated in large volume - the overheads are too high. This
is where I'd consider using a shared class or dictionary to
define the data and then pickle and/or shelve to save instances.
Either that or go with a lightweight database such as SqlLite.
> 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.
There are two sepoarate areas of concern.
1) The master app and its applet launching mechanism
2) The common data between applets
The solutions are likely to be different. For the common data
look at each common class and its responsibilities. What should
that class be able to provide in the way of sertvices for the
applets to consume. The applets then become a fairly simple
set of scenarios stitching together the services provided by the
shared classes. Without more specific knowledge of your
problem domain I can't be more specififc but this is afaily
common approach used in Financial and Customer
Handling applications for example.
> It's becoming more complex the more I discuss it.. ;)
They always do! Sometimes its better to just make a start
on the bits you think you do understand and see how it
hangs together. A very rough master application laiunching
a single applet using a minimal set of shared data would
be a good goal for starters.
More information about the Tutor