Murali,

One of the main complaints that people have about EJB's for data persistance is that 
they are slow. By this they mean that the way in which the container handles the data 
envolves too much complexity. Data is read more times than we could get away with, the 
transactional and security models are too heavy for some applications etc.

One way people have tried to get around these 'problems' of EJB is to move all the 
database access into seperate classes called DAOs (Data Access Objects) These are nice 
because you still keep all your database access managable by knowing where it exists, 
ie. not some in this session bean, some on that JSP and some in servelts. Often this 
approach ends up with duplicated queries which all need to be tested (and at a later 
date updated). The other nice thing about DAOs is the ability to build more dynamic 
queries.

DAOs avoid much of the good stuff the containers do, like the transactional support, 
which would need to be programmed manually using a DAO, but in many cases (especially 
web in applications) a quick dirty read is good enough.

So in short, DAOs are collections of database accesses which have been put grouped 
into classes.

Hope this helps? If not have a look at the blueprints on the sun java site, or also 
martin fowlers site (http://www.martinfowler.com) has some information that you may 
find useful.

Regards
IV




>  from:    Murali Mohan <[EMAIL PROTECTED]>
>  date:    Fri, 22 Nov 2002 06:07:01
>  to:      [EMAIL PROTECTED]
>  subject: Re: What are DAOs??
>
> Hi,
>
> Can you please tell me What exactly the DAOs are??? Java beans van be
> DAOs???
> What is its functionality?????
>
>
> Thanks,
> Murali
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>



http://www.amazon.co.uk/exec/obidos/redirect-home?tag=velloscouk-21&placement=home_multi.gif&site=amazon

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to