Archive for the ‘Adobe Flex’ Category


Common Misconceptions About Adobe AIR

Jun 4, 2009 Author: Figo | Filed under: Adobe AIR, Adobe Flex

Adobe AIR has gotten a lot of online coverage lately and that’s a good thing. I’m an absolute fan and before I tell you why, let me tell you about the biggest perception mistake most being made about it.

Wannabe

I have found – on a number of occasions – articles comparing AIR and FLEX to Java and .Net, as if it’s another development suite trying to compete for space with the establishment (the incumbents, Ahem!!). I’ve made the same mistake too and this is far from correct.

The comparison is understandable if you are comparing application development on FLEX – in Flexbuilder – where you can develop anything in ActionScript3 from a small application to an enterprise monster. Your application can then be compiled to run inside a browser in a Flash player, or it can be made into a standalone desktop application.

To speed up development, it has time-saving components and libraries too.

So what’s the fuss? Java and .Net have been doing the same thing for years and they have far richer libraries than Adobe’s toy!

Correct.

You’d also be right to think that other similarities between these development suites pit them against each other as competitors. All three make heavy use of a specific runtime environment.

The Flipside

So they do compete, right?

Sort of, and the mistake comes in thinking that this is where the story ends.

This next part explains why I’m so excited about Adobe’s offering (soon to come out in the incarnation of FlashBuilder4 and FlashCatalyst).

The big difference is that Adobe’s suite aims to extend the reach and prowess of the web developer, while the others are made for a different breed, including folks who can hold a whole conversation in hexadecimal code (not that web developers can’t do this, but you get my drift).

A Different Animal

To do this correctly, Adobe had to keep in mind the typical type of person who would be attracted to their tools, one I’d like to refer to as the Social Geek. Let’s call this type of person MASH, because they are increasingly aware that the best solutions are often a result of a multivendor mix. This person would be:

  • Purely focused on web applications
  •  Someone who’s not too crazy about attaching their skill sets to a brand name (e.g. I’m a Banana™ certified developer)
  • Someone who detests walled gardens (where software is concerned) and is always pleased to see them crumble

Alright Already! Sheesh! Get To The Point!

Right, let me tell you what’s so different about Adobe’s offering, and why that difference is so exciting and so powerful that Microsoft(.Net) and Sun(Java) are playing catch-up on similar development tools.

How does Adobe’s suite play to the Social Geek’s tastes appeal to MASH?

For one, the development runtime is Java and the development environment is Eclipse – the most widely used open-source development environment by professional developers. It’s already the best and well supported. Why re-invent the wheel?

Co-operation

Whether, you like developing in Java, Python, Perl, PHP, Ruby, HTML/JavaScript or a host of other languages, Adobe’s tools welcome you with open arms. You are presented with so many options for bringing your web applications to life.

And here’s the kicker

You are not limited to the web browser

For the first time, this tool opens the doors for web developers to venture into the world of desktop app development. The compiled applications run on Windows, Mac, and linux without the need for porting and they can seamlessly integrate with online applications as well as run offline.

Update:
Take a look at this basic example to get a better understanding.

Beauty To The Monitor

When you consider the fact that Adobe’s other tools are market leaders in the rich-media space, you start to realise that never before has the web developer been given so much power and so many options speed away into the future.

Open-source, open everything!

That’s exactly what modern web developers like to hear, and they’ve already started supporting the environment by building AIR applications. A good example of this revolution is the growing number of Adobe AIR desktop applications for twitter. There’s a new one almost every day and we’re only just seeing the start of the web developer’s foray into much more serious applications.

Even though there are still some issues with memory leakage and performance, these are minor issues and something we realise will be fixed in future releases.

Times Are A Changing

Instead of competing with Java and .Net, the Adobe suite aims to co-operate with all. The idea is to make new connections and build upon existing ones instead of cornering the market.

Naturally there will be technical hiccups with such a big undertaking but that I can put up with for the sake of the bigger picture.

Even giants like SAP and Intuit have built tools to make it possible for web developers to make AIR applications for their own platforms.

Picking Up Steam

With the unprecedented upsurge of Social media, Microsoft and Java have realised the need to give more power to the web developer, and are already working profusely on their development tools to make this happen.

Instead of new walls going up, existing ones are being demolished

That’s got to be frightening for traditionalists. It’s still early days and I can’t wait for tomorrow.

I’m more excited about the philosophy and thinking behind the software than by the tools themselves.

That said, am I the only one that thinks we’re talking about a game-changer here? Where do you see all this going?

SARS Brooms Up With Adobe Flex and AIR

Feb 23, 2009 Author: Figo | Filed under: Adobe AIR, Adobe Flex

Who would have thought that a government institution would be an early adopter of Flex and AIR?

Certainly not many people, and I am one of those pleasantly surprised by the news that the South African Revenue Service (SARS) had done just that!

It’s not everyday that you find the public sector out-pacing the private sector in new technology adoption (well, Flex has been around for a good number of years, so it’s not really that new).

I first learned of SARS’s foray into the Adobe Rich Internet Application (RIA) space when I registered for e-filing on www.sarsefiling.co.za . The e-filing website could use some improvement and I’m confident that it will come in time. Just like private sector banks, SARS has truly grasped the internet’s value proposition and I find that I highly commendable.

In an effort to foster more efficient tax controls, SARS developed two distributed desktop applications for tax practitioners and employers. A third package for individual taxpayers is in the works. The brand name for the suite of applications is equally catchy – e@syFile.

Their efforts went so far as having the e@syFile suite as finalist in both the North American and European Adobe Max awards at the end of 2008! Now that’s what I call palpable success.

To SARS I say:

Thank you and well done!

You have paved the way for adoption of the most exciting technology to come around in ages and I hope the private sector and other government organisations learn from your successes.

I wonder how many other SA organisations are seriously using Flex and AIR in their enterprise application environments. Does anyone know?

I know that there is a heavy-hitter of a stock analysis flex/php/mysql solution doing its thing in Nigeria. It was built for Customs Street Advisors, Lagos by the wizards at Saven Technologies.

While on the subject of tax, here's an interesting fact:

  According to legend, the term "Peeping Tom" was coined from a tax-related matter.

  It is said that Lady Godiva rode naked through Coventry in order to persuade her
  husband not to tax the townspeople so heavily; the only person to look at her as
  she rode by was a man named Tom and Peeping Tom has become a synonym for voyeur.

  (circa 1040-1080)

How To Use J-AMFPHP

Feb 22, 2009 Author: Figo | Filed under: Adobe AIR, Adobe Flex

Here you will find out how to build and test an AMF service inside a Joomla! 1.5 (and above) installation using J-AMFPHP.

UPDATE: This post is still helpful even if
you were not aware of the advantages of
Adobe's Action Message Format (AMF) over XML, REST, etc.

Let’s say you are quite comfortable with building extensions for your Joomla! projects and you now want to take them to the next level by integrating them with Adobe Flex / AIR / Flash.

I assume that you have some basic knowledge of Flex and AIR and you know about all the advantages they can bring to your web applications, and that you know about the advantages of communicating with your remote applications via Adobe’s AMF protocol instead of XML or Web Services (i.e. better data exchange performance, especially for large datasets).

You probably also know about the wonderful AMFPHP script that enables you to leverage Adobe’s powerful AMF protocol for your PHP applications.

If this is you, then you probably know that an AMFPHP extension has been made available by Anthony Mclin under the guise of J-AMFPHP. The great thing about it is that it exposes your whole Joomla! environment to speak AMF with your Flex / AIR applications.

Fantastic!

You think to yourself.

Now I can build Flex and AIR applications for Joomla!
But wait a minute! I have downloaded and installed J-AMFPHP but I have no clue of how it works with Joomla!

Don’t worry, I went through the exact same thing and I want to save you the trouble of jumping through hoops in getting Joomla! to talk to your Flex / AIR environment.

Getting Ready

First, let’s have a look at the J-AMFPHP folder locations that we will be focusing on within your Joomla! folder structure:

[web-root]
    |__________[administrator]
            .........
               [amfphp]
            .........
               [plugins]
                   |______[j-amfphp]

The first folder, [amfphp] contains your gateway script just like you will find in the AMFPHP code. The AMF service browser is missing from the J-AMFPHP installation. I suppose this is for security reasons, however, for testing purposes the service browser is indispensable in testing your Joomla! AMF service code.

If you have not done so, please download the latest version of AMFPHP from SourceForge and extract the [browser] folder from the downloaded zip archive into your [amfphp] folder in Joomla! We will use the service browser to test our sample AMF service that we will build shortly.

UPDATE: Important - if you launch your service browser at this
stage you will get a faultCode = “AMFPHP_CLASSPATH_NOT_FOUND” error.

That's because the service browser needs an additional step to work properly.
Here's what you should do.

Find the [services] / [amfphp] folder inside your downloaded AMFPHP zip archive and extract this folder to [plugins] / [j-amfphp] in your Joomla! installation.

The service browser files should only be used in development environment. Leaving them in place in your production environment will allow anyone to view your AMF service composition, please remember to remove them before you go live.

Time For Action

Let’s get cracking and build our first AMF service class in Joomla!

Let’s name our service class “HelloJoomla” , which is a spin on the classic “Hello world!” application.

Under the [plugins] / [j-amfphp] folder in Joomla!, create a new folder named [hello_joomla] and underneath that create a file named “HelloJoomla.php”. This file will contain your AMF service class code.

Let’s run a little test to make sure that we are still on track before we dive into coding the service class.

Launch your web browser and point to:

http://url/to/your-joomla-installation/amfphp/browser/index.html (e.g. http://localhost/amfphp/browser/index.html)

The typical bluish Flex background should come up. After loading you should see two items on your leftmost panel i.e.

[+] amfphp
[+] hello_joomla

Clicking on the [+] sign next to the “hello_joomla” item will show something like (c) HelloJoomla.

So far so good. We’re ready to rumble.

*If you do not get these results, then you should step back and see whether you went through everything correctly.

Coding The AMF Class

Fire up your favourite code editor and open [plugins] / [j-amfphp] / HelloJoomla.php for editing.

Insert the following code:

<?php

//make sure this request comes from within the joomla framework
defined( '_JEXEC' ) or die( 'Restricted access' );

/**
 * An example "Hello World" class for AMFPHP.
 * Whatever you type here will show up in your AMFPHP browser
 * It is good practice to document your class and functions
 * (methods) this way to make it easier on anyone that
 * might want to use your code later, yourself included.
 */

class HelloJoomla
{
    /**
    * A basic function to demo AMFPHP Services
    * Takes in your name as a parameter and
    * returns a greeting message with your name on it
    * @param Name
    * @returns A text string with a greeting message
    */
    public function greetMe($name) {
        $text = "Hello ". $name .", you have just created your ";
        $text .= "first Joomla AMF service for Flash/Flex Remoting.";
        return $text;
    }
}
?>

As you can see, this is exactly the same way in which you code your PHP classes elsewhere!
All your wonderful “J” methods are now accessible from here e.g.

$db =& JFactory::getDBO();

Lastly, go to your web browser again and open / refresh
http://url/to/your-joomla-installation/amfphp/browser/index.html

Drill down to click on (c) HelloJoomla. You will see your “greetMe()” method on the right hand pane. Note how the comments that you included in your PHP code show up .

Type in your name in the space provided and click on “call”. Watch for the output underneath.

You’re unstoppable now! Your AMF gateway is up-and running. Your gateway access url from within your Flex / Flash / AIR environment will be

http://url/to/your-joomla-installation/amfphp/

Have fun integrating your Joomla! environment with Flex, Flash, And AIR!

Update: Create a "HelloJoomla" Adobe AIR Application in HTML and JavaScript  link

Recent Tweets


Recent Comments


Afrigator