Except that's 2 places... 1 in the database and 1 in the code... 2...
:)

I wouldn't call that lazy -- you'd be _amazed_ how much time you can
save (and productivity you can gain) by cutting out very small
(microscopic) tasks which occur often. At least for me, I consider
schema changes at least in early development frequent enough to
warrant. Granted that once the early development is done and the
schema is pretty solid you don't get much in the way of schema changes
and it's easy enough to go back and replace the * with an explicit
column list, I just don't see a need.

But yes -- the design of a DAO is not a beginner's task.

> Funny I was going to use DAO as an arguement for using
> Select * but
> didn't bother since I didn;t want to mix entry level using
> select *
> with using Select * with a DAO Design Pattern which if you
> are using
> DAO you're not entry level. I could just as Easily say
> though (just
> for arguements sake) that if you are using DAOs then you
> only have to
> change the Select list in 1 place, not wanting to change
> it in one
> place == lazy. I will still say though Selecting all
> comumn names is
> is better for any programer that might have to go into
> your code
> though....

> Adam H

> On 5/12/05, S. Isaac Dealey <[EMAIL PROTECTED]> wrote:
>> Though in a DAO situation there's little point in not
>> selecting *
>> since the DAO generally is just going to get all the
>> columns for a
>> specific record and drop them into the bean or other
>> object
>> properties. You can of course argue that explicitly
>> declaring the
>> columns is faster for the database (although you are
>> using the primary
>> key for selection), and using a code-generator can shift
>> that load
>> some, but I still prefer select * in a DAO because I also
>> use dynamic
>> accessor methods and that way I don't have to rewrite my
>> DAO's when I
>> add columns to the table. I tend to be very much of the
>> "right tool
>> for the job" mindset, so if there's a practical reason
>> for using a * I
>> have no problem with it.
>>
>> > I guess we all have our admamant areas :) If I see a
>> > Select * I get
>> > fairly upset with the developer. In most caees you are
>> > bringing back
>> > unneeded data and in a large developement envirmoent
>> > another programer
>> > can not easily step into the code and see what is being
>> > selected from
>> > where.
>>
>> > Adam H
>>
>> > On 5/11/05, Glenn Saunders <[EMAIL PROTECTED]> wrote:
>> >> At 01:14 PM 5/9/2005, you wrote:
>> >> >That reminds me of one...Select * in SQL
>> >> >statements...thats a really
>> >> >big PITA and a sign of a beginner or a lazy coder...
>> >>
>> >> I guess that would make me a lazy coder.


s. isaac dealey   954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:11:2626
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/11
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:11
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.11
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to