I have a new project that requires Blue Dragon 9.0 Alpha (.NET). I never used Blue Dragon before and it ended up taking me a few days to get up and running.

First of all there is no documentation and there is practically no discussion around it. So I’m writing this in hopes it helps someone out.

The files I’m using are located at ftp://ftp.newatlanta.com/public/bluedragon/9_0/ .

 

The first step is to install IIS and ASP.NET. You may need to have .NET Framework 3.5 turned on as well.

Windows_Features

 

The second step is to make sure you have .NET Framework v4.0 installed.

 

The third step is to make sure you have an IIS site setup and using the .NET Framework v4.0 in the Application pools.

Application_Pools

 

The fourth step is to run BlueDragon_NET_90_alpha.exe in administrator mode.

At that point in time you’ll find an error message when you run the site:

Example: “Access to the path ‘C:\inetpub\wwwroot\BD Test\App_Data\bluedragon\config’ is denied.”

You will need to create a directory structure underneath your website directory:

App_Data
-bluedragon
–config
—bluedragon.xml
–work
—cfchart
—cfcollection
—cfdocument
—cflog
—cfschedule
—temp

The bluedragon.xml file is the following:

<?xml version="1.0" encoding="UTF-8"?>
<server>
</server>

 

After you create the directories and file, you will then get the following error:

Object reference not set to an instance of an object.
ConfigurationErrorsException: Could not create NewAtlanta.BlueDragon.Diagnostics.LogTraceListener, NewAtlanta.BlueDragon, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7551335de9fc3c36.

To fix this, you will need to add the app pool's user and grant is modify or full permissions.

When you add the user, use your machine's location  (as opposed to the domain), then enter the object name "IIS AppPool\[app pool name]". For example "IIS AppPool\BD Test". Then click "Check Names". This will resolve the name to the app pool name.

App_Pool_User

 

 

This should get you up and running with BlueDragon.NET 9.0 Alpha.

There are currently two patch files in the FTP site. If you run them, you may end up with an error "Could not load type 'System.ServiceModel.Activation.HttpModule'". To correct this run this to re-register ASP.NET:

c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -iru

I Am Anxiety

Posted: May 28, 2013 in Uncategorized
Tags:

While I know a couple of people who have it way worse than I, I experience anxiety on a daily basis, all day, every day. It’s something that I’ve learned to control, yet am aware it affects me in a negative way. Sometimes it requires medication, though luckily this is fairly rare.

However I believe most people either have no idea what people with anxiety tendencies go through, or they don’t realize the symptoms of anxiety.

I ran across this video today that explains this quite well. According to this video 1 of 4 people experience anxiety in one form or another. Perhaps it’s worth a watch.

Now that I’ve got my Sublime Text 2 plugins all installed and configured to what I mostly prefer, here’s what both take up in terms of resources when first booted up:

IDE RAM Disk
CF Builder 2.0.1 185,420 K 525 MB
Sublime Text 2.0.1 47,232 K 20 MB + 67.5MB App Data

Also take into consideration that Sublime Text takes only a few seconds to start, which ColdFusion Builder takes around 1/2 minute.

Now if I could only get some better “IntelliSense” type support for CF like CFC introspection – that’d be awesome!

This is pretty cool and informative – although the data was gathered by some perhaps illegal means. Found on psfk.

“Hackers have published a research paper detailing how they built a 420,000-node botnet resulting in an impressive map of the Internet over a 24-hour period.”

I just created a JavaScript method that sorts a JavaScript object by key name case insensitive. Source at https://gist.github.com/CFJSGeek/5550678.

/**
 * Sort JavaScript Object
 * CF Webtools : Chris Tierney
 * obj = object to sort
 * order = 'asc' or 'desc'
 */
function sortObj( obj, order ) {
	"use strict";

	var key,
		tempArry = [],
		i,
		tempObj = {};

	for ( key in obj ) {
		tempArry.push(key);
	}

	tempArry.sort(
		function(a, b) {
			return a.toLowerCase().localeCompare( b.toLowerCase() );
		}
	);

	if( order === 'desc' ) {
		for ( i = tempArry.length - 1; i >= 0; i-- ) {
			tempObj[ tempArry[i] ] = obj[ tempArry[i] ];
		}
	} else {
		for ( i = 0; i < tempArry.length; i++ ) {
			tempObj[ tempArry[i] ] = obj[ tempArry[i] ];
		}
	}

	return tempObj;
}

I recently developed my first jQuery UI Custom Widget using the jQuery UI Widget Factory. I found the Widget Factory to be a nice framework for what I needed to do and took away a bit of the complexity normally needed for a UI plugin.

It did introduce a level of complexity for live event binding. For example, I want all dynamically generated anchor tags to run a method when clicked.

The Widget Factory wants us to use the “this._on” method to accomplish this. The Widget Factory is a little undocumented so it was hard to figure this one out.

At first I tried the following:

$.widget( "CFWT.myWidget", {

	_create: function() {
		this._on('.myClass', {
			click: function(event) {
				var $container = $(event.target);
				doSomething($container);
			}
		});
	}
	
	_doSomething: function(container) {
		console.log(container);
	}

});

However I quickly found out that the event was only bound with any classes created the first time. After some Q&A on Stack Overflow I finally figured out the correct way.

$.widget( "CFWT.myWidget", {

	_create: function() {
		this._on(this.element, {
			'click.myClass': function(event) {
				var $container = $(event.target);
				this._doSomething($container);
			}
		});
	}
	
	_doSomething: function($container) {
		console.log($container);
	}

});

This new code will bind any "myClass" class that is created inside the widget's container. If you want it document wide then replace "this.element" with "document" or another container.

You may also notice that I use "$(event.target)" instead of "this". That is because "this" doesn't change to the event. Instead, I believe, it remains at the widget level, which can be pretty confusing.

A working example can be found at http://jsfiddle.net/vEAhq/8/

Sublime Tern

Posted: May 8, 2013 in JavaScript, Sublime Text
Tags: ,

Thanks to Emmet for releasing the “Sublime Tern” package. It implements TernJS into Sublime Text.

“TernJS is a JavaScript type inference engine written by Marijn Haverbeke. It analyses your JS code on-the-fly and provides autocompletion, function argument hints, jump-to-definition, and various automatic refactoring operations.”

I like stuff that “just works”, but since this package is pretty new it lacks a bit of documentation and Q&A.

I did also try the newly released official “TernJS for Sublime” package but that just became complicated compared to Emmet’s version and seemed to slow the editor way the heck down. So I uninstalled that rather quickly. I’m sure it’ll become much better as time goes on.

If you take a look at the TernJS Demo, you’ll see right away that using Ctrl-Space after the characters “co” will auto-complete to “console” or “confirm”. This is something I expected to “just happen” in the Sublime Tern package. But to my horror, it appeared that it just didn’t work.

After some discussion in GitHub, I finally figured out that you have to add some libraries into the project settings, which is kind of annoying. But I did just see that they released a new update to GitHub just now that will accept defaults for library loading which will be quite nice.

But basically here’s the answer to solve what appeared to be “broken” to me. Add this config object to your sublime-project file (Project > Edit Project):

"ternjs": { "libs": ["browser"] }

But I almost always use jQuery so I also added that:

"ternjs": { "libs": ["browser", "jquery"] }

Now I see the auto-completion options I was looking for.

If you program in JavaScript I highly recommend installed one of the two TernJS packages.

The reason I looked so deeply into this was because Adobe's Brackets implemented it and it was touted as a great feature to have!