1. What is object-oriented programming (Object-oriented programming)?
Object-oriented Programming (Object-oriented programming) is short of OOP technology, which is a new method and new idea for developing computer application. In the past, process-oriented programming often led to the inclusion of all the code in several modules, making the program difficult to read and maintain. In making some changes often take a move hundred, so that the future development and maintenance is unsustainable. The use of OOP technology, often to use a number of code modules, each module only provides specific functions, they are independent of each other, thus increasing the chances of code reuse, more conducive to software development, maintenance and upgrade.
In object-oriented, the algorithm and data structure are considered as a whole, called objects, the real world of any class object has certain properties and operations, and always with the data structure and algorithm in one to describe, so you can use the following equation to define objects and programs:
Object = (algorithm + data structure), program = (object + object + ...) )。
As can be seen from the above equation, the program is a lot of objects in the computer to express themselves, and the object is a program entity.
2. What is component-oriented programming (Component-oriented programming)?
Components are not a new concept, both the JavaBean specification and the EJB specification in Java are typical components. The component is characterized by the fact that he defines a common approach to processing. For example, JavaBean has the features of an inner view so that the JavaBean can be visualized by means of tools. The EJB specification defines some of the features in Enterprise Services, enabling the EJB container to add the ability of enterprise computing to code that conforms to the EJB specification, such as transactions, persistence, pooling, and so on.
Thus, the progress of components over objects is the introduction of generic specifications. Common specifications can often add new capabilities to components (as discussed above), but also add constraints to components, such as the interfaces you need to implement EJBS
Cop is a step further than OOP. Typically, OOP organizes data objects into entities. This approach has many advantages. However, OOP has a big limit: the interdependence between objects. A good idea to get rid of this restriction is the component. The key difference between a component and a generic object is that the component can be overridden.
3, what is aspect-oriented programming (Aspect-oriented programming)?
Separating the generic requirements function from the unrelated classes, while allowing many classes to share a behavior, once the behavior changes, there is no need to modify many classes, just modify this behavior.
AOP is such a decentralized programming approach that encapsulates "focus" in "facets."
4. What is Service Oriented programming (Service-oriented programming)?
SOP is an architecture in which the goal is to get loose coupling in software agent interactions. A service is a unit of work for a service provider to obtain the final result it wants for a service consumer. Both the service provider and the consumer represent their own roles as software agents.
This may sound a bit too abstract, but the SOP is really everywhere. Let's find an example of SOP in your house. For example, to play a CD, you can put the CD into the CD player, CD player will play this CD,CD machine for you to provide a CD play service. The advantage here is that you can use a different CD player to play the same CD. They can provide the same CD player service, but the quality of service is different.
The idea of SOP is distinctly different from object-oriented programming, and object-oriented programming strongly suggests that you should bind data to its operations. So in object-oriented programming style, each CD has its own CD player, and they cannot be disassembled. That sounds strange, but that's how we build many existing software systems.
And the SOP is different, in order to reduce the heterogeneity, interoperability, and changing requirements of the problem, such an architecture should provide a platform to build the following characteristics of the application services:
Loose coupling, position transparency, protocol independence
Based on such a service-oriented architecture, service users do not even have to care about the specific services they communicate with, because the underlying infrastructure or service "bus" will make the appropriate choices on behalf of the consumer. Infrastructure hides as much technology from the requestor as possible. In particular, from different implementation technologies such as the Java EE or. NET) Technical specifications should not affect the SOP user. If a service implementation already exists, we should reconsider using a "better" service implementation instead, and the new service implementation must have better quality of service.
Object-oriented programming, component-oriented programming, aspect-oriented programming, service-oriented programming