4

I was reading the book "Expert C# 2005 Business Objects".

The book describes various base classes to be inherited by various classes to solve real-world problems.

alt text

But the book does not provide examples of all those classes.

Can anyone give me all of those examples (with reason) to better understand CSLA?

For example, Which real-world objects are to be considered as Read-only Root Objects (Student/Product/Order, etc.)? And Why?

Community
  • 1
  • 1
user366312
  • 16,949
  • 65
  • 235
  • 452

3 Answers3

4

The ProjectTracker sample (which can be downloaded on the CSLA downloads page) has examples of all the main sterotypes used in the CSLA books.

Chapter 6 in the book (Object Orientated Application Design) gives an overview of the design process of business objects & Chapter 8 (Business Object Implementation) gives the actual implementation of the Project Tracker objects.

In terms of your specific query - I haven't often used "Read-only root" objects. However, I often use "Read-only list root" objects though. An example would be: I have a list called ProductInfoList, which has a read-only child ProductInfo. This would be returned to the user either in a ListBox, or from a search result, etc.

Hope this helps!

Brad Leach
  • 16,857
  • 17
  • 72
  • 88
2

Here you can find what you need:

http://www.lhotka.net/cslanet/download.aspx (see Framework, test, samples)

But before that take a look at this article:

The CSLA Framework; what is in it for me?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
manji
  • 47,442
  • 5
  • 96
  • 103
2

I would also recommend checking out our CSLA 3.8 templates. I had this same dilemma when I was learning CSLA. He does provide sample snippets of what each BO Type should look like but I don't find this very helpful to visualize. You could take a look at our templates and run the quick start against one of your databases that you are familiar with and modify the different BO Types per table to get a better understanding of how CSLA works.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Blake Niemyjski
  • 3,432
  • 3
  • 25
  • 41