Newbie having trouble getting started

Newbie having trouble getting started

Old forum URL: forums.lhotka.net/forums/t/2057.aspx


ender posted on Monday, January 01, 2007

Hi Folks,

I've got the book, read most of the other resources, played around with the PTracker and am having trouble gettting started.

I'm trying to create an application that is similar to the pubs database in MSSQL, the app tracks books, authors, publishers, etc.

For no particular reason, I thought I would start with the Publisher as the first object to code, not a problem, created it as an CSLAEditableRoot. I then wish to create a list(displayed via datagridview) of these publishers for the user and allow the user to update, delete and insert. I don't know if this should be a CSLAEditableRootList or a CSLAEditableChildList ? How do I figure out which this list should be?

Its not clear to me differences are between the two.

Any help would be appreciated.

JonM replied on Tuesday, January 02, 2007

The answer really depends on how you are going to use the object.  I believe you want a CSLAEditableRootList.   A editable root list will allow you to retrieve a collection of publishers that you add, edit, and delete items.  Then you can save them all at once.  

You could also use a read-only list so the user can find the publisher they want to edit and then fetch a single EditableRoot Publisher object to edit.   I generally use the read-only lists in search windows where it is not practical or performant to load several thousand fat objects.  I'll create a list that just has the essential properties for searching.

Copyright (c) Marimer LLC