Derrick,

There is a lot to be said for simplicity in your backend and POJOs are
about as simple as it gets.  However, if your backend code is not
trivial I really recommend using the Spring framework because you gain
so much power with a small investment of book/reading time.  For
example, it is a snap to set up database pools in Spring.  It is also
very simple to integrate Spring with BlazeDS (you can read my blog
post if you wish
(http://jim-boone.com/2008/03/07/converting-from-graniteds-to-blazeds-remoting/).
Spring also plays very nicely with Tomcat so you don't need a Java
application server like Jboss (all the Jboss embeds tomcat as the Web
server).

Spring implements the concept of dependency injection (DI) which to my
knowledge has not caught on in the Flex world yet but I am sure will
very soon. DI allows you to write very clean decoupled code that's
wired together using XML configuration files. There are also
enterprise services you get right out of the box like transactions and
security. Spring is way cool.  Check it out.

Jim

--- In [email protected], "Derrick Anderson"
<[EMAIL PROTECTED]> wrote:
>
> hi jim, thanks for your response-
> 
> for the first question, i want to save variables on the server
because in my
> application, the database used for all queries is determined at login
> (different clients go to different databases) but it's all the same
client
> code.  when the backend was coldfusion I would just save that datasource
> name in a session variable and use it for my queries.  if i cannot
save to
> the server, i have to pass that variable to all remoteObject
requests so it
> knows what DB to interact with.  that page you sent me looks most
helpful
> for this
> 
> for the framework i was more asking on the java development side of
things.
> i hear people talk about Spring and others, just wondering if I
should be
> using something like that or just writing pojo's.  (i know nothing about
> java frameworks)
> 
> thanks again,
> d.
> 
> 
> 
> 
> 
> On Fri, Mar 21, 2008 at 12:59 PM, Jim Boone <[EMAIL PROTECTED]> wrote:
> 
> >   Derrick,
> >
> > Your correct, this isn't a simple questions.
> >
> > 1) Why do you want to save variables in session on the server when you
> > can save state in your client? If you really have a business need to
> > save session variables, then look in the section titled "Working with
> > session data" in the BlazeDS Developer Guide.
> > (http://livedocs.adobe.com/blazeds/1/blazeds_devguide/) There is a
> > great example of how to write a remote Java object that will give you
> > access to anything in the request/response streams.
> >
> > 2) Working with query result sets? Simple, just create some type of
> > collection with the result set objects. Define an equivalent object on
> > the AS3 side (make sure you include the RemoteObject meta tag on
the AS3
> > object), and let BlazeDS convert the dataobjects to and from AS3
to Java
> >
> > 3) Frameworks are a function of how big the project is and how many
> > folks might be working on it. If it is simple, you don't need a
> > framework. More complex projects can but don't need to. You can use
> > Cairngorm or PureMVC. I have used both and prefer PureMVC for the
> > reasons that the author states on his web site.
> >
> > I know this is only a start but your Qs cover a bunch of ground.
> > Remoting between Flex and Java is almost brain-dead simple primarily
> > because BlazeDS is written in Java and Adobe has abstracted away
all the
> > complexity. Good luck!
> >
> > Jim
> >
> > --- In [email protected] <flexcoders%40yahoogroups.com>,
"Derrick
> > Anderson"
> >
> > <no.way.this.is.in.use@> wrote:
> > >
> > > hey everyone, i'm switching my server side app from coldfusion to
> > java- i'm
> > > still new to java so i'm looking for some docs or any tips that
cover
> > the
> > > basics:
> > >
> > > 1) sessions/persisting variables between requests to the app server,
> > how do
> > > you handle it? i'm assuming that I might need an application server
> > to
> > > handle that right? My current plan was to just export my java
project
> > to a
> > > JAR- what options do I have for persistence?
> > > 2) working with query resultsets
> > > 3) any particular framework that you develop in that works well with
> > blazeds
> > > (or does it matter)?
> > >
> > >
> > > sorry, i know it's really a java question, but I figure a lot of you
> > have a
> > > java background and might be able to give me some tips on ramping up
> > with
> > > java+flex (i have seen the blazeds turnkey sample apps, so i've seen
> > 1
> > > example of using List to handle query resultsets)
> > >
> > > thanks
> > > d.
> > >
> >
> >  
> >
>


Reply via email to