Looking to migrate a Fusebox and Mach II CF applic...
# lucee
m
Looking to migrate a Fusebox and Mach II CF applications to Lucee - are there any compatibility issues that we need to be aware of ?
d
I would recommend firing up a commandbox instance with Lucee and run your app to see what happens! Fusebox will most likely be fine depending on what version it is. Mach II is a more complicated beast and may have the odd issue.
m
thanks @davla Can this also be done using a standard Lucee installation. Its a prod server
d
I was suggesting using commandbox on your local dev machine. I run my dev environment via commandbox but still deploy standard Lucee/Apache install in production. Commandbox allows you to try multiple versions of cfml engines very easily.
๐Ÿ™ 1
I still have some old ColdSpring and reactor projects and managed to get them up and running on Lucee - ColdSpring had a minor issue which I was able to fix - canโ€™t remember off the top of my head what it was now.
๐Ÿ‘ 1
m
I have tried commandbox once before but it gets a little sticky with redirects I found
and a little complictated
d
Do you mean redirects (301, cflocation etc) or rewrites?
m
It rewrites it is
d
Rewrites can be a bit fiddly - I just use the Tuckey based URLRewrite xml file to add any rules. Just enough to get the main part of the application running - which should be enough to discover any Mach II/Fusebox issues.
m
super i can give that a try I guess. Many thanks @davla
๐Ÿ‘ 1
b
I have tried commandbox once before but it gets a little sticky with redirects I found
@Mauro caresimo To be clear, CommandBox has no redirect behaviors at all. If you had issues with something redirecting, it would have been your own application code.
As far as rewrites, the only rewrites CommandBox packages are the basic framework rewrites for apps like ColdBox or FW/1, which I've never heard of anyone having issues with. If you created custom rewrite rules and they didn't work, I would suspect the issue was in your rewrite rules you created ๐Ÿ™‚
d
Iโ€™ve had no real problems using rewrites in CommandBox, except when I add the rules in the wrong order or mess up the xml! But always down to user error and easily resolved. I use apache and htaccess in production and I know that using htaccess is possible in CommandBox but never managed to get that working. Is there a blog post/guide somewhere?
m
@bdw429s They were created before my time ๐Ÿ™‚
b
Sure, but it seemed you were blaming CommandBox for your issues ๐Ÿ™‚
๐Ÿ˜ณ 1
m
Obviously we did encounters errors and we did follow the guides but to no avail, It certainly isn't that intuitive to port over existing legacy code from CF to Lucee as many other errors were encountered in our experience so we had to roll back.
Each version of Lucee we tried presented new / different errors
I can revist but at the time we did it we were gettinga myrid of issues with both
I am just talking of our experience and perhaps with the codebase we inherited
d
You canโ€™t beat inherited codebases - IIRC Mach II wasnโ€™t the most straightforward framework.
๐Ÿ˜‚ 1
m
I think we were tring to migrate too mcuh at once. We had the issues with an old CFwheels application, trying to move over to a linux box and go from CF to Lucee
Perhaps we need to break it down ๐Ÿ™‚
b
@davla There is not really a guide for using
.htaccess
with CommandBox. That is a feature of the Tuckey Rewrites which works so-so and isn't documented much (Outside, of just saying "everything should work" ๐Ÿ˜†). Sadly, the Tuckey library has dried up as a Java open source project. The maintainer hasn't released a version in years and has stopped working on it. As such, I've been recommending people use Server Rules, which is powered by JBoss Undertow's Predicate Language and extremely extensible. Now is a great time to start looking at server rules-- the next version of CommandBox which will have Multi-Site built in (a full-fledged web server allowing for all
web
settings in the
server.json
to be configured individually for each site, unlimited HTTP/SSL/AJP listeners, unlimited hostname bindings, unlimited SSL certs via SNI, etc. As part of this, the Tuckey rewrites, which are inextricable from the servlet and therefore limited, are going to be deprecated (and disabled by default). I've already been enhancing the server rules, adding proper
is-file
and
is-directory
checks and I just added a rewrite map feature like what Apache has. It would be an interesting project to add a translation layer to read a htaccess file and create the corresponding server rules for it, but it would likely have the same little issues that the Tuckey one has unless somone was willing to work enough to get everything working correctly.
m
Thanks @bdw429s
b
@Mauro caresimo If you have issues with CommandBox again, please ask over in #box-products and we'll help you. I defo recommend doing one thing at a time to help isolate issues. CommandBox even has some nice features like forcing web server case sensitivity on Windows or forcing case insensitivity on Linux to help with transitions like this.
m
@bdw429s Roger that! ๐Ÿ™
d
@bdw429s That sounds like an excellent update. I am not wed to Tuckey rewrites and only use the minimum required to get my applications working locally. Being able to manage it all in server.json would be much simpler.