Data Representation layer

Source: Internet
Author: User

Last weekend I went to a technical salon, the main content is about open source software framework application and software architecture. A very interesting lecture to listen to later. At present, China's software has a lot of platform and programming language, such as. NET Java EE, in each language there are corresponding frameworks, such as STRUTS,AOP ... Our programming generally doesn't have to start from scratch, but to use a certain platform, give a certain framework, development, now more frameworks, can not be applied, in the application should pay attention to the problem is that it is best to directly inherit from the Pojo object, we use it directly with the good, and do not implement a particular interface of his.

On the level of O/R mapping, there are several relatively good open source tools, such as jdo,caster,hibernate, these things compared to entity bean is more light-weight, simpler. At this level we have a lot of options, a lot of middleware and platform have this product. For example, our BV platform, he is using contentmanager,contentlist,content,bvi_genericdbmanager such things to carry out our most low-level database operations. In fact, these things are the language of the abstraction of object and relationship database interoperability between. The most common is the direct use of the SQL language, on this, we artificially graded the system, this database and the operation between the objects is naturally this level. When we set a class, such as a person class, we also define her Personmanager and Personcontainer class, we can abstract in the manager of the person's additions and deletions and other operations, For example, to add a person to the database, we call P directly. Save (), we can even deeper abstraction of it, this time we need to give up the concept of the database, this time the database for the author of the program is transparent, the program staff only to call the corresponding function is good. At this point, the database is a larger scale of container,container. ADD (person); it's OK. In fact, we can also have a lot of other container, these container are loaded in memory, can form the corresponding set of each other is irrelevant, these are only preliminary. We can inherit the person class and even define a IPerson interface, which is good for us to realize its polymorphism. On this basis we can achieve a more object-oriented, more abstract environment.

A classmate told me that in the simpler application of. NET, there is no data representation layer this level of things, all use ASPX directly invoke the stored procedure ... Each village has a brilliant idea of a village.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.