This question may be a little naive, but I am interested in why one
would choose to use Hibernate with FDMS? Would it be possible to do
Cairngorm/FDMS/MySQL or would Hibernate be required? I am not
familiar with Hibernate so I don't completely understand the assets
it brings to the application design.
This brings up a broader, yet more specific, question:
How hard it it to bring in these elements (such as FMDS & hibernate)
later on in the development process?
Specifically, I am trying to migrate/redesign a large, rather
unorganized Flash MX 2004 RIA to Flex and in the process would like
to adhere to a more strict MVC (Cairngorm) approach. My goal is to
eventually provide the type of data management (sync conflicts,
messaging, etc...) that FDS/FMDS provide however, I am a little
concerned about biting off more than I can chew at this point.
Currently my application uses AMFPHP & MySQL which obviously is a far
cry from FDS and thus not only would I be migrating from Flash to
Flex, but also from PHP to Java ( am I crazy?!)
Is there a middle ground? Is it possible for me to focus on the Flex
side of things and keep my server code in PHP using webORB (or
AMFPHP) and then, down the road migrate the server code from PHP to
Java and implement FDS & FDMS? OR am I making a mistake to not
implement these services now when I am completely rewriting the code
anyway? Will it be a HUGE amount of work to try to incorporate FDMS
after the fact...?
I realize that this may be a very specific question, however, I would
guess there are probably others out there who come from a AMFPHP
Flash Remoting background and would now like to take advantage of FDS
but are a little wary of tackling the learning curve of Flex, AS3,
FDS & Java!
Thanks for all your input. I am just beginning the redesign of this
application and the postings on this list have really helped me. I
am planning on blogging my redesign process for those who are
interested in my trials. I will post the URL when I set up the blog.
- Kevin
On Nov 25, 2006, at 6:31 PM, Douglas McCarroll wrote:
Hi All,
I'm attempting to create a Cairngorm/FDMS/Hibernate/MySQL example
program which I'll publish to the community once completed. I used the
MySQL Sakila sample DB (pared down to 3 tables - Film, Actor &
FilmActor
- at present) and used HibernateTools to reverse engineer the
requisite
Java and Hibernate files. So far, so good. I've even managed to
successfully write corresponding .as files and implement the
beginnings
of a Cairngorm front end.
And it works. Kind of.
The problem is that the persistence layer takes forever to load, even
though the 3 tables only have hundreds or thousands of records each.
I've temporarily pared them down considerably (to 100, 100 & 500
records) and the program now loads quickly enough that I can continue
development work, but the performance issue needs to be addressed.
It's fairly easy to see what the problem is. Here's a picture of the
variable window that depicts the situation in all its glory:
http://www.brightworks.com/technology/tech_questions/
hibernate_lazy_associations/deeply_nested_actors_and_films.jpg
Beautiful, isn't it?? :-)
In other words, every actor references all films that the actor is
in...
And each of these films references all actors in the film...
And each of these actors references all films that the actor is in...
And each of these films references all actors in the film...
Etc, etc, etc, etc, etc.....
I wonder how many levels deep this goes? The program doesn't hang so I
assume that Flex puts a stop to it at some point...
Anyway, I'm assuming that the solution is to implement lazy
associations. My understanding is that Hibernate does lazy
associations
by default, so once I set up my destinations properly all will be
well.
But despite several attempts, I keep getting error messages.
Could one of the Hibernate gurus that inhabits this list point me
in the
correct direction?
The DB's schema is outlined here:
http://www.brightworks.com/technology/tech_questions/
hibernate_lazy_associations/index.html
And all relevant code, plus my latest error message, is here:
http://www.brightworks.com/technology/tech_questions/
hibernate_lazy_associations/code.txt
I assume that my problem is in data-management-config.xml, but I'm new
to all of this and could be doing other things wrong as well.
TIA!
Douglas
-------------------------------------------------
Douglas McCarroll
CairngormDocs.org Webmaster
http://www.CairngormDocs.org
Flex Developer
http://www.brightworks.com
617.459.3840
-------------------------------------------------