Build a C # framework blog

Source: Internet
Author: User


Recently, I started my project and encountered many unexpected problems during later development, and the schedule also exceeded the budget. I reflected on the problem, mainly because there are few projects and the demand analysis in the early stage is unclear. Of course, I am not aware of the framework. All these. Of course, we have to find a solution to the problem, so I read empty's article on setting up the framework series, but I still don't quite understand it in many places, for the moment, write down some things that you feel worth noting. Will be updated later.

Terms
T4 template subsonic ORM framework
1.
To take over the development of a project, first ask yourself if you have prepared your mind? That is to say, as the main operator of a project, do you know what you are doing? What functions do you want to implement? How to implement it? What platforms and tools are used for development? What technologies are involved? With whom to develop? What is the level? What are the possible difficulties? How can this problem be solved? What businesses are involved in the project? Do you understand these business processes? What are the requirements for performance and security? How to optimize it? Do you understand code security and server security? What documents do you want to write? How to write? Is there a development plan? How long does the plan take? How to control the progress ?.

2. What functions should I implement? How to implement it?

The functions to be implemented are described briefly.

Implementation steps: According to the steps described in the software engineering, the development specification requirements will first be developed, the requirements documentation, the development documentation (overall design documentation) detailed documents (detailed technical difficulties and algorithms, and relevant algorithms and flow charts), designs databases, codes, tests, and releases deployment, the entire process involves the compilation and maintenance of many documents. during the implementation process, the relevant documents are constantly improved, and version control and project progress control are well performed, the modification and change of project requirements can be implemented according to laws (documents can be queried and viewed), and the law must be strict (the development progress should be strictly controlled ).


3. In fact, writing a document is like writing an essay. As long as the relevant content is clearly described and highlighted, do not deviate from the topic of the document. Of course, if you can clearly describe the five w2h principles and add the corresponding legends (flowcharts), it would be even better.

Five w2h principles: 1.why -- why? Why? Why? Why? 2. What -- what is it? What is the purpose? What do you do? 3. Where -- where? Where to do it? Where to start? 4. When -- when? When will it be completed? When is the most appropriate time? 5. Who -- who? Who is responsible for this? Who will do it? Who is responsible? 6. How -- how to do it? How to Improve efficiency? How to implement it? How? 7. How much -- how much? To what extent? How long does it take? What is the quantity? What is the quality level? What is the cost output?

4. In many situations of daily development, in order to reuse common things, some things used at all layers are abstracted. For example, we separate the Data Object entity from the method so that it can be passed in multiple layers, for example, model. Some common auxiliary classes and tool methods, such as data verification, cache processing, and encryption/Decryption processing, are used as independent modules for reuse between layers, for example, common.
Business Entity model: This model is used to encapsulate the data structure of an entity class. It is generally used to map data tables or views of a database to describe the objective objects in a business. The model is separated for better decoupling, better stratified effect, better reuse and expansion, and increased flexibility.
L common Class Library: Common auxiliary tool class.
In section 5.2, we mentioned that common database operations can be abstracted and encapsulated into data operation classes (such as dbhelpersql) for better reuse and concise code. At the underlying layer of the data layer, the general database operation class is used to access the database. The complete layer-3 architecture is shown in figure 14-3.

Figure 14-3 final three-tier architecture
The database category class encapsulates ADO. NET and encapsulates some common
Duplicate database operations. For example, Microsoft's enterprise database sqlhelper. CS, dynamic and soft dbutility/dbhelpersql, and other tools are provided for Dal to access the database.

5. Subsonic Is An ORM open-source framework written by Rob conery in C # language. It uses the BSD software license (the BSD 3-clause license ). It is a practical and rapid development framework. Through simple configuration and the accompanying T4 template, it can help us generate powerful data access layer tools, this allows developers to stay away from SQL statement splicing and focus on business logic development.

6. Why do most companies ignore the importance of demand analysis? I think there are three main reasons: First, the demand side does not understand what they want, and second, communication problems, the demand side thinks it is clear that the developer understands what it wants, and the developer thinks it has understood the requirements of the demand side. The third is that the demand is very simple, there is no need to spend too much time and waste. early development and early completion can save money.

Therefore, the collection of requirements focuses on communication and record, and requires more questions, more ideas, and more arguments.

How to collect requirements

Collect information and requirements of various users during communication with users, and sort the requirements into text descriptions as soon as possible, and record them one by one. In the process of requirement collection, the demand side can be asked to provide relevant documents, reports, business flowcharts, and other content for our reference, and then carefully consider the general UI implementation on the software based on these, which of the following functions are included? What problems or difficulties may exist? Check with the requirement reporter multiple times in a timely manner to see if our understanding is correct, eliminate unreasonable points, and clarify various business processes and constraints.

Compile Requirement documents

The writing principle of the requirement document is that the description requirements must be clear and clear, and only what is done is described, not how to do it.

7,
Create a database
1. Data Table design requirements
1. The database table name and field name should follow the Pascal style and contain one or more words. The first letter of each word is in upper case, and the other letters are in lower case. (For specific naming requirements, see section 3rd)
2. For associated tables, the naming rule is R _ Table A _ table B, such as r_productinfo_tag.
4. For view naming, the rule is VIEW _ Table A. When a view is generated from multiple tables, several table names are connected by underlines, such as view_productinfo_productclass.
5. Stored Procedure. The naming rule is P _ TABLE name_stored procedure function name. For example, p_productinfo_add; if this stored procedure is shared by many tables, name it p_all _ stored procedure function name.
6. The data field name also uses the Pascal style. When a field references other table fields, use table name_other table field names, which are separated by underscores (_). Naming rules: Table name_word. For example, the fields associated with the productinfo table and the productclass table are productclass_id and productclass_name. When you reference a primary key or related field of the External table (including the status value), you must add the name corresponding to the primary key (or status value) referenced by the External table, to simplify the compilation of Multi-table join statements during queries and improve code execution efficiency, see the design in data dictionary for details.

8.
This framework has four types of log records: logon logs, operation logs, manual collection of exception logs, and automatic collection of exception logs.

Http://www.cnblogs.com/EmptyFS/

Build a C # framework blog

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.