Make database application development no longer streaking Test-DrivenDatabaseDevelopment

Source: Internet
Author: User
Tags dbase
In 1993, after I graduated from college in computer science, I started my IT career as my first job. I used dBaseIII to develop database applications for MIS systems in a state-owned organization. Since then, I have worked as a programmer for 11 years and have successively developed and maintained content management systems (CM), value-added telecom operation service systems, communication equipment network management systems, and

In 1993, after I graduated from college in computer science, I started my IT career as my first job. I used dBase III to develop database applications for MIS systems in a state-owned organization. Since then, I have worked as a programmer for 11 years and have successively developed and maintained content management systems (CM), value-added telecom operation service systems, communication equipment network management systems, and

In 1993, after I graduated from college in computer science, I started my IT career as my first job. I used dBase III to develop database applications for MIS systems in a state-owned organization. Since then, I have been a programmer for 11 years and have developed and maintained the Content Management System (CM) china Telecom Value-added Service System, communication equipment network management system, and e-commerce system. All these systems use databases such as Oracle and MySQL to store persistent data.

In these systems, some systems even use the database design as the core to drive the development of application code. That is, once the customer's needs come to the hands of our programmers, first find the Entity in the demand, then analyze the Relationship between these entities, and draw a E-R Diagram (Entity-Relationship divisor, object relationship diagram), and then determine the properties of each object, and find the primary key, and finally according to the E-R diagram to generate a database table in the database, then we can use programming languages like Java to develop application systems.

The above seemingly perfect development process was printed in the textbook "Relational Database Management System" that I studied in college more than 20 years ago, and has guided me to develop database applications for many years. But it was not until recently that I realized that this method could not solve the biggest problem in actual Database Application Development: When a database application system is delivered to multiple customers with different requirements, version control issues. I think back to a software company I work for. I once developed a database-centric Application System for another leading "big bully" party a company in a certain field in China. The system has been deployed in eight provinces in China. As the saying goes: "The two are different ." The database application systems deployed in these eight provinces come from the original system, but the requirements of each province are different, the software company had to set up eight large teams to maintain the systems in these eight provinces. After struggling for a long time, the software company decided to build a new system to unify the eight systems to reduce maintenance costs. But unfortunately, the new system finally became the ninth son of the dragon ".

Fortunately, the author of this book, Mr. Guernsey, not only solved the above problems in his work, but also wrote the solution in a clear and well-organized manner! According to Mr. Guernsey, the cause of the above problems is that when the database structure of each database instance changes due to demand changes, the versions of the original data stored in the database were not effectively managed during this period. Mr. Guernsey is keenly aware that when a change occurs, the "class" in Object-Oriented Programming is different from the "database instance structure" in the database development field. The former does not need to manage historical information during changes. You only need to stop the service, replace the old "class" with the new "class", and restart the service. However, when the latter changes, it is impossible to simply replace the database structure with a new one, and clear all the previously saved data in the database where the original structure is located. When the structure of the database instance changes, you must maintain the data stored previously. After all, the value of the database is reflected in the stored valuable historical data.

With insight into the above features of database application Development, Mr. Guernsey pioneered the idea of Test-Driven Development (TDD), which has been widely used in object-oriented programming, introduced to database application development-this is almost still in the "assembly language" era similar to machine coding-a wild land, as shown on the cover of the English version of this book, in the vast desert, a vibrant oasis surrounded by spring appears. The concept of TDD is combined with the features of database application development and preservation of historical data, just like for programmers who had no choice but to "streaking" traditional database application development, put on the solid armor of the "test" layer.

Mr. Guernsey not only discussed the methods and technologies for testing-driven development of traditional relational databases, but also discussed in the last chapter of this book, apply these methods and techniques to XML applications, file systems, and other object directories, and serialize data objects. I believe that the concepts and principles of test-driven database development described in this book can be widely used in testing-driven development of any application system that requires persistence of various forms of data.

Mr. Guernsey's pioneering work made me decide to suspend writing my own book "tame bad code" for the time being, and spend all four months to translate the book. When translating this book, I try to use fluent statements to express the author's original intention and try to make myself read the translated text, just as I like to read the original text. In case of improper translation, Please give some advice on my Sina Weibo "@ Wu bin_ben" for improvement. I will also create and maintain an incorrect table in the translation in my CSDN blog "http://blog.csdn.net/wubinben28.pdf" to facilitate readers.

The translation of the content on the 300 page of this book was successfully completed within four months, without the understanding and support of my wife XUE Jing and his son Lele, from the other side of the ocean, I would like to give a professional introduction to the operating model of hedge fund companies in the United States. I cannot do without the trust of Teacher Yang hailing; my family and friends are inseparable from my community, Weibo, and the Beijing design patterns Learning Group (bjdp.org). Finally, my parents' kindness is indispensable.

Finally, we hope that the concept of test-driven database development brought by Mr. Guernsey will be a good medicine for programmers who have worked hard in the Chinese language world to solve the troubles of database application development.

-- Wu Bin, an independent craftsman and founder of bjdp.org Beijing design mode Learning Group

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.