Flex is a tool for generating scanners. A scanner, sometimes called a tokenizer, is a program which recognizes lexical patterns in text. The flex program reads user-specified input files, or its standard input if no file names are given, for a description of a scanner to generate.

The description is in the form of pairs of regular expressions and C code, called rules. Flex generates a C source file named, “lex.yy.c”, which defines the function yylex(). The file “lex.yy.c” can be compiled and linked to produce an executable. When the executable is run, it analyzes its input for occurrences of text matching the regular expressions for each rule. Whenever it finds a match, it executes the corresponding C code.

Key Features of Flex:

Efficient Programming Model

Developers write Object Oriented code using the ActionScript 3, MXML, and CSS languages. These languages are easily learned by programmers from many different backgrounds such as Java, PHP, C#, HTML, and JavaScript. Flex supports a component-oriented programming model that allows developers to easily assemble applications from hundreds of components and extend base components to create custom interactions.

Developer Tools

The Flex SDK includes a compiler, debugger, and hundreds of out of the box components. Using these tools from IDEs, the command line, or from build tools like Ant, code is compiled into cross-platform applications.

In addition to the free SDK, Flex developers can use Flash Builder to build applications. Flash Builder is an IDE for Flex development built on top of Eclipse. It includes a Design View and a sophisticated code view featuring code completion, smart editing and code refactoring. Flash Builder also includes a visual debugger, a visual profiler, a network monitor, and a Services view with service introspection.

Server Integration

Flex applications run on the client either in a browser with Flash Player, on the desktop with Adobe AIR, or on mobile devices. To access back-end databases and other systems Flex has numerous networking APIs supporting everything from plain XML, JSON, SOAP Web Services, and optimized protocols like AMF.

Runtime Consistency

The Flex source code (.mxml and .as files) is compiled into Flash bytecode (.swf) that is executed at the client side by the ActionScript Virtual Machine in Flash Player or Adobe AIR.

The Flash Platform runtimes, Flash Player and Adobe AIR, are cross-platform runtimes that work consistently on a variety of hardware, operating systems, and browsers.

Plentiful Components

The Flex SDK contains hundreds of out-of-the-box components. DataGrids, Charts, Formatters, Validators, and numerous other UI controls are the building blocks for applications of all sizes. Components can be styled and skinned to fit the look and feel you want. There are also hundreds of third party open source and commercial components available for Flex. Mapping APIs, Data Visualization libraries, and Cloud APIs provide the building blocks for assembling great applications. Check out Tour de Flex to see many of the available components for Flex.

Outstanding Performance

By doing data visualization and UI interactions on the client-side less time is spent waiting for a server to respond. This offloading and client-side state handling makes back-ends more scalable and efficient. Interactions like filtering and sorting no longer need to round-trip all the way to the server or database. This makes software more responsive and easier to use.

Download Free Flex

Post By Gishore J Kallarackal (2,121 Posts)

Gishore J Kallarackal is the founder of techgurulive. The purpose of this site is to share information about free resources that techies can use for reference. You can follow me on the social web, subscribe to the RSS Feed or sign up for the email newsletter for your daily dose of tech tips & tutorials. You can content me via @twitter or e-mail.

Website: → Techgurulive