Some nonsense on system architecture

zhaozj2021-02-08  227

The previous while writing a universal property manager for the management of component properties within our system framework. Written and wrote, suddenly I had an idea, I posted it here, I hope everyone can discuss it.

First, you will just write a normal attribute manager, get the value of a certain property, like the SPM inside COM . This allows us to maintain component properties within the frame through a centralized interface. You can manage some shared properties, such as connecting strings, company names, web interfaces, etc. The default CSS file name.

When designing, I feel that if there are many properties, it is not convenient, and later decided to use the namespace to distinguish. Then it becomes a property manager that supports the namespace. Later, I didn't necessarily knew that I didn't necessarily knew that other namespaces were not necessarily named, so visited some of the common variables (I can't list the system registered property space in the smart list of VS.NET, requiring programmers to remember the names of these variables Space), and this is the original intention to develop. And the security of the attribute is also a problem, and a malicious component can destroy the entire system.

Naturally, I think of the property's permissions, the component can only read and write in their namespace, only some components with special permissions can read and write the entire namespace. Considering the half-day, ready to use Windows security mechanisms. Only the specified user can activate some global management class instance (fortunately VB.NET is relatively convenient in this area). Oh, is it very complicated? I think so too. For global properties, I decided to use inheritance, that is, the inheritance of the namespace level, the sub-space is automatically read-only inheriting all the properties of the parent space, so some common attributes can be easily managed and read.

Write here, I suddenly had a new idea. Since the attribute can be inherited so, can the class? In fact, in such an attribute management, as long as the class is in different attribute space, different configuration properties can be obtained to achieve different characteristics. For example, an order class, the order component constructs yourself by reading the current attribute. This allows different order characteristics by being at different attribute space hierarchy. I think this is a very interesting idea. I hope that the class can be directly inherited, through some special configuration, let the class have new behavior. In the namespace, you can achieve many new features and features by assembly and inheritance. In the perfect world, you can directly modify the business process directly without modifying the code. At this time, the functionality of the property is expanded, and the attribute must include characteristics such as Overrideable, NOTOVERRIDABLE.

For this purpose, I saw SQLServer's metadatasempic. Unfortunately, this thing seems to be able to achieve my thoughts, but the information is very small, MS has not updated since 2002, it seems to be abandoned.

My ultimate goal is to achieve such a system:

1. Framework systems provide basic services, including all basic types of implementation (database access, basic data type, communication, some universal business objects ......

2. Developers can derive and extend these classes through a GUI manager to get objects that meet their requirements. Of course, as a programmer, you can insert your own type of type into the system to get an additional function. (I have no good idea if I have a problem between a type of interaction.

3. Business consultants draw business flow charts in Visio, and developers can linked the final business class and these processes (huh, affected by BizTalk). 4. The system engine knows how to deal with derived classes, and the process can recompile when the business process changes. (This sentence may be relatively blurry, because I found that I also make sense to express the exact idea)

5. All types can be safely managed. Implementation inheritance and management through the type namespace and secure namespace mapping

Of course, a powerful cache manager is required to resolve the resulting performance impact, this cache manager I have some ideas, but it has exceeded the scope of this article. .

For such a framework system, I just have some 胧 的 想, there is no fully feasible solution. Just taking advantage of it yet, I wrote it, I hope to be able to throw a brick, and discuss it with everyone.

I am in the VB.NET version, called Bucher (no one eternal).

转载请注明原文地址:https://www.9cbs.com/read-2533.html

New Post(0)