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
Popular tags on this blogPerformance |
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.
- Planning a system to visually create responsive data-driven web page layouts & widgets in the Jetendo CMS browser interface
- Is Google Public DNS actually better then your ISP?
- Pros and Cons of CFML vs PHP and other languages
- Run Windows Guest in CentOS 6 Linux Host using Virtualbox 4 via the command line