I have received occasional spam on this list. It is definitely not a regular occurrence, but probably once or twice a week (at least that is how often I notice it)- Brian Rinaldiblog: http://www.remotesynthesis.com/blogColdFusion Open Source List:
Title: Message
Two of the biggest
benefits of OO design are maintainability (code that is easy to update) and
reusbaility (components that are easy to reuse). Many OO design choices help
both, but in most companies, one is more important than the other. If you're a
job shop churning out 5
Title: Message
An
update. Any thoughts on using single DAO as per:
http://www-128.ibm.com/developerworks/java/library/j-genericdao.html
Also,
in general terms don't people find they're copying a lot of code with entity
specific services? Don't most of your %EntityName%Service.cfc's
Peter,
I'm not sure this directly addresses your issue, but it seems related to me.
I ran into this issue a while ago myself. DAOs seemed for my
situations to be more work than they were worth. I ended up creating
a component to handle common database interactions (updates and
inserts). For
Did you take a look at the actual use of the single DAO? There is a
single generic DAO, but there are still domain object-specific DAOs
involved that are cast to the generic DAO type, I'm assuming just for
ease of use within the factory pattern that's involved here as well.
As you can see the A
Hi Steve,
Many thanks for the link. I'd actually skimmed the page months ago but
hadn't made the connection. I see you include data structure functionality
along with the CRUD features. Interesting approach - will definitely play
around with this. I had something similar back in my procedural
Peter,I realize you're asking about much more than just DAOs. But have you considered using Reactor, or something similar, to handle your database interaction? I think it might solve some of the same issues you're wrestling with in the consideration of a single, generic DAO.
-- Thanks,TomTom
yeah, i was going to forward this on to ray, but i figured if he was
somehow successfully avoiding the spam, he'd be less than enthused
about me circumventing his defenses :)
On 5/30/06, Christopher Bradford [EMAIL PROTECTED] wrote:
Here is an example of a spam email that I am getting from
Title: Message
Hi
Tom,
Brian
Rindaldi just brought that up offline. I think Reactor is great, but with recent
possible memory leaks Doug has been troubleshooting, I can't afford to base
everything on top of that today. I also have a bunch of ORM code I wrote for my
procedural generator
Hello Matt,
Caught out! When brainstorming something I tend to stir up a bunch of
information, skim everything and then reflect at leisure. I hadn't read the
article all the way through *blush*.
You're right. This article is more about wrapping hibernate with a typesafe
interface which is not
To potentially oversimplify the issue, I'll go out on a limb and say
that unless you *are* using something that generates your DAO(s) for
you, having a single generic DAO seems like a maintenance nightmare to
me. I envision (particularly with your last point below) a maze of
conditionals or
Matt,
I don't know if my approach would really be considered a DAO at all,
but I do have one component that I use for all database interaction
(the aforementioned DataMgr). It is generic and doesn't know anything
about the components that use it.
The approach certainly isn'tlike Reactor or
-Original Message-
To potentially oversimplify the issue, I'll go out on a limb and say
that unless you *are* using something that generates your DAO(s) for
you, having a single generic DAO seems like a maintenance nightmare to
me. I envision (particularly with your last point below) a
I have used a struct of bean objects for the many stored in the one, but only where I know that the number of objects in the struct will be limited. For instance, I have a small content system I put together that stores property beans for content objects in a struct in the object bean. While a
In reactor I created an iterator object that is lasily populated with a query of data. I have a getQuery method that will simply return the query and a getArray method that will translate the rows in the query into objects. Both those methods will let you get subsets of the data. IE: getQuery(1,
I agree that you can't optimize code by minimizing the number of characters.
I still remember getting only above average marks in college for a nice,
clean, well written piece of C to solve a problem in 50 well commented
lines. I was beaten by a guy that wrote an extremely terse single line
Title: Message
Funny,
I was just looking at those again today! I think the problem was the same as
with a lot of generic CRUD frameworks. You need to have enough extensibility
mechanisms to cover enough edge cases to make the approach worthwhile and when
you do that you have to do it really
This almost seems like what cfinsert and cfupdate were supposed to do for us. It's a rare occasion that I've seen those tags used.
--You are subscribed to cfcdev. To unsubscribe, send an email to cfcdev@cfczone.org with the words
Matt,
I definitely see your point on that. I certainly never got any usage
out of cfinsert/cfupdate and I can see how this seems like merely an
alternate syntax for those tags.
I think, however, that cfinsert and cfupdate are more limited in
significant ways (which I cover in my
is there anything wrong with returning a collection object to
represent the many rows of child data? and that's one of the members
of the object?
What is your preferred way of handling this?
An Array of objects of the many?
A query of the table with the many?
A structure...?
Other?
something
It still just doesn't make any sense to me to translate a query into an array of structs, when a query essentially IS an array of structs already. There would be a definite cost to do this, and what would be the benefit? Is there something I'm missing?
Thanks,BrianOn 5/30/06, Barry Beattie [EMAIL
Agreed. I would be very interested in hearing the advantages of
converting a query to an array of structs given you can access rows and
columns from a query natively.
Aaron
Brian Kotek wrote:
It still just doesn't make any sense to me to translate a query into
an array of structs, when a
what you say is true.
in fact a query would be in some cases a better datatype for this
beause of the ability to use a Query'o'query internally for simple
wrapper fuctions for a get{child data}ById(), ByType(), ByName(), etc.
the only reason about array'o'structs was the compatability with
Hi Barry,
I don't think there is anything wrong with a collection at all. It may be a
(fairly trivially) amount of extra work to populate if you're populating
from a database, but as long as you've got a reason not to use a query or
some kind of bean then go right ahead.
The OO purists will
24 matches
Mail list logo