MVC Framework now integrated with the live source code
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.
https://www.farbeyondcode.com/test/index
You can send unlimited arguments to the method with slashes:
https://www.farbeyondcode.com/test/index/id/arg2/arg3/arg4/arg5/arg6/arg7
It also supports query strings so its easier to debug for programmers with temporary variables that don't have to be in order.
https://www.farbeyondcode.com/test/index?anything=1
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:
https://www.farbeyondcode.com/test
https://www.farbeyondcode.com/test/
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">
Test
</cffunction>
</cfcomponent>
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
Previous Article
Next Article
Most Popular Articles
- Mass virtual hosting security tip when using a reverse proxy to connect to other servers
- Solution for MariaDB Field 'xxx' doesn't have a default value
- How to lock Windows immediately upon smart card removal
- Stop using sleep mode with Windows Bitlocker for better security. Learn how to use hibernate in Windows 8.
- Is Google Public DNS actually better then your ISP?
- Pros and Cons of CFML vs PHP and other languages
- Planning a system to visually create responsive data-driven web page layouts & widgets in the Jetendo CMS browser interface
- Run Windows Guest in CentOS 6 Linux Host using Virtualbox 4 via the command line