One question that developers often ask when they see Flex for the first time is: “how do I write a database application?”
The answer to this question is typically: You use an HTTPService, WebService, or RemoteObject to connect to a server-side component that provides an API to manipulate your data. This approach provides infinite possibilities, but it makes the assumption that you already have that entire backend infrastructure in place. If you don’t, and all you want to do is build a rapid prototype or a simple application, this might look like a lot of work.
In addition to the RPC services mentioned above, the Flex Data Management Services (FDMS) provide a virtually code-free approach to synchronize data between the client application and the middle-tier. That takes care of 50% of our challenge: no data synchronization code to write at the client-side.
FDMS also provides a pluggable adapter and assembler architecture to handle changes at the server-side. As an example of writing a generic assembler, I built a simple JDBC assembler that allows you to develop rapid prototypes and basic database-driven applications without writing a single line of server-side code. All you need to do is specify the database connection information and the table you want to work with in data-management-config.xml.
This assembler is by no means a full featured solution, but it shows the power and flexibility of the FDMS architecture: you could easily extend its capabilities, or build other generic assemblers for existing persistence solutions (a Hibernate assembler is already shipping with the product).
The point is that if FDMS provides a solid architecture to handle the most complex persistence scenarios (with virtually no data synchronization code at the client side), with the addition of specialized assemblers, it can also provide simple solutions to simple use cases, significantly improve your productivity, and deliver end-to-end code-free persistence.
Installing the SimpleJDBCAssembler:
To use the SimpleJDBCAssembler, you need to install the Flex Data Services. If you haven’t already done so, you can download the Flex Data Services here, and follow the installation instructions.
Download jdbcassembler.zip here and expand it in your root directory (the files will be unzipped in a directory called jdbcassembler)
Copy SimpleJDBCAssembler.class in {context-root}\WEB-INF\classes\flex\samples\assemblers. For example, if you installed the integrated server, copy SimpleJDBCAssembler.class in \fds\jrun4\servers\default\samples\WEB-INF\classes\flex\samples\assemblers.
Running the sample application:
Copy the \jdbcdemo directory in the context root of your web application. For example, if you installed the integrated server, copy the \jdbcdemo directory in \fds\jrun4\servers\default\samples.
Open {context-root}\WEB-INF\flex\data-management-config.xml and add the following destination:
This example uses an embedded HSQLDB database. Make sure hsqldb.jar is available in the classpath of your web application. For example in {context-root}\WEB-INF\lib. If you are using another database, make sure the JDBC driver for that database is in the classpath of your web application.
Start the server
Access http://localhost:8700/samples/jdbcdemo/simpleclient.mxml. (Change the port number and the context root as appropriate). This is a basic client built with just a few lines of code. You can edit the data inside the datagrid.
Access http://localhost:8700/samples/jdbcdemo/app.mxml. (Change the port number and the context root as appropriate). This is a slightly more sophisticated client. You edit data in a separate form.
Also notice that changes are pushed in real time to all the clients connected to a destination. For example, open the application in two browser sessions, change some data in one session, and notice that the changes are automatically pushed to the second session.
I’d highly recommend taking a look at the X2O Framework (www.x2oframework.com).
It’s a web-based data modeling platform that generates the server-side infrastructure (database, server-side, web services) as well as generated AS3 value objects. You don’t have to do any rpc or remoting integration. Instead, it lets you focus on Flex programming and have all your data management there.
I’d highly recommend taking a look at the X2O Framework (www.x2oframework.com).
It’s a web-based data modeling platform that generates the server-side infrastructure (database, server-side, web services) as well as generated AS3 value objects. You don’t have to do any rpc or remoting integration. Instead, it lets you focus on Flex programming and have all your data management there.
hi
Plz send me sample examples of database connectivity with oracle/db2 using flex>also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
my email arathy@mediainteractive.in
hi
Plz send me sample examples of database connectivity with db2 using flex>also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
my email arathy@mediainteractive.in
hi
Plz send me sample examples of database connectivity with oracle/db2 using flex>also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
Why do you have to be like MAcGyver to get flex to do anything. You know Adobe better get this data connection thing user friendly or Silverlight will surpass them for these type of projects. I should be able to go to the “Choose Data Source” feature in Flex, choose my server and database then flex needs to create the needed classes to make this work. I shouldnt need to got to useless blog after another to onlt hit more dead ends.
How to connect to MS-SQL database and to retrive data ie a row and display it in the flex application please provide the code for the java dao and the flex part.
How to connect to MS-SQL database and to retrive data ie a row and display it in the flex application please provide the code for the java dao and the flex part.
hi
Plz send me sample examples of database connectivity with MYSQL using java flex builder 3 also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
hi
Plz send me sample examples of database connectivity with MYSQL using java flex builder 3 also send me the steps for connectivity and the required components. hear attach my mail id : vimal071982@gmail.com
[...] Questions About Enterprise Development Bruce Eckel :: Hybridizing Java Christophe Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS adapter Christophe Coenraets :: Flex Test Drive Server for [...]
[...] Questions About Enterprise Development Bruce Eckel :: Hybridizing Java Christophe Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS adapter Christophe Coenraets :: Flex Test Drive Server for [...]
[...] Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS [...]
[...] Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS [...]
[...] Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS [...]
[...] Questions About Enterprise Development Bruce Eckel :: Hybridizing Java Christophe Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS adapter Christophe Coenraets :: Flex Test Drive Server for [...]
[...] Application - riapedia.com Need a ColdFusion Based FLEX Application Example – mail-archive.com Building database-driven Flex applications without writing (Client- or server-side) code – coenraets.org FLEX Applications Showcase Gallery – flexexamples.blogspot.com Help with simple [...]
73 Comments
hi we are planned to take seminar About the FLEx topic can you give the procedure to do the application(Sample Project) in Flex 3.0
Thanks ….
ThankS a lot ;)
ThankS good ;)
I’d highly recommend taking a look at the X2O Framework (www.x2oframework.com).
It’s a web-based data modeling platform that generates the server-side infrastructure (database, server-side, web services) as well as generated AS3 value objects. You don’t have to do any rpc or remoting integration. Instead, it lets you focus on Flex programming and have all your data management there.
I’d highly recommend taking a look at the X2O Framework (www.x2oframework.com).
It’s a web-based data modeling platform that generates the server-side infrastructure (database, server-side, web services) as well as generated AS3 value objects. You don’t have to do any rpc or remoting integration. Instead, it lets you focus on Flex programming and have all your data management there.
hi
Plz send me sample examples of database connectivity with oracle/db2 using flex>also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
my email
arathy@mediainteractive.in
hi
Plz send me sample examples of database connectivity with db2 using flex>also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
my email
arathy@mediainteractive.in
hi
Plz send me sample examples of database connectivity with oracle/db2 using flex>also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
Why do you have to be like MAcGyver to get flex to do anything. You know Adobe better get this data connection thing user friendly or Silverlight will surpass them for these type of projects. I should be able to go to the “Choose Data Source” feature in Flex, choose my server and database then flex needs to create the needed classes to make this work. I shouldnt need to got to useless blog after another to onlt hit more dead ends.
How to connect to MS-SQL database and to retrive data ie a row and display it in the flex application please provide the code for the java dao and the flex part.
Is this database access solution working with Air?
How to connect to MS-SQL database and to retrive data ie a row and display it in the flex application please provide the code for the java dao and the flex part.
hi
Plz send me sample examples of database connectivity with MYSQL using java flex builder 3 also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
hi
Plz send me sample examples of database connectivity with MYSQL using java flex builder 3 also send me the steps for connectivity and the required components. hear attach my mail id : vimal071982@gmail.com
how are you melisa
good demo admin..
mirc sohbet
thank you For admin…!
Thank for this nice informative article.
Well done and good luck with your very great work thanks
THANK YOUR
thanks for information
Flextrine is a Flex/PHP based ORM library that allows rapid developer of database enabled Flex apps (www.flextrine.com)
13 Trackbacks
[...] Questions About Enterprise Development Bruce Eckel :: Hybridizing Java Christophe Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS adapter Christophe Coenraets :: Flex Test Drive Server for [...]
[...] Questions About Enterprise Development Bruce Eckel :: Hybridizing Java Christophe Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS adapter Christophe Coenraets :: Flex Test Drive Server for [...]
[...] Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS [...]
[...] Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS [...]
[...] Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS [...]
[...] Questions About Enterprise Development Bruce Eckel :: Hybridizing Java Christophe Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS adapter Christophe Coenraets :: Flex Test Drive Server for [...]
[...] Christophe Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code [...]
[...] Application - riapedia.com Need a ColdFusion Based FLEX Application Example – mail-archive.com Building database-driven Flex applications without writing (Client- or server-side) code – coenraets.org FLEX Applications Showcase Gallery – flexexamples.blogspot.com Help with simple [...]
[...] Building database-driven Flex applications without writing (Client- or server-side) code – coenraets.org [...]
[...] Building database-driven Flex applications without writing (Client- or server-side) code – coenraets.org [...]
[...] Building database-driven Flex applications without writing (Client- or server-side) code – coenraets.org [...]
[...] Building database-driven Flex applications without writing (Client- or server-side) code – coenraets.org [...]
[...] Building database-driven Flex applications without writing (Client- or server-side) code – coenraets.org [...]