Spring's source component-based software development (CBD-Component-Based Development)

Recently I have time to read the book Supplementary Theory.
Read some software architecture (software architecture) information. Finally understand the basic idea of ​​Spring.

Spring is a lightweight component model developed under the guidance of CBD.

Why would spring and ejb be compared? The reason is very simple, because spring and ejb are both Java component standards. Both apply to CBD development methods.

There are some other component standards: COM/DCOM/COM+, CORBA

The web program structure we usually use: action->service->dao In fact, the principle behind it is CBD.

In actual development, CBD only provides development ideas, and there will be many specific problems when it is implemented. For example, CBD does not stipulate that web software should be divided into action service dao.

My previous understanding of spring, see
http://www.iteye.com/topic/1141770#2422312 , is purely practical. What is written here is the theoretical roots.

After understanding this, you can understand:
1.spring is not designed for java web development. Just spring supports java web development.
2. Spring does not actually dictate the structure of software components.
  The organization of software components is the developer's own business. Spring exists to provide a container for component assembly and auxiliary functions.

Therefore, there are many problems in developing java web with spring that need to be solved by developers themselves. Simply copying other people's spring application framework will not develop a good program. For example, there are the following common problems:

1. All logic is written in dao.
2. The organization of url, action package path, ftl/jsp, etc. is chaotic.
3. The relationship between action, service, and dao calls is chaotic.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327083787&siteId=291194637