Web development learning experience
During this time, I have been learning to use vss.net to do web, slightly some touch, mainly aspects:
1. WEB and B / S development ideas, mode
Since there is no understanding of the HTML language, I just got some examples, especially those such as JavaScript, such as JavaScript, etc., or even a simple page takes a long time to handle it. Furthermore, for a long time, it is affected by C / S development model. It usually consciously considers some B / S development a unique thing with C / S during the web development process, and many in the C / S mode It seems that it is very simple and the Web programming is particularly painful, and it is impossible to achieve; it is because of the shackles of this kind of thought, we have recently developed a lot of trouble, resulting in unreasonable system overall framework The system interface is very ugly, the system is low, and the system security is low, etc., there is a series of sequelae in the development of the forum, I still get a lot of inspiration:
a) The idea of the web system needs to be treated correctly. It is not a simple technical system. It involves HTML, USA (Web Design), frame design, etc., of course, there are many software companies at home and abroad to be database, system code, art, web page Design, etc. is divided into labor, but I personally think that the programmer's ability is from many aspects. I think more arms can have better achievements and competition, so often remind yourself, in the future development process Try to do your best in the above parts, don't always feel that you will write the code, the interface is a business woman;
b) In the process of developing the web application, the cooperation between the team is more important, more than the traditional C / S development collaboration, so communication is quite important, and the development of this forum as an example, due to the development agreed Some things have not been strictly enforced, causing many duplicate labor, and even one degree lead to failure; specifically, in the future development, some public components, classes, controls, interfaces, etc. can be discussed by all group members. The modification process must be cautious, and the necessary external interface must be added to the method level annotation;
c) use B / S mode development applications, high data security, concurrent control requirements, C / S method can't match, and we have used in this forum development process to simply encrypt data, no Finding the effective way to find a row, system security issues are a big hidden danger, I hope to find solutions through future learning and exploration;
d) I personally think that it is important to understand what is B / S, its advantages and restrictions, so that they can have their hands in practical applications. The mode is some of the summary of excellent object-oriented methods, these things are flexible, and they cannot be modeled for patterns;
e) I think I am learning a new language. When a new development tool must gradually develop some good habits, ASP.NET is no exception. In the development of ASP.NET, you can learn a lot, however, some basic programming habits we must develop, which can not only improve program quality and development efficiency, but also facilitate the reading of procedures and team development. If you write, you can understand or only a few people can understand, even if the program skills are skillful, the upgrade and maintenance of the program is a fatal issue. Some of the development process, the processing, the processing of strings, database links, and shutdown timing, etc., etc., which affect system performance must develop comparished habits, especially database operations, must insist on "opening , The principle of closed as soon as possible, because the user group facing the web application is definitely more important than traditional C / S, ensuring system performance is important; 2. .NET Framework framework
.NET FRAMWORK is a huge and complete class, which covers all the development fields, not only there are many places that can be used, but there are many places worth learning, such as how to organize collaborative relationships between various classes.
The most used in this frame is the things of the ADO.NET section, and saying ADO.NET has to mention DataGrid, DataSet, DataReader, DataAdapter Some heavyweight controls, classes, make many data interactions provide great Convenience, the things used in this development process are limited, main Dataset, DataGrid, DataReade repeatedly, and it is worth reviewing these good things that have not been in-depth, but learning DataGrid has learned some better in the process of use. Usage, such as template columns, paging features, etc.
3. Some small problems in the actual development process
During the development process, through the search information, some experiences worth mentioning:
a) Compared with the original For statement Foreach has better execution efficiency, Foreach is only 30% of Forth. With the test results in FOR and Foreach, we recommend more efficient Foreach. In addition, it is approximately 10 times that of the read data time;
b) In the ASP.NET program, using the SA account is a very unsafe approach, which has permission to perform any operations on the database. Hackers can invoke an extended stored procedure like XP_CMDSHELL to attack;
c) When processing data interaction, try to put the processing of the organization SQL statement into the intermediate layer (such as a dedicated data operation class, stored procedure, etc.), which is an effective way to prevent injection attacks;
d) Avoid unnecessary round-trip processes of the server. Use Page.isPostback to avoid unnecessary processing on the round-trip process;
e) Be sure to disable debug mode;
f) Under normal circumstances, read a lot of data, do not do a large number of SQLDataReader for returning data. For returning data, a large number of DATSETs are appropriate. The choice of SqlDataReader and DataSet depends on the implementation of the program function;
g) The data binding is recommended to use <% # ctype (contactView) .Row ("Field Name")%>. When the amount of data is large, it can increase the speed of several hundred times;
The above is just some of the individual collection, and the personal point of view is very uncomfortable. Some content seem very void, maybe there is also a mistake, I hope to continue progress in future learning practice and continue to accumulate.