Download Firefox -  a safer, easier to use web browser. Return to iribbit.net - Leap into the online experience! Return to iribbit.net - Leap into the online experience! iribbit.net - Leap into the online experience!

Project News :.

The latest project to launch was the site for Gorilla Offroad Company. Aside from their main site, a social media strategy was develop to launch the company into various industry specific automobile enthusist discussion board communities as well as popular social media fronts like Facebook, Pinterest, and Twitter.


Valid XHTML 1.0 Transitional

Valid CSS!

Section 508 Compliant

powered by: Macromedia ColdFusion MX

made with: Macromedia Dreamweaver MX

What is RSS

XML - often denotes RSS Feed information.

Macromedia - ColdFusion Programming
white horizontal rule

ColdFusion News :.

To bring a little life to my site, I've pulled a couple What is RSS Feeds into this page. You can currently choose between the technology related news stories from the following news sources:



You are currently viewing and RSS Feed from coldfusionbloggers.org.



Ortus Railo CloudVPS Servers!

Over at Ortus Solutions we have been hard at work to bring about pre-configured Railo CloudVPS servers to the masses. We partnered with KickassVPS and now have our very own offering of highly tuned Railo CloudVPS servers! Check them out:https://www.ortussolutions.com/services/railo-vps


(Fri, 29 Aug 2014 14:00:15 GMT)
[view article in new window]

Example of the thoughtlessness of a generic tag to CFScript solution
G'day:
I've repeatedly said that Railo and ColdFusion's way of implementing 100% CFML functionality coverage in CFScript was lazy, leaden, and detrimental to the language. Here's an egregious example.

<cfdbinfo> works like this:

<cfdbinfo type="tables" name="info">
<cfdump var="#info#">

So it's basically a function already (in functionality, if not in syntax): it takes inputs and returns an output. But that is a reasonable implementation for a tag.

What's the CFScript handling of it? It's a function, called cfdbinfo(). But is it? It looks like a function, but if it was a function we'd expect this to work:

info = cfdbinfo(type="tables");

That would be predictable and sensible (other than the unnecessary "cf" prefix). However that just gives us:

Variable CFDBINFO is undefined.

The error occurred inC:/apps/adobe/ColdFusion/11/express/cfusion/wwwroot/scribble/shared/scratch/blogExamples/cfml/cfscript/test.cfm: line 3
1 : <cfscript>
2 : //cfdbinfo(type="tables", name="info");
3 : info = cfdbinfo(type="tables");

Huh? Well not really "huh" because I know what the story is. It's not actually a function. It's just a weirdo function-looking thing. What the syntax actually is is:

cfdbinfo(type="tables", name="info");

Seriously.

So instead of engaging their brains and realising that <cfdbinfo> was a dead sitter to be a function (as it always was: it should never have been implemented as a tag), they didn't bother doing that. No. They concocted some weirdo new syntax, adding a whole new construct to the language instead.

And I dunno if any other language has odd "looks like a function, ought to be a function, but actually isn't a function", so this is yet another way in which Adobe is killing CFML... by increasing its incoherence and quirkiness and making it even less of an appealing prospect to people who don't already use it.

Railo is no better. They have also left this to the generic syntax... but at least their generic syntax isn't so leaden or confusing, as it makes no pretence of looking like a function:

dbinfo type="tables" name="info";

How easy it would have been for both vendors to put some effort into it, and to it properly.

Sigh.

If you see this CFScript approach as a poor implementation, hurts CFML's viability as a language from the broader-industry's perspective and needs redoing... consider voting for this: "Bin the generic CFScript approach and start again". It's been closed as "never fix", but that's not to say we can't let Adobe know we think they've messed up here and need to rethink some stuff.

--
Adam
(Fri, 29 Aug 2014 08:59:28 GMT)
[view article in new window]

Simplistic vs. simplicity in product design

We've all heard of it before: "I want something simple." People get tired of products that present them with so many choices that they don't know where to go next.

When you're building a product, this sentiment can sometimes lead you down the deceptive path of simplistic.

There is an important difference between the terms though.


(Thu, 28 Aug 2014 14:00:17 GMT)
[view article in new window]

Discovering MySQL GROUP_CONCAT

A relatively quick post this week, but I discovered something new in MySQL (as in new to me). A common query one might need to run is to get a list of rows from one table and it's related rows in a connected table.  For example, given these tables:

Let's say I want to get a list of books along with their related authors.  Now, you can do a standard query, such as:

SELECT title, firstname, lastname
FROM mylibrary_books b INNER JOIN mylibrary_books_to_authors bta ON b.bookid = bta.books_bookid
INNER JOIN mylibrary_authors a ON bta.authors_authorid = a.authorid
ORDER BY title

Which gives us results like so:

But for books with multiple authors, you have repeated lines, as you can see with A Day in the Life of Japan, which has two authors.  Usually, to display this more cleanly, so we have just one line per author, we'd have to do it in an application using something like PHP or ColdFusion to loop the results.  You could either do a query of titles and title ids and then look and get authors, then loop those, or use something like ColdFusion's group functions.  But either way, the presumption was that I'd have to write up a quick script to do such a query.

Then this week, needing a similar style query that just needed to dump to an Excel sheet, I discovered a function I had not heard of in MySQL - GROUP_CONCAT, introduced in version X.  This function let's you "get the concatenated values of expression combinations" as a string. It is similar to CONCAT, except it works on grouped rows.  It makes more sense with an example though.  So let's change our query to this:

SELECT title, GROUP_CONCAT(lastname SEPARATOR ', ') AS authorName
FROM mylibrary_books b INNER JOIN mylibrary_books_to_authors bta ON b.bookid = bta.books_bookid
INNER JOIN mylibrary_authors a ON bta.authors_authorid = a.authorid
GROUP BY bookid
ORDER BY title

Now A Day in the Life of Japan only has one row, but we only have the writers' last names. For the original query I needed, this was enough since it was just a single field in the other table I needed.  But for this example, it would be nice to have the full name.  So can we do something like this...

SELECT title, GROUP_CONCAT(CONCAT(firstname, " ", lastname) SEPARATOR ', ') AS authorName
FROM mylibrary_books b INNER JOIN mylibrary_books_to_authors bta ON b.bookid = bta.books_bookid
INNER JOIN mylibrary_authors a ON bta.authors_authorid = a.authorid
GROUP BY bookid
ORDER BY title

Yes, yes we can! :-D

So there ya go...titles with a readable list of characters!  So if you, like me, didn't know about this option, now you too have another tool in your querying toolbox that can help push some work to the DB where it makes sense to do so.

There is one caveat though - by default GROUP_CONCAT's resulting string is limited to 1,024 characters in length.  And if you exceed this, it silently failed and truncates the value.   For the use case we needed it for, it's fine as we would never exceed it, but if you will, you can increase it using the group_concat_max_len settings.  However, it will still be constrained by the max_allowed_packet variable, which defaults to 1GB.


(Thu, 28 Aug 2014 14:00:10 GMT)
[view article in new window]

Flash And AIR 15 Beta Updated
Updated beta versions of Flash Player 15 and AIR 15 are now available for download on Adobe Labs. Changes include Stage3D Standard profile support for iOS and Android (this was introduced in v14 for desktop only), improved Windows 8 support, AIR Gamepad enhancements, hardware video decoding in Chrome (PPAPI) on Windows, and automatic software fall back with StageVideo. More details can be found in the release notes.
(Thu, 28 Aug 2014 14:00:05 GMT)
[view article in new window]

NCDevCon 2014 Session-Next Level Static Site Generators

Next Level Static Site Generators

The team at Republic Wireless loves static site generators, but choosing to use one for an e-commerce site had some complications... so we built our own. Come learn about the cutting edge architecture Republic Wireless is using to drive it's marketing site. You'll learn about static site generators, cloud based CMSs, even Django style views and templating. You're guaranteed to walk away inspired and excited about the possibilities Node has opened up for developers.

About Les James

Les James

With experience that ranges from garage band websites to enterprise-level front-end templating, Les knows how to craft the look of the internet. Once rooted in photography and print design, he now finds his passion in transforming visual designs into professional-grade HTML, CSS and JavaScript. For him, front-end development is the perfect balance between the art and science of web design. Away from the office his thirst for knowledge and evangelism of cutting-edge techniques have led him to speak at conferences and organize a meetup for local web professionals.

Ready to Register for NCDevCon 2014?

Eventbrite - NCDevCon 2014 - North Carolina's Premier Web Conference


(Thu, 28 Aug 2014 12:00:13 GMT)
[view article in new window]

NCDevCon 2014 Session-Distributed Development Teams: Tools of the Trade

Distributed Development Teams: Tools of the Trade

In this session we'll take a wide look at the different tools that the distributed team at DZone uses to help bring order to the chaos that can occur from having team members around the globe. We'll look at some of the usual suspects such as Google Hangouts as well as some new comers such as ScreenHero and even dive into what working on a distributed team might look like through the next 2 or three years. If you work as part of a remote team, you won't want to miss this one.

About Matthew Schmidt

Matthew Schmidt

As President and CTO, Matt leads the engineering team at DZone, a tech media website designed for technology professionals. He started at DZone in 2001 as an intern and, after graduating from NC State with a BS in Electrical Engineering and Computer Engineering in 2004, Matt became the VP of Engineering. Since then, he and Rick Ross (DZone's co-founder and CEO) have grown DZone to attract a global audience of millions of technology professionals. He is also the architect of DZone's knowledge management software, AnswerHub. Since its creation in 2011, he has grown the platform and signed on major customers.

Follow Matthew Schmidt on Twitter

Ready to Register for NCDevCon 2014?

Eventbrite - NCDevCon 2014 - North Carolina's Premier Web Conference


(Thu, 28 Aug 2014 12:00:13 GMT)
[view article in new window]

My Last Day at Adobe
After working in Macromedia/Adobe for ten years I decided to quit Adobe. Today was my last day at Adobe. The last ten years at Adobe have been professionally and personally very satisfying for me. I have worked on some of … Continue reading
(Thu, 28 Aug 2014 08:00:18 GMT)
[view article in new window]

Datalist version of Country Dropdown

Earlier this morning I saw the following tweet:

I thought it made sense and figured - why not build a version using the <datalist> tag? I began by doing a quick Google search for a select drop down of countries. I came across this one: ISO Country List - HTML select/dropdown snippet. From that I simply copied and pasted the HTML. Here it is - with a few countries cut out. Like most of the world.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Select Country</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
</head>
<body>

<form>

<!-- credit: http://www.freeformatter.com/iso-country-list-html-select.html -->
<select>
	<option value="AF">Afghanistan</option>
	<option value="AX">Åland Islands</option>
	<option value="AL">Albania</option>
	<option value="YE">Yemen</option>
	<option value="ZM">Zambia</option>
	<option value="ZW">Zimbabwe</option>
</select>

</form>

</body>
</html>

And yeah - this works - but the UX is not terribly optimal. At minimum the US should really be on top if your audience is principally American. I mean, this is cool, right?

Ok, so how to convert this to a datalist? I just need to add a text input and convert the dropdowns. The current code uses both a value and a text field, but datalists support only one value. I went into my console and wrote this code:

s = $("select");
html = "";
for(var i=0;i<s.options.length; i++) { html+= "

This gave me a copy of the rendered string in my clipboard that I just then copied to a new file:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Select Country</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
</head>
<body>

<form>

<!-- credit: http://www.freeformatter.com/iso-country-list-html-select.html -->
<input name="country" list="countries">
<datalist id="countries">
<option value="Afghanistan">
<option value="Åland Islands">
<option value="Albania">
<option value="Algeria">
<option value="Zambia">
<option value="Zimbabwe">
</datalist>

</form>

</body>
</html>

The result is a bit nicer I think.

Of course, there are a few disadvantages to this approach. First, you lose the associated country code. But you could easily do that server side. If for some reason a user enters a made up country, or simply mispels, then you would need to either just accept it or make them enter it again. The other issue is what happens if the user is on a browser that doesn't support datalist. The cool thing is that - guess what - they can still type - so nothing is really lost. You could write a few lines of code to detect support for datalist and where it doesn't exist, dynamically replace the tag (you can still get it even if the browser doesn't support it) with a select tag.

On the off chance you want to try this, here it the giant dropdown version and here is the datalist version.


(Wed, 27 Aug 2014 18:00:18 GMT)
[view article in new window]

What would you do?
G'day:
Here's a quick one.

If you had a requirement to have a function which returned two things: a result, and optionally some telemetry on the process being run; and there were two distinct bits of data, and the nature of the requirement is such that the telemetry cannot pollute the return variable. How might you do that?

Here's two options (and they're not the only two options, that's beside the point here):

public Thing function getTheThing(required string typeOfThing, string telemetryVariableName){
variables[telemetryVariableName] = {status="OK", something="else"};
return new Thing(typeOfThing);
}

thing = getTheThing("badger", "variableForTelemetry");
writeDump([thing, variableForTelemetry]);

We have an argument which provides the name of a variable to set, and the code busts out into the calling context and sets that variable. This leaves the return value to just return the thing the function actually needs to return.

Alternatively we could do this:

public Thing function getTheOtherThing(required string typeOfThing, struct telemetry){
structAppend(telemetry, {status="OK", something="else"});
return new Thing(typeOfThing);
}

telemetryVariable = {};
otherThing = getTheOtherThing("parsnip", telemetryVariable);
writeDump([otherThing,telemetryVariable]);

We actually pass-in the variable to have the telemetry data to be put into. Now because CFML is not truly pass-by-reference, we have to append the data to that, but that's OK.

There'd be other ways.

Given those two options, the first option seems very jerry-built to me. Passing in the name of a variable, instead of the actual variable? Bleah. It just seems more natural to me to do the latter.

That's where I came undone today using queryExecute(). I tried this:

result    = {};
numbers = queryExecute("
SELECT id, en, mi
FROM numbers
WHERE id BETWEEN ? AND ?
",
[1,4],
{
datasource = "scratch_mysql",
result = result
});

I just assumed the result value - this is the one that contains the columns, SQL statement, etc of the resultant recordset - would be a struct I'd give it. But no. I just get this:

Error Occurred While Processing Request
Error casting an object of type coldfusion.runtime.Struct cannot be cast to java.lang.String to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed.

coldfusion.runtime.Struct cannot be cast to java.lang.String


Huh? Then I sigh. And change the code to be this:

{
datasource="scratch_mysql",
result = "result"
}

It takes the bloody name of the variable.

That seems really leaden to me. How would you have done it?

--
Adam
(Wed, 27 Aug 2014 13:19:50 GMT)
[view article in new window]


© The connection to the COLDFUSIONBLOGGERS's RSS feed has timed out - please try again later. We are sorry for any inconvenience this may have caused.