Happy new year to everyone

Thanks to all the people that follow mytweets and blog posts. 2010 hasn't been the greatest of years for me personally but here is to 2011 being a lot better! (with more posts)

Posted: 31-Dec-2010

View: 2173

Permalink: here

Framework One for when you don't need a framework pt2

This post follows on from my first part and is all about using a framework for even the most simplest sites.

So our family member, Marvin Acme, has come back with the layout for his ACME gadgets to capture and kill rodents site.
Site layout

Being a family member means we're getting paid most likely with canned beer and with that in mind they are not getting me working on stylesheets!

Posted: 07-Jun-2010

View: 2649

Permalink: here

Framework One for when you don't need a framework

I've just deleted about 2 hours worth of writes and re-writes to simplify what this blog post is all about. Originally I was going to waffle about frameworks and how they can be bad for a project and how they can get in the way but they're not all-round "bad" for every project yada yada. In reallity this blog post is about 1 thing, Framework One, and how its so flexible I'm even using it for basic brouchware sites.

Sure for your big MVC/OO apps you can use FW/1 with your dumb Controllers passing data to the Service layer to request other data from the model to pass back to the view. Which is great, but what I've also enjoyed is that on the otherside it doesn't stop you from very quickly creating a 3 page brouchware site for your family member that doesn't require more core files for features you don't need i.e. dependency injection, than there are application files. Its actually because of all the corse files that in the past I would not of advocated a framework by any means for a 3 page site and it is all down to the overhead of the required CFC's. That stance has now changed and I am going to show you why you should even use Framework One for when you don't need a framework.

Posted: 07-Jun-2010

View: 3197

Permalink: here

FW/1 and redirect in the application.cfc

Chatting with AJ Mercer this morning (his evening) on getting redirect() to work in the Application.cfc for Framework One (FW/1). The code being he was using looked perfectly fine:

view plain print about
1rc.variableToPass = "me";
2redirect(variables.framework.home, 'all', 'variableToPass');

As I said this looked fine and works in the controllers but in the Application.cfc we just saw "&fw1pk=[some number]" appended to the URL. The fix was quite simple. The variable/structure RC is set as a shortcut to the Request.Context for the controllers but in the Application.cfc you need to reference Request.Context directly. The meant the above code changed to:

view plain print about
1request.context.variableToPass = "me";
2redirect(variables.framework.home, 'all', 'variableToPass');

and all worked fine.

As a side note the fix for this came from it being such a simple framework to hack in to and see whats happening over others with multiple core files and components. Recently my work ethics has changed a lot and in its place 2 components now stand, convention over configuration and simplicity both of which FW/1 fits the bill. So if you haven't spent 30 minutes looking at it do so and also check out the Google group at http://groups.google.com/group/framework-one

Posted: 03-Mar-2010

View: 2371

Permalink: here