Many Questions About Using CSLA ??

Many Questions About Using CSLA ??

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


Islam Ahmed posted on Sunday, January 21, 2007

Hi Everyone
Peace Be Upon U All

First Of All I Want To Thank mr.Lhotka Very Much For The Great Effort Of Writting The C# Bussiness Objects Book & The CSLA , defenetly I Learned & Enjoyed It Much Smile [:)]

But I Have Some Questions About Problems I Faced Using CSLA For A Short Time (Still A Beginner)

- I Wonder If There Is A Template That Creates The Stored Procedures Like Those In The Book
(I Found A Template In CodeSmith But Not Similar To The Book Style).

- Is There Any Other Applications & Tutorials That Can Help Me Understand CSLA In Different Scenarios?

- In A Multi-Level Parent/Child Case , How Can I Get It Working In A CSLA
(Actually , I Wanted To Make ONE Form That Contains 3 Datagrids For The Situation
Application --> Modules --> Tasks
The System Contains Many Applications Can Be Edited In Grid 1 At Top And Every Application Contains Many Modules Appears In The Middle Grid , And Every Module May Contain Many Tasks Which Will Be Displayed In The Third Grid At Bottom, "the possibility to go down more levels exists by the way"
How Can I Get This Form Working With CSLA? Will I Need More Than One SafeDataReader?
And What Is The Structure Of The Base Classes That Will make My BObjects Work Fine
'I Mean Editable Root Collection , Editable Root , Child Collection and so on..'
it may look silly but it may happen Smile [:)]

Thanks You

Islam Ahmed

 

ChrisD replied on Monday, January 22, 2007

You can have a look at my site - http://www.onelittlevictory.com.  it may help you a bit.

Chris

RockfordLhotka replied on Monday, January 22, 2007

Islam Ahmed:

Application --> Modules --> Tasks
The System Contains Many Applications Can Be Edited In Grid 1 At Top And Every Application Contains Many Modules Appears In The Middle Grid , And Every Module May Contain Many Tasks Which Will Be Displayed In The Third Grid At Bottom, "the possibility to go down more levels exists by the way"

This sounds like it could add up to a lot of objects to load with data. However, to accomplish what you describe you'd probably have:

ApplicationList<-BusinessListBase
ApplicationEdit<-BusinessBase (child)
ModuleList<-BusinessListBase (child)
ModuleEdit<-BusinessBase (child)
TaskList<-BusinessListBase (child)
TaskEdit<-BusinessBase (child)

To avoid loading all the data at once, you could change ApplicationList to be an EditableRootListBase and use lazy loading to load its ModuleList on demand. That way you'd only load an ApplicationEdit object's ModuleList (and all its children) if the user selects that row in the first grid.

Stephen Richards replied on Thursday, January 25, 2007

I am designing my first CSLA project and I was just contemplating using lazy loading for one child object to improve performance.  Do you have a template or an example of this I could follow so I don't miss something?

Thanks for all your hard work.

Thunderstruck replied on Thursday, January 25, 2007

I can't speak for the C# version, but the VB version has templates in the \csla20vb\Templates folder.

Islam Ahmed replied on Thursday, January 25, 2007

Thanks for your replies

about the onelittlevictory site i found many usefull info and i'm waiting for the sections that still not completed to be done , i think it will contain many usefull extra ingo.

and for mr.Lhotka thanks again and i'll try ur suggestion and may be i'll post the code on the thread so any one can get use of it (although i'm very busy those days , but i'll try hard to do this soon)

thanks
islam ahmed

Copyright (c) Marimer LLC