Sep 03

Do you want to keep FIT?

Seesfit CEO Loic Le Meur recently starts a Social Software Diet Challenge to encourage Web 2.0 junkies to come together for a keep fit program. It has now a wiki page and many related photos on Flickr.

Since then more than 20 people have answered the call to keep fit, including me. The rules are simple, set a goal, and twitter and Flickr about the things you eat every day, and talk about your progress on Seesmic.


I am surprise that you don’t exercise

This is something I heard my fellow Flash mate Flashmech. I am not sure if you have heard similar words before, but this is definitely something anyone will not want to hear! Matter of fact, before I start working, I was 60kg, and being 1.75m, that is underweight. Now, I am 75kg and that is overweight. Like a friend of mine always said , “there is only 1 letter difference between FIT and FAT”. So if you are “under attack” from your friends, join Seesfit and start to lose the few kilograms on your belly!.


A little personal project to track Seesfit!

To help to track Seesfit, I whipped up a little Seesfit Application to help to track the progress of Seesfit’s users. Note that while I work for Seesmic, this is a completely personal project.

This application uses Google SpreadSheet as its backend database, and combine Flickr photos tagged with Seesfit, and Seesmic Thread so that you can see everyone’s progress with 1 look. I will added more features like posting to Flickr directly as we go along. It can be downloaded at http://seesfit.expertria.com/seesfit.air. If anyone is interested, I will open source it too so anyone can add features to it.

Now, run as you code!

Aug 31

Introduction
For many Flex/Flash developers developing Facebook applications, development maybe daunting at first without a very detailed documentations, sample codes and blogs posting around to help. Most of time, many cannot grasp the general architecture of creating a Facebook application. While I am no expert in Facebook application development, I have picked up some useful tips and tricks along the way and I hope to share it around. Do take note the date of this posting. Facebook platform changes from time to time so 6 months down the road, this post might be obsolete.

Note that when I speak about Facebook development, it means having your Flash/Flex content inside Facebook profile and its canvas page. I do not mean connecting to Facebook using Actionscript. If you are looking to communicate with Facebook using Actionscript, please refer to this AS3 Facebook Library:
http://code.google.com/p/facebook-actionscript-api/

The Basic
Before you get started, I will suggest reading this blog posting by padraenl, titled 10 Things That Would Have Been Nice to Know When Starting My Facebook Application. Facebook Platform native documentation is good for referencing, but there isn’t instructions to teach new developers the “standard way” of approaching problems. This blog post answers to many common questions a developer will have.

How it works:
To understand how Facebook Applications work is very simple. Facebook does not provide you with any hosting service. You host your own application on your own server, and tell Facebook where to retrieve it. You churn out your own HTML / FBML / Javascript codes and Facebook parse it on its server, as simple as that. Essentially, you can develop in any language you like, as long as your codes render out the proper HTML / FBML / Javascript.

Things to note is that some of the examples you found on Facebook currently might be obsolete as Facebook now has a New Profile Design. To understand the new profile, you can read it’s documentation, or just scroll down to check the few screen shots I placed below:

New Profile

Instead of a one page profile now, there is now “Wall”, “Boxes”, and Application Tab. Therefore, you will need to plan at least 3 screens for your application.

Main Profile - Wall:


This is mostly visited page from the user’s friends. You have the real estate of a small column on the left hand side of the page. If you are using a Flash movie, it will only play after the user has clicked on a preview image due to Facebook restriction. This part is cached by Facebook and will refresh by using setFBML or the more scalable method fb:ref tag and fbml_refreshRefUrl method. I strongly recommend fbml_refreshRelUrl method. You can learn more about fb:ref here and view the code example here: http://wiki.developers.facebook.com/index.php/FBML_Dynamic_Setup.

Boxes

Boxes is the part where your application will be. Note that your application can EITHER be inside WALL or BOXES tab, and this is controlled by the user. (See the next Screenshot, where under the Video application, the user can choose to “Move to Wall Tab” or “Remove Box”). Also note that you can choose the left column (wide) or the right column (narrow) under your application settings.

Under Boxes tab, your Flash file will NOT show until the user clicks on a preview image.

All the Boxes content are cached and is refreshed by setFMBL or the more scalable method fb:ref tag and fbml_refreshRefUrl method.


Application Tab

This is the best privilege your application can have. A user loves your application so much that he/ she adds it to an application tab. In this case, your application has all the real estate of the entire page, and you can have a very customized UI / information like the below screenshot (Animoto application)

Note that this page is NOT cached by Facebook. So any content is taken directly from a URL you specified in the application settings. For example, you can set Facebook to take from http://expertria.com/myapp/profiletab.php. Facebook will load the page and display any HTML it loads from your server inside the Application Tab.

This also means you need to prepare your server for the load as this is no longer cached by Facebook. Also, if your server is slow is responding, Facebook will consider it as a timeout.

The Main Application.

This is the main application, outside the profile page. This is the part where user who have granted the application permission will see. Typically, it is under a url like http://apps.facebook.com/yourappname/yourapppageurl.

For example, if you set the base url of your application as http://expertria.com/myapp/. A page on Facebook “http://apps.facebook.com/appname/viewallmyfriends.php will be retreivng information from http://expertria.com/myapp/viewallmyfriends.php

You can have as many pages in your application as you want, as well as useful features like URL-rewriting for neater URL address, etc. Facebook does not care as long as they get a http 200 response for the page it request and the response contain valid HTML / FMBL, and that the response is not empty.


PHP development

You can develop Facebook application in any language on your server, but PHP has more code samples and examples around. I will chose PHP as the development language just for the reason of support. Note that as of the writing of this article, if you download the PHP library from Facebook developers site, you will get the old library (which does not has the full feature set for the New Profile Design).

To get the latest one, please download from their SVN:
http://svn.facebook.com/svnroot/platform/clients/php/branches/redesign-changes/

Where to keep my data
As mentioned, Facebook does not care what you do on your server, as long as your server response with valid HTML / FBML. Therefore, you can have data persistence in your own mySQL, or any database you want.

However, I will recommend using Facebook Datastore for a few reason. Firstly, you will not need to maintain another database. Secondly, you can do FQL to achieve something like  “Get those users who had installed this application,w ho are also the current user’s friends, who also are tagged in my application” , in a very direct  manner. Thirdly, there is a test console to help you test your FQL (Facebook Query Language).

Essentially, Facebook Datastore consist of Objects (like Tables) and Associations (like Foreign Key). I strongly suggestion anyone who is new to Facebook Datastore to check out this blog here [
Introduction to the Facebook Data Store API ->http://www.dereksantos.ca/?p=23]. It has far better explanation than Facebook documentation, and anyone with RDBMS knowledge will strike a chore instantly by reading the article.

Using FMBL and Javascripts
Learn FBML and Facebook’s Javascript FBJS before building your application! While many HTML tags are supported in Facebook, you cannot use an Object tag to render your swf directly in Facebook. You will need to use <fb:swf> tag. Using FBML will also gives you a consistent look to your application, so that it will looks like Facebook native application. For example, there is no need to build a custom tab as there is fb:tab. There is also no need to create a blue button that imitate facebook buttons as you can always use Facebook’s css class=”inputbutton” to change the style of your button to match Facebook’s.

As for Javascript , there are also restriction to Javascript. For example, there is no innerHTML to get the content of your HTML. Thus, you will need to learn how FBJS works on Facebook. You will also need FBJS to communicate between your SWF and the main Facebook page.

Flash FBML
Refer to this page to see how to embed Flash in Facebook page. The documentation is complete
http://wiki.developers.facebook.com/index.php/Fb:swf

Essential you need to use Fb:swf to render your swf file.

Flash - JS Bridge
The <fb:fbjs-bridge/>  is essential for your SWF to communicate with the Javascript on your HTML page. It works like External Inteface basically. How it works is that it creates another SWF on Facebook page and your SWF communicates to it via LocalConnection. The bridge will then use External Interface to communicate to the Facebook page on your behalf.

Refer to this documenation for code samples: http://wiki.developers.facebook.com/index.php/Fb:fbjs_bridge

Also, check out this library to call / receive functions in AS3

Creating Flash in Javascript
There are two ways to create a SWF dynamically using Javascript. One way is to use a fb:js-string, which is a pre-setted FBML, initially invisible, and then use document.getElementById(’name of div to insert’).setInnerFBML(myjstringname) to show it on the page.

An fb:js-string example:
<fb:js-string var=”myjsstringname”>
<fb:fbjs-bridge/>
<fb:swf swfbgcolor=”333333″ imgstyle=”border-width:3px; border-color:white;” swfsrc=”http://expertria.com/swf/fb.swf”   width=”300″ height=”280″   />
</fb:js-string>
Another way is to use document.createElement(”fb:swf”), which will dynamically create a new SWF object. You can then set its swfsrc , width and height using the below code:

var swf = document.createElement(’fb:swf’);
swf.setId(’my_swf_id’);
swf.setWidth(’100′);
swf.setHeight(’100′);
swf.setSWFSrc(’FULL_URL_TO_MY_SWF’);
document.getElementById(’swfContainer’).appendChild(swf);

Summary
I hope the above article helps developers with Flex/Flash background in having a better understanding on Facebook Application. Feel free to drop any tips you have under the comments. There are a few things like Mock AJAX and AJAX javascript which I did not cover, but the above should be sufficient to get someone started.

Keep coding!

Jul 04

As a Flex developer, I am more interested over Flex applications over other RIA that are built on AJAX. Flowgram is one that blow me away at its creativeness. It is most probably an application that you “won’t get it” when you first look at, something which you will relate to a slideshow or a video playback initially. However, once you start to play with it, you will realize it is a ‘flow of websites, audio and images in which you can interact with”. Confused? 

Ok, for example, I can do a flowgram of FUG, and while you can viewing the flowgram, you can interact with the page as it is actually being loaded. See the flowgram I made ;)

As you can see, Flowgram allows the user to actually play with a particular website while looking at a presenting about the website, which is something that we have not see before.

Listen to what the CEO of flowgram got to say:

 

If you need an invite, ping me on Identi.ca, I got a few to give away.

Jun 26

Today I read about Curl and was pretty skeptical about it. From Curl’s website:

With the Curl Rich Internet Application Platform, organizations can easily migrate critical client-server applications to the web without sacrificing highly-interactive complex functionality.

The Curl Rich Internet Application Platform enables a new class of highly interactive, web based applications. For the first time, organizations can:

* Quickly build browser-based applications that are as powerful as any client-server solution
* Migrate legacy applications to the web without re-architecting
* Easily deploy complex applications across geographical and technological boundaries
* Extend access to critical applications to employees, partners and customers without sacrificing security

Only Curl makes the Internet a viable platform for delivering the complex business applications that are currently limited to client-server environments.

Obviously the management of Curl knows that the existance of Adobe Flex, Silverlight and AJAX and personally, I believe although they fight a common ground, they have their own developer’s advantage, being:

a. Adobe Flex appeals to Flash, Actionscript developers and for developers who wish to maintain 1 code base for application that can be deployed on desktop, web and across platform. Anyone with Flash Player can play, which is 98%. When done right, boost an application of insane interactivity like [->http://iminlikewithyou.com]

b. Silverlight, will appeal to Microsoft developers of course, which is bigger than Actionscript developers. I never like Silverlight but I admit they have their own market

c. AJAX. When done right, the application that comes out of AJAX can be more light weight than Flex and Silverlight.

From Curl’s Faq page, this seems to be their answer

Until now, there have been two types of development tools:

  • Development tools that excel at engineering high-performance complex applications traditionally delivered over a client/server network
  • Development tools that are well suited for presentation-intensive client-side web applications

Curl is the first development platform that supports both parts of the development process and makes it possible to build highly complex, enterprise-class applications and deliver them over the Internet.

Curl is the only platform that excels for both presentation and programming, so that applications spanning the entire content spectrum can be built efficiently within one unified framework

So how complex can it exactly be?
I go ahead to install the Curl Runtime and tries to run an application from their demo page. Tried to run 2 applications, 1 crashed the browser and another one shows but auto-hide whenever I tried to click on it. Therefore, I tried the Facebook Graph application it shows on other website. but this is what I get

Maybe I am missing something, as InfoWorld names Curl as Technology of the Year for the Best Rich Internet Application Platform for 2008

The Developers Community
How Curl will proceed will largely depends on its developers’ community. From what I read, it looks like Curl’s fighting ground will be Entreprise applications, and its security model, which it boost to be more secure than Flex. My take is that building Curl applications requires developers that is able to do that. There will also be a need of a compelling reason for companies not to develop on other platforms, which sometimes is being dedicated by what its existing developers can do (this is especially true for startups)

In short, I feel that Curl might have a hard fight ahead. Flex, AJAX and their developers are definitely pushing more amazing applications than what we have saw in 2007. The momentum is set and it is moving faster. Will Curl be able to stand in par and have a firm ground on the RIAsphere is yet to be seen.

Jun 24

When we talk about creating presentation slides within the Browser, most people will think of SlideRocket, the Flex application that allows you to create professional slideshow without any installation.


The SlideRocket interface

Today, Mike Taylor bring to my attention this Javascript based application 280Slides 280Slides allows you to create your presentation online. Unlike Sliderocket, no login is required so the moment you go to the site, you are ready to go. Mac users will find 280Slides having strong resemblances to Keynote. A side to side comparison as below:

Keynote? 280Slides?

Keynote? 280 Slides?

Now which one is Keynote and which one is 280Slides? I let you figure that out yourself ;)

What I particularly like about 280Slides is that it allows you to bring in web videos and photos conveniently from its interface. For example, I can type in ’seesmic’ and 280Slides searches the videos of it from Youtube, and I can drag and drop them onto my slides for playback later. The ‘Present’ button convenient saves your slides settings (no login so far!) and now you have an ad-hoc slideshow with minimum effort. To save the slides however, you will now need to either register or enter your existing credentials.

A wall I hit will be that when I tried to download the presentation, it prompts me to download a file of pptx extension, something I do not have the luxury to open unless I have Powerpoint 2008. It is weird that while the founders behind 280Slides tries to imitate the user interface of Keynote, they provide us with a download file type that only someone with Powerpoint can open. Thanks to Ross from 280Slides for clarifying, the PPTX extension can actually be converted via a free tools on Apple, the Open XML File Format Convertor. I guess that will solve my problems then!

An option to download it as PDF will be great, even without any effects and the videos gone. Also, the ability to collaborate with other users will really value add to 280Slides too.

This is the slide show I have created from 280Slides in 10 minutes, dragging a couple of my existing vidoes on youtube and photos on facebook and flickr. Enjoy!

Jun 22

Zoomii, which describes itself as A “real” bookstore with ,Amazon’s prices, Amazon’s secure payment ,Amazon’s shipping, is an interesting website that behaves like google map , but in the context of books browsing. It lets you search for categories , zoom in and out, and look for the particular book you want in a book shelves view, giving you a slight view of browsing in a bookstore. The view itself can be describe as similar to piclens. And together they definitely provide a more seamless experience while surfing the net.

Jun 14

During the Flex Singapore Usergroup June Meeting, I met Michael, the founder of Comiqs.com. Michael introduced to me his startup, which utilizes Flex and allow users to create their own comics strips using either a set of predefined images, upload one, or any image from the web.

Creating a ‘Comiq’ is simple enough. Register and click on Create and you are well on the way to create your first Comiq. The creation process is largely done by drag and dropping the images, text into the main Canvas. Everything you drag into the canvas can be rotate and scale, making the laying of your assets very foolproof

Once you are done, click on publish and your first Comiq is done.

You can view mine here http://comiqs.com/comics/OWqUDswAaVv

It is very nice to see more and more startups as well as MNC in Singapore using Flex. Good job guys!

Jun 13

In this episode, we talk about how you can create programmatic skinning in your Flex components

Video:

Related Files:
https://share.acrobat.com/adc/document.do?docid=539adfa2-738a-45d5-ac44-5e1b7201b200

Related Link:
Designing Flex 3 skins and styles using Creative Suite 3 and Flex Builder 3

Jun 12

2008 saw more and more companies in Singapore adopting Flex as their front-end User Interface solution. From small applications that brings down Apple shop to big ones that allows their clients to shop online like the SingTelShop that launches today

SingtelShop abandons the traditional ‘click-and-wait’ model and is the second telco in Singapore that launches a Flex application for users to browse and navigate between their service plans and desired handphone.  This application boost great convenience in allowing the end users to view the different price for a particular handset at one glance, check if they can renew their contract, as well as the details for a particular price plan. You can also view the phone’s detail, as well as the images of it from the User Interface. What I will love to see in the future will be a compare feature to help selecting between phones

There is also a compare feature which allows you to drag and drop the phones you like into a compare box, after which you will be able to compare the specifications between them. Thank you for SingTel for clarifying that to me.

Compare button

Drag and Drop phones

Compare them in one view

(although from next month onwards there will only be one choice for handphones ), as well as user ratings for a particular phone. User rating features is missing but has also been submitted as a possible feature in the future. However, the current application now does save the users a lot of time from going to different websites to gather their information.

 

P

Phones are pricing are all in 1 glance

 

Clicking one a particular plan shows you the talk time available, pricing, and the other details  

 

As mentioned, Singtel is the second Telco that launches a Flex application for their shop. The first one being the Starhub Kiosk which was launched a few months back, is a Flex application running on PCs, that allow users to browse the available handset at the shop and purchase it after that

The main difference between it and the SingtelShop is that this is deployed in the stores and not accessible from the net. It will download information from their central server on a daily basis to maintain in sync with the servers. SingtelShop, on the other hand, is accessible from the web. It is good to see Flex as well as Actionscript 3.0 gaining its grounds in Singapore, with 2 big Telco using them for their front-end solution, as well as the recently launched Krithik I hope to see more exciting stuff in months to come!

Related links, resources: The SingTelShop is built by two Flex developers currently in Singapore, Denis Volokh and Kyaw Kyaw Naing

Sep 13

untitled-1.jpg

I spend 30 mins today porting AirTalkr from AIR to pure Flex. Then redirect all the urlrequest links through a proxy (since most site I access , except twitter and flickr, are not ‘flash-friendly’ ), and there you got it, an Instant Messenger on the Web build with Flex.

Since its on the web, I add 1 small feature in Flickr where you can choose any photo as your background image.

I do that because a lot of friends tell me they are lazy to install AIR runtime or are ‘uncomfortable in installing a Beta product’. So ya, a little tiny messenger that share the same code base with AirTalkr desktop. It also demonstrate how rapid you can turn a desktop app into a web app with AIR and Flex =)

Now heres the link: http://airtalkr.com/im

Enjoy =)

Ads
The skipe is a big name in the internet phone provider companies. And voip is a regular phone but works as an internet phone as the voip providers facilitate to make calls through the high speed broadband. There are several other types of internet phone services, and it’s really difficult to choose from.