In this case, WDDX is fine because it's only on the back end. The front end
language stuff is all DB driven. The reason we wanted to do it this way is
it allows us to easily plug modules in to the back end from other
applications we've built, texts included, without needing to untangle the
texts from the DB.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Joe Eugene
> Sent: Monday, October 13, 2003 10:20 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [CFCDev] Diving in ...
>
>
>
> Direct DataBase calls might be faster than WDDX. We used Database to
> accomplish
> Localization of the application.. so basically every page has its
> "MetaData"
> defined
> in the DB like (form controls, image controls etc) and data returned in
> structs.
>
> #img['myImage']# =
> myImage_#request.siteCountry#_#request.siteLanguage#.gif
>
> Conventions go like
>
> imageName_USA_EN.gif
> imageName_USA_ES.gif
>
> Multi_language, Muti-Country (Basically a site for USA, handling Multiple
> languages)
>
> You can use a application scope CFC instance holding the
> MetaData, if needed
> but
> this might take alot Memory.
>
> WDDX was not an option for us.
>
> Joe Eugene
>
> ----- Original Message -----
> From: "Nando" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, October 13, 2003 3:47 PM
> Subject: [CFCDev] Diving in ...
>
>
> > I've been lurking here since mid August, and finally have a
> chance to dive
> > in. I've got this working fine, but since i'm starting out with CFC's in
> > earnest, i was wondering if anyone would mind critiquing this
> component to
> > get me on the right track. Being in Switzerland, we need to
> support a few
> > different languages in the back end interface (uLan = user
> language), and
> > decided the best way to go would be to keep the admin texts in
> a wddx file
> > right next to the form or back end display file.
> >
> > Only users with "allowAdmin" permission level are allowed to
> edit the back
> > end texts, so the linked edit dots are hidden otherwise.
> >
> > TIA,
> >
> > Nando
> >
> > <cfcomponent hint="I'm the AdminText Manager">
> >
> > <cffunction name="init" access="public" returntype="com.AdminText">
> >
> > <cfargument name="path" type="string" required="yes">
> > <cfargument name="arrLen" type="numeric" required="yes">
> > <cfargument name="ulan" type="string" required="yes">
> >
> > <cfset variables.aText = ArrayNew(1)>
> > <cfset variables.path = arguments.path>
> > <cfset variables.ulan = arguments.ulan>
> > <cfset variables.arrLen = arguments.arrLen>
> >
> > <cfset variables.d = LCase(ListLast(GetDirectoryFromPath(path),"\"))>
> > <cfset variables.f = LCase(ListFirst(GetFileFromPath(path),"."))>
> >
> > <cfset wddxPath = Left(path, Len(path)-4)&'.wddx'>
> > <cfif FileExists(wddxPath)>
> > <cffile action="READ" file="#wddxPath#" variable="adminText_wddx">
> > <cfif Len(Trim(adminText_wddx))>
> > <cfwddx action="WDDX2CFML" input="#adminText_wddx#" output="adminText">
> > <cfscript>
> > aText = arrayNew(1);
> > for(i=1; i lte #ArrayLen(adminText)#; i=i+1) {
> > if(IsStruct(adminText[i])) {
> > if(StructKeyExists(adminText[i], #ulan#) AND
> > Len(StructFind(adminText[i], '#ulan#'))) {
> > aText[i] = StructFind(adminText[i], '#ulan#');
> > }
> > else {
> > aText[i] = StructFind(adminText[i], 'en');
> > }
> > }
> > else { aText[i] = '';}
> > }
> >
> > </cfscript>
> > <cfelse>
> > <cfscript>
> > aText = arrayNew(1);
> > temp = ArrayResize(aText,#arrLen#);
> > for(i=1; i lte #arrLen#; i=i+1) {
> > aText[i] = "";
> > }
> > </cfscript>
> > </cfif>
> > <cfelse>
> > <cfscript>
> > aText = arrayNew(1);
> > temp = ArrayResize(aText,#arrLen#);
> > for(i=1; i lte #arrLen#; i=i+1) {
> > aText[i] = "";
> > }
> > </cfscript>
> > </cfif>
> >
> > <cfset variables.aText = aText>
> >
> > <cfreturn this>
> > </cffunction>
> >
> > <cffunction name="getTextDot" access="public" output="yes">
> > <cfargument name="pos" required="Yes" type="numeric">
> > <cfif request.allowAdmin><a
> >
> href="#request.self#?fuseaction=editAdminText.edit&d=#variables.d#
> &f=#variab
> > les.f#&pos=#pos#&arrLen=#variables.arrLen#" style="width:10;"><img
> > src="admin/icons/editDot4.gif" width="4" height="4" hspace="3"
> vspace="2"
> > border="0"></a></cfif>#variables.aText[pos]#
> > </cffunction>
> >
> > <cffunction name="getDot" access="public" output="yes">
> > <cfargument name="pos" required="Yes" type="numeric">
> > <cfif request.allowAdmin><a
> >
> href="#request.self#?fuseaction=editAdminText.edit&d=#variables.d#
> &f=#variab
> > les.f#&pos=#pos#&arrLen=#variables.arrLen#"><img
> > src="admin/icons/editDot4.gif" width="4" height="4" hspace="1"
> vspace="2"
> > border="0"></a></cfif>
> > </cffunction>
> >
> > <cffunction access="public" name="getText">
> > <cfargument name="pos" required="Yes" type="numeric">
> > <cfreturn variables.aText[pos]>
> > </cffunction>
> >
> > </cfcomponent>
> >
> > ----------------------------------------------------------
> > You are subscribed to cfcdev. To unsubscribe, send an email
> > to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
> > in the message of the email.
> >
> > CFCDev is run by CFCZone (www.cfczone.org) and supported
> > by Mindtool, Corporation (www.mindtool.com).
> >
> > An archive of the CFCDev list is available at
> www.mail-archive.com/[EMAIL PROTECTED]
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
> in the message of the email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
>
> An archive of the CFCDev list is available at
> www.mail-archive.com/[EMAIL PROTECTED]

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to