I took some time today to coerce ColdBox 3.0.0 RC1 into running on OpenBlueDragon 1.4 and thought I'd share my changes and thoughts with both lists, So far the basic handlers and controllers work (ie, I can display the demo page, cache information, debugger, etc. but haven't gone much further than that)
Here's what I changed: 1. In what I believe to be an OBD Bug, negative numbers are not supported as cases in switch statements unless they are quoted (Which I imagine has a performance penalty), So in the file "coldbox/system/ logging/LogLevels.cfc" the -1's must be quoted on lines 31 and 56, I have submitted this as a bug to the OpenBlueDragon tracker http://code.google.com/p/openbluedragon/issues/detail?id=290 2. The CFMLEngine.getVersion() function returns "1" for OpenBlueDragon due to a change in the version number scheme, This breaks a few things, so coldbox/system/core/cf/CFMLEngine.cfc needs to be updated, I added a test to see if (version=1 && engine=bluedragon) then version=7, to make it equivalent to all the checks that test for what I assume is NewAtlanta's BlueDragon/JX, which OBD is obviously very compatible with, I'm not sure if there are any other features that can be enabled as OBD has been under active development for a while now, and is probably a fair bit further along than BD/JX was when these checks were written. 3. This next one is nasty, Once CFML7 support is enabled, CB3 starts to make use of cfinterface in it's caching interface, The OpenBlueDragon cfinterface syntax is entirely different from what's expected in several ways (Full details here http://wiki.openbluedragon.org/wiki/index.php/CFCOMPONENT), First they actually have no cfinterface tag, instead they have an attribute to cfcomponent, type="interface", And also interfaces cannot "implement" other interfaces, instead they become type="abstract" components which can be implemented by others. I patched the relevant files to change them to the OBD syntax but obviously that makes them incompatible with Adobe and Railo. I'm not sure how high a priority fixing this is for the OBD team, I'll take a stab at it in a month or so if they don't move on it, request submitted to their tracker here: http://code.google.com/p/openbluedragon/issues/detail?id=292, The only other way I can think of would be to have special files set aside for OBD that duplicate the functionality of pretty much everything in coldbox/system/cache/ with a very slightly different syntax, which is kind of absurd. 4. There are a few other bugs I encountered while pressing onward, including at least two that break forgebox, the first is an OBD compatibility issue, their cfzip tag uses a zipfile attribute, instead of just file (compatibility fix requested here: http://code.google.com/p/openbluedragon/issues/detail?id=291), and second there's something broken in coldbox/system/core/conversion/ JSON.cfc that will surely effect other projects/modules, I think it's getting structs & queries confused when doing a conversion, but I will need more time to track that down (And May be able to replace it with native functions for OBD). Finally I believe the coldbox cache reap method may not be threading properly, and will dig into that if time allows. Inlined below are the changes I made in patch format (So they're available in the list archives), on any unix-like platform you should be able to apply them by entering the coldbox directory, and running "patch -p0 < /path/to/patch", I'll also host them as long as it's convenient: http://grevian.org/~grey/cb3-obd/obd-bugfix.patch http://grevian.org/~grey/cb3-obd/obd-detect.patch http://grevian.org/~grey/cb3-obd/obd-interface.patch Sorry that this email is HUGE, Just wanted to make sure I put everything relevant in. - Josh diff -Naur ./system/core/cf/CFMLEngine.cfc ../nPatch/system/core/cf/ CFMLEngine.cfc --- ./system/core/cf/CFMLEngine.cfc 2010-11-26 01:31:04.132195089 -0500 +++ ../nPatch/system/core/cf/CFMLEngine.cfc 2010-11-26 00:55:09.562431258 -0500 @@ -55,6 +55,10 @@ <!--- Get the current CFML Version ---> <cffunction name="getVersion" access="public" returntype="numeric" hint="Returns the current running CFML version" output="false" > + <cfif getEngine() eq "BLUEDRAGON" and ( listfirst(server.coldfusion.productversion) eq "1" ) > + <!--- OpenBlueDragon restarted their version numbers at 1.x, But they are at least CFML7 compatible ---> + <cfreturn 7 /> + </cfif> <cfreturn listfirst(server.coldfusion.productversion)> </cffunction> @@ -182,4 +186,4 @@ <cfreturn instance[arguments.engine][arguments.feature]> </cffunction> -</cfcomponent> \ No newline at end of file +</cfcomponent> diff -Naur ./system/logging/LogLevels.cfc ../nPatch/system/logging/ LogLevels.cfc --- ./system/logging/LogLevels.cfc 2010-11-26 01:31:04.143188308 -0500 +++ ../nPatch/system/logging/LogLevels.cfc 2010-11-26 00:55:09.902389729 -0500 @@ -28,7 +28,7 @@ function lookup(level){ switch(level){ - case -1: return "OFF"; + case "-1": return "OFF"; case 0: return "FATAL"; case 1: return "ERROR"; case 2: return "WARN"; @@ -53,7 +53,7 @@ function lookupCF(level){ switch(level){ - case -1: return "OFF"; + case "-1": return "OFF"; case 0: return "Fatal"; case 1: return "Error"; case 2: return "Warning"; @@ -68,4 +68,4 @@ } </cfscript> -</cfcomponent> \ No newline at end of file +</cfcomponent> diff -Naur ./system/cache/ICacheProvider.cfc ../nPatch/system/cache/ ICacheProvider.cfc --- ./system/cache/ICacheProvider.cfc 2010-11-26 01:31:04.131236435 -0500 +++ ../nPatch/system/cache/ICacheProvider.cfc 2010-11-26 00:55:09.556432075 -0500 @@ -13,7 +13,7 @@ Please note that all cache providers have a reference back to the CacheBox Factory. ----------------------------------------------------------------------- > -<cfinterface hint="The main interface for a CacheBox cache provider object, you implement it so CacheBox can manage it for you."> +<cfcomponent type="interface" hint="The main interface for a CacheBox cache provider object, you implement it so CacheBox can manage it for you."> <!--- getName ---> <cffunction name="getName" output="false" access="public" returntype="string" hint="Get the name of this cache"> @@ -174,4 +174,4 @@ <cfargument name="objectKey" type="any" required="true" hint="The object cache key"> </cffunction> -</cfinterface> \ No newline at end of file +</cfcomponent> diff -Naur ./system/cache/IColdboxApplicationCache.cfc ../nPatch/ system/cache/IColdboxApplicationCache.cfc --- ./system/cache/IColdboxApplicationCache.cfc 2010-11-26 01:31:04.129194918 -0500 +++ ../nPatch/system/cache/IColdboxApplicationCache.cfc 2010-11-26 00:55:09.546460212 -0500 @@ -9,7 +9,7 @@ The main interface to produce a ColdBox Application cache. ----------------------------------------------------------------------- > -<cfinterface extends="coldbox.system.cache.ICacheProvider" hint="The main interface to produce a ColdBox Application cache"> +<cfcomponent type="abstract" impliments="coldbox.system.cache.ICacheProvider" hint="The main interface to produce a ColdBox Application cache"> <!--- getViewCacheKeyPrefix ---> <cffunction name="getViewCacheKeyPrefix" output="false" access="public" returntype="string" hint="Get the cached view key prefix"> @@ -84,4 +84,4 @@ <cfargument name="async" type="boolean" hint="Run command asynchronously or not"/> </cffunction> -</cfinterface> \ No newline at end of file +</cfcomponent> diff -Naur ./system/cache/policies/IEvictionPolicy.cfc ../nPatch/ system/cache/policies/IEvictionPolicy.cfc --- ./system/cache/policies/IEvictionPolicy.cfc 2010-11-26 01:31:04.128239043 -0500 +++ ../nPatch/system/cache/policies/IEvictionPolicy.cfc 2010-11-26 00:55:09.545431105 -0500 @@ -9,7 +9,7 @@ Description : The CacheBox eviction policy Interface ----------------------------------------------------------------------- > -<cfinterface hint="The CacheBox eviction policy interface"> +<cfcomponent type="interface" hint="The CacheBox eviction policy interface"> <!--- execute ---> <cffunction name="execute" output="false" access="public" returntype="void" hint="Execute the eviction policy on the associated cache"> @@ -19,4 +19,4 @@ <cffunction name="getAssociatedCache" access="public" returntype="any" output="false" hint="Get the Associated Cache Provider of type: coldbox.system.cache.ICacheProvider"> </cffunction> -</cfinterface> \ No newline at end of file +</cfcomponent> diff -Naur ./system/cache/providers/CacheBoxColdBoxProvider.cfc ../ nPatch/system/cache/providers/CacheBoxColdBoxProvider.cfc --- ./system/cache/providers/CacheBoxColdBoxProvider.cfc 2010-11-26 01:31:04.131236435 -0500 +++ ../nPatch/system/cache/providers/CacheBoxColdBoxProvider.cfc 2010-11-26 00:55:09.555440207 -0500 @@ -179,4 +179,4 @@ </cffunction> -</cfcomponent> \ No newline at end of file +</cfcomponent> diff -Naur ./system/cache/store/IObjectStore.cfc ../nPatch/system/ cache/store/IObjectStore.cfc --- ./system/cache/store/IObjectStore.cfc 2010-11-26 01:31:04.131236435 -0500 +++ ../nPatch/system/cache/store/IObjectStore.cfc 2010-11-26 00:55:09.560451719 -0500 @@ -10,7 +10,7 @@ A store is a physical counterpart to a cache, in which objects are kept, indexed and monitored. ----------------------------------------------------------------------- > -<cfinterface hint="The main interface for CacheBox object storages."> +<cfcomponent type="interface" hint="The main interface for CacheBox object storages."> <!--- flush ---> <cffunction name="flush" output="false" access="public" returntype="void" hint="Flush the store to a permanent storage"> @@ -75,4 +75,4 @@ <cffunction name="getSize" access="public" output="false" returntype="numeric" hint="Get the store's size"> </cffunction> -</cfinterface> \ No newline at end of file +</cfcomponent> diff -Naur ./system/cache/util/ICacheStats.cfc ../nPatch/system/cache/ util/ICacheStats.cfc --- ./system/cache/util/ICacheStats.cfc 2010-11-26 01:31:04.130193425 -0500 +++ ../nPatch/system/cache/util/ICacheStats.cfc 2010-11-26 00:55:09.554433114 -0500 @@ -9,7 +9,7 @@ The main interface for a CacheBox cache provider statistics object ----------------------------------------------------------------------- > -<cfinterface hint="The main interface for a CacheBox cache provider statistics object"> +<cfcomponent type="interface" hint="The main interface for a CacheBox cache provider statistics object"> <!--- Get Cache Performance ---> <cffunction name="getCachePerformanceRatio" access="public" output="false" returntype="numeric" hint="Get the cache's performance ratio"> @@ -43,4 +43,4 @@ <cffunction name="getLastReapDatetime" access="public" returntype="string" output="false" hint="Get the date/time of the last reap the cache did"> </cffunction> -</cfinterface> \ No newline at end of file +</cfcomponent> -- Open BlueDragon Public Mailing List http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon official manual: http://www.openbluedragon.org/manual/ Ready2Run CFML http://www.openbluedragon.org/openbdjam/ mailing list - http://groups.google.com/group/openbd?hl=en
