« July 2007 | Main | September 2007 »
August 31, 2007
We need flexibile crossdomain.xml on Google properties
Ali Mills posted about his experience of Google Developer Day. Where, Ali got to know about Google's plan to host a flexible crossdomain.xml on their servers, which would allow third-party flex-flash-web-applications to access Google APIs.
As we know, Youtube also changed it's crossdomain.xml, which broke many third-party flex-flash-applications consuming YouTube's API. I understand, it was more of security reasons; Lesson to be learnt: Never host a crossdomain.xml (which allows all domains) on your main application server.
Similarly, Gdata, Picasa, Google-Calendar etc don't allow all domains, only Google related properties.
I hope, Google guys hear us (Flash/Flex developers) and host a crossdomain.xml (as promised in Google Developer Day) asap.
Yahoo! has a good team of flash/flex developers, that could be the reason, Yahoo! has always been trying their best to satisfy the needs of developers. The most recent update, sure you all have heard of, Flickr now hosts a flexible crossdomain.xml, you can read more on these places:-
- Flickr: Now Even More Flash-friendly - Yahoo! Flash blog
- Goodbye Image Proxy - Thank You flickr! - Quasimondo's blog
- Yes!! Thank you Flickr for crossdomain.xml - Doug Mccune's blog
Technorati tags: google, crossdomain, api, flickr, yahoo, flash, flex, youtube
Posted by Abdul Qabiz at 05:46 PM | Comments (3)
August 29, 2007
Google Indic Transliteration - Cool application
Google keeps coming up with innovative stuff, Google Indic Transliteration is one of latest additions. It allows English to Hindi transliteration.
It's an AJAX application with pretty neat user-interface. I have started using it, and spread the word among my friends. The moment I saw, I thought, if there is an API to use it on our application. I don't know, if there is one. I digged and found this URI:-
http://www.google.com/transliterate/indic?tlqt=1&langpair=en|hi&text=wahan%2Caap&tl_app=3
It would return the JSON data (you might not see some characters):-
while(1); [ { "ew" : "wahan", "hws" : [ "वहाँ","वहां", ] }, { "ew" : "aap", "hws" : [ "आप", ] }, ]
You can send multiple English-words by separating them with comma (,).
That's all, we need to use it in Flex/AIR app. Web-based Flex/Flash applications might require a server-side proxy to use this service, I am not sure, if Google's crossdomain.xml allows access to third-party applications?
Technorati tags: google, Indic transliteration
Posted by Abdul Qabiz at 03:27 PM | Comments (5)
August 27, 2007
Adobe Flash Player's Security-Sandbox is very restrictive
Adobe Flash Player Security-Sandbox is very good and we have not heard any major security vulnerabilities so far. However, I think, it can be made more intelligent, I have some use-cases where I can't do anything.
XMLSocket API is cool, since it's inception, developers could create cool applications (multi-player games, chat-apps, presence-apps etc). XMLSocket servers (unity, swocket etc) is needed to comply with a specification in order to work with Flash Player (as a client). Since developers are using/creating custom-servers, they could control various things on server-side, f.ex: configuring right security-permissions, serving right policy-file (crossdomain.xml) etc.
With Binary Socket API, in Adobe Flash runtimes, things have changed a lot. Applications (for Adobe Flash runtimes) can now connect to servers using standard protocols (POP3, SMTP, Databases, HTTP etc). Totally cool feature which allows creation of kick-ass applications (Yahoo! Web Messenger, mySql driver etc). But Adobe Flash Player's security-sandbox is limiting Binary Socket's capabilities.
I have been working on a library (as3httpclient) to do more things (http-status-messages, http-authentication over GET request, support for more http-methods etc) which are not supported by URLLoader API. This library (as3httpclient) doesn't work in deployed web-application because Adobe Flash Player's Security-Sandbox restricts it to.
I have following questions/concerns:-
- When URLLoader (or other such native APIs) can connect on any port, why can't custom APIs (as3httpclient and others) connect?
- Why can't Flash Player be little more intelligent to check, if connection is made to a HTTP server? Rules could be:- If connection is requested to same domain and destination-port is assigned to HTTP server, let communication happen. If destination server:port is in different domain, check for valid crossdomain.xml and allow the connection?
- Why doesn't Flash Player consider to-ports attributes, if policy-file is served over HTTP?
With standards, we expect flexibility. We can't expect a HTTP server to push policy-file to Flash clients? That's not standard.
Technorati tags: adobe, flash player 9, security sandbox, binary socket, as3httpclient
Posted by Abdul Qabiz at 04:52 PM | Comments (2)
Yahoo! Go 1.X is discontinued
I got an email yesterday, Yahoo! Go 1.x would be discontinued tonight i.e. August 27, 2007 midnight. I am suggested to upgrade to Yahoo! Go 2.0, which unfortunately doesn't work on any of Nokia S60 second-edition phones. I am suggested to use mobile-browser to access services provided by Yahoo! Go 1.x. Well I think, that's not going to help because:-
- I loved the way Yahoo! Go seamlessly integrates with phone and delivers mails/messages to Phone's inbox.
- I loved Yahoo! Messenger in Yahoo! Go 1.x
- I loved the Yahoo! Calendar integration with Phone's calendar.
I think, I liked the seamless integration.
My brother told me that Yahoo! Go 2.0 on Nokia N95 (or S60 third-edition) doesn't come with Yahoo! messenger, that's not good? Why it's missing from new version (Yahoo! Go 2.0)? Is it because of some business-deal (BlackBerry etc)?
I think, taking away an important feature in new version of software/hardware or lack of backward compatibility would upset users. Backward compatibility is important.
I am upset because Yahoo! Go 1.x would stop working on my phone, I don't know why? It's alright to release new version but that shouldn't force existing users to upgrade or not being able to use existing (installed) software.
Technorati tags: Yahoo! Go, mobile, application, discontinued
Posted by Abdul Qabiz at 03:12 PM | Comments (1)
August 21, 2007
Adobe Flash runtimes support H.264 and AAC
Adobe has announced support for H.264 (codec) and AAC (audio) in latest update of Adobe Flash Player 9 Beta and Adobe AIR. I just read Tinic's post, which is full of information. Some related links:-
- Tinic's technical post on H.264 support and other things added to latest update of Flash Player 9 Beta 2.
- Adobe's announcement on Yahoo! Finance
- Ryan's post on H.264 support
- ReadWriteWeb on H.264 support
I think, this would increase Flash Player usage on web. I am hoping that this update makes to release version ASAP. Future surely looks great...
Technorati tags: adobe, h.264, video, standards, flash player
Posted by Abdul Qabiz at 11:45 AM | Comments (0)
August 15, 2007
Happy Independence Day
![]()
I wish a Happy Independence Day to all my fellow Indians. It is indeed a day that reminds us of all freedom fighters who struggled for this day, thanks to all of them for showing us free India. I am proud to be an Indian.
We have done a lot in last sixty-years but we could have done more. It's never late, I am sure India would be a developed nation by 2020, a vision given by our ex-President Mr. APJ Abdul Kalam.
Jai Hind
Credit: Flag graphic provided by http://www.3dflags.com
Technorati tags: Indian Independence Day
Posted by Abdul Qabiz at 04:16 AM | Comments (3)
August 03, 2007
DataGridDataExporter: Export DataGrid data as CSV
A friend of mine, who is new to Adobe Flex, asked how can Datagrid-data be exported as CSV. I wrote a simple class, with one static-method, to do that. This is very basic implementation of CSV format.
Check out the example or download the code (with example).
/** _________________________________________________________________________________________________________________DataGridDataExporter is a util-class to export DataGrid's data into different format.
@class DataGridDataExporter (public)
@author Abdul Qabiz (mail at abdulqabiz dot com)
@version 0.01 (2/8/2007)
@availability 9.0+
@usage<code>DataGridDataExporter.<staticMethod> (dataGridReference)</code>
@example
<code>
var csvData:String = DataGridDataExporter.exportCSV (dg);
</code>__________________________________________________________________________________________________________________
*/
package com.abdulqabiz.utils
{
import mx.controls.DataGrid;
import mx.controls.dataGridClasses.DataGridColumn;
import mx.collections.ArrayCollection;
import mx.collections.XMLListCollection;
import mx.collections.IList;
import mx.collections.IViewCursor;
import mx.collections.CursorBookmark;
public class DataGridDataExporter
{
public static function exportCSV(dg:DataGrid, csvSeparator:String="\t", lineSeparator:String="\n"):String
{
var data:String = "";
var columns:Array = dg.columns;
var columnCount:int = columns.length;
var column:DataGridColumn;
var header:String = "";
var headerGenerated:Boolean = false;
var dataProvider:Object = dg.dataProvider;
var rowCount:int = dataProvider.length;
var dp:Object = null;
var cursor:IViewCursor = dataProvider.createCursor ();
var j:int = 0;
//loop through rows
while (!cursor.afterLast)
{
var obj:Object = null;
obj = cursor.current;
//loop through all columns for the row
for(var k:int = 0; k < columnCount; k++)
{
column = columns[k];
//Exclude column data which is invisible (hidden)
if(!column.visible)
{
continue;
}
data += "\""+ column.itemToLabel(obj)+ "\"";
if(k < (columnCount -1))
{
data += csvSeparator;
}
//generate header of CSV, only if it's not genereted yet
if (!headerGenerated)
{
header += "\"" + column.headerText + "\"";
if (k < columnCount - 1)
{
header += csvSeparator;
}
}
}
headerGenerated = true;
if (j < (rowCount - 1))
{
data += lineSeparator;
}
j++;
cursor.moveNext ();
}
//set references to null:
dataProvider = null;
columns = null;
column = null;
return (header + "\r\n" + data);
}
}
}
DataGridCSVExportExample.mxml:-
<?xml version="1.0"?>
<!-- DataGrid control example. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import com.abdulqabiz.utils.DataGridDataExporter;
private function exportCSV ():void
{
console.text = DataGridDataExporter.exportCSV (dg);
}
]]>
</mx:Script>
<mx:XMLList id="employees">
<employee>
<name>Christina Coenraets</name>
<phone>555-219-2270</phone>
<email>ccoenraets@fictitious.com</email>
<active>true</active>
</employee>
<employee>
<name>Joanne Wall</name>
<phone>555-219-2012</phone>
<email>jwall@fictitious.com</email>
<active>true</active>
</employee>
<employee>
<name>Maurice Smith</name>
<phone>555-219-2012</phone>
<email>maurice@fictitious.com</email>
<active>false</active>
</employee>
<employee>
<name>Mary Jones</name>
<phone>555-219-2000</phone>
<email>mjones@fictitious.com</email>
<active>true</active>
</employee>
</mx:XMLList>
<mx:Panel title="DataGrid Control Example" height="100%" width="100%"
paddingTop="10" paddingLeft="10" paddingRight="10">
<mx:Label width="100%" color="blue"
text="Select a row in the DataGrid control."/>
<mx:DataGrid id="dg" width="100%" height="100%" rowCount="5" dataProvider="{employees}">
<mx:columns>
<mx:DataGridColumn dataField="name" headerText="Name"/>
<mx:DataGridColumn dataField="phone" headerText="Phone"/>
<mx:DataGridColumn dataField="email" headerText="Email"/>
</mx:columns>
</mx:DataGrid>
<mx:Button label="Export CSV" click="exportCSV ()"/>
<mx:TextArea id="console" width="100%" height="100%" />
</mx:Panel>
</mx:Application>Technorati tags: Datagrid, csv, export, flex2, actionscript
Posted by Abdul Qabiz at 04:10 PM | Comments (19)