Board bridge http://www.jdon.com 2005/04/28
The software era of the database as the core has passed, and the database era has been ended. When I saw that many people in the J2EE journey were painful between objects and databases, I thought I came out.
In fact, this sentence is definitely a few years ago, because the coming of the middleware era, actually means the end of the database, is the so-called one mountain without two tigers: If you pay attention to the database, your J2EE system can't completely o, only You ignore the database, your system is likely to completely move to OO, as for specific functions such as database performance tuning, it can be implemented with EJB containers or O / R mapping tools.
Many years ago, most of the business programmers included in myself were starting our career from the database. The earliest is DBASE / FOXPRO. Later, there is a SQL series database, and Oracle pushes the database era to the peak.
Whenever there is a new project, the first step is to first design the Table Schema, and then start using the SQL statement to implement business logic. This development model has been repeated, which is later joined Delphi / VB, they are just Take a graphic display, this C / S structure brings the biggest problem: it is very difficult to maintain, modify, move a hundred.
The software's life is in sports. When it needs development, the best software personnel will have no hand to him, who is the sorrow?
Now more people have started to accept B / S structures, but many people in them have not really understood why the B / S structure, the multilayer architecture of B / S is true (therefore, pseudo multi-layer B / S system Everywhere is all).
The multi-layer architecture is actually completely separated from the display function, business operation function, and database functions in the previous system, eliminating the coupling and influence of each other, thereby achieving loose coupling and good maintenanceability.
I. From the design: due to the complete separation of the hierarchy, the business calculation function is an intermediate function (intermediate layer), which does not rely on specific performance layer technology (JSP / HTML Applet, etc.), nor does it rely on specific database technology (Oracle / SQL Server, the business operation function is running in the J2EE application server, does the business operation function does not rely on the database, does it mean that the database is not a focus?
Second. Of course, multi-layer structure brings performance issues: When the client accesses data in the database, you usually need to pass multiple hierariquenches, how to minimize performance, how to minimize database access is the first solution to the J2EE application system, using stored procedures There is no solve this problem, and the implementation of the stored procedure is still behind the rear end, and does not shorten the rough road to the client request.
The root solution to the performance problem is to use object cache. Now, the huge memory space provided by the 64-bit CPU provides a hardware foundation for single caching calculations. More importantly, this cache calculation is scalable, through the cluster Cache mechanism (such as jbosscache), by increasing the number of application servers, can improve the cache calculation capabilities of the entire business logic layer, abandoning the old thinking that is carried out for internal memory.
3. Do you first need a data table design at the beginning of the system analysis? The answer is negative, and the UML represents the object-oriented analysis design method has become a powerful tool. With the popularity of model-oriented drive analysis design (MDA), the database analysis method is gradually abandoning, has a profound traditional database analysis habit The staff must face and accept this challenge.
Throughout the J2EE system development process, the database has dropped from the past central position to a pure technology implementation, the database is only a means of persistence (file is another implementation means); what is a long time? This is relative to the memory cache state, the persistence is the permanent storage of state data when the internal surplus is electrically saved, but if the J2EE application server is running 7x24 hour cluster; almost never properly, is there a persistent? Obviously, the database has become the same level as in the file system in the operating system. It is really ended by it, and IBM has a strong opening source of DB2 databases in the early days.
For J2EE beginners, the two effects of the past: Process language program habits and database-centered design habits, from a new object-oriented perspective (OOA, OOD and OOP, AOP), develop your J2EE system J2EE design and development three pieces: Model, Patterns and Framework. The above is not just theory, but I am doing every day. If you or agree with please broadcaster, awake more painful beginners.