Entries Tagged as Metro
Using Metro - Decorators and Validation
Posted by Paul Marcotte | Tags: ColdFusion , jQuery , Metro , Transfer
In the first part of Using Metro, I reviewed the Service and Gateway portion of the Metro security package. In this post, I'll describe the core Metro Decorator and Validator as well as the jQuery plugin I use for client side validation.
Metro 0.3 Released
Posted by Paul Marcotte | Tags: Metro
The latest version of Metro is now available on RIAForge. Here's the skinny on what has changed.
- Added an audit package
I've been using a Transfer AfterCreate and AfterUpdate observer to track changed to Transfer objects that I wish to track. Since this has become a common part of some of the apps I'm building, I decided to include it in Metro. - Updated the core Service and Gateway to add getByProperty() support
I ran into a use case for this on a new project and decided to add it to simplify things. - Fixed a bug in core Decorator related to validation rule creation
This update fixes a problem created when no min and max arguments are passed to addRule(). - Updated the security package to add "Active" attribute to User
Another use case addition. In order to provide a little more security to user registration, I added and Active flag to the User object.
Using Metro - Creating Concrete Services and Gateways
Posted by Paul Marcotte | Tags: ColdFusion , ColdSpring , Metro , Transfer
In my brief introduction to Metro, I provided some cursory configuration details. Today, I'll describe portions of the included sample security package to demonstrate how to integrate Metro and leverage the simple User, Role, Permission model. Since Metro is designed specifically for use with Transfer ORM, we'll need to set up a database, dsn and configure Transfer and ColdSpring for this demo.
Metro 0.2 Released
Posted by Paul Marcotte | Tags: Metro , Transfer
The latest release (0.2) of Metro eliminates a convention on naming object Ids (or your database table Primary Key). Like a lot of developers, I tend to name my table PK as table name plus "Id" - UserId, AddressId, etc. I used this convention within the core Service for Metro, but I was unsatisfied with that limitation. Using Metro should not force one to adopt another developers convention(s). So I re-factored the core Service and Gateway to use Transfer metadata instead. Object retrieval in the Service save() method which looked like this:<cfset var obj = get(arguments.objectName,arguments.input[arguments.objectName&"Id"])>
Is now this:
<cfset var pkName = getGateway(arguments.objectName).getPrimaryKey()>
<cfset var obj = get(arguments.objectName,arguments.input[pkName])>
And the core Gateway has this new method.
<cffunction name="getPrimaryKey" access="public" output="false" returntype="string">
<cfreturn getTransfer().getTransferMetadata(getClassName()).getPrimaryKey().getName()>
</cffunction>
These are small but important changes to the Metro library.
Introducing Metro - A Transfer ORM Service Factory and More...
Posted by Paul Marcotte | Tags: ColdFusion , ColdSpring , Ideas , Metro , Transfer
Metro is a library of components to support rapid development of applications that use ColdSpring and Transfer ORM.