CSLA.net - 可继承的基类

发布于 2024-08-03 04:14:35 字数 290 浏览 3 评论 0原文

我正在读《Expert C# 2005 Business Objects》一书。

本书描述了各种类继承的各种基类来解决现实世界的问题。

alt text

但是本书没有提供所有这些类的示例。

谁能给我所有这些例子(有理由的)以更好地理解 CSLA?

例如,哪些现实世界对象被视为只读根对象(学生/产品/订单等)?为什么?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

苏大泽ㄣ 2024-08-10 04:14:35

ProjectTracker 示例(可以在 CSLA 下载页面 上下载)包含所有示例CSLA 书籍中使用的主要刻板印象。

书中的第6章(面向对象的应用程序设计)概述了业务对象和应用程序的设计过程。第 8 章(业务对象实现)给出了项目跟踪器对象的实际实现。

就您的具体查询而言 - 我不经常使用“只读根”对象。但是,我经常使用“只读列表根”对象。一个例子是:我有一个名为 ProductInfoList 的列表,其中有一个只读子 ProductInfo。这将在列表框中或从搜索结果等中返回给用户。

希望这有帮助!

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!

晨曦÷微暖 2024-08-10 04:14:35

我还建议您查看我们的CSLA 3.8 模板。我在学习CSLA时也遇到过同样的困境。他确实提供了每种 BO 类型应该是什么样子的示例片段,但我认为这对可视化没有太大帮助。您可以查看我们的模板和 针对您熟悉的数据库之一运行快速启动,并修改每个表的不同 BO 类型,以更好地了解 CSLA 的工作原理。

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.

靖瑶 2024-08-10 04:14:35

您可以在这里找到您需要的内容:

http://www.lhotka.net/cslanet/download。 aspx(参见框架、测试、示例)

但在此之前请先看一下这篇文章:

CSLA 框架;这对我来说有什么好处?

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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文