How is LightFront different than other MVC frameworks?

LightFront is similar to several of the other frameworks, in many ways. However, it does set its own path, as it does things in a few unique ways.

It's Small... Very Small

The main file, lightfront.cfc, is just under 350 lines of code (currently 328). Unlike any other ColdFusion framework, it's designed to be simple. It's a controller framework. It delivers your views, and can access your model but doesn't force you along a certain approach - that's up to you. LightFront allows so to use seven simple functions which, with some good programming practices, allows you to build whatever it is you need your controller to do.

It's so small... it's self-documenting. If you've ever looked at the bigger MVC frameworks, you'd know that there's a lot of things going on behind the scenes, and it's very difficult to understand. Those frameworks tend to be harder to follow and harder to learn. LightFront is so small and simple, you should be able to read the Application.cfc and lightfront.cfc and the samples and understand what it's trying to do. Though lightfront.cfc is under 350 lines, the code is either documented, or it's written using clear-to-understand variable names and functions so you can know what's going on.

Small Means a Small Footprint...

The lightweight nature of LightFront means it does not take a big memory footprint. This means no long start up time. You can see this in some of the big frameworks, like Mach-ii, Fusebox and Model-Glue, where the framework must be loaded into the application scope before the application can start. LightFront has a negligable effect on memory on your server.

Small Means Fast...

Because LightFront is small, it's also fast. Typically, requests are several orders of magnitude faster than the bigger frameworks. One CFC loads up a lot faster than the bigger frameworks and their multiple CFCs.

It doesn't try to do too much...

LightFront just wants to do one thing really well - be a solid, front controller. By doing that, LightFront can be lean and mean.

LightFront is a pragmatic framework... it's designed to live in the real world!

This framework was designed to provide a solid front controller, but it's pragmatic in how it does it. Most of the current CFML front-controller frameworks fail for many of us because they look at coding in an idealized world, where developers are given the chance to develop all new applications all the time, and you can use their frameworks throughout an entire application.

In the real world, this is not what most developers get to experience. Instead, most developers support and enhance existing applications. If the application was written years ago, chances are you are not going to be able to do a full rewrite and use one of the bigger frameworks.

LightFront is different. Its footprint is so small, you can easily use it in the real world. Use its functions as you need them. It doesn't have to extend an Application.cfc. You can still support those old-school applications, and gradually update them to an MVC architecture with LightFront.

LightFront is unique in that it can work with four different kinds of controllers:

  1. CFC-based controllers, with a central processing or "hub", such as routing all requests through index.cfm. You can also set up a proxy for remoting requests, so that requests do not have to go through Application.cfc.
  2. Switch-based (Fusebox 2/3 style) controllers that use a switch/case design.
  3. Standalone templates, where /view/home/welcome.cfm can be accessed directly via ?do=home.welcome if there is no corresponding controller/home.cfc or switch-based controller (in this example, controller/switch/home.cfm).
  4. No central hub (no hub or central processing page). It can also support not being used in applications where you don't use a central "hub", like an index.cfm used in virtually all of the major CFML controller frameworks. This provides much more flexibility than any framework out there.

With the current version of LightFront, support for existing applications is still in the alpha phase. Once it reaches beta (version 0.6), this will include accessing from an Application.cfm and being called from, but not extending an Application.cfc. By version 1.0, LightFront will be able to be used in virtually ANY CFML application written for CFMX 6.1 and above. Rest assured, this is envisioned as a CRITICAL feature of the framework, and one of the major reasons why LightFront was concieved of in the first place.