February 2006 - Posts

Do they look alike?

http://home.plus.yahoo.com/
http://www.google.com/ig
http://www.live.com/
http://www.start.com/
http://www.netvibes.com/
I have tell some of my friends that I hope to create an application in Flex 2 in which users can check email, read newsfeeds, chat on IMs, etc, all within a Flex 2 interface. Well, I have come out with a Demo version for you guys (all who love Flex =) ) to try it out and tell me how you think of it

Currently, I have link it up with Delicious, and able to have a simple RSS reader, as well as a mock 'Dashboard'

(3rd March 2006) Note, the system is undergoing upgrade, this login / relevant demos may not be working correct from this date.

The URL is here:
http://expertria.com/shock/

username: dev22@123.com
password:dev22

Feedback Form is here: http://expertria.com/shock/resources/store/form.html

Note that you will need Flash Player 8.5 to view. It is a demo version so there will be a lot of bugs.
If you wish to be inform when the next version comes out, drop me a mail at shinchi[at]gmail.com (I think the comments system of this blog is not working)

If you want to contribute / integrate in your flex applications, tell me!

The next version of this application should be able to:
-User Registration (done, but i disable in this demo due to security reason)
-Streamload Online Storage Integration (halfway done, disable in demo due to security reason)
-RSS News Feed (almost done, plus integration with bloglines)
-Flickr Integration
-Delicious Bookmark Integration (almost done)
-Online Address Book
-IMs such as AIM, Msn Messenger, Google Talk (have to get pass security sandbox =( )
-Widget engine with widgets such as World Clock, Calculator, Translator, Weather
-Youtube Integration for video sharing

Secondary features:
-Music player
-FTP support
-Email support


If you are lazy to install flash player 8.5, these are screenshots:


With task Manager too, lol


Dashboard


Normal Desktop (This entire thing is flex 2 running in browser =) )


I created a RSS reader and a bookmark service that uses Del.icio.us in Flex 2. Everything goes well locally. However, once I upload it online, the sandbox security kicks in and nothing can be loaded. =X

I managed to solve this by creating a simple asp.net which loads the page for Flex. The code is simple

For Flex:

public class ServiceDelegate {
        public function getRemoteXML(url:String, listener:Function,
        username:String, password:String)
        {

            var urlloader:URLRequest = new URLRequest("http://<somedomain>.com/gateway.aspx");
            urlloader.method = "POST";
            var vars:URLVariables = new URLVariables();
            vars.serviceurl = url;
            if(username!= null) vars.username = username;
            if(password!=null)vars.password = password;
            urlloader.data = vars;
           
            var xmlloader:URLLoader =
            new URLLoader(urlloader);
            xmlloader.addEventListener(Event.COMPLETE,
            listener);
   
        }
    }

This function takes in the url, a callback function, a username and a password in the case authentication is needed, such as del.icio.us

On the asp.net side:

 protected void Page_Load(object sender, EventArgs e)
    {
        string serviceurl = Request.Form["serviceurl"];
        string username = Request.Form["username"];
        string password = Request.Form["password"];

        string result = "";
        HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(serviceurl);
        objRequest.Credentials = new System.Net.NetworkCredential(
              username, password);
        objRequest.PreAuthenticate = true;
        try
        {
            HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();       
            StreamReader sr = new StreamReader(objResponse.GetResponseStream());
            result =  sr.ReadToEnd();
            sr.Close();        
        }
        catch (Exception ex)
        {

        }      
        XmlDocument doc = new XmlDocument();
        doc.LoadXml(result);
        Response.ContentType = "text/xml";
        this.Response.Write(doc.InnerXml);    
    }

With this, Flex 2 can now load from most pages without affecting sandbox security. Another approach is to use AJAX, although I have not tried it yet