Refactoring FB4 app into FW/1 app

79 views
Skip to first unread message

John Blayter

unread,
Jul 22, 2010, 10:43:18 AM7/22/10
to framework-one
I recently joined an organization that has a huge FuseBox 4
application. Now that FuseBox has a toe tag on it I've been thinking
about starting a migration to a 'convention over configuration' type
of framework. I was wondering if anyone had experience in both FuseBox
and FW/1 in the same application? I was wondering how the two
frameworks played or didn't play together? Unfortunately because of
the size of the application the two frameworks will have to play nice
until we can refactor almost everything in the application.

Thanks,

John

Sean Corfield

unread,
Jul 23, 2010, 4:53:08 PM7/23/10
to framew...@googlegroups.com

Since both Fusebox and FW/1 (and most other MVC frameworks) tend to
take over responsibility for processing the request, the simplest
solution is to start the FW/1 migration with an application in a
folder off the web root with its own Application.cfc and migrate
circuit by circuit.
--
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

James Agnostic

unread,
Jul 24, 2010, 2:56:54 AM7/24/10
to framework-one


On Jul 23, 1:53 pm, Sean Corfield <seancorfi...@gmail.com> wrote:
> On Thu, Jul 22, 2010 at 7:43 AM, John Blayter <jblay...@gmail.com> wrote:
> > I recently joined an organization that has a huge FuseBox 4
> > application. Now that FuseBox has a toe tag on it I've been thinking
> > about starting a migration to a 'convention over configuration' type
> > of framework. I was wondering if anyone had experience in both FuseBox
> > and FW/1 in the same application? I was wondering how the two
> > frameworks played or didn't play together? Unfortunately because of
> > the size of the application the two frameworks will have to play nice
> > until we can refactor almost everything in the application.
>
> Since both Fusebox and FW/1 (and most other MVC frameworks) tend to
> take over responsibility for processing the request, the simplest
> solution is to start the FW/1 migration with an application in a
> folder off the web root with its own Application.cfc and migrate
> circuit by circuit.
> --
> Sean A Corfield -- (904) 302-SEAN
> Railo Technologies, Inc. --http://getrailo.com/
> An Architect's View --http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood

I wish there was a quick how-to on porting from Fusebox to FW/1

I remember how painful it was moving from Fusebox 3 to 4

Here are some things I am currently struggling with (sorry if these
have been covered before) :

1.) In some of my circuits, I start with:

<circuit permissions="admin">
<prefuseaction callsuper="true">
<include template="fbx_settings.cfm" />
</prefuseaction>

...
</circuit>


2. My directories are filled with stuff like:

act_*.cfm // Calling the CFC and displaying messages are done here.
dsp_*.cfm // Display stuff
*.cfc // The actual action happens in the CFC. I like keeping my
CFCs silent and returning boolean for success or failure
fusebox.xml // of course

I don't use qry_ much anymore.


3. My Plugin directory has

security.cfm // reads the permissions tag of off circuit and if
fails, will throw an exception
exception.cfm // If security exception, go to login page (default
page), else show fancy error message and log error.


4. What exactly is the rc thing? Fusebox does not have it








Sean Corfield

unread,
Jul 24, 2010, 4:55:01 PM7/24/10
to framew...@googlegroups.com
On Fri, Jul 23, 2010 at 11:56 PM, James Agnostic <ja...@webworldinc.com> wrote:
> I wish there was a quick how-to on porting from Fusebox to FW/1

Unfortunately Fusebox apps vary so much in structure that it would be
almost impossible to create a *quick* how-to :)

> 1.) In some of my circuits, I start with:
>
> <circuit permissions="admin">
> <prefuseaction callsuper="true">
>  <include template="fbx_settings.cfm" />
> </prefuseaction>

That maps to the before() method in a controller. If you really have
parent circuits with non-empty pre/post fuseactions, you'll need a
base controller and extend it for each 'circuit' that has the same
parent circuit.

> 2. My directories are filled with stuff like:
>
> act_*.cfm   // Calling the CFC and displaying messages are done here.

Maps to a method on a controller.

> dsp_*.cfm   // Display stuff

Maps to a view.

> *.cfc       // The actual action happens in the CFC. I like keeping my
> CFCs silent and returning boolean for success or failure

Maps to a model CFC or a service CFC.

> 3. My Plugin directory has
>
> security.cfm     // reads the permissions tag of off circuit and if
> fails, will throw an exception

Probably maps to a controller() call in setupRequest() in your Application.cfc.

> exception.cfm    // If security exception, go to login page (default
> page), else show fancy error message and log error.

Maps to onError() in Application.cfc.

> 4. What exactly is the rc thing? Fusebox does not have it

rc = request context = equivalent to Fusebox's attributes scope.

Hope that helps?


--
Sean A Corfield -- (904) 302-SEAN

Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

Reply all
Reply to author
Forward
0 new messages