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.
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
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?
- Planning a system to visually create responsive data-driven web page layouts & widgets in the Jetendo CMS browser interface
- Pros and Cons of CFML vs PHP and other languages
- My dog survived eating a box of Oreos