Vous êtes sur la page 1sur 18

Flex Interview Questions with Answer

1. Please explain about yourself? 2. Tell about your current project and roles and responsibilities? 3. Explain Data Binding in Flex? Data binding is the process by which changes in one action script object are reflected in another action script object. (OR) Data binding automatically copies the value of a property of a source object to a property of a destination object when the source property changes. Data binding requires a source property, a destination property, and a triggering event that indicates when to copy the data from the source to the destination. An object dispatches the triggering event when the source property changes. Adobe Flex provides 3 ways to specify Data binding: 1) Curly braces ({ }) syntax in mxml and [Bindable] metadata tag 2) <mx: Binding> tag in MXML 3) BindingUtils.bindProperty/bindSetter methods in Action Script at runtime. 4. Explain Event Life Cycle/Event Phases/Event flow?

Flex is an event driven programming model. Events let a developer know when something happen within in a flex application. They can be generated by user devices such as the mouse and keyboard or other external inputs such as the return of a webservice call. Events are also triggered when changes happen in the lifecycle of a component such as the creation or destruction of a component. The event flow is conceptually divided into 3 parts. (1) Capturing Phase (2) Targeting Phase
Application HDividedBox ViewStack Panel id="medical" Button label="Submit" Panel id="dental" Button label="Submit" In the above example there are two Submit Buttons one in the medical Panel and the other in the dental Panel. You can imagine an application that has many forms and many Submit Buttons. When the user clicks the Submit Button in the medical Panel, a click event (data type MouseEvent.CLICK) begins its journey within the event framework.

(3) Bubbling Phase

(1) Capturing Phase:


The first part of the event flow is called the capturing phase. This phase comprises all of the nodes from the root node to the parent of the target node. During this phase, Flash Player examines each node, starting with the root and stops after it reaches the target node's parent. The capture phase works from the outermost component downward toward the Button. This means the click event is first given to the Application to handle. If the click event is not consumed by the Application, it is given to the HDividedBox. It is then given to the ViewStack and then to the medical Panel (2) Targeting phase: The second part of the event flow, the targeting phase, consists solely of the target node. Flash Player sets the appropriate values on the Event object, checks the target node for registered event listeners, and then calls those listeners (3) Bubbling phase: The third part of the event flow, the bubbling phase, comprises all of the nodes from the target node's parent to the root node. Starting with the target node's parent, Flash Player sets the appropriate values on the Event object and then calls event listeners on each of these nodes. Flash Player stops after calling any listeners on the root node. 5. What is stopPropagation() and stopImmediatePropagation()? Difference between stopPropagation and stopImmediatePropagation()? How to stop the event flow/ event phases? (OR) (OR)

stopPropagation: Prevents processing of any event listeners in nods subsequent to the current node in the event flow. This method does not affect any event listeners in the current node (current target).
stopImmediatePropagation: Prevents processing of any event listeners in the current node and any subsequent nodes in the event flow. This method takes effect immediately and it affects event listeners in the current node. 6. What is clone() method?

Clone method creates duplicate copy of the event class. This method is executed automatically when the event is redispatched in the event listeners.
7. What is preventDefault () method? To cancel the default behaviour of the event. The methods of the Event class can be used in event listener functions to affect the behaviour of the event object. Some events have an associated default behaviour. For example, the doubleClick event has an associated default behaviour that highlights the word under the mouse pointer at the time of the event. Your event listener can cancel this behaviour by calling the preventDefault () method.

PreventDefault () method will work only if Cancellable property is true, otherwise its not working. 8. What is the difference between Target and Current Target? Target: The object that dispatched the event (doesnt change). Target will not change. Current Target: The object who is currently being checked for specific event listeners (changes). Current target is keep on change. 9. How to create Custom Events? Explain the steps to create a new custom event?

10. How to enable capturing or Targeting and Bubbling Phases? 11. How to execute only Targeting phase listeners? 12. Tell me arguments of addEventListener() method?

addEventListener (type: string, listener: function, useCapture: Boolean=false, priority:int=0, useWeakReference:Boolean=false):void


type: Type of Event(MouseClick, MouseOver) listener: Its a function useCapture(dfault:false): If True: Enable only Capturing Phase

Flase: Enable Targetting and Bubbling Phase.


Priority(int=0): The priority level of the listener. The higher the number the higher the

priority.
useWeakReference(default =false): whether the reference to the listener is strong or weak. A

strong reference (default) preventing your listener from being garbage-collected, a weak reference does not.
13. Explain about cairngorm architecture

Cairngorm is an implementation of several design patterns that form a lightweight architectural framework. Cairngorm follows the principle of separating the view and business logic which is known as the Model-View-Controller pattern (MVC). The Pieces of Cairngorm: Model Locator, View, Front Controller, Command, Delegate and Service

Model Locator: Stores all of your applications Value Objects (data) and shared variables, in one place. Similar to an HTTP Session object, except that its stored client side in the Flex interface instead of server side within a middle tier application server. View: One or more Flex components (button, panel, combo box, Tile, etc) bundled together as a named unit, bound to data in the Model Locator, and generating custom Cairngorm Events based on user interaction (clicks, rollovers, drag n drop.) Front Controller: Receives Cairngorm Events and maps them to Cairngorm Commands. Command: Handles business logic, calls Cairngorm Delegates and/or other Commands, and updates the Value Objects and variables stored in the Model Locator Delegate: Created by a Command, they instantiate remote procedure calls (HTTP, Web Services, etc) and hand the results back to that Command. Service: Defines the remote procedure calls (HTTP, Web Services, etc) to connect to remote data stores.

14. Advantages and disadvantages of Cairngorm Framework?

Advantages:
(1)Multiple handlers for a single event.

DisAdvantages:

The ModelLocator can get huge and unwieldy; depending on how large your application is and how much data it keeps. To resolve this, I have seen using more than one ModelLocator to separate, say, the business data from the presentation data. But it still wont be fun to handle merge conflicts with everyone updating it, if youre in a large team. Extending the CairngormEvent for each event to encapsulate the event name ID and data was not too pleasant. I would imagine its easy to end up with duplicate event IDs in a large application (which is why a naming convention would be vital). I suppose you can create a generic Cairngorm event, but the data parameters wouldnt be type-checked. Lastly, I wasnt in favor of referencing the ModelLocator in all of my Flex components. I favored passing a data reference from a parent component to keep my view components as reusable and un-Cairngorm-ish as possible. 15. Difference between Cairngorm Event and Flex Event?

Cairngorm Event is not a bubbled event and it can be understand by only flex commands. Flex events can be dispatched by every component in Flex.
16. How to add two commands to one single event type?

Sequence Command is used to add multiple commands to one event type.


17. Should Model Locator as a singleton class? can't we instantiate this class as like normal

class? You can call as a normal class because constructor is public.


18. What is Singleton class? Explain the steps to create a Singleton class?

The singleton pattern is a design pattern that is used to restrict instantiation of a class to one object. If we create the class as a singleton then no way to create more than one instance. But, we can get that single instance in any number of classes. So all the classes will share the same properties and behaviours of that singleton object. Steps to create a Singleton class: Consider the MySingleTon class as a singleton class. package { public class MySingleTon { // Single Instance of Our MySingleTon private static var instance:MySingleTon; //DEFINE YOUR VARIABLES HERE public function MySingleTon (enforcer:SingletonEnforcer) { if (enforcer == null) { throw new Error( "You Can Only Have One MySingleTon");

} } // Returns the Single Instance public static function getInstance() : MySingleTon { if (instance == null) { instance = new MySingleTon ( new SingletonEnforcer ); } return instance; } } } // Utility Class to Deny Access to Constructor class SingletonEnforcer {} 1). We should create one static variable. It will be called "instance" and it will be of type MySingleTon. This will be the variable where we will store our one instance of our class. 2). Then we should create one constructor. The constructor takes one argument "enforcer". You will notice that this "enforcer" has a type of "SingletonEnforcer" which is defined directly after our class. Here is the logic behind that: When you put a class in an ActionScript file below the main class, it is only available to that class.

If the constructor requires this argument then only our main class can create an instance of itself, because we do not have access to the SingletonEnforcer class. Only the main class has this access.

We will not access our class in the normal way by using the new statement because we cant call the constructor. Once we get inside of the constructor, we have a few lines that make sure things work as planned. The if statement ensures that we had a valid enforcer passed in. If there wasnt it throws an Error stating that You Can Have Only One MySingleTon. 19. Explain about Blaze Ds and Blaze DS services?

BlazeDS provides a set of services that lets you connect a client-side application to server-side data, and pass data among multiple clients connected to the server. BlazeDS implements real-time messaging between clients.

Blaze DS services: (1) HTTP Service (2) Webservice (3) Remote Object

HTTP Service: HTTP Service components to interact with JSPs, Servlets and ASP Pages that are not available as Webservice or remoting services destinations. <mx:HTTPService id=myService url=http://localhost:8400/middlejava/LoginServlet result=resultHandler(event) fault=faultHandler(event) method=Get/> Webservice: Webservice components let you access webservices, which are software modules with methods. Webservices methods are commonly referred to as operations. Webservice interfaces are defined by using XML. Flex application can interact with webservices that define their interfaces in a Webservices Description Language (WSDL) document, which is available as a URL. WSDL is a standard format for describing the messages that a webservice understands the format of these responses to those messages. <mx: WebService id=Webservice wsdl=http://search.yahoo.com/searchservice?wsdl result=resultHandler (event) fault=faultHandler (event) method=Get/> Remote Object: Remote object components let us access the methods of server side java objects, without manually configuring the objects as webservices. We can use remote object components in MXML or ActionScript. We can use RemoteObject components with a standard alone BLAZE DS web application or macromedia ColdFusion MX from Adobe.
20. Explain the configuration details of Blaze DS?

(1) (2)

Add BlazeDS JAR files and dependent JAR files to the WEB-INF/lib directory from BlazeDS project. Add BlazeDS configuration files in the WEB-INF/flex directory from BlazeDS project.

(3)

Define Message Broker Servlet and a session listener in WEB-INF/web.xml from BlazeDS project The Blaze DS uses four main configuration files namely:

Services-config.xml: The top level Blaze Ds configuration file, this file usually contains
security constraints, channel definitions and logging settings that each of the services can use.

Remoting-config.xml: The remoting service configuration file, which defines remoting


service destinations for working with remote objects.

Proxy-config.xml : The proxy service configuration file which defines proxy service
destinations for working with webservices and HTTP Service (REST Services)

Messaging-config.xml: The messaging service configuration file, which defines messaging


service destinations for performing publish subscribe messaging. 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)


Remote Objects specifies named or unnamed sources. This service connects to an AMF(Action Message Format) Gateway

HTTP Service/Web Service


These services use named or raw URLs These services connect to an HTTP Proxy Gateway. HTTP Service use HTTP protocol/requests Web Services use SOAP (Simple Object Access Protocol). These services transfer data in XML format. This is slow.

AMF protocol transfers data in a binary format, so the data can be moved across the network more quickly. Remote Service automatically serializes Here the data transfer is in XML only. 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

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 o LIFE o Invalidation, validation, interaction Construction, configuration, attachment, initialization

DEATH o Detachment, garbage collection

28. Explain about Application life cycle? 29. Explain about the custom components method?

(OR) 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? 33. Can we use Text Input/Editable component as Item Renderer?

Yes, 34. What are all the events dispatched in Item Editor? Item Edit Beginning, Item Edit Begin, Item Edit End 35. What are the collections classes available in Flex? Array Collection, XML List Collection, Grouping Collection. 36. 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.
37. How to get/retrieve an item from Array?

38. What type of skinning is available in Flex? Graphical skinning, Programmatic Skinning and Stateful skinning. Graphical Skins: Images that define the appearance of the skin. These images can JPEG, GIF, or PNG files, or they can be symbols embedded in SWF files. Typically you use drawing software such as Adobe Photoshop or Adobe Illustrator to create graphical skins. Programmatic Skins: Action Script or MXML classes that define a skin. To change the appearance of controls that use programmatic skins, you edit an Action Script or MXML file. You can use a single class to define multiple skins. Sateful Skins: A type of programmatic skin that uses view states, where each view state corresponds to a state of the component. The definition of the view state controls the look of the skin. Since you can have multiple view states in a component, you can use a single component to define multiple skins.
39. What is the difference between Graphical skinning and Stateful skinning?

Sateful Skins: A type of programmatic skin that uses view states, where each view state corresponds to a state of the component. The definition of the view state controls the look of the skin. Since you can have multiple view states in a component, you can use a single component to define multiple skins.
40. What is CSS (Cascading Style Sheet)?

Cascading Style Sheets (CSS) are used in Flex to apply styles to visual components on the application display list. CSS is a standard for encapsulating the code that makes up the

design of an Application. Given the power and maturity of CSS, most experienced Web designers/developers strive to implement as much of the design and layout properties of a Web site/application in CSS as possible. The result is much greater control and flexibility over the look and feel of the site. Some features of CSS Global: styles applied to all the components. Type selector: Applied to particular type of components in entire project. Style Name selector: Applied to only one component by specifying the Style Name property.
41. Difference between SWC and SWF file?

SWC file is a library file and SWF file is a runnable file. We will copy to Flex Projects libs folder. SWC is what you use when you're looking for a library to compile into your app. You have access to the classes and can import individual parts. SWF is more likely what you're looking for when embedding graphics.
42. Difference between Label and Text?

Label: If you explicitly size a label control so that it is not large enough to accommodate it's text the text is truncated and terminated by an ellipsis(...) Text: Here the text is displayed in new lines.
43. What is Shared Object? (OR) How to store the data in local?

Shared objects function like browser cookies. The SharedObject class to store data on the user's local hard disk and call that data during the same session or in a later session. Applications can access only their own SharedObject data and only if they are running on the same domain. The data is not sent to the server and is not accessible by other Adobe Flex applications running on other domains, but can be made accessible by applications from the same domain. Public var so : SharedObject = SharedObject.getLocal("mySO"); so.data.fName = "Ram Kishoore";
44. What is over loading? Is method over loading possible in Flex? No. Method overloading is not supported in Action Script3.0. 45. What is method overriding?

override a method of a base class in your ActionScript component. To override the method, you add a method with the same signature to your class, and prefix it with the override keyword 46. What is composition?

Making use of the already created class functionality or behaviour by instantiating the class and calling the required methods.
47. Difference between String and String Buffer?

String is immutable and String Buffer is mutable. String class creates new instance for any method but String Buffer updates/modifies same instance.
48. What is serialization?

Object can be represented as sequence of bytes that includes the object's data as well as information. Transfer of data from client to the server like sending the Java objects from Java to Flex.
49. What are the differences between 4.6/4.5/4.0 and Flex 3.0?

4.5 and 4.6 are used for developing mobile based applications. 4.6 has few new components. 4.0: 1) Spark components have been introduced. Component logic and appearance has been separated. Appearance of the components is specified in skins. 2) FXG 3) FTE (Flash Text Engine) 4) States changed 5) Effects changed
50. Difference between Flash and Flex?

Flash is used by the designers. Flex is used by the developers. Flash uses only Flash Player API but Flex uses both Flash Player API and Flex SDK library also. like datavisualization.swc, automation.swc, rpc.swc. In flash no coding only designing. In flex you can create big projects.
51. Difference between Sealed Class and Dynamic class?

Sealed Class
A sealed class possesses only fixed

Dynamic Class
A dynamic class defines an object that can be

set of properties and methods that were defined at compile time. Additional properties and methods cannot be added at runtime. This enables strict compile time checking.

altered at run time by adding or changing the properties and methods.

It doesnt enable strict compile time checking.

It also improves memory usage. It consumes more memory because it requires Because it doesnt require an internal an internal hash table for each object hash table for each object instance. instance. All classes in Action Script 3.0 are sealed classes by default. You can create dynamic classes by using the dynamic attribute when you declare a new class.

52. Difference between Data Grid and Advanced Data Grid?

(1) Advance Data Grid allows sort by multiple column when you click in the column header. DataGrid allows only single column sort.
(2) Styling rows and columns: Use the style function property to specify a function to

apply styles to rows and columns of the controls. (3) Display Hierarchical and Grouped Data: Use an expandable navigation tree in a column to control the visible rows of the control. (4) Creating Column Groups: Collect multiple columns under a single column heading.
(5) Using Item Renderers: Span multiple columns with an item renderer and use multiple

item renderers in the same column.


53. Explain about Modules?

Modules are classes just like application files. You can create them either in ActionScript or by extending a Flex class by using MXML tags. You can create modules in MXML and in ActionScript. Modules are dynamically loadable SWF that contains an IFlexModuleFactory class factory. They can be loaded if application requires loading these module and they can be unloaded when application no longer needs a module. These modules cannot be run independently of an application. An MXML-based module file's root tag is <mx:Module>. Creating MXML-based modules To create a module in MXML, you extend the mx.modules.Module class by creating a file whose root tag is <mx:Module>. In that tag, ensure that you add any namespaces that

are used in that module. You must also include an XML type declaration tag at the beginning of the file: <?xml version="1.0"?> After you create a module, you compile it as if it were an application. After you compile a module, you can load it into an application or another module. Typically, you use one of the following techniques to load MXML-based modules: ModuleLoader -- The ModuleLoader class provides the highest-level API for handling modules. For more information, see Using the ModuleLoader class to load modules. ModuleManager -- The ModuleManager class provides a lower-level API for handling modules than the ModuleLoader class does. For more information, see Using the ModuleManager class to load modules.

Creating ActionScript-based modules To create a module in ActionScript, you can create a file that extends either the mx.modules.Module class or the mx.modules.ModuleBase class. Extending the Module class is the same as using the <mx:Module> tag in an MXML file. You should extend this class if your module interacts with the framework; this typically means that it adds objects to the display list or otherwise interacts with visible objects. To see an example of an ActionScript class that extends the Module class, create an MXML file with the root tag of <mx:Module>. When you compile this file, set the value of the keep-generated-actionscript compiler property to true. The Flex compiler stores the generated ActionScript class in a directory called generated. You will notice that this generated class contains code that you probably will not understand. As a result, you should not write ActionScript-based modules that extend the Module class; instead, you should use MXML to write such modules. If your module does not include any framework code, you can create a class that extends ModuleBase. If you use the ModuleBase class, your module will typically be smaller than if you use a module based on the Module class because it does not have any framework class dependencies. The following example creates a simple module that does not contain any framework code and therefore extends the ModuleBase class: // modules/asmodules/SimpleModule.as package { import mx.modules.ModuleBase; public class SimpleModule extends ModuleBase { public function SimpleModule() { trace("SimpleModule created"); }

public function computeAnswer(a:Number, b:Number):Number { return a + b; } } } To call the computeAnswer() method on the ActionScript module
54. What is RSL (Runtime Shared Library)? One way to reduce the size of your applications' SWF files is by externalizing shared assets into stand-alone files that can be separately downloaded and cached on the client. These shared assets can be loaded and used by any number of applications at run time, but must be transferred only once to the client. These shared files are known as Runtime Shared Libraries or RSLs. If you have multiple applications but those applications share a core set of components or classes, clients can download those assets only once as an RSL rather than once for each application. The RSLs are persisted on the client disk so that they do not need to be transferred across the network a second time. The resulting file size for the applications can be reduced. The benefits increase as the number of applications that use the RSL increases. Flex applications support the following types of RSLs:

Standard RSLs -- A library of custom classes created by you to use across applications Cross-domain RSLs -- A library of custom classes, like standard RSLs, with the

that are in the same domain. Standard RSLs are stored in the browser's cache.

difference being that they can be loaded by applications in different domains and subdomains. Cross-domain RSLs are stored in the browser's cache.

Framework RSLs -- Precompiled libraries of Flex components and framework classes

that all applications can share. Framework RSLs are precompiled for you. 55. How to call Java Script from Action Script and Action Script from Java Script? (OR) How do you call Java Script from flex and flex from Java Script? From Action Script you can directly call any JavaScript function on the HTML page, passing any number of arguments of any data type, and receive a return value from the call. Similarly, from JavaScript on the HTML page you can call an Action Script function in Flash Player and get a return value. Calling Java script methods from Action script: Syntax: ExternalInterface.call( methodName:String, [parameter1:Object]) The parameters have the following meanings: MethodName: The name of a JavaScript function to call

parameter1: Any parameters to be passed to the function; you can specify zero or more parameters, separating them by commas Accessing Flex from Java script: You can call Flex methods from your enclosing wrapper by using the ExternalInterface API. You do this by adding a public method in your Flex application to a list of callable methods. In your Flex application, you add a local Flex function to the list by using the addCallback() method of the ExternalInterface API. This method registers an Action Script method as callable from the JavaScript or VBScript in the wrapper. Syntax: addCallback(function_name:String, closure:Function):void The function_name parameter is the name by which you call the Flex function from your HTML page's scripts. The closure parameter is the local name of the function that you want to call. This parameter can be a method on the application or an object instance. 56. What is the use of Arraycollection filter function?

filterFunction: Function [read-write] A function that the view will use to eliminate items that do not match the function criteria. A filter function is expected to function (item: Object): Boolean When the return value is true if the specified item should remain in the view. If a filter is unsupported, flex throws as error when accessing this property. We must call refresh () method after setting the filter function property for the view to update.

57. What is CallLater () method?

The callLater () method queues an operation to be performed for the next screen refresh, rather than in the current update. Without the callLater () method, you might try to access a property of a component that is not yet available.
Syn:

callLater(method:Function, args:Array):void

Ex: We have a button click event that loads data from a XML file or a webservice. That loading of data would probably have another resultHandler which will wait for the loading to finish. And meanwhile your button click handler might be doing some other things so in these situations we can use callLater.
58. Advantages of Adobe Flex? (1) Complete browser portability: any browser that supports flash player and that includes

almost every browser.

(2) Strong backend connectivity: from its inception, flex has featured excellent support

for popular backend technologies such as the java and dot Net. (3) Streaming: flex offers excellent support for streaming binary data. Heavy allocations that needs to transfer large amount of data to the end user. (4) Asynchronous: Asynchronous request/response model. Flex offers complete support for asynchronous processing of user requests.
(5) SVGs (Scalable Vector Graphics): flex stands out from most other RIA-based

technologies because it supports vector-based drawing and direct embedding of SVG mark-up files. SVG based images look equally good at any resolution a given browser supports. (6) Security and Rich User Interfaces: Robust security flex leverages the highly tested flash player security. RUI, flex benefits from halo skins, gradient fills, vector graphics and other flash player features
59. Difference between view stack and view states? States View Stack This is used to change view of a single container This is used to switch between different itself. containers for a single view. This should be used when you just want to add or This is used where there is a complete change in remove a few components based on certain the controls used. conditions. Login/Registration/Forgot password is the best TabNavigator, TabBar, LinkBar etc are the best example for using the states as each page will examples. either add or remove to the already existing one.

Vous aimerez peut-être aussi