7.9. Summary

Starting with the object/relational mismatch, this chapter covers a whole gamut of topics that relate to Flex and Java persistence. In a brief exposition, differences between the relational and object-oriented world were considered in the context of granularity, inheritance, polymorphism, relationships, and identity.

Next, the chapter covered the fundamentals of JPA, and Hibernate. JPA was introduced via a complete example. The example itself was rudimentary, but it brought many aspects of configuration, entity definition, annotations, and entity manager to light. If you were a newbie and knew little or nothing about JPA, then this section hopefully brought you up to speed. If you already knew a lot about JPA, then it might have served the purpose of a quick review. After JPA, Hibernate essentials were covered. The coverage of Hibernate was minimal, and almost all of the content was restricted to the core Hibernate features. There was absolutely no discussion of the Hibernate validator, annotations, search, or shards.

Once the fundamentals of Java persistence were covered, the topic of Flex and JPA/Hibernate integration started. The topic started with the demonstration of an anti-pattern, which for some reason has seen some adoption among developers. An example illustrated that eagerly fetching all Hibernate records is not a wise approach. The example was complete in its own right and hopefully acted as a pointer for what might go wrong if you don't use a specialized adapter.

After you were made aware of the problems and the anti-pattern, you came to a section that stated the Flex and Hibernate adapter expectations. This section served the dual purpose of acting as a wish list and a benchmark so that you could see how good the existing adapters are.

After elucidating the expectations, there was an illustration of the key aspects of creating a Flex and Hibernate adapter. The illustration was at a conceptual level and didn't delve into actually writing a complete adapter. That might end up taking a few chapters, if not an entire book on its own.

Once you understood how to write an adapter on your own, you were presented with a couple of existing open source adapter options and made aware of an upcoming alternative. This is where you see fully working examples that support lazy loading and avoid any initialization exceptions.

Finally, there was short but important coverage of data management. The discussion wasn't detailed enough for you to start using data management with Flex, Java, BlazeDS, and Hibernate. In fact, there isn't an option yet from the open source stack that addresses this area. LCDS has robust support for data management and open source alternatives in GraniteDS Tide exist, but there isn't anything there that leverages BlazeDS and Hibernate. However, it's not all gloomy; work on such a piece of open source software has begun!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.131.10