One of the challenges of a larger OO application is tracking and managing the state of objects. I think in many cases objects are created when they dont need to be, but the developer is not sure or cant find the scope of the current object, so they instantiate a new one (guilty).
Following OO best practices like loose coupling (minimal dependency among interacting objects), promotes object creation and managing of its own state. In other words, I better be creating a object pointer to other objects that I depend on. The classic case is a DAO or Gateway data access object that has a service that manages it. The data access object has a dependency to the service layer. Without the its service, the application could never use the data access object. This dependency is often managed in the constructor method of the service. When the constructor method is called, object pointers are created to the data access layer objects.
If your application consists of a lot of objects, then lots of these type of dependencies are created and lots of object instantiation calls are made. Enter coldSpring.
Coldspring is itself a framework that plugs into another framework, like mach II.
ColdSpring helps to manage all this object instantiation and dependency stuff. The creation and dependency relationships are removed from the service layer and abstracted away into a coldSpring configuration file, that is registered in the mach ii controller file.
Read this article and follow others from this blog.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment