27 Mar 2011

Getting CouchDB / Couchbase Server and Flash to Play Nice Together

Flash-couchdb
I've dabble with NoSQL technology and I've found CouchDB as a very intriguing place to start. Since I mostly code in Flash I wanted to figure out a way of getting Flash to communication with CouchDB.

I was Googling and came across Todd Anderson's (blog) project on GitHub called, "as3couchdb". My only problem is that I prefer to do almost everything exclusively in Flash. I noticed Todd had an AS3 version in his example projects, but that it requires Flex because of the custom metadata at the time of compiling. So you would get an error like this,

"Error: The CouchModel instance [com.custardbelly.couchdb.example.model::ContactDatabase] must be annotated with [DocumentService] metadata tag."

I found a hack-around, so anyone else wanting to use CouchDB and within the Flash IDE can do so (assuming you have CouchDB running locally already - if not, download Couchbase Server here)...

  1. Simply create a new Flash project
  2. Download Todd's as3couchdb and getting the example BasicActionScriptExample Class under the Properties Panel -> Publish -> Class in the Flash IDE
  3. Go to your Publish Settings, and check the SWC box under Publish (make sure you do this, otherwise you will get this metadata tag error: "Error: The CouchModel instance [com.custardbelly.couchdb.example.model::ContactDatabase] must be annotated with [DocumentService] metadata tag." 
  4. The compile your project... the example should publish and work! How about that for getting started quickly?

If you have any questions feel free to leave a comment. I'm using Flash CS5 and Couchbase Server (CouchDB v 1.0.2) on a Mac.


For those interested in how I found this hack-around:


Images used above curteosy of seokchanyun & mondi

25 Oct 2010

Adobe Future of Magazine Publishing?

Adobe-future-of-digital-publishing
At Adobe MAX, the new publishing platform for digital magazine was demoed and the beta was announced. I really like the concept, interactivity, but still think the navigation is a bit clunky.

8 Oct 2010

Adobe releases AIR for Android

Aironandroidmarket
I've been a part of the Adobe AIR for Android pre-release program for a few months now. For those aren't familiar with it, it allows Flashdevelopers to build native Android apps using ActionScript 3.0. From experience, it is really ease to re-purpose your desktop AIR applications into mobile Android apps!

Check out these great resources to get started:

2 Aug 2010

Unable to build a valid certificate chain for the signer

Are you receiving this error, "Unable to build a valid certificate chain for the signer" when you try to compile your AIR either via Flash or the AIR SDK ADT?

I'm using a Mac running OS X 10.6.4 and Firefox 3.6.8. I've been having this issue for a few weeks now while I've been trying to sign my AIR app so I can publish it to the Adobe Marketplace. I've followed the documentation from from Adobe and Thawte on how to export my Code Signing Certificate (CSC), but I still get this freaking error, "Unable to build a valid certificate chain for the signer"!

The only official documentation I could find was lacking:

After a couple of suggestions from the fine support people at Thawte didn't work, reading countless FAQs, searching forums, trying every single Google Search trick I wasn't able to find a solution. Joe Ward at Adobe pointed me in the right direction! I finally figured it out and thought I would document it here, so it you have a similar issue, hopefully this is a well documented solution for you other Adobe AIR Developers out there. See below...

RESOLVE THE CSC ERROR:

  1. Download & unzip thawte-roots.zip from: https://www.thawte.com/roots/index.html
  2. Open Firefox and go to Preferences -> Advanced tab -> Encryption -> View Certificates
  3. In the View Certificates window, go to Authorities and click Import...
  4. Browse over to your unzipped Thawte Roots folder -> Thawte Code Signing -> Code Signing CA
  5. Select Thawte Code Signing CA.pem and click Open
  6. You should get an alert window that states this is either "successfully installed" OR "already installed
  7. Click the OK button
  8. Repeat these steps to import: Thawte Roots folder -> Additional Thawte Roots -> thawte Primary Root CA -> thawte_Primary_Root_CA.pem
  9. Re-export your certificate

I've found that both Adobe and Thawte didn't document this error/solution very well. If you have any questions about this, please feel free to contact me and I'll help out as much as possible.

10 Jun 2010

Quoted on Adobe.com (Adobe AIR 2 Released)

I was quoted on Adobe.com in regards to the public release of Adobe AIR 2. CHECK IT OUT: http://blogs.adobe.com/air/2010/06/introducing_air_2.html Stay tuned, I'll have an AIR 2 app releasing shortly!

BTW... this is in relation to Adobe releasing AIR 2!

10 Jun 2010

Media-Rich, Flash eLearning Course running on the Google Nexus One

This is a video demo that I created to show how easy it is to convert older Flash eLearning content so that is optimized for mobile devices. There is an actual demo towards the end that shows how smooth it runs on the Google Nexus One (running Android 2.2 FroYo and Flash Player 10.1 for Mobiles).

 

RESOURCES:

Authoring mobile Flash content for multiple screen sizes

Optimizing Performance for the Flash Platform

9 Jun 2010

A Letter to Steve Jobs

The following is a letter I've sent to Mr. Jobs concerning Flash & AIR on the iPhone & iPad:

2962058738_59803e8ce0_o
Image from: TechShowNetwork

 

 

Dear Steve,

I agree with you... apps and content need to run well on mobiles, and they need to be developed with quality and performance in mind. With that said, I think you are possibly misplacing your blame. Tools aren't the problem, developers are! I don't have a problem with Apple curating the App Store, but by forcing developers to use only one set of tools, I must respectfully disagree. This should be the developer's choice.

I think you are missing a huge opportunity here to increase your company's revenue. This little demo proves Flash content can run really well on mobiles devices that are comparable to your iPhone & iPad if done properly.

I believe the real issue that you aren't taking into consideration is that whether an app is built with Flash, Java or even Objective-C; they can still crash. I've seen it with my own eyes with apps on my iPhone and iPad. The quality of the app is up to the developers to ensure that their app is optimized and bug-free. It is not right to blame the tools when the developer built a bloated, buggy app that crashes. That blame should fall solely on that developer for not having a mastery of his tools. Plus, there are still a large number of iPhone apps built with Adobe's AIR iPhone Packager currently in the iTunes Store, of which that majority of them function just as well as Objective-C coded iPhone apps.

BTW... I still have one app, TheProducer, that has been locked eternally "In Review" since March 15, would you at least either approve or deny it. We would like to move forward building apps for the iPhone and iPad with Flash CS5, so that we can educate people of all ages, around the world on how they can create quality media with tools such as the iPhone 4.

I ask that you at least reconsider Apple's stand on this. You could increase your enterprise and gaming developer community significantly by accepting ActionScript developers.

Warmest Regards,
Lee Graham

9 Jun 2010

The Case for Adobe Buying the Smokescreen Project

 

Smokescreen - iPad demo #1 from Chris @ RevShockAds on Vimeo.

 

While there are NO facts, NOR rumors... yet... of this happening I think Adobe really should buy these guys out! Or at the very least, fund them and help them out. If you haven't heard, Smokescreen is a JavaScript render engine for Flash content. Basically, it will allow Flash content to run on Apple devices (iPhone, iPad & iPod Touch) without the 3rd party Flash Player plugin. 

While the feature set is fairly primitive for now and the performance is OK, this is the largest middle finger Adobe could flip to Apple. If Adobe was to put some resources to aid these gents with Smokescreen (like they've done with the Zend Framework), it really could go further to promoting their Open Screen Project!

Just my $0.02

4 Jun 2010

Apple's HTML5 Showcase is anything but OPEN!

Apple_html5_01

 

I noticed a link to Apple's HTML5 Showcase and I thought it would be interesting to see what they are demoing, so I took a look... Nice page and initially looks like a good variety of demos...

Apple_html5_02

 

I quick learned that I couldn't access demos within Google Chrome, Internet Explorer or even Firefox. I had to use Safari... WTF!?!?!?!?

Apple_html5_03

 

Déjà vu! For a second there I had flashbacks to a few years back, using a Firefox browser and trying to access a site that requires ActiveX and would only run in Internet Explorer. Scary! Don't get me wrong, I completely understand HTML5 is still in development and browser companies are still building HTML5 features as they are established and change, BUT ARE YOU FREAKING KIDDING ME... I have to use frickin' Safari?


Sean Michael Kerner of InternetNews.com said, "...if HTML5 is truly about creating an open web standard for all, shouldn't an HTML5 demo page highlight standard features that work across all HTML5 compliant browsers?"

 

Correct if I am wrong, but I thought HTML5 was about any content, any device, any where! 

I did try it on Safari just to see the demos. Overall, sure it was pretty cool. Overall there is still a bit of lag with the processing of the JavaScript from time to time. Everything was nice until I got to the HTML5 VR Demo. It said this demo not only requires Safari, but it also requires me to be on an Apple machine!!! Apple has clearly gone past Adobe's requirement for a 3rd party plugin, this is requiring the users to have a certain type of hardware. APPLE THIS DOESN'T BELONG IN AN "OPEN HTML5 DEMO" 

 

It's like Jason Calacanis put it when talking about Steve Jobs at Wall Street Journal's D8, "Jobs fired away at Adobe over the Flash issue. He discussed how his closed platform is actually open because they support HTML5. He discussed why Google is toast (no one searches anymore, if they want a restaurant they just open the Yelp application)."

 

Again, correct if I am wrong, but I thought HTML5 was about any content, any device, any where! 

Apple_html5_04

 

Apple's HTML5 Showcase on the Google Nexus One... I went ahead and tried it on my Nexus One, just for fun.

  • HTML5 Video Demo - Got this message, "This demo contains H.264 video. Windows users can download QuickTime to enable support fro this industry-standard format." - This is a frickin' riot here! Apple bashes Adobe for needing a proprietary plugin to view content and Apple requires the same thing here. Its a freaking double standard here!
  • HTML5 Typography Demo - This demo actually worked, BUT definitely not optimized for mobile consumption on the Nexus One. Tried it on my iPhone and it worked well.
  • HTML5 Gallery Demo - This actually worked very nice, with the exception that I was not able to select the drop down to change Gallery demo styles.
  • HTML5 Transitions Demo - Worked very nicely.
  • HTML5 Audio Demo - Worked well.
  • HTML5 360 Degree Demo - Kind of worked. Really, really choppy.
  • HTML5 VR Demo - Same response as attempting to view in Safari on my PC... I need a Mac product to view.

 

Apple's HTML5 Showcase = FAIL

 

1 Jun 2010

Flash & Flex Developer Magazine (June 2010)

Fresh off the digital press (or PDF)... download your copy of Flash & Flex Developer Magazine for FREE!!! Also, check out my Special Report section introducing Adobe's AIR for Android!

Don't forget, the AIR for Android beta is now OPEN to developers.


Download here


 

 

Download here

Lee Graham's Posterous

Hi! I'm Lee Graham. I'm a GOAT (Geek Of All Trades)! I'm also a Flash Platform Developer, eLearning Developer for BB&T University, Android fanatic,  & husband to the world's most beautiful girl!


Connect with Lee Graham


DISCLAIMER: The information contained on this site are strictly my personal views and doesn't reflect the views of my current employer.