Using Metro - Decorators and Validation

Metro , Transfer , ColdFusion , jQuery No Comments »

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.

Read more...

Metro 0.3 Released

Metro No Comments »

The latest version of Metro is now available on RIAForge. Here's the skinny on what has changed.

  1. 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.
  2. 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.
  3. 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().
  4. 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

Metro , Transfer , ColdFusion , ColdSpring 1 Comment »

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.

Read more...

Metro 0.2 Released

Metro , Transfer No Comments »
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...

Transfer , Ideas , ColdFusion , ColdSpring 3 Comments »
Metro is a library of components to support rapid development of applications that use ColdSpring and Transfer ORM.

Read more...

Using the Eclipse MXUnit Plugin with Apache Virtual Hosts Revisited

MXUnit , cfeclipse , Apache No Comments »

In a previous post on the topic of using the MXUnit eclipse plugin with virtual hosts, I described how I setup my eclipse project and Apache virtual host for testing. Although that setup worked, I would get periodic errors that necessitated disabling and re-enabling the MXUnit plugin. Until recently, I was still running eclipse 3.2, so when I got the opportunity to configure a new machine from the ground up, I decided to go with a fresh install of the latest eclipse (3.4) and essential plugins, CFEclipse (1.3.1.6), Subclipse (1.4.5) and MXUnit (1.0.7).

Read more...


Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds