I have an application running CF8. One of the CFCs is very large and breaks when trying to upgrade to a newer version of CF.
I use the functions in the CFC to build html docs that can be displayed or emailed. How should I go about refactoring this cfc to make it work?
Format is currently like this:
function - get order
function - get order details
function - display order
several hundred lines of html that get pulled back to the web page or emailed
I would split the CFC methods that make up your "model" (business logic) from those that provide content to views (display logic), especially if they might have access="remote".
Before going down that path, though, can you clarify what you mean by "breaks"? Specific errors would be helpful.
Branch target offset too large for short
Googling that error message and "ColdFusion" together got me these possible solutions (actually these are only the first 5 or so results):
Seems the most likely culprits are:
It's hard to say which one applies to you, because you haven't provided a stack trace. Read over the links (or Google the error message and read all of the results) and compare them to the first few lines of the error stack trace.
Thank you for the time.
I know that the problem I have is too many cffunctions with lots of lines of html formatting.
What I am trying to figure out is do I pull all the html and conditional formatting out of the cfcs and leave that in regular cfm files and just use the cfc to do the queries?