On Wed, Jul 1, 2009 at 7:11 AM, annet <[email protected]> wrote:
> > Yarko, > > > .... the reason I am doing all this - I like to see how much can be > solved > > with structure, and thus minimize code (need for widget)... > > > > ... so first I'm trying to understand the kind of strucuture that is > > "natural" in what you are dealing with... > > A mathematical approach (structure and patterns) to analysis and > design. I am afraid I am not yet proficient enough to produce a model > close to perfection. > > I am dealing with fitness and health clubs. > > > > So you have facilities (locations...) > > ... and you have ... mmm.... resources (it could be a swimming pool - > with > > open hours; it could be when a masseuse or perhaps a coach-by-name is > in...) > > > > and the resources have schedules; and those schedules have > availability.... > > > > and the resources have a relationship with a facility - in the case of > > something fixed (e.g. swimming pool) it's probably a single relationship > for > > that resource; for other things, (e.g. trainer, masseuse) it may be > many > > relationships with facilities.... > > > > and there is some relationship between schedules: e.g., a trainer's > schedule > > involves several facilities (so the trainer's view of the trainging > schedule > > for tennis is different than a facilites view of scedule for tennis). > > > > so that sounds like a schedule event has an association with a > > facility-resource, a professional, and an attendee. > > > > How am I doing so far? > > Great, I am starting to get your point, talking about structure. > > > > And you are trying to do something with widgets to manage the complexity > --- > > e.g. tennis courts might be 5, 3 for open play, two for trainer use on > > certain hours... > > That's one example, other examples: > the restaurant being open daily from 07:00 am to 11:00 pm, a schedule > event without professional or attendee. > the dojo only being open when scheduled by a professional and a group > of attendees > squash courts being scheduled by attendees during the company's > opening hours > > Some company owners regard the air-conditioning, parking lot, lockers > and towel service as facilities as well. > > I find it difficult to get a grip on this part of my domain. Given the > concept of bounded rationality I have to settle for a less perfect > model and improve on it in upcoming iterations. Yes exactly - My point, the exercise that I wanted to follow - is to get as many "real world" uses, understand what people (owners, clients, restaurants, etc.) want for _their_ use, and for each of these try to make some programmer's abstraction (e.g. "resource" can be ... well, I started with two types). The "structure" I look for is what KINDS OF THINGS do all these people talk about, and what is the MINIMAL ABSTRACTION that works (covers the specific cases), and has the FEWEST special cases (which is just a way to "create" fewer or a smaller abstraction). Once this is in some reasonable 80% state, THEN I like to code / prototype to see if [a] the abstractions hold up, and [b] if there is some special cases that I forgot to consider (perhaps operational - perhaps something only I, the programmer, would know or care about - like sessions expiring). As this progresses, I may go back and re-factor (try to make cleaner abstractions, better definitions of the interfaces between the abstractions, etc). All this results in my discovering where / when I need utils, tools, widgets. So - I was trying to get to an understanding of the base logic, base system ... since I couldn't tell why you were wanting to use a widget. I am still not sure widget is the right (or wrong) thing; I'm just not seeing the structure you have (external, in the world - the clubs, professionals, facilities), and how you have mapped that to your structure (internal - the code, tables, etc.). Anyway, sorry if this is too far away from your code question - it's what I find the most fun ;-) (coding, then - alas - should become rather simple, trivial). To get a grip on this part of your domain, I start with what is - no interpretation - and try to assign my abstractions.... e.g. calandar event has these relationships with other things..... professional has association with more than one club... restaurant is a kind of fixed facility that has limited availability for certain kinds of events... etc. Then as new things come up for me to do, all I need to do is see if this is one of the "kinds of" things I've already structered for... If not, is it close (e.g. can I iterate - slightly modify my abstraction to accomodate this without impacting other things)? If not close, do I need a new abstraction, or is this a special case? (that is, are there likely to be more of similar kinds of things in th e future?) This is the fun of design, I think ---- lots of fun actually.... ;-) So - back to your widget question: all I want to know for that question is: have you thought thru your abstractions that are involved (and will be served by this widget)? Can you describe what you think the necessary relationships between system abstraction are? Then we can go into: is this a good way to manage what you need? would a change in structure (e.g. a change in data table, new data table, etc.) be better / easier? Or - Ah, now that we see what is really needed, here's a good way to structure widgets. Kind regards, Yarko > > > > Kind regards, > > Annet. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

