[Zope] Help in deciding approach to Web App

John Schinnerer john at eco-living.net
Mon Dec 5 09:48:36 UTC 2011


On 12/04/2011 09:56 PM, Fernando Martins wrote:
> On 12/04/2011 09:31 PM, John Schinnerer wrote:
>> In any case, this looks (to me anyhow) like a very object-oriented
>> system you are modeling so an object oriented approach and language
>> would seem most suitable.
>
> And how would you create (and update) objects in Python for:
>
> "at least 500 tools as of now, and it is bound to grow in the future as
> newer tools are introduced. Existing tools will also have version updates.
>
> Each tool, on average, has at least 100 properties that define the tool.
> Some of them have as high as 1000 unique properties."

How familiar are you with OOP?

What I mean is, when I read your high-level description of what you want 
to do, I imagine objects interacting with other. In your "car wash" 
example I see that, for instance. Or any kind of work-flow, which is 
what this sounds like to me. A state machine.

Each tool is an object; it knows what its properties and abilities and 
possible states are and can communicate them to other objects and can 
accept and act on communication from other objects. In that way the 
objects interact with one another to do whatever it is you build them to 
do.

I'm thinking of your "car wash" metaphor. In a car wash there are a 
variety of elements (objects) that communicate with one another to move 
the car through and to wash it as it moves through. Simple example:

* mechanism that pulls or pushes the car through
* mechanism that sprays it with water and soap
* mechanism that scrubs and wipes and rubs it
* mechanism that sprays it with rinse water
* drying mechanism(s)

These all need to signal one another so they do the right thing at the 
right time. Spray (or scrub or blow hot air) only when the car is in the 
right place for each.

If some tools can be built by adding to/extending other tools, that is 
an object-friendly situation, since enhancing an existing tool to make 
another that you need saves you having to create all tools from scratch.

In the car wash, maybe the different sized scrubbers used are all made 
by bolting together two or more of the smallest size scrubber. Maybe in 
parallel, maybe in series, depends on what is needed.
Maybe the same scrubber controller can have different size brushes 
attached to it.

In short, an object - tool - is code and data that interacts with other 
tools (other entities of code and data).

An upgrade to a tool would involve changing the code and/or data that 
constitutes the tool. If that introduces some new way of interacting 
that other tools need to also know, then you add that to those tools also.

Adding more tools means coding them. If they can be based on existing 
tools, so much the easier (and more object-appropriate).

So that's some high-level information about an object-oriented approach 
to what I think your project is about.

Tthe flexibility you appear to need as the system grows may be 
problematic for an RDB. And, my bias is OO, so perhaps someone who 
thinks in RDB-space can describe at high level how this would look in an 
RDB implmentation.

cheers,
John S.





-- 
John Schinnerer - M.A., Whole Systems Design
--------------------------------------------
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
john at eco-living.net
http://eco-living.net


More information about the Zope mailing list