I made another mistake.

Source: Internet
Author: User
At the meeting today, we decided to change the data access solution of JDBC + stateless sessionbean to the entitybean solution. This means that my module needs to be re-designed. Two lessons have been learned: 1. Do not think you are better than others. When we designed this module, we chose entitybean, which means that the configuration and deployment of entitybean is too complicated, and ejb1.1 does not support local interface, resulting in a reduction in the efficiency of complex data operations. In addition, object-schema mapping is not much simpler than JDBC + SSB. Who knows how to design and find out that once they have to deal with the relationship between complex points, CodeNaturally, it's complicated. Finally, we found that our design repeat a lot of entitybean functions, such as object-level caching (I wrote a single-Write-multiple-write cache module myself, A waste of time), configurable relationship ing, and multi-level proxy design patterns... Think about it later. ProgramThere are more employees than us, so we may not have written manual data storage? Of course, there are a lot of problems, so we invented solution 3 of entitybean, But we naively thought we were better than others, and completely forgot Linus to explain why the Linux kernel didn't need to be written in C ++. Famous saying: Being there, done that. In fact, this lesson has been learned before. In the previous file organization lesson, I spent an hour writing a commonly used implementation method (linked bucket). I had to implement the so-called extendable hashtable that supports maximum flexibility. The result was written for two days, not well written yet. In fact, Eric mentioned the similar mistakes he made in his blog. Why didn't I go to my heart? 2. This is relatively old. Is to sharpen the knife without mistaken cutting back the firewood. At the beginning of the project, countless books mentioned that entitybean is good for data access with complex relationships, but I did not think about why others insisted on it, nor did I go into details, forget the ancient training: the old saying goes, the old saying goes, and the old saying goes, the old saying goes.

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.