Galleon Forums Status
So last week after I made the announcement, Luis Majano, the creator of ColdBox had replied to say that he'd like to give the ColdBox port another once-over, since he'd implemented most of that port a while ago on an older version of both ColdBox and Galleon. Though he also said he wouldn't be able to get to it until this week, which was fine by me because I had plenty to keep me busy. And I was right. I'm still working on the ports, although I'm making progress.
The onTap port was pretty quick and painless. One of the advantages there is that I didn't have to change any of the URLs, which wasn't true of any of the other frameworks. Galleon was written originally with a handful of base templates (pages) in the root directory and a separate handful in the /admin/ directory. So all the links are just relative links to different pages, much like you would see in a static HTML site (which is also how I'm writing my comparison article). And on the onTap framework this works fine, so in forums.cfm you'll find links like:
#htmleditformat(query.forumName)#
</a>
All I did was copy the original templates into the onTap directory, then copy them again to the /_components directory where I moved those around some, separated display into some includes and then edited the contents of the originals to use the framework by replacing the original code with <cfinclude template="#request.tapi.process()#">.
With the other frameworks collectively it was a bit more challenging. I had to perform a regular expression replacement of "(\w+)\.cfm to index.cfm?event=forum.$1& because all the other frameworks insist on everything being routed through index.cfm, creating the need for the event variable. But because URLs aren't always that simple, I couldn't stop there. I then had to replace instances of &? with ? and &" with " to account for the fact that not all the original URLs had query parameters. Then I had to replace all the instances of the regular expression ...rooturl#(\w+)\.cfm? with ...rooturl#index.cfm?event=forum.$1& for all the places where the URL had been embedded in an outgoing email. And there's still some question as to whether or not I've managed to get all the URLs properly rewritten.
It's one of the joys of porting to my own framework that I didn't have to mess with any of that. Although honestly I've never liked the fact that other frameworks insist on index.cfm in the first place. Call me old fashioned, I think the framework should take advantage of the fact that you can have more than one file in that directory. I suppose if I were using Fusebox I would probably rewrite the core files to use the file name as the name of the controller / circuit to use, so for example if I dropped onto index.cfm there would be a default fuseaction within the "index" circuit / event-handler and if I then went to "forums.cfm" there would be a different default fuseaction for the "forum" circuit / event-handler... but that's not the way Fusebox is written... Which I'll talk about a little more in my comparison article.
I also haven't copied the style sheets or any of the images to any of the frameworks (except the onTap framework) because none of the other frameworks make any commentary about where to place those files, so I just edited all the image sources and link tags to use the original sets. The onTap framework provides a little bit of automation for images and style sheets, so I have copied them there.
I also set up all the ports to reference the same ini file (/cfcs/settings.ini.cfm) from the original Galleon2 installation directory, so that if you decide to make any changes to the galleon settings, you'll only have to change them once. I should probably go back and delete all the other ini files that have been copied to the other ports to avoid confusion.
While not all of the frameworks have specific architectures for layouts (onTap and ColdBox both do), they all have popular techniques for creating layouts within their developer communities. So I've used those conventions for the other frameworks and have removed the custom tag Ray used originally for that purpose.
As it sits right now, I have 4 of 6 of the ports in a release-ready or nearly release-ready state and have just barely begun writing the comparison article. I've finished the initial draft of the ports for onTap, Model-Glue, Fusebox 5 (traditional) and am waiting on Luis to get back to me with his comments on the ColdBox port. I still have the Mach-II port to draft and another Fusebox 5 port to show Fusebox in non-xml mode. I will probably also do a little more work on the existing code for Model-Glue and Fusebox 5 because right now all the business objects are being referenced from within the view templates and I want to at least separate the bulk of that code away from the views into the controllers.

There are no comments for this entry.
[Add Comment]