Per-Application Mappings

1 view
Skip to first unread message

Tony Nelson

unread,
Feb 23, 2011, 8:31:30 PM2/23/11
to ColdMVC
All,

I'm thinking about changing the per-application mappings that ColdMVC
automatically creates due to inconsistent class path resolution issues
in ColdFusion.

For example, if your application is located at C:\inetpub\wwwroot
\myproject\, the following mappings will be automatically created for
you:

/myproject => C:\inetpub\wwwroot\myproject\
/root => C:\inetpub\wwwroot\myproject\
/app => C:\inetpub\wwwroot\myproject\app\

This can become an issue when working with ORM and Flex, since a
component can resolve to multiple different class paths. For example,
a typical User model can resolve to the following paths:

- myproject.app.model.User
- root.app.model.User
- app.model.User

My proposal is to remove the "myproject" and "root" mappings, leaving
only the "app" mapping. I believe this will provide the greatest
flexibility for working with plugins while also allowing for a
straight-forward way of managing components paths.

Thoughts?

Ryan Ricard

unread,
Feb 24, 2011, 10:24:44 AM2/24/11
to ColdMVC
I'm all for it assuming this resolves the inconsistent class path
issue. It appears your goal is to have a single per-application
mapping resolve to an application's components; thus, setting an
application specific per-application mapping that resolves elsewhere
within an application should be fine, correct? Example being... /log
=> C:\inetpub\wwwroot\myproject\log\

Tony Nelson

unread,
Feb 24, 2011, 10:29:49 AM2/24/11
to ColdMVC
Correct. You can create any other mappings that you wish. The goal of
the change is so that the framework only creates a single mapping that
references your component's app directory, where components are
located, so that class path resolution is more consistent.

-Tony
Reply all
Reply to author
Forward
0 new messages