Flex Interview Questions with Answer for Experienced Page 2

 Flex Interview Questions with Answer Page 2

21.       What is adapter in Blaze DS?
            Java Adapter is used to communicate with Java and JMS adapter is used to communicate with JMS. Java adapter class allows us to invoke methods on a Java object.

22.       Explain about different types of channels available in Blaze DS?
            HTTP Channel, AMF Channel, RTMP Channel.
            AMF Channel: A simple channel endpoint that transport data over HTTP in the binary AMF format in an asynchronous call and response model.
            HTTP Channel: Provides the sample behaviour the AMF Channel/endpoint, but transport data in AMFX format, which is the text based representation of AMF.
            RTMP Channel: The RTMP Channel creates a single duplex socket connection to the server and gives the server the best notification of the player being shut down.

23.       Explain about Remote Object? What is end point in Remote Object?
            Remote Object:  Remote Service automatically serializes and deserializes the data between Flex client and your server side language. As a result, you can directly call methods on your Java/.Net/ColdFusion/PHP etc… objects. This service connects to an AMF (Action Message Format) Gateway. AMF protocol transfers data in a binary format, so the data can be moved across the network more quickly.
endpoint: This property is used to identify the Java web project from your flex client project.
            Ex: http://localhost:8080/JavaTest/messagebroker/amf
•          http: this is a protocol used to communicate with webserver from client. http means “Hyper Text Transfer Protocol”
•          localhost: Host name of the machine where you have deployed your Java web project.
•          8080: Port number of the web server where you have deployed your Java project.
•          JavaTest: Context root of the web application to identify the web project uniquely.
•          Messagebroker/amf: this is the URL pattern of the servlet which we have defined in web.xml file.
•          <<protocol>>://<<hostname>>:<<port no>>/<<context root>>/<<URL Pattern>>

24.       Explain about ResultEvent and FaultEvent in Remote Object? (OR) Explain about result handler and fault handler methods?
            result: This is the event listener for the event ResultEvent. This event is automatically dispatched by the Flash Player when it receives the successful results from the backend Java service.
            fault: This is the event listener for the event FaultEvent. This event is automatically dispatched by the Flash Player when it receives any error in calling the Java method.

25.       Explain about Flex Data Services like HTTP Service, Web service and Remote Object?

26.       Difference between HTTP Service and Remote Object? (OR) Which one you will prefer?
            Data Service(Remote Object)
            1. Remote Objects specifies named or unnamed sources.   
            2. This service connects to an AMF(Action Message Format) Gateway
            3. AMF protocol transfers data in a binary format, so the data can be moved across the network more quickly.           
            4. Remote Service automatically serializes and deserializes the data between Flex client and your server side language. As a result, you can directly call methods on your Java/.Net/ColdFusion/PHP etc… objects          
           
            HTTP Service/Web Service
            1. These services use named or raw URLs
            2. These services connect to an HTTP Proxy Gateway.
               HTTP Service use HTTP protocol/requests
               Web Services use SOAP (Simple Object Access Protocol).
            3. These services transfer data in XML format. This is slow.
            4. Here the data transfer is in XML only.

27.       Explain about component life cycle?
            A set of methods the framework calls to instantiate, control and destroy components.      OR
            The component instantiation life cycle describes the sequence of steps that occur when you create a component object from a component class. As part of the life cycle, Flex automatically calls component methods, dispatches events, and makes the component visible.
            3 Main Phases:
            BIRTH
                        Construction, configuration, attachment, initialization
            LIFE
                        Invalidation, validation, interaction
            DEATH
                        Detachment, garbage collection
           
            override protected function createChildren():void{
                        myLab=new Label();
                        myLab.text="my label";
                        myLab.setStyle('color',"green");
                        this.addChild(myLab);
            }
override protected function updateDisplayList(unscaledWidth:Number,  unscaledHeight:Number):void {
                        myLab.move(0,0);
                        myLab.setActualSize(100,100);
            }
           
28.       Explain about Application life cycle?
29.       Explain about the custom components method?                                                                                                                                                                         What are the methods we have to override when we are creating a custom component?
                                                            (OR)
            Explain about the validation and invalidation methods?
           
30.       Explain about measure() method? When this measure() method is called?
            The measure() method sets the default component size, in pixels, and optionally sets the component's default minimum size.
             This method is used for following reasons.
            1)         To set the components measuredWidth, measuredHeight, measuredMinWidth and measuredMinHeight.
            2)         To set the default width and height values to this component.
            3)         To measure the child components widths and Heights. So that we can specify how much width and height is required for our component.
            4)         Measure method is called only when you are not specifying both width and height externally at the time of calling this component.
            5)         This method can be called multiple times by calling the invalidateSize() method.

31.       Difference between Item Renderer and Item Editors?
            Both are used for editing,but item renderer is used for displaying visual elements..
            item editor is used for editing purpose. Item editor can pass data back from the particular control to save it as a new value for item being edited. We can also use item renderer as editor by using boolean property renderIsEditor.
            itemrenderer is used to format and display the contents in a components whereas itemeditor allows us to edit the displayed content

32.       How to display the Check Box in Data Grid header?
<mx:DataGridColumn headerText="ADD" dataField="add"     itemRenderer="mx.controls.Button"/>
            <itemrendere>
            </itemRenderer>

36.       Can we use Text Input/Editable component as Item Renderer?
            Yes,

37.       What are all the events dispatched in Item Editor?
            Item Edit Beginning, Item Edit Begin, Item Edit End

38.       What are the collections classes available in Flex?
            Array Collection, XML List Collection, Grouping Collection.

39.       Difference between Array and Array Collection?
            1) Array Collection is a wrapper class based on Array.
            2) Array Collection contains sorting, filtering features but Array not.
            3) Array Collection dispatches the Event when new item is added, updated or deleted.
            4) Array Collection automatically refreshes/updates the view whenever the change happens in Array Collection.
           

40.       How to get/retrieve an item from Array?

Tags: ,

0 Responses to “Flex Interview Questions with Answer for Experienced Page 2”

Post a Comment

Thanks for your comments

Subscribe

© 2014 Java Frameworks. All rights reserved.
Designed by Blogger