简体   繁体   English

CSLA.net - 可继承的基类

[英]CSLA.net - Inheritable Base classes

I was reading the book "Expert C# 2005 Business Objects" . 我正在阅读"Expert C# 2005 Business Objects"

The book describes various base classes to be inherited by various classes to solve real-world problems. 本书描述了各种类继承的各种基类,以解决实际问题。

替代文字

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? 谁能给我所有这些例子(有理由)更好地理解CSLA?

For example, Which real-world objects are to be considered as Read-only Root Objects (Student/Product/Order, etc.)? 例如,哪些真实世界对象被视为只读根对象(学生/产品/订单等)? And Why? 为什么?

The ProjectTracker sample (which can be downloaded on the CSLA downloads page ) has examples of all the main sterotypes used in the CSLA books. ProjectTracker示例(可以在CSLA下载页面下载 )包含CSLA书籍中使用的所有主要类型的示例。

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. 书中的第6章(面向对象的应用程序设计)概述了业务对象的设计过程,第8章(业务对象实现)给出了项目跟踪器对象的实际实现。

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. 一个例子是:我有一个名为ProductInfoList的列表,它有一个只读的子ProductInfo。 This would be returned to the user either in a ListBox, or from a search result, etc. 这将在ListBox或搜索结果等中返回给用户。

Hope this helps! 希望这可以帮助!

Here you can find what you need: 在这里你可以找到你需要的东西:

http://www.lhotka.net/cslanet/download.aspx (see Framework, test, samples) http://www.lhotka.net/cslanet/download.aspx (参见框架,测试,样本)

But before that take a look at this article: 但在此之前看看这篇文章:

The CSLA Framework; CSLA框架; what is in it for me? 它对我有什么用?

I would also recommend checking out our CSLA 3.8 templates . 我还建议您查看我们的CSLA 3.8模板 I had this same dilemma when I was learning CSLA. 当我学习CSLA时,我遇到了同样的困境。 He does provide sample snippets of what each BO Type should look like but I don't find this very helpful to visualize. 他确实提供了每种BO类型应该是什么样子的样本片段,但我发现这对于可视化非常有帮助。 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. 您可以查看我们的模板并针对您熟悉的某个数据库运行快速入门,并修改每个表的不同BO类型,以便更好地了解CSLA的工作原理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM