I’m John C Bland II

Husband, Father, Tech Author, Deacon.
Founder ofย Katapult Media, and full-stack polyglot developer.
Political Free Agents Podcast Host.

I create. I launch.

YouTube Channel

I post regular fun on YouTube like me playing the bass and anything else I find fun.ย 

Get Something Built

All project work goes through Katapult Media. Business is open. Let’s chat.

Spring’ing my Flex via BlazeDS

Spring+Flex+BlazeDS = NICCCCCCCCCE, seriously. First, “Spring”:https://www.springframework.org is a pretty nice approach to Java development. Couple Spring with “Velocity”:https://velocity.apache.org/ and you can do some pretty quick web work. Anyways…I’m talking Flex here…not Velocity. ๐Ÿ™‚

So, I struggled BIG TIME getting this thing to work. Java has this insane idea that you need to configure everything (hehe)! Configuring Java/Spring/BlazeDS whooped my tail today. I finally got it and it seemed most of my problems were due to me missing a few jar’s in my /WEB-INF/lib folder.

Anyways…I got it working and I am officially Springing my Flex. ๐Ÿ˜‰

Here are a few code snippets of why this is a nice approach.

In my DAO I have a method (let’s call it foo) that returns a List. To query the database I setup in my applicationContext.xml and return the List, I simple do the following:

bq. return getJdbcTemplate().queryForList(“select * from mytable”);

My DAO is extending JdbcDaoSupport so it takes care of a few things for me. That’s pretty easy huh? That is almost as easy as ColdFusion queries. It gets a bit more hairy when you have to build a query string but that is expected.

You will DEFINITELY hear more from me about Flex+Spring via BlazeDS. My next task (after finishing this app) is to build a messaging app to showcase how sweet it is to push content to my Flex app vs my Flex app asking for content.

Stay tuned…

FMS: A Quick Fix for missing onBWDone, onFCSubscribe, etc.

Ok…this one made me work a bit. A customer was having a problem using Flex to build a simple video player. The player I built, at work, is FP9 but AS2 (medium-long story) so I hadn’t come across their specific problem.

The Problem
ReferenceError: Error #1069: Property onBWDone not found on flash.net.NetConnection and there is no default value.

The Problem #2
ReferenceError: Error #1069: Property onFCSubscribe not found on com.llnw.controls.MediaPlayer and there is no default value.

Quick Discussion
Both problems are the same issue. When you call Flash Media Server and attempt to connect there is server-side Actionscript that gets executed. For certain calls there is a return call. For example:

_netConnection.call(“FCSubscribe”, null, “mystreamname”);

With that type of call you will get a return call to onFCSubscribe.

The AS2 Solution
In AS2 it is easy because of how loose classes are. You can easily use:

_netConnection.onFCSubscribe = Delegate.create(this, handleFCSubscribe);

This is exactly what I do and it works but AS2 isn’t the problem here…AS3 is the culprit.

The AS 3 Solution
My first shot at it was an old AS2 “hack”:

NetConnection.prototype.onFCSubscribe = handleFCSubscribe;

That worked just fine but it kind of bugged me. I just felt a little dirty hitting the “.prototype” keystrokes. So, I kept looking.

{insert blaring horns of victory; or Fanfare…whatever your song preference}

public function onFCSubscribe(info:Object):void{
trace(“worked”);
}

public function play(connectionurl:String):void{
_netConnection = new NetConnection();
_netConnection.client = this;
_netConnection.connect(connectionurl);
}

That’s it right there. _netConnection.client = this; is the fix. What it tells the server-side actionscript is “when you want to return calls, return them on my client property.” So, since “client = this” all of the calls from FMS back to my client will run inside of “this”.

{long sigh}

Man…I feel a little cleaner now. ๐Ÿ™‚ Well, that fiasco is over so I need to head to the house. Ping me if you have any other questions here.

Java: HelloWorld++

That’s right…I wrote a Java app and extended HelloWorld with HelloWorld++. I introduce you to…the newest version of HelloWorld…in Java. {insert dramatic music}

bq. package com.llnw.training;
/**
*
* @author johnb
* @version 1.1
*/
public class Main {
public static void main(String[] args){
System.out.print(“Hello World”);
if(args.length > 0){
System.out.print(“\nand hi ” + args[0]);
}
}
}

Hooah! ๐Ÿ™‚ Ok…this isn’t my first, per se. I built HelloWorld first then HelloWorld++ was the v1.1. hehe.

Some serious/full posts will come soon (post-training).

Flex 3 and AIR – Beta 3 on Labs

That’s right, check it out and get your Flex on while you grab some AIR! Ok…cliche…I know, or is it? ๐Ÿ™‚

Anyways…”grab the beta versions on Adobe Labs”:https://labs.adobe.com/.

I can tell you…this is very important release. Check the release notes to see all of the new stuff.

AS2 Events & Constants Work-around

Going from AS3 (Actionscript 3) to AS2 is a bit of a struggle at times and at “work”:https://www.llnw.com I’m mainly in AS2 for a few projects I’m working on. So, one of the things I’ve been doing is creating every app using events so I have a base EventDispatcherBase class that mimics the AS3 EventDispatcher. All classes, that need to, extend EventDispatchBase and, to follow how things go with AS3, your event names are constants of either the event or your class/mxml file.

For example, you would dispatch an event like this in AS3:

bq. dispatchEvent(new Event(Event.COMPLETE));

In AS2, you dispatch like this:

bq. dispatch({type: “MyType”, target: this});

So, my EventDispatchBase has a dispatchEvent function which does the above by takes an IEvent (interface) as an argument. My event dispatching in AS2 looks like this:

bq. dispatchEvent(new Event(Event.COMPLETE, this)); //where “this” is the target in most cases

I added the “this” argument for specific cases where I wanted to specify a child of my present class as the target.

Now…how do I keep all of my event names in check AND insure new developers working with the code do not jack up my event calls? Constants. Well…wait…AS2 doesn’t have constants so how do I use them? I’m glad you asked.

bq. public static function get PLAY_VIDEO():String{ return “PLAY_VIDEO”; }

A getter function is nothing more than a read-only property. Using a getter with no setter ensures your event name cannot be changed. One thing to not is I’m returning the string direct vs storing it in a variable.

bq. private var _playVideoEvent:String = “PLAY_VIDEO”;
public static function get PLAY_VIDEO():String{ return _playVideoEvent; }

The reason is due to AS2’s loose nature of allowing you to access private vars in a class by using code like this:

bq. trace(myclass[“privatevarname”]);

Anyways…this is my little rant for the day. I have all sorts of lil’ random information I want to blog about daily but I never take the time to do it. I’ll try to do it more often though.

CoCoMo Beta & FMS 3 Announcement

I woke up not feeling too great today so I sat down for a few, popped open the laptop, and saw an email about the new FMS 3 Product Line (line??? huh?) and “Ryan Stewart”:https://www.digitalbackcountry.com blogged about a CoCoMo app in the wild.

So, FMS has changed pricing and separated FMS into multiple products. You can “read more on the press release”:https://www.adobe.com/aboutadobe/pressroom/pressreleases/200712/120407adobefms3.html.

You can play with the “CoCoMo app here”:https://blogs.adobe.com/collabmethods/2007/11/testing_the_first_public_cocom.html. For those not following, CoCoMo is, in my words, Adobe Connect separated into reusable components and available for integration into your own app. This is a GREAT move by Adobe. Now I can build a whiteboard with 1 or 2 tags in my Flex app. Very nice!

Check them out. Also, you can apply for the “CoCoMo Private Beta here”:https://blogs.adobe.com/collabmethods/2007/12/cocomo_private_beta.html.

CFWACK 8 Volume 2 is here!

I finally got my Volume 2 book today and it is amazing to see my name on a book. I knew it would be on there…I had my moment with Amazon.com having my name listed as well as an author profile…and Peachpit.com has my name as well. Those were cool but seeing it on the actual CFWACK is pretty sweet. ๐Ÿ™‚

Now I just have to decide if I want to crack the plastic wrapping on it and actually thumb through it. ๐Ÿ˜€

Get your copy “on Amazon”:https://www.amazon.com/dp/0321515463?tag=geelif-20&camp=14573&creative=327641&linkCode=as1&creativeASIN=0321515463&adid=0GXX4ZYVCTJ2XK1B80DQ&.

Volume 3 coming soon.

Bye Bye Rhapsody

I’m not going to rant for too long but I have to say my peace.

Urge made a HUGE mistake moving to Rhapsody. All of “my initial thoughts”:https://www.johncblandii.com/2007/10/rhapsodyagain-nooooooooo.html stand and were confirmed after using Rhapsody for a little over a week.

The first couple days I thought it had changed. The player was the same sucky player but I was able to live with that for a bit. Next I waited to see if the playback experience had improved and for a couple days I thought it had. Well, 1.5 days. I listened for any hiccups in the playback and things were moderately ok. BUT…at 1.6 days (an hour later; lol) I started getting a ton of hiccups in the playback. It got to the point where I turned off the player because every 3 to 5 seconds (literally…no exageration) it skipped. UGH!

Anyways…I just called and told’em to delete me (not just cancel…get rid of my info; lol). I doubt they actually delete me but hopefully it is canceled and this itme they don’t keep emailing me. The guy said my account was free but that didn’t even tempt me. I told’em I won’t use it…get rid of it.

So…bye!

Urge…I miss you. ๐Ÿ™ lol

Flash CS3 AS3 RPC

My recent “RIAForge”:https://www.riaforge.com email showed a new project added called: “Flash CS3 AS3 rpc (WebServices, Remoting)”:https://cs3as3rpc.riaforge.org/.

Now, I haven’t tested this or anything so don’t hold me to it. ๐Ÿ™‚ Let me know how well it works if you test it.

Thanks Johan!

Click to Activate…GONE!

Woo hooo! ๐Ÿ™‚

“Back in April 2006, we made a change to how Internet Explorer handled embedded controls used on some webpages. Some sites required users to โ€œclick to activateโ€ before they could interact with the control. Microsoft has now licensed the technologies from Eolas, removing the โ€œclick to activateโ€ requirement in Internet Explorer. Because of this, we’re removing the โ€œclick to activateโ€ behavior from Internet Explorer! ”
– Source: “https://blogs.msdn.com/ie/archive/2007/11/08/ie-automatic-component-activation-changes-to-ie-activex-update.aspx”:https://blogs.msdn.com/ie/archive/2007/11/08/ie-automatic-component-activation-changes-to-ie-activex-update.aspx

Great news! I was hoping everyone would have used a JS library to bypass the issue but there are a ton of people still using Object/Embed. Either way…it doesn’t matter anymore! ๐Ÿ˜‰

CF AIR Compiler

Terrence Ryan has a proof of concept app (“CF AIR Compiler”:https://www.numtopia.com/terry/blog/archives/2007/11/cf_air_compiler.cfm) which takes CF sites and compiles them into AIR apps. His approach simply makes since and CF is probably the easiest language to accomplish this since CFHTTP and CFFILE are so freaking simple to use.

Although this is done with CF, for CF, and by CF (I only…with and by are the same thing but i had to complete the phrase; hehe) you could essentially point this to almost any site and pull the files (html content, js, and css) but it is cool to see this proof of concept in the wild.

The Importance of a Common Code Library

This is a “what do you think” post. I have my thoughts, will cover it briefly in a sec, but I want to know what others think about this topic.

First, a common code library is merely a way of saying the company or group you work for has a common code library which all files are based on/reference. So, you have a common DisplayObject class which extends EventDispatcher. That’s a reference to a lot of things you see in AS2 since a common event dispatcher wasn’t available, etc but I’m not restricting this to AS2.

So, what does your team do for a common library? Source control? Networked location? Do you even use one or does everyone go Commando on it?

Where does this come from? Well, I’ve been at LLNW for a few weeks now and the first thing I noticed was the lack of a common library. Without giving away too many details there are 3 different FLAs which do the EXACT same thing and all 3 had the same code duplicated in multiple files. So, the developer in me was pretty irritated having to make quick updates to fix bugs to numerous files.

Since then I have rewritten a few apps there and the main thing I did was create a common library, hosted in the UI teams Subversion repo. This has opened up the ability to share code across applications. All of this is AS2 code right now but I have started an AS3 library as well.

Over my years of contracting I only met 1 company where I didn’t have to write every line from scratch and that was “Terralever”:https://www.terralever.com. They really have their stuff together and their library is massive, including a lot of their own code and code from the community. This is what I’m attempting to achieve at LLNW so when/if we hire more Flash developers they can hit the ground running by viewing the asdoc generated docs and looking through the library.

Back to you, the reader(s). I’m more-so interested in seeing what other people do and what is approach is taken for file access.

Adobe AIR + Intel = Mobile YUMMY!

Yep…that’s right. “Intel is helping bring Adobe AIR to the mobile phone.”:https://softwareblogs.intel.com/2007/09/19/adobe-integrated-runtime-on-mobile-internet-device/

While in a meeting (at work with Adobe FMS guys there) I read an email from Intel. I was blown away at Intel sending the email and not Adobe…that’s HUGE, IMO. Intel is “backing” the AIR “movement” and in a big way. I love it!

So, what can you do with AIR and mobile? Well, nothing now. Intel has a lot of information on “Mobile Internet Devices (MIDs)”:https://www.intel.com/products/mid/ and, from what I can tell, they have fully embraced and are even pushing Adobe AIR.

I tried to find an online link but I couldn’t so I took the email from Intel and put it online. I DID NOT CHANGE ANY TEXT OR INFO (other than deleting my unsubscribe link).

intelMIDs.html

Rhapsody…again? NOOOOOOOOO!

Ok, I used to use Rhapsody and loved it for a while but their player software was TERRIBLE!!!! That thing provided an absolutely bad listening experience. I couldn’t listen to any song without the player “buffering” then starting again. This would happen at least 3 or 4 times per song….UGH. I left them about 2 years ago. Ever since I left I can’t stop them from emailing me. Why? Because you have to login to change your notification settings. Cool…no prob, right? Nope…big prob since I no longer have an account with them! UGH!

So, why the rant? “See for yourself”:https://www.urge.com/index.jhtml. ๐Ÿ™ {insert really hard sobbing crying here}

At first, I was fine with the “Urge meet Rhapsody” deal because they played it off as “Urge is joining Rhapsody” BUT IT ISN’T TRUE. Rhapsody is taking over Urge COMPLETELY. I figured the available songs/artists would increase since the two services were joining but Urge is coimpletely gone now.

As of 10/25 you can no longer access Urge in Windows Media Player. I thought my work laptop was just tripped out when I couldn’t reach Urge but I checked my email (just now) and Urge emailed me with the following: “Beginning on Friday, October 26th, you will no longer be able to access URGE.”

I went to the “FAQ”:https://www.urge.com/answers/index.jhtml and it says you have to download the Rhapsody software….{insert really hard sobbing crying here}.

Well…I guess I’ll start looking for new services. Any suggestions? I may try the Rhapsody software again. It could have improved but I doubt it. ๐Ÿ™