As azure blue is the SOA architecture. Net code generator in direct support of the architecture of the most complex architecture, it focuses on how to achieve blue SOA architecture follow-up development.
1: I need to write code in any place
You need to prepare the local code is in the business of the Partial file. We recommend that you manually prepared by the code should be 70 per cent in the business of the Partial document, 30 percent in the UI interface,
2: automatic generation where the code should not be amended, where I was allowed to modify the
DAl, Common of the type you should not make any changes, this will ensure that the application of multiple generation; operations of the properties Enum class, Partial type of primary documents, UI controls of the type you in principle, you will not need to change, UI interface code categories need to do to modify business rules, but the best to maintain the same structure automatically generated. Partial operations of the document is entirely reserved for you to prepare your own code of the place.
3: how to use the database Service
Database objects and database services directly related. However, the use of affairs is in the business layer. Automatically generate the code has been very good considering the affairs of the database support.
In order to achieve good layered structure, not directly in the Bll-generation, services and create objects. Bll, should be generated through the Factory idbTransaction targets, avoid direct hard-coded generation database services. Dim tran As IDbTransaction = Common.DbTranFactory.GetDBTran
Because of the Dal in the affairs of the use of internal support, and the Bll layer, the code does not automatically generate overrides, so Bll layer, if we call Model other types of services operations, first of all need to override Dal corresponding Affairs how, before they can use.
Because the father table, table of the data is automatically loaded as needed, and automatically generate the code on the data provided is not loaded inert Services support. If the Service has begun after a non-affairs is not the way to read the data submitted, the Panel will take place at this time deadlock.
In coding, it needs to pay attention to this issue. Resolved in two ways: First, early pre-reading data to the memory types, such services will not start after the database and then to go read the data. This has the advantage of the time taken up by the Panel will be short, but the possibility of a data loss has increased.
Another approach is to expand its services for the operation of the support services in the implementation process, the non-use of code generator information provided by the automatic loading function, but the code used to write their own affairs function to support the operation to extract the data. This provides maximum control of the affairs of flexibility, but more needs to prepare its own code, the use of locks and Services will become a long time, so a deadlock with the possibility has increased. We do not recommend this approach.
4: How to save their masters Sheet Data
Bll in the main table of the corresponding increase in the corresponding categories of data saved to them. To preserve the main form of data, and then pairs table object of some attributes assignment, then calls the sub-table collection of objects to the Save method of preservation table.
5: how to master that data table
In the SOA framework, the sub-sheet data as the main form of a collection of objects to reflect the attributes, using a single main object on the table that can master sheet data.
6: inert load
SOA in this structure, databases mapping of the keys to the relationship between objects. But a durable object from the database load, corresponding with the object linked to other objects from the database will not be immediately loaded, when an object needs to have contact with other objects (father of Table objects) or collection of objects (a table Collection of objects), the dominant does not need to use the code to load the relevant code, when adopted for the first time to visit properties linked to the target, it will automatically load durable objects from the database. Once finished loading, even if there is a change in the future, will not be re-loaded from the database. Such a mechanism known as inert loaded. In the preparation and related code, need to pay attention to the need to advance the target before the start of the Panel from the database to load. Otherwise, the database may result in deadlock.
7: business expansion category of property
The need to expand the business category, including the two main attributes category
Some rely on other attributes of the business and properties.
As the database design model is based on the theory of compliance with the paradigm, a number of attributes will not rely on reflected in the database table. But these attributes is indeed owned by a business object, and the need in the UI layer or other places used, it is necessary to expand on these attributes. For these attributes, we propose that the business rules GET part of the package to achieve the kind of package.
Some of it has nothing to do with the business rules of the UI need to use the property. For example, FU Zi object navigation URL, some of the property values show format requirements. If this attribute need to use multiple UI interface, we propose to have some kind of attribute in the package, not directly included in the UI interface.
8: rewrite the attributes business class
Database for mapping the field after the type of property, but there are certain attributes directly or completely dependent on the relationship. At this time, we propose in the business of rewriting these attributes, business rules package in the Get Set method, or.
This inertia load on a follow-up development can also needed to rewrite.
9: how to use automated queries
SOA in this structure, data query is fully object-oriented way to achieve it. Ready for the conditions, the collection business, a lot of the structural function, will query as a parameter to construct a new business collection, the new business object collection includes the need for results of queries.
10: If the Multi-table and other complex queries
We recommend to their results to the query in the database, first proposed a view and entities table, then use the code generator generates the type, if necessary, in business class, covering SelectSequel attributes, and then we can use object-oriented approach To achieve a complex query.
11: business rules should be written on where
Business rules written in any place, this is a more divisive issues. Because, now popular multi-storey structure, business rules and have not completely written on the business rules layer in. Through the process of writing a stored in the database inside, written in a direct interface in the UI. There is a problem, what are the rules of business, we believe that embodied in Products in the business rules is the relationship between the data. Therefore, the business rules is only part of user needs, business rules does not mean that the needs of customers, business rules or data. Business data by category to reflect the attributes.
How to achieve business rules » To achieve business rules are basically two models, one at the business category, with the expansion of business rules approach. There is a direct package, in the corresponding attribute.
Packaging in direct property or Get Set method can be achieved in the external transparency and can ensure consistency between the data, we recommend will be in the business rules package attributes Get or Set in the way.
12: How to understand the automatic generation of the model MVC
MVC is a popular interface was designed to UI M code Model, V code view, C on behalf of Control.
SOA framework is based on some UI to generate the MVC pattern. Specific to SOA framework, M behalf of a BLL objects, through automatically generated Datasource attributes to achieve, V code Partial include Html, Partial interface controls the various main categories. Control used the document contains code Partial-fu class to achieve.
Control is the Model and View of the bridge, but also control View the changes, but Control Model should not control the inherent relationship between the data. Control through Model (datasource attribute) to manipulate data, rather than through the UI attributes to manipulate the data.
.
13: How to understand the structure of the SOA-type
- Type refers to compile time will be able to fully determine the type of person. That the more direct point is inside the IDE, you can then. Out features. Use strong types of benefits are to take full advantage of the compiler to find possible mistakes, and in the process of encoding through intelligent programming tips to speed up the pace. - Type refers to compile time will be able to fully determine the type of person. That the more direct point is inside the IDE, you can object to the use of the name behind '.' By the characteristics. Use strong types of benefits are to take full advantage of the compiler to find possible mistakes, and in the process of encoding through intelligent programming tips to speed up the pace. - Type refers to compile time will be able to fully determine the type of person. That the more direct point is inside the IDE, can be used behind the target. Out features. Use strong types of benefits are to take full advantage of the compiler to find possible mistakes, and in the process of encoding through intelligent programming tips to speed up the pace. Strong is the type of object-oriented. SOA framework for the use of the full-type characteristics, mainly through a variety of Enum and static variables to achieve the type of strong.
14: How to understand the efficiency of the system
Multi-storey structure and is fully object-oriented system will sacrifice some performance. Multi-layer structure of the system to provide the scalability and maintainability. Fully object-oriented to provide the readability of the code. In the current level of the hardware under the conditions of blue technology that will not in any place to deliberate pursuit of the so-called system performance. Blue technology system performance issues that will appear in local areas, and may amend the key areas of impact on system performance problems can be solved.
Blue technology that the most likely impact on system performance issues where there are three
1: The system uses an inappropriate algorithm
Under normal circumstances there is no need to deliberately pursue the optimal performance of the algorithm. Only unforeseen could occur performance of algorithms, or the performance problems did occur, it needs to adjust. The main situation is extracted from the database inside do not need a lot of data, and then through the code to filter and aggregate data.
2: Sequel statement did not optimize
Only complex Sequel statements may need to be optimized.
3 database system is not optimized
General database table for a reasonable index, we can solve most of the data access and performance issues.
4: massive data query
The need for massive data in the level of architecture to solve performance problems. General is through the establishment of data warehouse solutions to the problems.
5: inappropriate to deal with multi-nested.
6: function or process was repeated many times
|