Tuesday, May 30, 2006

Introduction to Flex Data Services

Flex,a server component to create rich presentation layers for internet applications. This article assumes that you have basic knowledge of flex which includes MXML, ActionScript, MXML class library, RunTime services and Flex compiler.
Here i will explore the Flex data services . Flex data service is an object that you insert in MXML file. This object communicates with the business layer. This object is used to send and receive data from web services , Java remote objects and HTTP URL's.
Flex is a presentation layer technology and hence can not communicate with database directly. For this flex work with business layer to get the data.
The Flex data service architecture can be viewed as a combination of three services.
  • RPC Services
  • Flex data service
  • Flex Message service

    Flex Message service : Flex message service is a combination
    of client side API and message service
    running on server.
    The managment of destinations is handled by message service and for publishing and subscribing to these destination , the client side API allow flex clients.
    Message service is responsible for routing the message from a publisher to a destination where the subscriber are subscribed.

    The steps for sending a message to destination:-

    1: Create a producer to publish message to a specific destination.
    <mx:Producer id = "pdoducer" destination ="Topic">

    2: Now we need to create a message and publish it.

    private function sendMessage():Void{
    var message:AsyncMessage = new AsyncMessage();
    message.body.topicID = topicID.text;
    message.body.tMessage = topicMessage.text;
    producer.send(message);
    }

    Now the steps for subsriber to subscribe a destination:-

    1: <mx:Consumer id="consumer" destination ="Topic"
    message = "mHandler(event)">


    and the definition of mHandler

    private function mHandler(event:MessageEvent){
    var mBody:Object = event.message.body;
    myTopic.text = mBody.topicID+":"mBody.tMessage;
    }


    The destination we were dealing above are configured at the server side in a XML configuration file( flex-message-service.xml ) . This xml files contains the information of destinations. The structure of the xml file is.

    <destination id="Topic">
    <properties>
    <network>
    <subscriber-timeout>0</subscriber-timeout>
    </network>
    <server>
    <max-cache-size>1000</max-cache-size>
    <message-time-to-live>0</message-time-to-live>
    <durable>false</durable>
    </server>
    </properties>
    <channels>
    <channel ref="my-rtmp"/>
    <channel ref="my-polling"/>
    </channels>
    </destination>


    RPC Services:- A flex client can invoke methods of java object
    deployed in application server. It can access the back-end data using the SOAP based webservices or using XML over HTTP . These three ways collectively called RPC services.

    Flex Data Managment Service:- The client side API and data managment services running on appliaction server together form the flex data managment services.

  • Saturday, May 27, 2006

    Ready for another Flex Project

    Last time when i worked on Flex, It was very new for me. Yet i enjoyed working with flex. Within a short period of time, i tried to explore the flex. Since other members in the team were involved in the project. I only got chance to explore the Datagrid component of Flex.

    The best thing about Flex is the XML based UI. It's a new and easily adoptable concept. They have their language called MXML
    ( Macromedia Flex Markup Language ) for user interface design.

    Last time we did not work on any server side application in Flex. This time we have to explore the server side of Flex. Again we have 3 days for this small flex based project. I am eagerly waiting for my technical head to come and to start with the project.

    From monday, I will work on Flex for next 3 days. This time more fun working with Flex.

    Thursday, May 25, 2006

    Java and Related Technologies

    Java is a powerful open source technology. The way, it created the ground is amazing. The support of java in open source community is increasing day by day. Previously there was very few choices of IDE's for java development. Now more and more Java IDE's are coming into picture and some of them are really cool.
    We have a long list of good server for java developement which includes Tomcat, Weblogic, JBoss etc. Which makes this language the first choice for large applications. And open source technologies like Ant, Junit makes the life easier for java based development.
    As java becoming more popular for open soucre developer, other technologies like .Net( Microsoft alternative to java ) is loosing it's ground. The fact is that the .Net developers are always underpaid than java developers.

    Experience to Adobe products

    Adobe is a well known company for it's amazing products.This year in my new company, I got the chance to work on adobe products. Before this i was use to with java and open source technologies. The adobe technologies which i used were flash, the universal existing product and Flex, the new name in adobe product list.
    I was new to flash. But i did not find any difficulty in learning this new language. The way the language Action-Script 2.0 is designed is similer to java, They have adopted the java syntax and their object oriented model. For a open source (Java ) programmer , moving into the action-script 2.0 is not very difficult.
    It's very similer to java , yet there are many differences in between. The biggest pain working with adobe technologies is the lack of good java kind documentation. For every problem where you stuck, you need to do some google to find the article desribing the topic. For a good learning experience , a good documentation is badly needed.
    We also got chance to work on Flex for a little period of time , This was to create a small flex based project to demonstrate the rich features of flex datagrid and their charting components. we finished with a small project and we really enjoyed working with flex.
    Within a short period of time, i explored the adobe technologies and found great to work with those.

    Related Posts
    New Acrobat Connect Pro From Adobe
    Open Screen Project From Adobe
    Adobe Released Adobe LiveCycle Data Services ES 2.6
    Adobe® Media Player 1.0 And Adobe TV Released By Adobe Systems
    Adobe Share - Document Sharing Service From Adobe Systems
    Adobe AIR For Linux Alpha

    Daily Technology Tips

    Catch me at Mashable

    PayPal

    Sign up for PayPal and start accepting credit card payments instantly.

    Blog Explosion


    Bloglines

    Blogrush


    BlogsByCategory.com