
4D for Flex is the first commercially available component to offer a direct connection between a Flex application and a SQL database. A quick, surefire alternative to makeshift, third-party collaboration techniques often used in large projects, 4D for Flex facilitates direct, intuitive collaboration between 4D developers and Flex developers, quickly and dependably bringing rich interfaces to your users.
Adobe is undoubtedly one of the top names in RIAs (Rich Internet Applications) right now. Flex 3 – the current version of this platform – gives web programmers a suite for creating and controlling interface objects by coupling XML (MXML) with ActionScript (a variant of ECMAScript, just like JavaScript). It’s available free as an open source SDK, or as a commercial IDE (integrated development environment) called Flex Builder, based upon Eclipse. Projects created with Flex can be executed in web browsers using Adobe Flash Player 9, or with the new Adobe AIR desktop runtime – available for most operating systems. Flex’s chief strengths are its wealth of rich interface elements and its extreme consistency between browsers and operating systems.
To learn more about Flex 3, please visit : http://www.adobe.com/products/flex/features/flex3/
Although Flex is widely praised for its graphic and ergonomic qualities, its coupling with professional applications has proven to be relatively complex. It requires a large amount of data flow via Adobe Live Cycle Data Services, or BlazeDS in the open source version. This sort of heavy lifting may be fine for teams accustomed to developing three-tier enterprise applications with, say, J2EE, but it may seem disproportionately complex for those who appreciate the natural simplicity of 4D environments.
"Unlike any other Flex-to-Database connectivity available on the market today, 4D for Flex offers a direct link from Flex to 4D Server v11 SQL. This allows developers to integrate their 4D Server v11 SQL applications directly with Flex RIAs without a need for intermediary software or complicated 3-tier solutions such as J2EE. This simple, direct approach makes 4D for Flex and 4D Server v11 SQL the best match for developers like me."
Julio Carnero
President,
Pascal Information Technology
This is why 4D Web 2.0 Pack offers 4D developers a new, intuitive communication tool, with no prerequisite of intermediary technologies – just Flex. 4D for Flex is the latest step in 4D’s goal to deliver ever more solutions for developers to integrate their applications with emerging technologies.
There have already been existing ways to make a 4D application communicate with a Flex client. The first and most intuitive has been the use of Web Services, used to collaborate with Flash well before the advent of Flex. Thanks to its integrated SOAP server, 4D can return data on-the-fly to a Flex front-end quite easily. It’s also possible to have 4D and Flex communicate on a lower level using plain old XML via http.
These two techniques work in a disconnected mode and are based on XML exchanges, and are therefore suited to more moderate data exchanges.
4D for Flex offers a third option that allows for working in a connected mode, transferring data compactly in a binary format, allowing you to deal with larger-scale projects with much more serious traffic, and to offer more flexible ways to enter and edit data.
The idea behind 4D for Flex is simple: A 4D component library is referenced in a Flex project, and whenever data is requested, a "SQL Service" is invoked, which in turn executes a SQL sequence at the 4D Server level. The returned results are displayed within the interface objects defined by the library (data grids, buttons, etc.), using preconfigured display, navigation, and communication options in conjunction with 4D. Of course, you can also use all of Flex’s native interface elements as well. In fact, all Flex objects that use a data source can natively take advantage of 4D data returned in the "SQLResultSet."
On the 4D server side, only a single operation is necessary: Opening the port reserved for SQL connections (19812 by default). This sole departure from standard web programming (where everything typically passes through port 80) has a major benefit: The 4D database can be used remotely without a single modification to the server, and managing its security is further separated from programming, resting in the sure hands of the 4D administrator.
Immediate communication is thus possible between two worlds that at first seem completey foreign. Flex developers will be able to use remote data provided by 4D, and 4D developers can offer their customers a new interface. It’s all possible thanks to their lingua franca: SQL requests. A team that is otherwise completely heterogeneous can churn out rich clients for their enterprise applications in no time.
The connection protocol between 4D for Flex and 4D is binary, guaranteeing solid data output and a reduced volume of traffic. Moreover, the component offers by default the automatic pagination of records. The result? Not only do you get pretty graphical interfaces, but loads of reliable data, to boot.
Once your data is displayed in the Flex interface, it’s totally manipulable and can be batch-updated thanks to the "Bulk and Modify" function, all in one transaction secured by the "Select for Update" function. To top it off, you can even execute 4D methods and see the results in the Flex environment.
Thanks to the numerous interface controls available, you can create an application that behaves exactly the same in RIA mode as it does as a local client, making life easier for your users. And to really refine your applications, Flex Builder’s debugging functions are complemented by an included Adobe AIR utility (based on 4D for Flex, of course) that allows you to trace all of the exchanges between your Flex application and your 4D database via a dedicated console.
For years, 4D developers have been deploying their singular, unified code in different ways and on different platforms.
4D for Flex, as a completely client-oriented technology, opens the doors for RDAs (Rich Desktop Applications) as well as RIAs (Rich Internet Applications), fully perpetuating the philosophy of write-once/run-just-about-anywhere-you-please.
Your web interfaces will be more faithful to your "heavy client," and with local deployment on AIR, it’s practically like having a remote 4D Runtime!
By connecting your projects with Flex resources, you can continue to serve modern, evolved applications the same way you’ve always been: with the simplicity and value added technology of 4D.
4D for Flex is a part of 4D Web 2.0 Pack v11.