• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

A question from Mark Cade case study

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Can some one elaborate the following statement from Mark Cade case study, third paragraph page no. 170?

"Because the Shipping, Payment and Accounting systems have Java technology APIs and the data is not persisted, you have direct access from the OrderProcessor as opposed to encapsulating the requests in a DAO."

I couldn't understand that statement completly. I am not sure what does he mean by "the data is not persisted". Does he mean that the data is not persisted in the system being developed?

In the following situations, when can I go for a DAO and when can I use a Processor to talk to the subsystem?

1) The subsystem has a Java technology APIs and the data is not persisted?(Cade says we should go for Processor)

2) The subsystem has a Java technology APIs and the data is persisted?

3) The subsystem does not have a Java technology APIs and the data is not persisted?

4) The subsystem does not have a Java technology APIs and the data is persisted?

Thanks in advance,
Srinivas.
 
Srinivas Bitla
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can some one answer this question?

Thanks in advance,
Srinivas.
 
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Srinivas, I'll try to help.

If you look at pages 166, 167, you'll see that the new system consists of new packages Order, Customer and Catalog. Data for these packages is persisted in the new system (i.e. DAO's required in component diagrams).

These new packages have dependencies on some existing packages (Inventory, Accounting, Shipping, Payment and ContentMgmt). These existing packages persist their own data (i.e. not part of the new system). Therefore in component diagrams interfaces are shown as the way to access data in these systems.

Hope this helps,
Ray
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator



I couldn't understand that statement completly. I am not sure what does he mean by "the data is not persisted". Does he mean that the data is not persisted in the system being developed?

In the following situations, when can I go for a DAO and when can I use a Processor to talk to the subsystem?



Authors are of the opinion that an additional DAO layer may not be necessary and hence direct data access constitutes a good design when the mode of access is 'read-only'.

Personally I beg to differ. DAOs are not about persistence, but about encapsulating data access. Hence the mode of data access( read-only versus read-write) should not be the criteria driving your decision to use( or not ) DAOs.

Well, anyways...
 
Get off me! Here, read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic