Hivemind and spring overlap a large part of their implementation functions. They all implement similar functions by using ICO principles such as control flip and dependency injection, in this regard, the guiding spirit of the two is the same.
The existence is reasonable. The implementation methods and concerns of hivemind and spring are quite different.
Hivemind is a microkernel that provides component services and configurations. It is a basic framework for various Java programs. The Java program can be a tapestry application, servlet-based web application, command line tool, swing or awt gui program, and so on.
Services in hivemind are Java classes that implement specific interfaces and are registered. Hivemind uses the dependency injection mode to generate and provide these services in real time. (See the following example)
As for spring, there are many communities that will be introduced here.
The following figure compares the two frames:
Hivemind Architecture
Spring architecture:
The following compares the two architectures in text mode.
Examples:
1. Use hivemind and spring to intercept a method.
Continue tomorrow :-)
Comparison of another friend: h vs S
Http://raibledesigns.com/wiki/Wiki.jsp? Page = appfuse
Tian Chunfeng