Junilu Lacar wrote:In your case, the DAO is probably the best place for you to keep the data structure in which you will "persist" your objects. Declare the HashMap as a private member of your DAO class. Note that keeping them in memory is not really persisting the objects. Persistence means that you can get the objects back after you terminate the program and run it again. An in-memory solution is not true persistence.
Junilu Lacar wrote:What is this date and what is its relation to Telephone?
Junilu Lacar wrote:Your code actually looks pretty decent, not too bad for someone who only learned Java in the last 5 months. I've seen worse from supposedly more experienced programmers.
Junilu Lacar wrote:
Diego Macario wrote:
how can you help me?
By explaining some things to you, pointing you to material that you can read to get better understanding, and looking at your code to see if we have suggestions on how to make it better. Other than that, we won't do your work for you, but you probably already realize that.
As Jelle said, it would help if you explain a little bit more what your requirements are, why you think you need DAOs and Controllers, etc. It would also help if you showed us some of the code you have written so far, if any. Just code snippets, please -- don't post 500 lines of code, or even 100 lines. Thanks.
Junilu Lacar wrote:DAO - responsible for persistence concerns
Controller - acts as an intermediary between View and Model/Business classes.