One-to-many relationships & nested widgets?

6 views
Skip to first unread message

Duncan Bayne

unread,
Jun 21, 2011, 4:25:07 AM6/21/11
to weblocks
Hi,

My (intended) model has a pretty simple set of nested one to many
relationships, like:

Lesson Plan -> Lessons -> Topics

However I'm at a loss how to model this in Weblocks. All the examples
I've seen are of simple models and widgets. I've got my 'lesson plan'
going, & can CRUD lesson plans, but now I'm a little lost.

Could someone please point me at some documentation or a tutorial for
relationship mapping in Weblocks, & the associated best-practice for
nested widgets (which I'm assuming is how to go about it on the UI)?

Yours,
Duncan Bayne

radisb

unread,
Jun 21, 2011, 8:19:42 AM6/21/11
to webl...@googlegroups.com
I think it mostly depends on the presentation model you want to implement and not so much on the kind of relationship of your entities
You could present your model in many ways: 

Lesson Plan: grid ->drill down to see lessons -> drill more to see topics

Lesson Plan: page -> lessons as links -> topics as links in the linked lessons pages

Lesson Plan: nav bar -> lessons as tabs -> topics as content (links list or whatever)


Of course you could mix and much or do pretty anything you want. 

I would suggest deciding on the presentation in a more specific way and 
then start to think how you can translate that to weblocks.

You dont model abstract relationships with Weblocks (and any web framework), you implement presentational models.  .

I really would like to be able to answer more specifically to you. I am not an experienced user of neither lisp or weblocks. Maybe others have more specific information.
I think you will find many code snippets here for parts of "presentational models" and "interaction patterns" people have tried to bring to life with weblocks. E.g authentication, or presenting grid data with many tweaks. Also the contrib of the source contain real gems especially as concepts or ideas for solutions to misc problems.

Vassilis.

Reply all
Reply to author
Forward
0 new messages