Font Size: a A A

The Design Of Purchasing-Selling-Stocking System Base On IoC & ORM Framework

Posted on:2009-08-31Degree:MasterType:Thesis
Country:ChinaCandidate:Y P ZhangFull Text:PDF
GTID:2178360272471902Subject:Computer technology
Abstract/Summary:PDF Full Text Request
Object-oriented programming method greatly improved the efficiency of software development,but with the scope of software increase very fast,the business logic become more complicated,and the relations of object also became more close,so it is very difficult for software's testing and modification because coupling among classes is too tight.To avoid this phenomenon,we need to make these coupling classes become enough relax.There are many methods to solve this proglem.The basic precondition is Interface-oriented programming so that the caller only need to be concerned about the appearance of the functions of the caller without the need for the realization of specific concern.In accordance with the manner in the past,we often used similar factory patterns to create this function,a better way is IoC(Inversion of Control) programming methods.There are two forms of control reversal,one is dependent on a finding that could be called pull mode,such as the use of JNDI:Object obj=(Object) initContext.find ("…"),so by it the caller can look for the target needed,and the specific path to achieve JNDI hidden in the back.The other is to rely on injection can be called push mode,in accordance with the caller in definition interface was the caller,such as: CalledInterface x,and then need a method or constructor to assign x,the assignment of work to the IoC container to be completed in this way will not cause related to the API(such as JNDI) dependence.At present,most of us use of the database to relational database.Business model in the relational database is in the form of tables,and in the object-oriented programming languages are reflected in the form of the object,they are so different between the two forms of performance data.In object-oriented languages,when relational database access,the traditional way is to write code in the SQL statement, which is the most flexible,but very easy to go wrong,and there will be unusually large section of the code such as try…catch…,and it is not easy to achieve independence of database.In order to achieve the programming language used in object-oriented approach to operations in the relational database,there have been ORM (Object-Relation-Mapping) this new method of programming By ORM framework,it is one-mapping between the object and the data in relational database,there will be no SQL statement.Some ORM framework also achieved in a totally transparent persistence function,can automatically monitor the changes of the objects removed from the database,write these changes to the database automatically when commited to the database.In the application of occasions,ORM framework that can greatly improve the process of expansibility and maintainability.In this paper,by example of popular IoC framework:SpringFramework and ORM framework:Hibernate,and with the combination of Purchasing Selling Stocking System,I discussed the Inversion of control and object-relational mapping design method when use it on the WEB system which on the JavaEE platformFirst of all,the paper combined with SpringFramework and Hibernate framework,discussed on IoC and ORM framework's origin,function and use,and then introduced the Purchasing Selling Stocking System on that basis to complete, respectively,described the system's overall technical architecture,business model,the establishment of the operational functions of the modules,system development tools and environment,system design and discussed in detail,but also gives the database design.Finally,summed up the advantages of the system and the need to improve.
Keywords/Search Tags:Inversion of Control, IoC, Object Relation Mapping, ORM, SpringFramework, Hibernate, Declarable Transaction
PDF Full Text Request
Related items