DAO pattern

  • Thread starter Alexey J.1001958768
  • Start date
A

Alexey J.1001958768

Hello!

Question addresses primary to object relation mappers users.

Does anyone explain me why business objects shouldn't have a dependency on
the persistent layer (DAO objects).
I want to exclude business logic from a controller and concentrate it into a
business objects. Methods of the business object
must intensively use DAOs. But it violates this dogma.

And question: how could I able to write more complicated business methods
without access to DAO objects?

Thanks.
Sorry for my poor English.
 
A

Anzime

Alexey said:
Hello!

Question addresses primary to object relation mappers users.

Does anyone explain me why business objects shouldn't have a dependency on
the persistent layer (DAO objects).

Think about switching databases.
I want to exclude business logic from a controller and concentrate it into a
business objects. Methods of the business object
must intensively use DAOs. But it violates this dogma.

And question: how could I able to write more complicated business methods
without access to DAO objects?

Have your business logic classes call handlers that call DAO classes.
Handlers may contain additional pre/post DAO logic.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top