Nbear advantages and disadvantages Rough Analysis (version 3.7)-One of Nb

Source: Internet
Author: User

The following is a rough look at the nbear3.7.2 feeling, but also gives a simple comparison with Castle's activerecord.
The general feeling is that nbear is good. It is basically the same as the castle solution in hierarchical design, that is, the usage of ORM is a little different. Compared with the castle solution, Castle is easier to use and nbear takes a long time to learn.

I. Advantages:
1. Some packaging at the application layer is provided, saving a lot of trouble:
A. Implementation of distributed deployment
B. serialization and multi-language
C. ajaxhelper/webutil, etc.

2. The performance of ORM may be better than activerecord. (Activerecord is a layer of packaging in nhib.pdf, which consumes more performance. In addition, the failure to accurately set the attributes and usage of Nhibernate may also cause performance concerns)

3. Multiple databases are supported. Compared with activerecord, can I omit "self-extended dbhelper "?
A. ar considering performance issues, I recommend that you use "add, delete, and use AR to query your own extended DB ".
In nbear, the gateway is displayed. selectdatareader ()/gateway. executenonquery () interfaces, that is, nbear already provides dbhelper and adds a bit of packaging for multiple databases, which may be a little more "cross-Database" than self-encapsulated dbhelper. (However, it is estimated that the problem of "Writing select SQL statements cannot be used in a specific database" cannot be completely avoided)

4. provides several useful tools to accelerate development.
A. Tools used to produce entitydesign classes from databases: nbear.tools.dbtoentitydesign.exe
B. automatically update entity and entityimpls. XML (and update data table structure) from the class chart. vs2005 plug-in: setupnbearvsplugin.exe
C. Tools used to generate entity/entityimpls. XML (and SQL) from entitydesign. dll: nbear.tools.entitydesigntoentity.exe (unable to use it after the plug-in is available)

Ii. Disadvantages:
1. The learning cost is high, and documents are not easy to understand. It takes some time to get familiar with it at the beginning. (It may be better to have internal training)
2. Fast updates, and backward compatibility of versions is not enough. (Version V4 has been planned, and the change is even greater)
3. The version 3.7 and later in the ORM is estimated to be too complicated and overpacked. It is too troublesome to learn a set of non-General syntaxes, like LINQ. In addition, whether the performance can support some useful SQL statements remains to be tested.
4. It is better to save the entitydesign layer. It is not as simple as activerecord, and there is also an entityimpls. xml. (The design layer is a design designed to generate design and entityimpls. XML, Which is useless in the end. It is better to design the database first and then automatically generate the entity)
5. The webui and serviceinterface layers both reference the entity layer. This means that the architecture and nbear are fully bound together.
(If entity is not referenced, in theory, the serviceinterface implementation layer can be completely replaced, for example, written using another ORM framework .)
Of course, it may be to use entity as DTO to facilitate the passing of object parameters in distributed solutions. = "Is not a good choice.
6. The final layered design will make a "anemia domain model", that is, the entity object only has no data action. This is certainly not a good design from Oo's intention (Object = "Data + action" encapsulation. = It cannot be determined at present, and it should be okay. Entity cannot add methods (Distributed DTO considerations). This means that the service layer will write a "transaction script" with similar effects and the design is not easy to control, the service class is very messy.
7. Domestic open-source projects have concerns about the lack of sustained and healthy development. After all, the open-source business model in China is not mature. If you need to work on open-source projects after work, I am afraid that the support and upgrade efforts are insufficient and will not last long. (But fortunately, it is open-source. You can extend it by yourself)

 

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.