Chapter 7. Let the Rules Rule
In the last chapter, we took a nice break and looked at some infrastructure preparations. Now we'll return to the core model for a chapter. This chapter is about rules.
The topic of rules is a huge one. We will...
Categorization of Rules
If we try to categorize rules, we quickly find out that there are many dimensions to consider. For example, there are attributes such as the following:
Where to execute (in which tier/layer)When to executeDegree of complex...
Principles for Rules and Their Usage
I think the word principle is very good because it's not strict. It's much easier to come up with principles than categories, probably because of the built-in vagueness. Still, principles are descriptive regard...
Starting to Create an API
We'll come back to these principles and evaluate how we fulfilled them later in the chapter, but now it's time to come back down to Earth and take up some of the problems outlined in Chapter 4. I'm going to start with the...
Requirements for a Basic Rules API Related to Persistence
Now that we have decided on a specific context for now, that of the transition to the state of persisted, let's start the discussion about an API regarding that. We will get back to other (...
Focus on Domain-Related Rules
Let's work with the remaining feature requirements from Chapter 4, one by one. We started out with the feature requirement number 6, which was called "An order may not have a total value of more than one million ...
Extending the API
We have talked about the rule API regarding persistence-related rules and how to get information about problems with those. What more do we need of the API?
Well, depending on the application we are building, we might really nee...
Refining the Implementation
So far we have been focusing on the rules API from a consumer viewpoint. I think it would be interesting to write about some ideas on how to implement the rules as well. So let's get under the hood of the Order class an...
Binding to the Persistence Abstraction
In the previous chapter, I talked about how to prepare for the persistence infrastructure by working with an abstraction layer that I called NWorkspace (which is just an example of such an abstraction of cour...
Generics and Anonymous Methods to the Rescue
If you are using an environment that supports generics (such as .NET 2.0), you can of course apply generics to the solution proposals discussed previously and gain slightly in explicitness, type safety,...
What Others Have Done
I have occasionally touched on what others have done and written about in this respect, and before we end I'd like to touch on two more sources.
The first is Streamlined Object Modeling [Nicola et al. SOM], which has a tho...
Summary
All these years and this topic still feels a bit immature and with no obvious solutions. That said, we have touched on several ideas for how to deal with rules, some typical and some a little more atypical.
We discussed quite a lot about ...
AJAX popular information C# language guides Windows books and cookbooks
.......
С 2009 года мы стали переводить структура сайта на различные языки. Сайт теперь будет содержать книги не только на английском языке, но также и на других европейских языках, в том числе и на Русском языке.