Jamie,
A blog is OMLOTTDSD (On My List Of Things To Do Someday). Some of
the stuff I've found might be helpful to someone else headed down
this path, so I'd like to put it out there.

One thing I should mention on the Java/Mach-II thing. I'm not a
strict Mach-II adherent. I like the framework and am happy to
turn over a lot of the interaction mechanics to it. But I like to
keep my code as environment independent as possible. So my
personal guidelines are:

- use the filters and listeners as shims between the framework
and the Model (which is Mach-II's advice as well, but I've seen
some seepage in some of their examples). In other words, all the
Mach-II dependent code stays in the filters and listeners, which
in turn communicate with the Model in framework-neutral terms.
This separation makes it easy to build the Model pieces in Java.

- I generally use the standard CF request and session scopes
rather than the Mach-II event scope. So for example, I'll
explicitly manage my own form beans in the request scope rather
than moving them in and out of the Mach-II event scope (or using
Mach-II's bean). Again, this is just my personal preference for
keeping my code as framework-independent as possible.

One cool thing I just discovered: by instantiating
coldfusion.sql.QueryTable objects in my Java DAOs, my Java
classes can return native CF queries (rather than resultsets)
back to the CF pages to manipulate. And if I get ambitious, I
might wrap it with a factory to return either resultsets or
queries, depending on the caller's preference. Makes the CF-Java
nexus even sweeter.

Dave Jones
NetEffect

At 09:51 AM 3/3/04 -0500, you wrote:
>Excellent information. I don't know if you blog, or otherwise make
>your experiences known, but I'd be very interested to know how the
>Java/CFML Mach-II hybrid turns out, and what you learn from the
>project.
>
>Thanks very much for your feedback.
>
>Jamie
>
>On Tue, 02 Mar 2004 16:13:52 -0800, in cf-talk you wrote:
>
> >Jamie,
> >I'm currently implementing a client project in Mach-II using CFCs
> >for the Controller-View and Java for the Model.
> >
> >So far I'm pretty happy with the way things are coming together.
> >I too found the incomplete OO implementation of CFCs frustrating
> >(particularly the lack of interfaces) and prefer modeling the
> >business rules and objects in Java. CF is much better on the
> >front-end however and can run rings around JSPs. I've found
> >Mach-II a good framework for melding the two together.
> >
> >Here are the gotchas I've found so far in using Java w/ CF:
> >
> >- the Java classes must reside in the CF web root, or possibly in
> >a classpath defined in the CF administrator. That has a couple consequences:
> >1. you can't run your hybrid apps on a shared host
> >2. you have to be careful with naming conventions and shared
> >classes between apps because all the classes will reside under
> >the same root. Not as neat and tidy as pure Java web apps.
> >
> >- supposedly changes to classes placed in webroot/WEB-INF/classes
> >are automatically picked up by CF, but I have not found this to
> >be the case. Instead, I'm finding I have to stop-start CF after
> >every change for the changes to be recognized. Big hassle.
> >Fortunately, I'm used to doing TDD w/ JUnit, so the code gets
> >tested pretty thoroughly in Java before moving it into the app.
> >
> >- CF uses log4j 1.1.3, so your Java code must too. Big bummer,
> >particularly since log4j 1.3 purportedly will resolve a log
> >archiving problem on Windows. Also, this suggests the possibility
> >of big conflicts down the road. If my Java code uses a
> >third-party library and a future release of CF incorporates a
> >different version of that library, it seems very possible that my
> >code will no longer work if the api of CF's version of the
> >library is different.
> >
> >I'm still early in the process of using Mach-II and using CF and
> >Java together, but so far both seem promising.
> >
> >Dave Jones
> >NetEffect
> >
> >
> >At 05:47 PM 3/2/04 -0500, you wrote:
> >>After having been asked to extend one too many spaghetti-code
> >>procedural applications, I have started to suspect that there *is*
> >>something to the idea of OO. I am now anxious to try this out
> >>(probably with Mach-II, for lack of a better idea), but I am concerned
> >>that some of my "OOAD using UML" training will become invalidated by
> >>CFCs' incomplete implementation of OO.
> >>
> >>My question is pretty vague at this point, but I'm wondering what to
> >>look out for, with regard to OOAD and its implementation in CFCs.
> >>Also, I'm wondering if there's some sort of "Java as the Model" /
> >>"CFMX as the View and Controller" approach that I should consider
> >>(what ever became of Mach-II for Java, BTW?)
> >>
> >>Another side question: Can anyone recommend any references for how to
> >>go about implementing the Class Model in code (as well as its
> >>interaction with RDB-persisted data)?
> >>
> >>Any feedback, links, suggested reading, etc., is appreciated.
> >>
> >>Thanks,
> >>Jamie
> >>
> >>----------
> >>[
> >
> >
>
>----------
>[
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to