(The copyright of this article belongs to the author. You are welcome to repost it, but you must specify the source and original author) The introduction of JDO specifications has given traditional database applications, especially Web-based database applications, a new opportunity to adopt transparent middleware storage technology to reduce the tedious work of traditional development, improve the efficiency of development and maintenance so that we can respond to the ever-changing needs of the new Internet age. From the perspective of development, if a database is involved in J2EE standard web application development, development teams with certain experience will not directly perform database operations using JSP + JDBC, on the one hand, the project is huge, the code is lengthy, and on the other hand, it is not easy to maintain, and the risk is even greater. A simple statement similar to the following: Resultset = preparedstatement.exe cute (); ... Preparedstatement = connection. preparestatement (...); It seems that there is no problem, but the server will gradually crash during the running process, because a preparedstatement is missing before the second statement. close (), so that some non-JVM allocated memory will never be recycled (because it is not managed by the Java Garbage Collector ). This type of problem is very easy for programmers who are not very proficient in JDBC. The most important thing is that after such a problem occurs, you need to find out the problem, in the case of a large amount of code, you will find that this is much more complicated than the United Nations verification work in Iraq. Therefore, experienced development teams use some Javabean to wrap data objects, which is also required by object-oriented development. However, even if valueobject is used to wrap database data, the above risks still exist. This is only one aspect of the problem. In the case of more and more application development requirements, the efficiency and maintainability of traditional development methods cannot meet the requirements. Many companies have only two solutions for this: one is to expand recruitment, but this involves the development level and training costs; the other is to postpone or cancel some secondary development tasks, however, this will only slow down the development of enterprises. Under such circumstances, some internationally experienced enterprises (such as Sun and IBM) have jointly developed JDO specifications, in order to free developers from this risk, free from complicated and repetitive work, and guide development with a brand new fully object-oriented concept and business awareness. Compared with EJB, JDO specifications have simple implementation and outstanding performance, which can greatly save the company's development costs. Therefore, many companies have embraced them, although jdo1.0 specifications were announced less than a year ago, products that implement JDO specifications have sprung up, such as the United States (Kodo, frontiersuite, fastobjects, etc .), France (libelis Lido), South Africa (jdogenie), Germany (jrelay) and other vendors have relatively good products (from which we can see that Java is a relatively open and international thing), in addition to these commercial products, there are also some brave men who make up some teams to provide free products (implementation), such as tjdo, xorm, and OJB. Next let's take a look at what JDO can bring to us. 1. Saving development costs and time.When using JDO, some companies that currently use JDO save about 30% of the Code in development and about 60% of the work in maintenance. Although the data comes from the JDO product provider, from the user's point of view, I think this number is not excessive. Because the traditional development method has a large amount of code, it may lead to a large number of developers, long development time, a large number of people, great difficulty in coordination and communication, and long development time, the developer's memory is limited, and the consistency between the front and back codes is also affected. After JDO is used, the code that developers need to write is mainly the packaging part of the data layer, which will be greatly reduced, and the code in the application will be mainly focused on the processing of business logic. As the saying goes, do more, make more mistakes, do less, and make fewer mistakes. Although it is a bit negative, it also shows this fact. When the number of manual code decreases, the chances of errors will be much lower. Even if there is an error, it is easy to find out. When these goals are met, the one-time investment in JDO (such as the purchase of JDO products and related training) will be insignificant compared to the traditional development overhead. In terms of labor costs, the work of three people can now be done by two people (because the workload is reduced), which saves the cost of one person's power. 2. Improve application performance, especially web applications.JDO manufacturers are all using years of experience to perform a lot of Optimization on underlying database operations. These optimizations are generally difficult for programmers due to experience and complexity, such as distributed buffering, jdbc2.0, and jdbc3.0 for advanced performance optimization processing, etc. Therefore, if we use JDO products, we can use these optimizations provided by the vendor to improve the server performance. Generally, manufacturers provide many performance tuning parameters for different situations. 3. More flexible business logic.Since JDO frees developers from working at the bottom of the data layer, they can focus on business logic and communicate with the demand side more easily, when you hear a new requirement or change, you first think about how many data tables you want to add and how to associate Foreign keys. The more complicated you want, the more you will eventually reject the demand. After JDO is used, developers can implement business logic more quickly, even if it is a test, it is more convenient and quick. For example, they want to propose two different implementation schemes for the demand side to compare the effect, it can be completed quickly by starting a demonstration program, and the traditional method can be completed in the same time. When developers can better communicate with the demand side, they can better understand the needs, and often provide professional opinions to improve the business logic, both parties can have better training. 4. It is conducive to the stability of the development team.The stability mentioned here is not to say that the personnel are relatively fixed, but that the roles in development are relatively fixed and the work positioning is relatively fixed. For example, a person who cares about performance is responsible for the ing layer. He needs to understand the specific implementation of the JDO product and how to effectively map the business model to the database, people who care about the Code do not need to consider these details. They only need to implement the business logic on the basis of the object-oriented data model (generally a complex or simple entity class diagram. Each has its own responsibilities, the division of labor is clearer, and the overall work efficiency is greatly improved. That is to say, after the JDO technology is used, it is easier to vertically divide tasks in project development. Different types of tasks are done by different people. In the traditional way, projects can only achieve horizontal division of labor. One person makes one piece, and each piece is from the interface to the JavaBean and then to the database full-outsourcing. If vertically divided, it is difficult to determine interface specifications between tasks, which leads to mutual complaints and affects the development progress. This is why many projects have been well conceived at the beginning, the specific process will be related to each other, resulting in "No work, no delay. As JDO technology is a more practical specification, project managers can better allocate work tasks and draw lines between them ". In this way, project development is not easily affected by the flow of people, because: First, if a developer is removed, just add one person or assign the work to another person, let him clarify his responsibilities and have little impact on other developers, unlike the previous "one person gets stuck". Second, if the workload is heavy, you need to add new developers, training on the job status is simpler than before, because more and more people are familiar with and proficient in JDO specifications, Just Like java. With this foundation, as long as you understand the business logic, you can develop it. This is also the benefit of standardization. Just like many foreign-funded enterprises, everyone is a screw. Although the mobility of personnel is high, the company's development is very stable. 5. Provide more personal development opportunities.For developers, the biggest killer is the constant and inefficient way of working over the years, which is killing their own lives. After using JDO technology, they will see that the original development can be so easy, and there are more business logic aspects worth your attention and effort. The developer's thinking will shift from the underlying code to advanced business processing, because their development methods have been standardized and improved. I guess there will be a concept like JDO certification in the future, and it will be easier to apply for a job in case of it. After all, a specification often brings about improvements in many aspects. When developers think more about business issues, they often have more standardized opinions on the business processes of the demand side, which leads to a virtuous circle between the two sides. Developers often wonder why the bosses of many large companies do not develop but do business, and where they will find their way out in the future. In fact, developers can fully understand the business content in the development process, which is also beneficial to their future development. In addition, they will be more rigorous in thinking and more principled. The above are just a few obvious benefits that JDO can bring. In fact, there are more benefits that we will explore and study during use. In future articles, I will start with the specific development process and describe how to use JDO to develop projects. The copyright in this article belongs to the author, but you are welcome to repost it on the premise that the source and original author are indicated. In additionMy columnView my other articles and provide valuable comments! |