ColdFusion Muse

Converting Fusebox 2 to FW1 - Creating Scaffolding

A quick Muse post with a bit of code. I know I know it's been a while and my coding has suffered. Still, some of you may find this useful.

I'm converting a Fusebox 2 application to FW1 and I wrote a simple script to automate some of the shell files I need. FW1 uses a URL convention that looks similar to Fuesbox. In Fusebox you have a 2 part URL param that dictates what your code is supposed to do. For example, fuseaction=reports.users would logically be a "circuit" called "reports" - think of it as collection of code or an application within a suite of applications. The second part of the fuseaction dictates which report exactly is supposed to be run.

FW1 is not dissimilar to this approach although it tends to introduce complexity for complexity sake at times (don't @ me). In FW1 an "action" parameter dictates which controller to run which in turn calls services and views as needed to set up a page or action. So FW1 may have action=reports.users - it looks quite familiar.

Since my Fusebox application is well organized I created a script that builds off the circuit and creates the necessary FW1 files. For each circuit I am going to create:

  • circuitName.cfc in the FW1 /controllers folder.
  • circuitName.cfc in the FW1 /model/services folder.
  • circuitName.cfc in the FW1 /model/DAO folder.
  • A folder named for the circuit in the FW1 /views folder with a placeholder file within (default.cfm) for my eventual content.

The script is pretty easy and it's designed to be run within the fusebox application where the FW1 application is accessable via file operations. First some setup:

<!--- MAK: location of my F1 files. --->
<cfset targetFW1 = "E:\eclipse-ws\new-fw1\trunk\">

<!--- MAK: Set up our target Dirs for FW1. --->
<cfset controllerDir = targetFW1 & "controllers\">
<cfset serviceDir = targetFW1 & "model\services\">
<cfset DAODir = targetFW1 & "model\DAO\">
<cfset viewDir = targetFW1 & "views\">

Next I created some placeholder files for controller, services and DAO. I'm going to read those files into variables.

<cffile action="read" file="#templateDir#dao.txt" variable="daoContent">
<cffile action="read" file="#templateDir#service.txt" variable="servicesContent">
<cffile action="read" file="#templateDir#controller.txt" variable="controllerContent">
Then I'm going to use my Fusebox applications structure called "Fusebox.circuits" and loop through it taking action on my plan.
<!--- MAK: loop through them and check them out. --->
<cfloop collection="#fusebox.circuits#" item="circ">
    
    <!--- MAK: Does the controller exist? --->
    <cfif NOT fileExists(controllerDir & circ & ".cfc")>
        <cffile action="write" file="#controllerDir##lcase(circ)#.cfc" output="#controllerContent#">
    </cfif>
    <!--- MAK: Does the services file exist? --->
    <cfif NOT fileExists(serviceDir & circ & ".cfc")>
        <cffile action="write" file="#serviceDir##lcase(circ)#.cfc" output="#servicesContent#">
    </cfif>
    <!--- MAK: Does the DAO file exist? --->
    <cfif NOT fileExists(DAODir & circ & ".cfc")>
        <cffile action="write" file="#DAODir##lcase(circ)#DAO.cfc" output="#daoContent#">
    </cfif>
    <!--- MAK: Creat the Directory in the view along with a default.cfm --->
    <cfif NOT directoryExists(viewDir & lcase(circ))>
        <cfdirectory action="create" directory="#viewDir##lcase(circ)#">
        <cffile action="write" file="#viewDir##lcase(circ)#\default.cfm" output="<h4>Hello World</h4>">
    </cfif>
</cfloop>

That's it. The end result is matching DAO, Controller and service files and view folders. Of course I may delete some of them or merge or whatever as my FW1 application takes shape, but having a matching convention with Fusebox let's me examine code from one into the other without a lot of fuss.

Follow Up

I created a script that handles the "second" part of fuseaction and places an CFM in the views folder as a placeholder. Basically "reports.users" should result in a /views/reports/users.cfm file containing HTML. This is where the eventual display code will be housed.

Talent Search Continues - Eclectic ColdFusion Developers Sought

CF Webtools is having a stellar first quarter. We've added 5 folks to our staff and we are hungry for more. We are actively looking to fill 3 developer positions on our ColdFusion development team. Here are some facts about working with CF Webtools.

  • Yes you work from home so laundry day is no longer a stresser.
  • Looking for folks legal to work in the US only. (sorry! We still love you world!)
  • Yes the position is W2 with benefits after a short (30 day) trial period.
  • Yes benefits include health care.
  • No our health care won't cover your life coach, Zelda, and her $200 sessions - but it's ok.
  • Yes there are other benefits - 401k, dental, PTOs, disability, life insurance, and a water cooler chat that keeps humming with each new edition.
  • Plenty of bad code, plenty of good code, and the serenity to know the difference.
  • We need advanced ColdFusion developers and yes, you will be tested. The test involves logging into a VM and coding through a few simple tasks.
If you are still interested. Here are 3 profiles for the folks we are seeking. Each position has a unique set of needs.


Profile 1 - The Team Pro

We are still looking to fill this specific position. It's an awesome team with very bright and active programmers using a cutting edge stack. You will grow here.

  • Mac User (especially for development). If you know Vagrant that's a plus.
  • REACT js library.
  • Framework experience (especially FW/1)
  • Lucee experience.
  • High DB Skills in MSSQL or MySQL including optimization, design and indexing.
  • Familiarity with SCRUM, Git, Agile and Jira as primary elements of SDLC


Profile 2 - Self Starter

This is the third on a team of 2. The team is eclectic and engaging and you will have a good experience with them, but you do need to be able to find your way through requirements and think around corners. We need someone who is good at gleaning institutional knowledge of a system and code. If you like to dig in, find things about a system and then use that knowledge to help others and make the system better, this is an ideal profile for you.

  • If you have Oracle experience (programming PL/SQL) that is a plus.
  • Familiarity with on-line testing, SCORM etc will help here.
  • The ability to flesh out requirements and make appropriate assumptions without too much hand holding will help as well (although ramp up time is to be expected of course).
  • All the usual advanced CF that apply to all of our positions.


Profile 3 - The Wizard

We are looking for someone who is a ColdFusion jack of all trades. If you like to hop from project to project, If you love problem solving, If you like engaging with multiple folks each day on different levels, then this may suit you. Some helpful skills:

  • Front end expertise – ability to take a designer's PSD files and confidently make them into a workable website. Bootstrap experience, jQuery skills etc.
  • Strong CSS skills – you are the answer to the CF expert's question "is there anyone here who can help me with my css?"
  • Confident switching environments, CF versions, platforms, and frameworks. The confidence that you can "figure it out".
  • Comfortable with complex DB queries, query optimization, performance troubleshooting etc. I know I know - UI plus database is a unicorn. :)


More about CFWT

We are not recruiters and we are not looking to "place" you. You will naturally work with and for customers but we care about developers and work culture. We intend to get to know you and what makes you tick and we hope to provide a work environment where you can grow. We want you to want to come to work every day. We are looking for developers that match our culture of Can-do, Caring, Communication and Competency. Here's some items that you need in order to fit in here.

  • You should be able to setup multiple local environments on your own with a minimum of assistance. Probably this means words like "Apache" or "IIS" shouldn't scare you too much. Yes you will be exposed to ______ (windows/mac) even if you are religiously devoted to ________ (windows/mac). We don't make the rules.
  • You should be able to work with SVN or GIT and sometimes other source control products.
  • You should Maintain positive attitude - We interact with respect and gentle humor. Snark is minimized and encouragement is the order of the day. If you are quirky and self deprecating that will be a plus and you will love it here.
  • You should Maintain and enhance your skills set - you will be given the opportunity to work on lots of code, different versions, platforms, integrations, libraries and SDLC organization and procedure. Everyone of these is a growth opportunity. If that has you licking your chops climb aboard.
  • We like Balanced Developers - Our devs have a full life. They ride horses, snowshoe, skydive, sword fight, play instruments, love dogs, golf, learn languages, rear children, go to plays, like to bake, fish, hunting, equestrian sports, skydiving, guitar playing, dog training, macramé, Golf, racquetball, Mandarin, Politics (careful!), family outings, child rearing, school plays, choirs, baking, snowshoeing, ice fishing, hunting, aquaponics, mudding, and the list goes on. We love it all! We think those things make you a better developer and it makes us want to be around you. We aren't looking for 80 hour a week developers slavishly devoted to coding. We are looking for eclectic, interesting people who enjoy coding and want to do it for a living.
Hopefully this helps explain how we operate enough to pique your interest. If you want to take a shot send your resume to jobs@cfwebtools.com or call (402) 408-3733 ext 105 and ask for the Muse. We look forward to hearing from you!

It's Up To Us To Stop Hackers

The first month of 2019 has passed and it was full of year end wrap up articles about anything and everything from 2018. Most were fluff articles on pop culture and such. What I found most interesting were the articles that quantified the past year of hacking and security breaches. According to NBC News, Hackers stole nearly half a billion personal records in 2018. There were fewer breaches, but the breaches were bigger and worse and more data than ever was stolen. Crypto-miners have improved as well and not in a good way. Previously I wrote about Cryptojacking and Hacking for Bitcoins. These are malware attacks where hackers install crypto-miners on servers they have compromised. The Crypto-miners use your CPUs to make money for themselves. Hackers have taken this malware to a new level of deviousness. The malware can now target and remove cloud security products as reported here and here.

It's been a banner year for the hackers.

[More]

ColdFusion Bug Introduced In Newest Update

UPDATE: Adobe has released updates for the last update.
  • ColdFusion 11 Update 17 was released that supersedes Update 16.
  • ColdFusion 2016 Update 9 that supersedes Update 8.
Many of us have been testing these new updates including myself and so far they look good. We have not heard any news on any additional updates for ColdFusion 2018

alert everyone that there is a critical bug that was introduced with yesterdays updates for ColdFusion 2018, ColdFusion 2016, and ColdFusion 11. Adobe is very actively working on a resolution. The bug is simply this, in cfscript queryExecute() is broken. This is the bug report.

Here is an example of what is no longer working. Example one is a cfscript based CFC file.

component output="false"
{
    public query function getRoles() {
        var userRoles ='';
        var sql = "SELECT roleId, roleName FROM userRole ORDER BY roleID";
        userRoles = queryExecute(sql);
        return userRoles;
    }
}

Example two is a cfscript block in a CFML file.

<cfscript>
userRoles = '';
sql = "SELECT roleId, roleName FROM userRole ORDER BY roleID";
userRoles = queryExecute(sql);

writeDump(userRoles);
</cfscript>

The code causes a Java error at the queryExecute() statement. Many of us are working with Adobe to provide test cases, stack traces, and testing hot fixes in order to get this resolved as fast as possible. Until there is a fix, if your application is using cfscript based queries, you will want to hold off on the update.

CF Webtools Developer Teams are ColdFusion experts and are ready to build your applications. We are also an Amazon Partner. Our Operations Group can build, manage, and maintain your AWS services including ColdFusion servers. We also handle migration of physical servers into AWS Cloud services. If you are looking for professional AWS management our operations group is standing by 24/7 - give us a call at 402-408-3733, or send a note to operations at CF Webtools .

New ColdFusion 2018 and ColdFusion 2016 Updates and Patches

Adobe just released updates for ColdFusion 2018, ColdFusion 2016, and ColdFusion 11. Please note that this is most likely the last update that ColdFusion 11 will receive due to it's core support end of life is coming up in April of 2019.

Some New Features

  • This update includes adding support for Java 11 to ColdFusion 2018 and ColdFusion 2016. ColdFusion 11 did NOT get this update most likely due to ColdFusion 11 nearing end of life.
  • ColdFusion 2018: Server Auto-lockdown includes a new installer for Mac OS.
  • ColdFusion 2018 and ColdFusion 2016: Updated the following OEMs:
    1. Jetty 9.4.12
    2. ExtJS 6.6
    3. JPedal 8.4.31
  • ColdFusion 2018 and ColdFusion 2016: You can use cfloop as script for arrays, lists, structs, or queries.
  • ColdFusion 2018: New platform support matrix for the following:

Adobe has updated more features for ColdFusion 2018 and ColdFusion 2016 including new mobile updates and Performance Monitor Updates. It's time to update your servers.

CF Webtools Developer Teams are ColdFusion experts and are ready to build your applications. We are also an Amazon Partner. Our Operations Group can build, manage, and maintain your AWS services including ColdFusion servers. We also handle migration of physical servers into AWS Cloud services. If you are looking for professional AWS management our operations group is standing by 24/7 - give us a call at 402-408-3733, or send a note to operations at CF Webtools .




Blog provided and hosted by CF Webtools. Blog Sofware by Ray Camden.