INTRODUCTION TO FLEX Sumit Ray Prajyot Rajigare
• What is flex INDEX• Why use flex• What do you code flex apps in• MXML• ActionScript• Flex Component• Flex Events• Pre-requisite for flex developer• Recent Versions Of Flex• Competitors• Advantages• Disadvantages• Final word
WHAT IS FLEXFlex is a framework for creating RIA’s based on flash player.Defining exactly what Flex is can be confusing becauseFlex actually includes a combination ofdifferent technologies.Flex is not a single software product,but instead includes the four main pieces
1. Languages WHAT IS FLEX • ActionScript • MXML2. Component Framework • Flex SDK3. Integrated Development Environment (IDE) • Flex Builder4. Cross-browser runtime • Flash player
WHYTo develop RIA’s USE FLEXClient side IntelligenceCross-platform, accessible applicationsRicher and capable control libraryItll run on all the current browserson all platforms.
WHAT DO YOU CODE FLEX APPS INMXML XML-Based language used to describe UI layout and behaviors of FLEX appsActionScript Object oriented programming language used to write methods in the application
WHAT DO YOU CODE FLEX APPS IN• It is the Heart of Flex MXML• Used to lay out user interface components• Also to declaratively define non-visual aspects of an application, Access to data sources on the server Data bindings between UI components and data sources on the server.
WHAT DO YOU CODE FLEX APPS IN• It is more structured than HTML, and it provides a MXML much richer tag set e.g. data grids, trees, tab navigators, accordions,etc.• You can write an MXML application in a single file or in multiple files• MXML also supports custom components written in MXML and ActionScript files.
WHAT DO YOU CODE FLEX APPS IN• Is the programming language for the flex ACTION SCRIPT• It enables interactivity, data handling• ActionScript is executed by the ActionScript Virtual Machine (AVM).• It is easy to being familiar with AS who has basic knowledge of OOP.
FLEX• Component library provides UI controls COMPONENTS Simple : Buttons, Checkboxes, Radio Buttons Complex : Data grids and combo boxes• Developers use provided components to design complex layouts and use (or modify) the skins for a better look
• Flex applications are event driven FLEX EVENTS• When the user interacts with an interface component or when changes occur in the appearance of a component, an event is dispatched• When an event is dispatched, event listeners, also called event handlers, designed in ActionScript are called on to process the event
PRE-REQUISITE FOR FLEX DEVELOPER• Familiar with Object oriented concepts.• Some exposure to web development and basic knowledge related to web applications• Knowledge of web services using Java / Spring• Knowledge of basic and complex UI Components.
• Flex 1.0 VERSIONS March 2004• Flex 1.5 October 2004• Flex 2.0 June 28, 2006• Flex 3.0 February 25, 2008
VERSIONS• Flex 4 March 22, 2010• Flex 4.5 November 30, 2011• Flex 4.6 February 22, 2012
• OpenLaszlo COMPETITORS• Microsoft Silverlight• Curl• JavaFX
Flex is for everyone, Flex is for all ADVANTAGES Flex applications have boadest reach Cross-platform and native experience Flex makes your application look good Performance Real time Rich media Offline Support Accessible
DISADVANTAGES There is no server-side component to ActionScript so you needto find a way to pass data between Flex and your backend.Flex does not have any built-in support for multithreading,which complicates the situation further Flex does not read or write files to the end-user’scomputer. This is a restriction of the Flash Player. And the most important thing is, weneed adobe flash player to run theapplication.