Common Parent Class Businessbase
My friend's comments gave me a lot of motivation to write this series of articles, it seems that everyone is more concerned about this series. In order to follow the article to do a foreshadowing, I in the first half of this article to explain the overall structure of the blogengine.net, the latter part is mainly for the Businessbase class analysis.
After downloading the source code to open the solution, we found that from the project's organizational structure blogengine.net divided into two projects: one is blogengine.core, as implies meaning, it is BlogEngine.NET's core logic layer. All the business logic and some features are embodied in this project, and there is actually a part of the data access in this core business layer, and that is the provider model. In BlogEngine.NET, there is only one function of relational databases or XML, and that is to store data, and the ID generation of BlogEngine.NET business objects is controlled by the core layer, not in the data store, because it can support more data sources. It is different from many other business systems, the database may have a lot of stored procedures, triggers, functions, etc. to complete a certain business operations and data processing. In BlogEngine.NET, we can even use a. txt file to develop a provider for blogengine.net to use, the method is simple, as long as the implementation of Blogprovider (BlogEngine.NET provided), Membershipprov Ider and RoleProvider are on the way, and in fact BlogEngine.NET has also largely exploited the classic model of. NET itself. Another project is a site, mainly the specific Web implementation, but the specific function is to call the core layer to complete.
Actually just started to see BlogEngine.NET source code when I also difficult to start, do not know where to look, can not find the entrance of the place. In fact, it is no wonder that the information provided by the Government is mostly about the use and development of the expansion, and the community found something is not what they want most. After studying for a while, I found that the whole blogengine.net was unfolding around this businessbase base class, where all the other classes served or received messages such as Provider,extension. Businessbase is the base class for all business classes, which encapsulate the common characteristics of many business classes. Its subclasses are:
Authorprofile: The encapsulation of the user profile.
Page: This class actually corresponds to a static article in BlogEngine.NET, page and post specific difference is not very important, interested friends can refer to the official provided instructions.
Post: A class that is applied most in blogengine.net, representing an article submitted by the author.
Category: Article classification, an article can belong to more than one category, classification can also have a parent classification.
The following diagram is their inheritance relationship:
The Ipublishable interface in the diagram I will explain in detail in future articles.