Entries Tagged 'Flex & Flash' ↓

AirTalkr: AIR based instant messenger

AirTalkrAirTalkr is the new instant messenger on the block. And it’s not just an IM that connects to multiple networks, it can also connect to mySpace and a whole lot others. And what’s more interesting is that it’s built in Adobe Integrated Runtime!

From the site:

AirTalkr is a multi-protocol Instant Messenger that connects to MSN, Yahoo!, GTalk, AOL and ICQ. Not only that, it also has connects to to various Web 2.0 services like Flickr and YouTube. AirTalkr runs on Adobe AIR, so you will need the runtime to use it. As of now, AirTalkr can run on Windows and Mac.

BTW, this is done as an entry to the AIR Derby Adobe has organized!

Good times ahead!

 

Flex Examples

Karan suggested a nice site by Peter deHann covering Flex Examples. Peter posts interesting examples in Flex. Ready examples like his certainly help us get a quick solution to the problem on hand!

Thanks Peter for putting up a wonderful collection!

 

WebORB and PHP connection - finally got it to work

Have had some troubles getting data to Flex from PHP using WebORB. Finally got it to work using some workarounds!

The discussion thread is here on the Midnight Coders forums.

We wanted to have classes doing most of our business logic and call them from both PHP as well as WebORB. Flex will make service calls to WebORB to get data in AMF format. The latest version of WebORB has an excellent Service Browser that allows to inspect and invoke services right from a browser console. Since we were including a prepend file in the main class, the Service Browser failed using the file. Had to include the prepend file from the class’s constructor to make it work!

This is because WebORB itself will instantiate an object of the class to invoke a method on it. It can access the $_SESSION variables across all the objects that get instantiated in turn (and not $GLOBALS).

Here’s some PHP code to illustrate:


<?php
class Manager
{
public function __construct()
{
/** IMPORTANT ******
If we do not include the prepend file here, the WebORB Service Browser
tries to load it, and that will create a problem because of PHP reflection
Putting it in the constructor will include the file and make things work.
Also, you can not use $GLOBALS to store variables across functions.
Storing them in $_SESSION will work though.
**/
// The directory this file will get called from is “Consolde” in webroot.
// So include path must be relative to that
$prepend = “../myproject/includes/prepend.inc.php”;
if (is_file($prepend)) // sanity check
{
include_once($prepend);
}
}
/**
* Get a list of all favorite products
**/
public function getFavorites()
{
$query = ‘SELECT id, name FROM product_favorites
WHERE userId = ‘.intval($_SESSION['userId']).’
ORDER by lastModified DESC’;
$_SESSION['mainDB']->Query($query);
$result = $_SESSION['mainDB']->Result();
return $result;
}
}
?>

And an excerpt of my prepend.inc.php:


$config["dbhost"] = “localhost”;
$config["dbuser"] = “user”;
$config["dbpass"] = “pass”;
$config["dbname"] = “maindb”;
$_SESSION["config"] = $config;
// Include all classes for the application
include_once(”classes/DB.php”);
// Do the DB connection and store it into session
// The DB class will use the $_SESSION["config"] values
// to connect to the DB
$_SESSION["mainDB"] = new DB();

This made it work both from the Service Browser and Flex. It actually also makes it work from the rest of the PHP files I have. Allowing me to test the whole app easily.

This is looking good now!

Thanks!

 

Be like Adobe

Robert X. Cringely wrote about how Adobe wants to build “invisible” software - so ubiquitous that it’s existence is assumed - with AIR (Adobe Integrated Runtime). And then I saw iPhone UI simulation in AIR yesterday.

I will put my money on Adobe too - not on Microsoft, not on Sun or not even on AJAX. Adobe is on the right track with its focus on developer tools. Just like it open sourced PDF (and will do Flex), it should also open source AIR. And it will be invisible not in 10 years as Bob says, but in 5 years.

We always wanted to build a company like Macromedia, and now Adobe. Delivering excellent technology that becomes invisible. We have not yet figured out the right product and strategy to do that yet, but we are working on it!

Working with various technologies over the last 8 years, I have never been so excited as I have been with Flex. It’s cutting edge, solves the problem, and is great for developers. I have seen how Macromedia / Adobe works, and I’ve seen their focus and marketing talent. They have grown many fold in the last 5 years, and I think it’s not stopping anytime soon.

Way to go!

 

Yahoo! launches web messenger developed in Flex

Yahoo! Web MessengerVaishali told about the new Yahoo! Web messenger. And it’s all done in Flex (and PHP)! It looks good, works well, and is a good example of things to come! They have made the panels look much better with rounded corners et al, and have kept the standard Flex look for drop downs and text boxes.

Overall, it works well and looks good! I knew Yahoo! is doing a lot of things with Flex after Yahoo! Maps, but this is a good example of what’s possible.