![]() ![]() An interface enforce low coupling between components, what’s make easy to protect the interface consumer from any implementation changes in the classes implementing the interfaces.Interfaces allow developers to start talking about the general way that code behaves without having to get in to a lot of detailed specifics. An interface also provides a level of abstraction that makes programs easier to understand.An interface is a contract between an object and its consumer. An object that uses another object is called a consumer. If an object implements an interface then that object is to conform to a standard. An interface provides a way to define a contract that promotes reuse. ![]() Here are three key benefits derived from using interfaces: In the long run, this could alleviate a lot of time, effort, and cost associated with modifying and adding new features to an application. Low coupling is desirable because a change in one area of an application will require fewer changes throughout the entire application. Hibernate core contains many packages, each one is related to a specific feature hql, sql, and others. Items that work closely together are placed next to each other. This results in packages with high cohesion and high modularity, and with minimal coupling between packages. It places all items related to a single feature (and only that feature) into a single directory/package. Package-by-feature uses packages to reflect the feature set. In this post Hibernate Core is analyzed by JArchitect to go deep inside its design and implementation. Let’s take a look inside the hibernate core library and discover some of its design keys. ![]() In general the widely used libraries are well designed and implemented, and it’s very interesting to learn from them some coding best practices. Perform powerful object relational mapping and query databases using HQL and SQL. Hibernate is an open source Java persistence framework project. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |