While I absolutely love the new <CFIMPORT> functionality of CFMX I have a number of gripes about it's implementation.....

1. It is not possible to specify the TAGLIB parameter as anything but a constant string.  If I could specify a variable then I would be really happy and my other gripes would go away.  This is an issue because of other points below....

2. The <CFIMPORT> *MUST* be inline on the page you want to perform the import into.  You cannot put it into another CFM file and perform a <CFINCLUDE> on it.  If you could do this, you could then easily change just one file (the <CFINCLUDE> one) and have all your pages get their tags from a different path).

3. <CFIMPORT> ignores CF mappings.

(NOTE: I have thought of another possible solution to my problem and that would be putting the <CFIMPORT> tags into Application.cfm - but I think this may provide the same sorts of problems as using <CFINCLUDE> - I will try that after sending this and report back if I find joy)

Why is this a problem?

Well.... if you create a generic <mytags:page> tag for all of your CFMX pages you need to <CFIMPORT> at the top of each page.  This is fine except when your devlopment and production environments may have different root paths for storing some of this stuff.

For example:

I develop a lot of stuff on my laptop.  This is my own laptop and I do stuff other than for my main employer on it as well.  I store my custom tags in a directory called /system/cftags (for example).  However, work stores them in a directory called /work-system/cftags (names changed to protect the guilt).  I dont want to have a /system/cftags and a /work-system/cftags (and any number of other possibilities if I develop for multiple locations).

So - when I have to port my development code from my laptop to works acceptance and or production systems I am in the place where I have to go and edit the files that have <CFIMPORT> in them (either manually or automatically - the point is I should not have to).

Now.....

I am guessing I know exactly why this is the case......

<CFIMPORT> is probably NOT actually a CFMX tag but is actually a mechanism to provide an instruction to the Java compiler.  It just looks like a tag.  Therefore, CFMX really knows nothing about it as far as it actually being a "tag" and when CFMX actually sets up it's environment with variables and suchlike, this "tag" has been consumed in the compilation process.

BUT.....

That does not make my life for using <CFIMPORT> any easier - and the functionality of "custom tags" that it provides is just SO useful that I dont want to abandon it.

It really shows promise for creating complex systems, but then falls down when trying to maintain those complex systems if you need to migrate between different environments or you need to make architectural changes to the site.

Can any of the MM people on the list shed any light on any possible future enhancements/changes that may alleviate the above issues?



Gary Menzel
IT Operations Brisbane -+- ABN AMRO Morgans Limited
Level 29, 123 Eagle Street BRISBANE QLD 4000
PH: 07 333 44 828  FX:  07 3834 0828


****************************************************************************
If this communication is not intended for you and you are not an authorised
recipient of this email you are prohibited by law from dealing with or
relying on the email or any file attachments. This prohibition includes
reading, printing, copying, re-transmitting, disseminating, storing or in
any other way dealing or acting in reliance on the information. If you
have received this email in error, we request you contact ABN AMRO Morgans
Limited immediately by returning the email to [EMAIL PROTECTED]
and destroy the original. We will refund any reasonable costs associated
with notifying ABN AMRO Morgans. This email is confidential and may contain
privileged client information. ABN AMRO Morgans has taken reasonable steps
to ensure the accuracy and integrity of all its communications, including
electronic communications, but accepts no liability for materials
transmitted. Materials may also be transmitted without the knowledge of ABN
AMRO Morgans. ABN AMRO Morgans Limited its directors and employees do not
accept liability for the results of any actions taken or not on the basis
of the information in this report. ABN AMRO Morgans Limited and its
associates hold or may hold securities in the companies/trusts mentioned
herein. Any recommendation is made on the basis of our research of the
investment and may not suit the specific requirements of clients.
Assessments of suitability to an individual's portfolio can only be made
after an examination of the particular client's investments, financial
circumstances and requirements.
****************************************************************************
--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to