spring in action-note-2

1 , AOP: in the software industry, AOP is the abbreviation for Aspect Oriented Programming, meaning: Aspect Oriented Programming, dynamic agent program features a technology to achieve unity maintained by way of pre-compiled and run. AOP is a continuation of OOP, is a hot spot in software development, an important element is the Spring framework, is a functional programming Yansheng Fan type. AOP can use to isolate each part of the business logic such that the business logic to reduce the degree of coupling between the parts, improve the reusability of the program, while improving efficiency of development. 


AOP to ensure the simplicity of a POJO. 
With AOP, you can use a variety of functional layers unwrapping core business layer. These layers declaratively flexibly applied to the system, your core applications do not even know they exist. This is a very powerful concept, can be safe, and the transaction log and core business logic concerns the phase separation. 

Spring three core ideas: 
1 , IOC (Inversion of Control) 
to achieve the relationships between the components mentioned outer container (spring of xml) from the internal program to manage. 
2 , the DI (dependency injection) 
dependencies between components at runtime system is determined by the container application, the container is a certain dependency dynamically                                                                                                                
audience injected into each instance of the application associated components in the system . 
. 3 , the AOP (Aspect Oriented Programming) 
  using called " transverse "Internal object technology, cross-sectional decapsulates, and a plurality of classes that affect the behavior of encapsulated into a common reusable modules, and named it " Aspect " , i.e. cut. The so-called " cut " , it simply is that nothing to do with business, but it is the responsibility of the business logic or common module called encapsulated, easy to duplicate code to reduce system and reduce the degree of coupling between modules, and facilitate future operability and maintainability. 
Use " cross-cutting " technology, AOP the software system is divided into two parts: the core concerns and crosscutting concerns. The main flow of business processes is a core concern, not part of the relationship is with crosscutting concerns. It features a crosscutting concern is that they often occur in many core concerns, and everywhere essentially similar, such as certification authority, log things. AOP is that the various concerns separation system, the core and crosscutting concerns separated. 



ClassPathXmlApplicationContext and FileSystemXmlApplicationContext difference: 
ClassPathXmlApplicationContext find the next default will go classPath path. classPath path refers to the compiled classes directory. 
FileSystemXmlApplicationContext default is the path to load the next project, can be a relative path, or an absolute path, if the absolute path, "file:" prefix default. 


Spring loaded into the bean to give a typical application context have life cycle: 





the ORM: Object- relational mapping (Object / Relation Mapping), along with the development of object-oriented software development methods produced. Object-oriented development approach is to mainstream development approach today's enterprise-class application development environment, a relational database is the main data storage system enterprise application environments permanent storage of data. Object and relational data are two forms of business entities in the form of business entity performance object in memory, the performance of relational data in the database. An association and inheritance relationships between objects in memory, and in the database, relational data can not be directly expressed many to many associations and inheritance. Accordingly, the object - relational mapping (ORM) system is generally present in the form of middleware, the main procedures for mapping objects to a relational database data. 
That is the practical application between relational databases and business entities objects as a map, so that when we target specific operating business, you do not need to go and deal with complex SQL statements, as long as the operation object operating as usual it it. 
  ORM framework is used to implement the program ORM technology. 
  Common ORM framework: Hibernate, TopLink, Castor JDO, Apache OJB and so on. 
In Java ORM principle: Let me talk about realization of the principle of ORM, in fact, be achieved JavaBean property to map the fields of the database table, any ORM framework is nothing more than reading a profile of the field JavaBean properties, and database tables automatically associate, when from the database Query, automatically into the corresponding attribute value field in the JavaBean, as INSERT or UPDATE, automatically JavaBean property values bound to the SQL statement.

DAO (Data Access Object) data access object is an object-oriented database interface, it was revealed that the Microsoft Jet database engine (used by the Microsoft Access), and allow Visual Basic developers through ODBC like to connect directly to other databases, direct connection Access to the table. DAO system best suited for single application, or locally distributed small use. 

I.e. Java Message Service JMS (Java Message Service) application program interface, API is a Java platform on message-oriented middleware (MOM) for between two applications, or distributed system to send messages asynchronously communication. Java Message Service is a specific platform-independent API, MOM vast majority of providers offer support for JMS. 

MOM (Message Oriented Middleware) is a message-oriented middleware, using messaging provider to coordinate messaging operations. MOM need to provide API and management tools. The client uses api calls, send messages to the destination managed by the provider. After sending the message, the client will continue to do other work, before this news confirmed and received at the receiving side, the provider remains the message.

 

Guess you like

Origin www.cnblogs.com/geekftz/p/11284122.html