MVC Framework now integrated with the live source code

Sat, Nov 03, 2012 at 3:15PM

I finished integrating my new MVC framework with the live version of the source code and converted all of the sites from using CFML's Application.cfm to using the Application.cfc file which is a little faster and has a few extra important features such as configurable mappings. This lets me have a period in the component path without having an error.

Test is a controller and index is a method in the url below.

You can send unlimited arguments to the method with slashes:

It also supports query strings so its easier to debug for programmers with temporary variables that don't have to be in order.

The index method is force to have 1 canonical url by automatically 301 redirecting the alternative urls.  These urls below will all redirect to /test/index:

This is how simple a controller's code is:

<cfcomponent output="no" extends="zcorerootmapping.mvc.controller.base">
<cffunction name="index" access="remote" output="yes" returntype="any">

I'll be converting the apps to use the MVC structure so that the views are html files that can be edited without coldfusion code.

This work represents a bit steps towards having the skinning system done for all the sites.

The new code is also 5 milliseconds faster on every request.

Bookmark & Share