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]

