Hi Mayuresh,
Here's what comes to my mind.

Class hierarchy
User - Book - (Page Collection) - Page - (Asset Collection) - Assets

User class holds the id of the user currently logged into the system and
his/her permissions for each type of operation.
The Book class holds the database record/file handle of the book belonging
to the current user.
The Page class contains the record number where the book id is the same as
the current users book.
The Asset class contains a handle to a single record where the page id is
the same as the current open page in the book.

All recording operations are handled at the Asset level except for creation
of a new Asset where the Page class implements the method and the creation
of a new Page where the Book class implements the method.

The Page and Asset classes are better contained inside a separate Page
Collection class and an Asset Collection class rather than a list. Putting
them in a class can let you extend the existing functionality available
through lists by adding custom methods such as e.g. gotoPage(pageNum) or
deleteAsset(assetNum).

The Asset class depends on the User class for permissions for each
operation. Before each operation, the User class is queried for permission
for a certain type of operation. If the User class returns true, then the
operation is allowed, else it is blocked.

Possible operation types:
1 - Read
2 - Modify
3 - Add
4 - Delete

This is in no manner a very comprehensive design. Just what I can think of
over the top of my head. I had some detailed notes for a similar
application which are lying at home. I'll mail them to you later if you
like.

Have a nice day.

Pranav Negandhi
Software Engineering
Learnet India Limited, Mumbai.
Phone: 91-22-859 8042 Ext: 316
http://www.learnetindia.com



[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to