0

CF Equivalent MD5 Hashing Functions for SQL Server 2005+ & Oracle 8+

Coldfusion, Database

Both Oracle and SQL Server have built-in hashing functions. The trick is neither returns a value that is immediately comparable to a hashed value in ColdFusion (i.e. 32 character, hex based, upper case). So some additional conversion is required.

Oracle 8+

I couldn't figure out how to make it work inline with a SELECT statement, so first create a database function MD5_HASH:

CREATE OR REPLACE FUNCTION MD5_HASH (v_input_string in varchar2) RETURN VARCHAR2 IS
    v_checksum VARCHAR2(20);
BEGIN
   v_checksum := dbms_obfuscation_toolkit.md5 (input_string => v_input_string);
   RETURN utl_raw.cast_to_raw(v_checksum);
END;

Then use this with a SELECT statement. The "dbms_obfuscation_toolkit.md5()" generates a RAW value that is then converted with "utl_raw.cast_to_raw()" to return a string than is equivalent to a CF hash() call. So an example SELECT statement:

SELECT MD5_HASH([column]) FROM [table]

SQL Server 2005+

Note there is an option for earlier versions of SQL Server that involve installing a .dll, but this example takes advantage of a function introduced in 2005 "HashBytes()".

SELECT UPPER( RIGHT( master.dbo.fn_varbintohexstr( HashBytes( 'MD5', [column] ) ), 32) )
FROM [table]

A few notes:

  1. master.dbo.fn_varbintohexstr() is an undocumented function, but it has been around for awhile, and doesn't appear to be going anywhere, and I don't know another way to do the conversion
  2. RIGHT( [value], 32) is needed because the value returned has a leading 0x to indicate the value is hexadecimal, which ColdFusion does not do.
  3. Finally UPPER() is there because the value returned is lower cased.
0

Hiring a Coldfusion Software Engineer North of Baltimore, MD

Coldfusion

I work on a Coldfusion Content Management System SiteExecutive. This is very much a product with an established client base in the dozens. We are looking to hire another programmer to work on the product to join a team of programmers including myself.

I think this is an opportunity to solve some interesting problems with datasets that number in the hundreds of thousands of records (and continually growing). It involves understanding and applying concepts and technologies particularly in the parsing and search algorithms space. Generally speaking, the focus is on doing the right thing as opposed to the expedient.

That said, rather than tell you "It's the greatest place to work in the world!" here are some specifics and I'll leave it up to you to make up your mind. Feel free to drop me a line here with questions. The link above includes information about how to apply.

Technologies

  • Languages: ColdFusion 8, Java 5
  • Web Servers: IIS, Apache
  • Databases: Oracle 10, SQL Server 2005 (looking at 2008 this year). There is an opportunity to add MySQL to this stack as well
  • OSes: Windows Server 2003 (looking at 2008 this year), Redhat & Solaris (not sure which versions)
  • Defect Tracking: Trac
  • Source Control: Subversion

Process

  • Requirements & Use Cases: from the Alistair Cockburn school of thought (i.e. not UML).
  • Coding: no finicky coding standards, emphasis is on avoiding lousy algorithms (e.g. O(n2))
  • Testing & Support: developers are not the front line for either

 

0

CF Development on Linux: Looking for Suggestions

Coldfusion

Looking for comments from people who are doing Coldfusion develoment on Linux about their experiences. Note, moving to Macs is not one of the options on the table. See below:

Email from my boss:

What are your thought of a development team using Linux OS instead of Windows? Is there sufficient development tools at work well on Linux?

My response:

Doable.

Problems to Solve

  1. Laptops: loading *nix thereon is more painful than a desktop install. VM is not a solution because disk I/O too slow.
  2. Microsoft:
    1. .NET / Coldfusion integration only runs on Windows.
    2. SQL Server don’t run on no *nix I’m aware of.
    3. Exchange Email Client. I know there are *nix options, but never seen them
  3. Coldfusion *Nix Support only on commercial *nix OSes, such as Redhat. The open source versions are not, such as Fedora, but still work (at least with some fiddling). So could be a pain point.

Think there are probably sufficient development tools.

Development Tools

  1. IDE: Eclipse, Netbeans, Emacs
  2. Database: Oracle SQL Developer
  3. Productivity: Open Office

Course we could all move to Macs as well.

0

Coldfusion UI Tags Suggestion

Coldfusion, Suggestion

A Rob Brooks-Bilson post touched a nerve of mine regarding Coldfusion's UI tags, like cfform and cfwindow. As well as its integration with third party libraries, such as Verity. In short, they're great if you can live within their limits. But, if you need to go beyond it's a big can't-get-there-from-here.

Take cfform for instance, great idea, but what happens when you start to need things like related select boxes? Little challenging. Or in the more recent case, the issue is the libraries continue to advance, such as Ext and FCKEdit, but the Coldfusion tags lag behind.

My suggestions:

  1. divorce the release cycles between UI/third-party integration tags and Coldfusion
  2. open source the UI tags with a license that requires changes be made freely available

 

0

Baltimore Adobe User's Group

Coldfusion

So AboutWeb, which has expanded beyond it's I270 / DC / NoVa territory in Baltimore, is hosting an inagural Baltimore Adobe User Group. In my opinion this is a Good ThingTM Several years ago, Fig Leaf ran a Baltimore Coldfusion User Group, but it died most likely due to lack of interest. Finally, there is also the TeraTech Maryland Coldfusion Users's Group. But this is a misleading name, as someone with a familiarity with MD geography can tell you, and really should be named something like the Montgomery County / Washington, DC Coldfusion Users's Group. But I suppose that doesn't quite have the same ring.

Anyway, glad to see it happening. And am looking forward to being there. If you are in the Baltimore metro area hope you show up.

P.S. You can also check out Nic Tunney's blog for a little more information as well.

0

Coldfusion, Open Source & C Syntax for cfscript

Coldfusion, Suggestion

I wrote this post over a month ago calling for the addition of a full fledged C syntax for ColdFusion.And, I still want that to happen. But at the time felt it was not worth publishing. Also, I admit upfront I am absolutely guilty of previously calling for cfscript's demise. But now with New Atlanta's annoucement they will Open Source Blug Dragon and a recent Dan Vega post about how to change cfscript I decided to revisit and post.

Has Been

I've worked with ColdFusion since 1999 and in that time ColdFusion:

Each aquisition produced hand wringing. I am certainly guilty of doubting its survival. Even its own evangalist has noted ownership disregard as a red-headed step child. Yet it continues to chug along.

What has surprised me then is that the evolution includes players (Blue Dragon, Railo, Smith) other than ColdFusion's "owner". Of course that Adobe has posited Coldfusion is NOT a language, but rather a platform. This argument of platform vs. language stikes me as semantic. After all what's a language without its libraries?

I think this is a lesson Java has learned very well. Putting aside the idea of a polyglot VM for a moment, Java has incorporated ideas from a number of projects that began outside of Sun, including Spring, Hibernate and StAX XML processing to name a few. As well as language concepts such as generics (badly perhaps), enumerated types and possibly closures in the future. All of which Sun, to its credit, has fostered via the Java Community Process.

Err Is?

This is not to say Coldfusion has not evolved as well; rather its survival oft times appears to be in spite of its master. I have always found it frustrating that each new Macromedia, now Adobe, initiative targets another language/platform. Want Live Cycle? Or, a back end for Flex? Take a look at Java. And, developers matter.

Lots have weighed in on how to find these elusive good programmers such as Spolsky, Yegge and Braithwaite. In other words, it's always hard to find good help. And at least once a month I heard how much easier it is to find .NET, Java or something else programmers. So, what happens then if the people who could help you don't want to?

Could Be

Make Coldfusion a language programmers want to work with. Do this by giving them the C-like syntactical goodness that has ruled the day in the software engineering world for the past 20+ years. Make cfscript ECMAScript compliant. Flex is there. Some people believe the Next Big Language will be such. So take the red-headed stepchild's runt of the litter and make it a worthwhile feature.

Make cfscript a full fledged language. Make it ActionScript. Make it Groovy. Do something. Create a Coldfusion paradigm that encourages the separation of presentation (i.e. CFML) and logic (cfscript) in a way that's approachable to the rest of the programming world.

In short, Coldfusion is approachable for greenhorns, and easy to dismiss for veterans. Making Coldfusion something that experienced programmers want to use is the right next step. The stories of people switching to Coldfusion from something else are few and far in between. And, that is the tide to change.

Could Could Be

So the Blue Dragon is out the bag. As New Atlant CEO Vince Bonifanti posted, I think the most important aspect of this decision is that the "free" rather than open. While some have pointed out that the real push for Blue Dragon is .NET that the J2EE version will be available for free opens up possibilities. Such as C-like syntax for cfscript.

 

Search