7.5. Flex and Hibernate Integration Expectations
This section focuses on what should be expected when integrating Flex and JPA or Hibernate and not what is necessarily present in the adapters today. It attempts to put together a set of requirements that could be used as the starting point to evaluate adapters and solutions that make Flex and JPA/Hibernate work together smoothly.
For every solution that integrates Flex and JPA or Hibernate, you should consider supporting the following:
Lazy loading
Incremental updating
Adherence to standard JPA and Hibernate semantics
Managed CRUD operations
Minimal dependency
Non-invasive value addition
Lazy loading is by far the most important of the list of expectations. JPA and Hibernate allow you to lazily fetch and load referenced entities, providing performance gains and optimal resource utilization. Say that a person has many friends, where each friend is a person. Logically, each friend, who is a person, will have friends and that way the connected list could go on to an infinite depth. There is popular belief that any two people are only six such links apart. So, let's assume that six links is the maximum depth it can descend to. Now if an initial list of the 100 most connected people is fetched and you desire to have access to their extended network, you have two simple choices in hand:
Either you eagerly fetch the 100 people and their entire networks up to six levels of depth, or
You fetch the 100 people only and do not load anything from ...
Get Professional BlazeDS: Creating Rich Internet Applications with Flex® and Java® now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.