Greetings:

I have been asked to refactor my successfully deployed Turbine/Velocity application so that another customer could reuse most of the code but put a glitzier front end on it using Flash MX. To accomplish this I have been investigating the Flash Remoting MX tool, which provides a "web services" gateway between the Java class files and Flash's ActionScript objects. Initial tests are very promising but I have two questions that I'm hoping folks more experienced than I can help with:

a) Design pattern?

Rather than rewriting all the logic code, I think the right way to do this is to build an interface layer that will allow me to use the same code with either Velocity templates OR Flash Actionscripts, depending on configuration parameters in TRProps. My guess is that this is a pretty common situation in the OO world so there is probably an existing design pattern that addresses this need directly. Adapter? Abstract Factory? I'm kinda a beginner with patterns but this seems like a situation tailor made for picking the right one. Ideas?

b) Vector and ResultSet

For the deployed application I'm using Criteria for all my db calls and wind up putting Vectors and Hashmaps into the context to be processed by Velocity. But Flash Remoting provides a ResultSet actionscript object that maps directly to javax.sql.ResultSet so for the new UI I'd probably want to send ResultSet objects back and forth. However, I'd like to avoid rewriting all the queries that presently return vectors (e.g. xxxxPeer.doSelect(criteria)). So, is there some way to magically transform the output from Peer class-based queries into javax.sql.ResultSet objects or is that too farfetched?

Thanks, in advance, for suggestions on either issue.

Bruce


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to