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

7 Feb 2011

mLearning is Coming!

(download)

With the evolution of mobile technology, the next step of education is naturally bringing eLearning to mobiles. The main four mobile operating systems are: iOS, Android, RIM & Symbian. As we know, the final product of the majority of eLearning projects is Flash. As of today, Symbian supports Flash Lite, and  Google (with Adobe's help) has done a wonderful job of making a full version of Flash work on Android devices. That leaves Apple's iOS and BlackBerry's RIM as the only platform not to support Flash, with the exception of BlackBerry's tablet, called the PlayBook. You can take the time to write custom apps work like your eLearning, but that costs too much in both time and money.

So what other solutions does that leave us with. As many know, I've been very skeptical of HTML5 technology, mainly because so many are saying its the silver bullet solution to compatibility issues. Well, I'm still not sold on that, but I do think it is a great tool to have at your disposal, especially in the eLearning world.

Last week I was given a demo of a new eLearning tool, Rapid Intake's mLearning Studio, that produces both a Flash based course for desktop and laptop computers, as well as an HTML5 version that works on iOS, Android and soon RIM. The beauty is that you don't have to write two versions of the same course.

Here is a live link (http://rapidintake.com/mobilebeta/sample_beta1/player.html) to a course they produced. Go ahead, take a look at the Flash version on your computer, then pull out your iPhone, iPad or Android (2.2+) device and take a gander at the HTML5 version. The technology is still in the development stages, so if you have any trouble accessing it from your Android, try this link (http://rapidintake.com/mobilebeta/sample_beta1/indexMobile.html) instead.

Here is a link (http://www.rapidintake.com/products/mobile/mobile-learning-studio/) to their product page. Take a look, and feel free to contact them with your questions!

 

6 Oct 2010

Flash & Flex Developer Magazine: Visualizing Your Data with BIRT & Flash

Get the most recent edition of Flash & Flex Developer Magazine HERE!

 

 

A Look Inside...

  • s Apple Getting The Big Picture?

    As Adobe developers we may not like Steve Jobs but we should respect him. Seeing the turnaround of Apple Computer upon his return and the stellar growth of companies such as Pixar Animation Studios should lead any of us to deduce he is a man with a plan. Just a few short years ago we had never heard of i-devices and now none of us can sit and enjoy our latte without seeing at least one.


  • Sothink SWF Decompiler An all-in-one Magical Flash Utility

    Suppose you watched a video presentation online and want to save it on your system to enjoy it later offline. Maybe you are thrilled with a cartoon animation and you want to create a wallpaper out of it using few assets from the movie. Or you could be a student with a curious mind who wants to learn the ‘behind the scene’ stuff.


  • Visualizing your Data with BIRT and Flash

    Understanding how Actuate is using data driven BIRT reporting in combination with Flash presentations to create highly interactive business applications.


  • Monetizing Your Web Game part 3

    Currently there are many choices when it comes to monetizing a web game. It can be daunting to decide which model is best for a developer. On top of this, there are conflicting reports as to which ones are truly lucrative.


  • Objects and Associative Arrays Why an ActionScript Object is Like a Dictionary

    There is more to the ActionScript Object class than meets the eye. In the first of a new series, Huw Collingbourne looks at associative arrays


  • Loading External Assets Using the open-source BulkLoader Class

    Flash offers great built-in solutions for loading several types of external content into SWF applications. However, that doesn’t help you much when it comes to loading numerous units of different kind of data at the same time. Thankfully, there are some third-party utilities that can take care of the job. In this article you will see how to make use of the open-source BulkLoader class.


  • Adobe Alchemy a Comparative Example

    Adobe Alchemy is an Adobe project that allows users to compile C and C++ code to be run on the Actionscript Virtual Machine (AVM2). With this possibility developers can take advantages of hundreds of powerful C and C++ libraries on the Flash Platform. These libraries will be compiled as a SWFor SWC files that run on Adobe Flash Player 10 (as well as Adobe AIR 1.5).


  • How to Test Upload Bandwidth to a FMS

    Flash Media Server is able to detect the client connection speed and serve up video at the appropriate bitrate. It allows your application to avoid the annoying „Choose the size of video” message and let the FMS do it for you. In this article you’ll learn how to do that.


  • Flash GAMM!

    A story of enthusiasm and love to Flash-platform which turned a small meeting into one of the brightest events in flash-industry.


  • Interview with Sean Carey

    Sean Carey President of HD Interactive, a premium provider of branded games, rich internet applications, social media & memorable online experiences.


  • Book review: Flex 4 In Action
     
  •  

    31 Aug 2010

    Flash & Flex Developer Magazine (September 2010)

    (download)

    Get the next free edition of Flash & Flex Developer Magazine: AIR for AppUp


    Here is a sampling of what is inside...

     

    • Intel Atom Developer Program: Million Dollar Development Fund

      Intel recently released a new App Store specifically for Netbook Apps: Intel AppUp (http://www.appup.com/). Included in this program is a partnership with Adobe (Melrose SDK … NOW in Public Beta!), a Million Dollar Developer Program Accelerator, and the Intel Developer Challenge 2010.


    • NET FRUGALITY

      We Flash and Flex developers and for that matter, anyone developing Web 2.0 content have enjoyed a free ride on the bandwidth bandwagon. While fiber optic vendors have scurried to lay the last mile of our super highway, none of us have paid much attention to the weight of our applications. But that is all soon to change. Resolution be damned, we are all being ushered into the wireless era, and like it or not, the game is changing.


    • Introducing Amethyst

      A Visual Studio user who wants to create a rich internet application (RIA) has, up to now, had only one real choice: Microsoft Silverlight. With the launch of Amethyst, that’s all changed. Amethyst puts a powerful suite of Flash Platform design and coding tools right inside Visual Studio.


    • Onyx-VJ development

      Onyx-VJ is an open source video performance tool based on ActionScript 3 language. The project was started by Daniel HAI back in 2003.


    • Engineering Business Focused Facebook, YouTube, and Twitter Apps

      The avenues for delivering innovative products and services to vast groups of clients are unlimited as internet media platforms evolve, become widely used, and are made more accessible.


    • Monetizing Your Web Game Part 2

      Currently there are many choices when it comes to monetizing a web game. It can be daunting to decide which model is best for a developer.


    • Simple Class Generator for ActionScript 3.0

      Flex 4 containers are not close relatives of Flex 3 Containers. If you want to avoid family feuds, you need to take care of the children. In this article, we’ll find out how.


    • Communicating with the browser

      Sometimes Flash just isn’t enough to get the job done. Often times you might need to communicate with code outside the Flash Player, such as JavaScript in an HTML page.


    • Flex and PHP Mobile

      Mobile is big. The web is big. Services are big. It is no secret that in the past several years the API has become king. Simply accessing a web site is not sufficient any more.


    • Amethyst Puts Flash In Visual Studio But can it compete with Silverlight?
       
    • Adobe Flex 4: Training from the Source Volume 1
       

     

    26 May 2010

    Steve Jobs Hates You!

    Stevejobshatesyou
    Just stumbled across this on Mashable: Flash Enthusiast Sends a Hidden Message To Steve Jobs

    Mat Bisher came up with this clever way to send his message and as a Flash Platform Developer myself, I find this absolutely hysterical!

    View full page example here: http://www.sosapplesos.com/restrictedexample.html

    Keep up the good work Mat!

    21 May 2010

    Android becomes a Man, but is it Ready to be the King? And Google TV is born!

    Androids

    Over the last couple of days, it has been interesting to say the least with all of the exciting news coming from the Google I/O (Developer) conference. It was rather amusing to see a large number of fair & well-deserved smart remarks directed at Apple, iPhones & iPads.

    Day 1, the big news was the Chrome Web App Store.

    Day 2, it was all about the little green dude... Android! The Android OS seems to have finally matured past the point of playing catch up with Apple's iPhone and now seems to be setting its own agenda.

     

    Android 2.2 (FroYo) Developer's Note:

    1. Speed - faster VM & JIT compiler 2x-5x faster apps
    2. Enterprise - 20 new features including Exchange support
    3. Data Backup API
    4. Cloud-to-Device Messaging API
    5. Tethering and wireless hotspot
    6. A better Browser:
      • V8 video. 
      • The Android browsers dusted the iPad browser hands down in decoding JavaScript. 
      • Eventually web apps will be able to access the device hardware such as the camera & accelerometer. 
      • Flash Player 10.1 support within the Browser. 
    7. Android Market - Search can search within apps and removable storage. 
    8. Apps on SD. 
    9. Application can be set to auto-update. 
    10. A stack trace reporting feature for developers to better help with debugging. 
    11. Android Market account tied to devices. 
    12. Devices will be able to download application OTA (Over-The-Air) directly from your computer. 
    13. Music is now purchasable on the Android Market!
    14. Non-DRMed music purchased on iTunes will be able to play on your Android device.
    15. AdSense for Mobile Ads - Google's counter Apple's iAds I'm sure. Expandable ad formats within apps which can use maps and the click-to-call feature.

    CNET's Stephen Shankland: "Basically, Google is working to reproduce iTunes abilities with just a browser, no iTunes.

     

    Google TV: TV meets web. Web meets TV.

    Imagine your computer, mobile phone and TV viewing experiences all being blurred together. This is exactly what Google is doing! Its a fact a large quantity of people spend hours of time watching YouTube on their computers and mobiles, now imagine watching that on your 1080p HD TV. Lets take it one step further, how about watching that YouTube clip and then sharing it with your buddy from your TV. Its no longer a dream, its coming later this year (Fall 2010) to a BestBuy near you. 

     

    What you need to know about Google TV:

    • Running the Android OS + Chrome Browser
    • Will be integrated with with Sony TVs that are coming out.
    • Will be available as a standalone box (thanks to Logitech) and will work with your current TV. Will require a keyboard & pointing device. 
    • Better searchability of the program you like. 
    • More interactivity with your favorite programs. 
    • Allows your to record future episodes of your favorite shows and ties directly to Amazon Video so you can purchase previous episodes. 
    • Access to Android Apps! You will be able to login to your Android Market account, buy an app on your phone or computer & have it automatically downloaded to your Google TV.
    • You can watch YouTube directly on your Google TV.
    • Will be able to interact with Facebook, Pandora, Flickr, etc...
    • NOTE: your Android phone can be used as a remote control.
    • You will be able to login to your Android Market account, buy an app & have it automatically to your Google TV.
    • Watch & listen to your podcasts directly on you Google TV. Podcast via Google Listen (http://listen.googlelabs.com/). 
    • Notably: the NBA.com has create a Google TV site that allows for more interactivity while you consume sport. This is the future!

     

    Tv_l

    Google TV Developer's Note:

    • Developers will be able to build both Android apps as well as Web apps and access them on Google TV.
    • Google TV currently runs on Android 2.1 & has the Google Chrome browser & Flash Player 10.1.
    • The SDK will be released early 2011.
    • Best part... its all OPEN SOURCE! This will happen late 2011.

     

    Adobe AIR for Android Developer's Note: its nice having a little green guy and Google as friends! 

    Phprpqpfaio2-377

    Ever since Apple decided to take their arrogance to the next level and Google joined Adobe's Open Screen Project, this really have panned out well for Flash and AIR Platform Developers. Yesterday, Google pretty much said Flash is part of Android.

    WARNING: As a Flash/AIR developer, you now have the responsibility to optimize your all of content so that it runs well across all device. If users have a bad experience with Flash on these Android-based devices it will reflect bad on ALL Flash content. 

    So what does this mean to you as an Adobe Flash or AIR developer?
    1. You can develop Android apps using AIR for Android which is now in beta (developer access only). SIGN UP HERE!
    2. As a Flash Developer, you can develop Flash Apps and content (720p & 1080p videos) for Google TV. READ MORE HERE...
    3. AIR for Android will work on Google TV eventually. Top priority is optimizing AIR for Android on mobiles.
    4. General tips for designing websites to work on Google TV

     

    13 May 2010

    Adobe Fights to Set the Record Straight about Flash

    Today, much to my delight, Adobe has launched a classy advertising campaign, "We HEART Choice" to counter Steve Jobs' missive, "Thoughts on Flash". The message is simple, Adobe still likes Apple, they want to set the record straight, and they just want to let developers to choose what tools they want to build with.

    Anyone that it out of the loop can grab all of the details that have led up to this point by read, Apple's CEO Entered an Insanity Plea as the Reason for Banning Flash on the iPhone

     

    Weheartapple1

     

    Lets first take a look at "The Truth about Flash"...

    Statistics_764x238
    Adobe really did a nice, concise job with this counter in the way they addressed all of the issues: touch, video, performance, security, & openness.

    Read the entire article "The Truth about Flash"...

     

    The Co-Founders of Adobe wrote a nice letter about the internet and openness...

    They really have a fabulous point...

    "If the web fragments into closed systems, if companies put content and applications behind walls, some indeed may thrive — but their success will come at the expense of the very creativity and innovation that has made the Internet a revolutionary force."

    Read the entire letter "Our thoughts on open markets"...

     

    Marquee_792x200

     

    Future of Flash...

    Flash is not only available on the computer, but shortly it will available on Android mobiles & tablets and TVs as well. I'm a part of both beta testing for AIR for Android and Flash Player 10.1 for Android and its really exciting to see a mobile device handle Flash & Adobe AIR apps so well!

    Check out a few exciting videos about FP 10.1 & AIR for Android:

     

    Adobe_flash_ad

    30 Apr 2010

    The Flash on iPhone War: Flash & Flex Developer Magazine (April 2010)

     

    I was just surprised to see when I was downloading the latest edition of Flash & Flex Developer Magazine, that the Special Report I wrote became the title of this month's edition: The Flash on iPhone War. Kind of nifty and unexpected! 

    Click here to download the April 2010 edition of Flash & Flex Developer Magazine for FREE

    29 Apr 2010

    Apple's CEO Entered an Insanity Plea as the Reason for Banning Flash on the iPhone

    Today, Steve Jobs, CEO of Apple, publically entered a plea of insanity on Apple.com as to why Apple is banning Flash from the iPhone.

    As an Flash developer, I feel Mr. Jobs arguments are fairly weak and a bit on the side of insane and just goes to show everyone how deperate Apple is to put out these public relations fires caused by not allowing Flash on the iPhone or iPad.

    First and foremost, there is a huge difference between developing apps and developing websites that are viewed on mobiles. Steve kind of blurs the two together throughout. Adobe Flash runs within browsers, while Adobe AIR has been used to develop desktop and native mobile apps which includes iPhone and iPad apps. While Flash hasn't been tested in the iPhone Safari browsers, there are over 100 apps that were built with Flash CS5 and AIR 2 that are currently in the iTunes Store. Nowhere in his post does he address how well iPhone Apps that have been developed with Flash CS5 and AIR 2 work so well on his precious little devices.

    So yes, I think Steve's post is filled with shenanigans, ancient facts and many statements that are simply insane!

    WARNING THIS IS A LONG POST!

     
     
    Steve's Point #1 - First, there’s "Open". 
     
    My Response - Yes, Adobe is "100% proprietary" and Flash is not technically an "open", but why does this matter? At least they place nice with others. Adobe's Open Screen Project is clear evidence of this. Along those lines, Adobe doesn't dictate how we can and can not use their tools. In this sense, Adobe is open. We pay for the tools, we use them however we choose.
     
    HTML5 nowhere close to being complete, and it simply doesn't have the capabilites of Flash. Just take a look at the specs:http://dev.w3.org/html5/spec/Overview.html
    The plugin issue is not really an issue either. Google has embedded Flash Player into Chrome and will be doing the same when Android OS 2.2 (Froyo) is released later this year.
     
     
    Steve's Point #2 - Second, there’s the "full web".
     
    My Response - This really has not happened until recently, more than likely because of the iPad. Most of these companies like a Netflix or a Facebook, have just recently implemented these video player that work on the iPad and iPhone. So when Adobe said majority of site run Flash video a year or so ago, yes, they were correct. I think Mr. Jobs took this statement a bit out of context to match is arguement.
    The gaming point made me laugh. I'm not sure why Steve keeps referring to old comments made my Adobe. Hasn't he seen some of these Flash games (http://labs.adobe.com/technologies/flashcs5/appsfor_iphone/) running on his iPhone? 
     
     
    Steve's Point #3 - Third, there’s reliability, security and performance.
     
    My Response - I personally don't recall seeing Symantec stating this. Even if it were true, Flash is like any other leading technology (like Microsoft Windows)... its will always a prime target because its on pretty much every machine. Its not like the Adobe engineers are sitting their twiddling their thumbs, they are always working to patch these security issues.
    As far as Flash not working well on mobile devices. I say this is a load of crap. Again, where what decade is Steve talking about? In 1995, maybe. Devices now are powerful enough to support Flash and as Andy Rubin, Google's VP of Engineering Android, Flash will be bundles with the next version of Android. 
     
     
    Steve's Point #4 - Fourth, there’s battery life.
     
    My Response - I don't know all of the technical details related to this, but yet again, Steve has some of his facts possibly straight here. Flash does supports H.264, as well as many other formats. If its a matter of Flash accessing the hardware, that problem should be fairly easy to resolve if Apple opened up the platform a bit. Just last week, Apple conveniently opened up the Mac operating system, so that Adobe could use hardware acceleration for decoding H.264 on Macs. Seems to me, that this is an Apple issue, if it is anyones.
     
     
    Steve's Point #5 - Fifth, there’s Touch.
     
    My Response - This was his most comedic comment in this post. Yes, most website created 3, 4, 5 years ago, whether created with Flash or HTML/CSS/JavaScript used rollovers. This is more of a change in mentality for the developer when they design apps and websites in general, NOT a specifc Flash issues. Today, I can take my iPad or iPhone and access HTML website that have issues because they were designed with rollovers.
     
     
    Steve's Point #6 - Sixth, the most important reason. (Adobe also wants developers to adopt Flash to create apps that run on our mobile devices)
     
    My Response - Um... yeah! And what is wrong with that? It would be extremely valuable from a developer's point of view to have access one tool that allows me to write apps with one language that can run on a desktop, netbook, iPhone, iPad, Android mobiles, webOS, etc... 
    I've developed an app with Adobe Flash CS5 & AIR 2 that runs on my iPhone, my iPad and my Google Nexus One. The beauty of what Adobe is doing is that is takes very minor code changes to repurpose your app to run on another device. My app runs extremely well on all three devices. So I'm not sure what Steve is talking about. 
    He mentioned, "We know from painful experience that letting a third party layer of software come between the platform and the developer ultimately results in sub-standard apps and hinders the enhancement and progress of the platform." What painful experiences is he referring too? I'm clueless here.
    I could see a potential issue where if Apple wasn't working with 3rd parties, it would take a little bit of time for them to adapt their tools to be up-to-date with the latest APIs and features from Apple. The developers wouldn't be upset with Apple over this 3rd party not having their tools up-to-date. 
    Just look out at all of the APIs that are out there today. Say a 3rd party company builts an app based on the Twitter API, then Twitter making a change to the API, and then the company's app stops working because the company didn't update their code to be in sync with the latest updated from the Twitter API. The consumer couldn't blame Twitter for this 3rd party developer not keeping his app up-to-date, they would have blame the 3rd party developer.
    In response to Steve's comment about the lowest common denominator. As a developer, I would prefer initially to have a limited features at first, in exchange for being able to develop apps for a variety of platforms, as opposed to having to learn ActionScript 3, then JAVA, then Objective-C, etc...
     
     
    Concluding Thoughts...
    • Flash will be a leader in the mobile era just as it has been in the PC era with or without the iPhone/iPad. Google has been it very clear that they are working with Adobe to include both Flash & AIR in Android.
    • Apple needs to grow a set and simply come out and say that the reason for all of these shenanigans is because they now view Adobe Flash as a competitor. I could comfortably live with that confession.
    • I would like to see Apple at least give a little ground and allow developers to use, Flash CS5 to build iPhone and iPad app. We've already proven this can be done effectively.
    • My suggestion to to Steve, if you really want to improve his iTunes/iPhone/iPad/iWorld he should remove all of the stupid iFart apps.  

     

     

     

    *    DISCLAIMER 1 - I proudly make my living as a Flash Developer

    **  DISCLAIMER 2 - I'm a part of the Flash CS5, AIR 2 & AIR for Android Beta Program

    *** DISCLAIMER 3 - I'm a Mac Boy through and through. I typing this on my iMac, I'm on my second iPhone upgrade, bought an iPad before they were shipping, and my next computer will more than likely be a Macbook Pro.
    11 Jan 2010

    Flash & Flex Developer Magazine (January 2010) FREE!!!

    DOWNLOAD HERE!

    Articles & Tutorials in this edition:

    • Free Issue to download 01/2010
    • Flash and Mobile devices, apps, and iPhone and iPod Touch
    • Web Form Builder
    • Wowza Media Server 2: Unified Streaming Beyond Flash
    • Wanna play here? Get Corona!
    • A Journey into Adobe Flex Charting Components [Part 3]
    • Gate2Shop Overview
    • Creating Flash Websites using Flash Catalyst
    • A Flash in the Cloud
    • Flex and The Cloud: Is this really just Client/Server 2.0?
    • Workflows with Flash Catalyst and Flash Builder
    • Online ADS: Same as it Never was
    • Simple AS3 Bar Equalizer Tutorial
    • Creating Augmented Reality w/ Adobe Flash CS4
    • Learn to create arcade games in Flash
    • Flash, the iPhone, and Amazon EC2
    • Developing SWF Applications for the PlayStation Portable
    • Flexunit 4 with Test Driven Development
    • Using Custom Base Classes in Flash
    • Getting Tweets into Flash from Twitter
    • Text Layout Framework

     

    DOWNLOAD HERE!

    Lee Graham's Posterous

    Hi! I'm Lee Graham. I'm a eduGeek, as well as an eLearning Developer for Red Hat, Android FANATIC,  &  eduGeek.


    Connect with Lee Graham


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