Entries for month: January 2009
The latest Metro release (0.4) includes some bug fixes and a significant change to the included security package. After much consideration, I felt it was appropriate to separate the security package into "user" and "security" to facilitate integration with other projects and provide better separation of concerns. There is now a UserService which is responsible for managing the User, Role and Permission objects. The SecurityService is now primarily responsible for managing user sessions.
Additional meaningful updates below:
- The loginUser() method found in UserService, now checks the Active status for a User.
- The User decorator's hasPermission() method now accepts a comma separated list of permissions to check.
Wiring the Coldbox Logger Plugin To An AOP Logging Advice
Coldbox , ColdFusion , ColdSpring , AOP No Comments »Logging is one of the classic cross-cutting concerns one hears about when discussing Aspect Oriented Programming (AOP). Other common aspects are caching, security and data transformation. Over the past year, I've begun to apply AOP with ColdSpring to my application design. I was completely confused about just what was going on with AOP, when I first looked at it, then, by degrees, I came to realize that it is actually pretty simple if you can focus on the basics without trying to absorb all the terms associated with AOP. With the release of ColdSpring 1.2, Brian Kotek wrote an excellent quickstart guide, that I recommend (especially for the AOP tutorial which I borrow heavily from for this example). I'll briefly describe how I wrapped my head around the concept.
Customizing the ColdBox Logger Plugin with Method Injection
Coldbox , Ideas , ColdFusion 2 Comments »I've started using Coldbox recently and really like the tooling it provides. I don't always have access to the ColdFusion logs for apps on shared servers and although I have worked with log4j, I didn't like property file configuration. The simplicity of the ColdBox logger is great, but I wanted to be able to set log levels and work with the standard debug(), info(), warn(), error() and fatal() methods. One way to achieve this is to mixin the desired behaviour. Another ColdBox plugin, methodInjector, allowed me to do just that.
I revisited the Metro ServiceFactory after John Whish's recent question about how Metro instantiates concrete classes. After a bit of trial and error, I'm happy to announce that the ServiceFactory now supports the creation of concrete gateways without requiring a concrete service in the same package. Before I outline how Metro resolves the class path for instantiating a Service and composed Gateways, I'll describe the basic conventions one must follow to use Metro.
Recent Comments