Product Infos
j2flex Präsentation (deutsch)
j2flex Presentation (english)
With Adobe Flex developers can easily create Rich Internet Frontend Applications. LiveCycle Data Services is Adobe’s solution for providing Java based middleware to access Java Classes directly from Flex Frontends. However, Flex Developers still have to program Java to provide backend services for Flex Applications.
Herrlich & Ramuschkat helps saving lots of coding time for backend tasks in Flex Projects. Our j2flex Persistence Framework is 100% Java based and supports all the leading J2EE Application Servers and SQL-Databases. Adobe LiveCycle Data Services provide the connectivity to the Flex Client Applications.
The main concept
In j2flex is something called a “meta database”, an object-oriented data model stored in a relational database system like MS SQL Server or Oracle. This approach allows us to persist pretty complex data definitions very easily and without much hassle, including 1-1, 1-n and n-m relationships. Due to this dynamic persistence schema, new object types (i.e. business entities) can be added to the system pretty easily without modifying the physical database model. Also, it’s super-easy to modify existing object defini-tions. On the other hand, if you already have a full-blown physical database model in place, it’s quite easy to make it work with j2flex. All you have to do is to add OBJ_ID and OBJ_TYPE columns to your physical data model.
Now that you know how data gets persisted in j2flex the next question is what to use to query this “meta database”? Well, SQL of course! Probably the best thing in j2flex’ core engine is the SQL Parser. This allows you to use pseudo-SQL statements to query the database. Why pseudo? Because it is no “real” SQL. The SQL you send to j2flex is parsed on the server side into real SQL before the data is fetched from the database. Why’s that? As said above, when a Contact gets persisted, the real data gets stored in several physical tables. The SQL Parser allows you to query the database as if the Contacts would be stored in a table called CONTACT- This is because when you create a new data type “Contact” a virtual table of that name gets created, think of it as the class name in terms of OOP. So querying all Contacts becomes as simple as
select * from CONTACT
Doesn’t sound too complicated, does it? The neat thing is that with j2flex you can send those queries directly from a Flex client to the server. As they are no real SQL queries there’s no danger of SQL injec-tions as everything gets handled by the SQL Parser. Also, the SQL Parser only allows SELECT statements, so you cannot call INSERT/UPDATE/DELETE on it. To create, update or delete objects (data) you use a special API.
So with j2flex you can directly read data from and save data your database without too much worrying about how this works - and without writing server side code. Just use SQL-Statements inside the Flex Application.
But j2flex also offers a solution for integrating a Flex application into an existing J2EE infrastructure - including mapping the physical data model to the Flex world, dedicated authentication and authoriza-tion, workflow support and much more.
If that’s still not enough, you can easily extend j2flex to meet your needs, either through the Flex/ActionScript 3 or Java API. It conforms to Flex 2 Framework standards, can be used with Cairngorm and gives nice integration with the Data Management Services of LiveCycle Data Services

