Blog

Blog Archives - 16 Record(s)

Remove Filter Year: '2007' - Month: '3'

ColdBox 2.0.0 RC 1 Now Available.

Posted by Luis Majano
Mar 27, 2007 00:00:00 UTC
Well, we are almost there. I am releasing today the release candidate 1 of ColdBox 2.0.0. You can get the bits from by clicking here

This new build includes the following:

1. Complex Settings via the config.xml. You can now declare arrays and structures inline using {} and [] notation.

Ticket Here | Config Guide

2. ColdBox Cache Monitor: For all you geeks, this cache monitor will render the performance of your cache and create a monitor that you can have open alongside your application so you can view its state and event get metdata reports about the objects in cache.

URL Actions Guide

Cache Monitor

Cache Monitor Alongside Application

3. Multiple fixes and updates

4. Dashboard updates.

5. Cache Settings Override via the config.xml. You can now override the framework-wide settings in your applications.

6. Much more fixes and cleanup.

You can see all of the updates and tickets Clicking Here.

Enjoy this release as the final version will be coming soon.

Need to Refactor Transfer to meet your server layout? Here you go!

Posted by Luis Majano
Mar 21, 2007 00:00:00 UTC
As you all now, the best and easiest way to install Transfer is just by droping it in your web root and boom, you are ready to roll. However, sometimes you need the flexibility to change the path and things just work. Well, I just created this ANT task to do that. It will ask you for a new base path and a new relative path, then it will refactor the entire Transfer codebase to meet your directory layout. This similar Task is included with ColdBox in the install directory, so you can refactor the ColdBox codebase to your layout.

Example

I have my frameworks under a directory called: 'frameworks' and I usually create a version to them, say: frameworks.coldbox2_00 or frameworks.transfer0_63

Everybody has their own naming conventions and ideas. Anyways, here is the ANT Task.

This ant task will rebuild colspring using a prefix of choice

The prefix choosen is: ${Setting: transfer.newprefix not found}

Refactoring: ${Setting: basedir not found}

transfer.com

/transfer/resources

You just need to place this as build.xml or refactor.xml in the root of your Transfer directory, where the TransferFactory.cfc is. Then just run it, it will ask you for the first path, type "frameworks.transfer0_63" then the relative path, type "/frameworks/transfer0_63" and then you are ready to roll.

Just make sure when you instantiate the factory it will now be: "frameworks.transfer0_63.TransferFactory"

There you go. Make sure you make a backup, just in case, or if you are a real geek, then keep it, so you can run it multiple times.

Have fun!!

ColdBox: New Transfer Sample Application! Transfer Rocks!!

Posted by Luis Majano
Mar 21, 2007 00:00:00 UTC
I have just been delving into Transfer this past few weeks and I must say I am really impressed by its design and usage. The way the ORM is layed out is impressive and even more with its TSQL addition. So I decided to create another sample application dedicated to Transfer. It will be on the next beta or RC coming for 2.0.0, but if you do not want to wait, then get it from the Repository by Clicking here

Kudos to Mark Mandel for this amazing tool

The sample application is a very simple CRUD and Listing application and shows you how to instantiate the Transfer factory into the ColdBox cache also. I will be posting a tutorial on it pretty soon at the usual documentation depot :)

Have fun and thanks Mark for this awesome project.

MySQL default value Gotcha!! No functions allowed!!

Posted by Luis Majano
Mar 20, 2007 00:00:00 UTC
I just came upon this issue today and it was bothering the creepers out of me. I could not put a function as a default value on a column on a MySQL table, a function call like : NOW() or UUID()

Noooo!!! MySQL Do not like it one bit. So I had to revert to the docs and there it was:

The DEFAULT clause specifies a default value for a column. With one exception, the default value must be a constant; it cannot be a function or an expression. This means, for example, that you cannot set the default for a date column to be the value of a function such as NOW() or CURRENT_DATE. The exception is that you can specify CURRENT_TIMESTAMP as the default for a TIMESTAMP column.

Link: http://dev.mysql.com/doc/refman/5.0/en/create-table.html

So please take note on this issue if you just spend 20 minutes like me, trying to figure it out.

Hope this helps.

ColdBox Dashboard, Take it for a spin!

Posted by Luis Majano
Mar 19, 2007 00:00:00 UTC
I just update my dashboard subdomain so you can test out the dashboard for yourself. You head on over to http://dashboard.coldboxframework.com and log in with 'coldbox' to test drive this unique approach to framework management.

Please send me your feedback and suggestions. This is still in beta as the framework, and they should be soon released.

Thanks again for all your support.

ColdBox Dashboard 2.0.0 Beta Screenshots

Posted by Luis Majano
Mar 18, 2007 00:00:00 UTC
I have just updated the ColdBox Screenshots so you can see a first hand look at the new and improved ColdBox Dashboard. This is a great application that will surely grow and help developers create and maintain ColdBox Applications.

Please remember that it is still beta and improvements are ongoing. However, for this 2.0.0 release, they will be both be released at the same time. After that, separate timelines will be in place.

I welcome your ideas and suggestions on this great dashboard. More fun stuff coming soon. If you really find these tools to fill your needs, please Click Here to Donate or visit my Amazon Wishlist. This project only survives because of the community and I would appreciate your support.

ColdBox 2.0.0 Beta Build 524 : With Dashboard!!

Posted by Luis Majano
Mar 18, 2007 00:00:00 UTC
Well, the last beta roundup is here, and yes, it includes the new and improved ColdBox Dashboard. So please enjoy this beta as it includes the following updates and enhancements:

- ColdBox Dashboard 2.0.0

- Welcome to ColdBox IoC Object Caching:

You can now enable the IOC plugin to cache your service objects in the coldbox cache.

In order to do this, you will have to enable it in your config file via the 'IOCObjectCaching' flag. Then, you will need to get rid of your singletons in your IOC declartion files and declare your singletons via the cfcomponet tag using the 'cache=true' metadata attribute. You can also assign a timeout here.

- Caching Debugging Panel Enhanced.

- Coldspring now receives the coldbox controller reference as part of the settings structure. The gap in the model is now closed. You can now reference the active coldbox controller in your IoC configuration files by using '${Setting: coldbox_controller not found}'. You will now be able to use the framework in your model objects if needed.

- AppMapping setting in the config file is now optional. If set in the config file, then it will override the auto-detected mapping. This is a great feature if your main application root is not reachable from the url.

- The new object to use in the event handler methods and layouts/views is 'Event' to standardize with conventions.

- All documentation updated to 2.0.0

- BlueDragon fixes

- Minor fixes,updates.

- Install ANT task, so you can refactor the code if needed.

- Application Template ANT task. You can now create new applications via ANT.

- More guides coming soon.

You can find the beta in the forums as usual

Well, enjoy this latest beta as the release is coming soon.

Coldspring usage question, please help?

Posted by Luis Majano
Mar 15, 2007 00:00:00 UTC
I have a question concerning setting up a service via coldspring. Let's say I have object A already instantiated in the application scope and I want it to be injected into every service ColdSpring creates for me. However, I don't want object A to be created by ColdSpring.

I want to be able to define in my service definition that for example my UserService will receive this instantiated object as a dependency. How do I define this? Is this possible? Am I totally deranged for trying to do this? Any thoughts? Do you understand my dilema?

I know I can inject it later by hand coding it, but I don't want to do that, I want Coldspring to do this for me. Is this possible?

cfdirectory recurse emulation alternative: the Java Way (For BlueDragon, etc)

Posted by Luis Majano
Mar 14, 2007 00:00:00 UTC
As you know, ColdBox is now fully supported for BlueDragon and Railo. However, to port it was a bit tedious when it came to the auto-registration engine for handlers, since I need to traverse the handlers directory recursively and create an array of handlers. This is so easy in Adobe ColdFusion, but BlueDragon and Railo, does not support it (BD 6, railo 1). Here is the Adobe ColdFusion code:

That is awesome!! So easy!! Well, to do it the Java Way, takes some patience and well, some insight into recursion. The following example is using the CF/JAVA hybrid notation, but the end result is the same as above. And with some speed tests, the code actually compares, not that much of a slow down. So :)

Here is my call to the recursion, the entry point:

What I do is call my recurseListing method with the handlerArray I want the results in, the handlersPath into the initial directory and the working directory. Why do I send in the HandlerPath again? Well, I do it, to actually clean the path to show me the invocation paths, mumbo jumbo!! Give me the code!! Here it is:

Remember that this code is not to get the query like cfdirectory, it could, but you will have to do that, I am just showing how I solved my problem. This is a great exercise also.

//Init the oDirectory object with the initial working directory (Java File Object)

var oDirectory = CreateObject("java","java.io.File").init(arguments.Directory);

//Get an array listing of the objects in the directory

var Files = oDirectory.list();

//My Index.

var i = 1;

//My temp File Object

var tempfile = "";

//My clean handler string.

var cleanHandler = "";

//Loop Through listing if any files found.

for ( i=1; i lte arrayLen(Files); i=i+1 ){

//get first File reference as a File Object

tempFile = CreateObject("java","java.io.File").init(oDirectory,Files[i]);

//Directory Check for recursion, if directory, then recurse.

if ( tempFile.isDirectory() ){

//recurse, directory found, send in the new directory path.

arguments.fileArray = recurseListing(arguments.fileArray,tempFile.getPath(), arguments.HandlersPath);

}

else{

//File found

//Filter only cfc's, I could have used a Filter Java object, but was lazy.

if ( listlast(tempFile.getName(),".") neq "cfc" )

continue;

//Clean entry by using Handler Path (For my specific purposes)

cleanHandler = replacenocase(tempFile.getAbsolutePath(),arguments.handlersPath,"","all");

//Clean OS separators accordingly

if ( getSetting("OSFileSeparator",1) eq "/")

cleanHandler = removeChars(replacenocase(cleanHandler,"/",".","all"),1,1);

else

cleanHandler = removeChars(replacenocase(cleanHandler,"\",".","all"),1,1);

//Clean Extension right off baby

cleanHandler = getPlugin("fileUtilities").ripExtension(cleanhandler);

//Add data to array, a cleaned Handler, thank you GOD, bless you.

ArrayAppend(arguments.fileArray,cleanHandler);

}

}

//else return the empty array or filled array.

return arguments.fileArray;

There you go, you can follow the comments to tell you what I did. This is an awesome exercise and shows you how ColdFusion is really powerful by leveraging its Java backbone. When things like this just work, it just amazes me of how ColdFusion has evolved and how EASY it is to overcome problems by leveraging Java. Viva Java Mis Amigos!! Viva!! Viva!!

Hope you enjoy this little java/cf/recursion tutorial. This example shows potential of how you can build your own recursion methods.

ColdBox Interview at CFFrameworks.com!

Posted by Luis Majano
Mar 14, 2007 00:00:00 UTC
My interview on ColdBox has just been released over at CFFrameworks.com

It discussed the why's of ColdBox, who its better than anything :) and its new features for the upcoming 2.0 release.

Hope you enjoy it.

Can you Digg Cfframeworks:

http://digg.com/podcasts/cfFrameworks_Interview_Podcast

Can you Digg my Interview: http://digg.com/podcasts/cfFrameworks_Interview_Podcast/313083

You can also download the interview from iTunes here or use the download link below.

Thanks again for your support

Site Updates

Archives

Entries Search