Keep it simple or...

I'm facing a dilemma. I've set up my own architecure, and then I read Andrew Monkhouse's book. I can see lots of variations so I'm now a little bit confused...Should I change my architecture to something more simple?Or is it worth to take a risk by keeping a more complicated architecture...

The variations beetween my idea and the book are:

I want to put a Service class in front of my Data class.

I want to have a DAO layer, (DAO FActory, FileAccessDAOImpl)

I want an exception mecanism, with 3 kind of exceptions:
1)TechnicalExceptions - Database exceptions etc...
2)FunctionnalExceptions - Exceptions from Data file and service layer
3)GUIException - UI Exceptions
The idea is to send exceptions from layers to layer until UI

I was quite satisfied with this architecture, but reading the book make me feel less confident now...Should I come back to an easier solution? (Data file-FileAccess-LockingManager only?) Without DAO/Services and a less complex Exception handling?

I would have no problem to change my idea, if that easier solution is enough to pass the exam...As I can imagine, implementing a more complex solution is more work, and also more risks to make mistakes...

I'm reading the forum, and what I see is that people seems to keep their own solution instead of a more "Generic" simple solution...Is there a particular reason for this?Does examinators are more sensible if someone wrote his own architecture instead of a "Generic" one?

The book just gives you some kind of guidance to succeed with the certification, covering big topics like the networking protocol, the GUI and so on. Although it is a great book (which helped me a lot) my design differs a lot of the one described by the book (e.g. my Data class is not a facade).

You just have to do what you think is ok considering the requirements you got, also considering the ones like code reuse, extensibility, maintainability, simple approach which is understandable by a junior programmer,... And if you think you need something like a Services class and/or a DAO factory, just go for it and explain in your choices.txt why you made these decisions.

Another remaining point of interrogation for me is about my DAO layer.

What I was thinking is that my Data file as a reference to a dao. This dao is instanciated by a DaoFactory that send back a FileAccessDao implementation. (this way I want to make sure there's no problem when swithching db file to a commercial database).

But reading the forum seems many people see the Data class as a DAO already...so That's mean if that the case I don't need an extra Dao Layer.

But I'm not really convinced by this idea that Data file (Wich is the implementation of the interface provided by sun) is actually a DAO. I can see it more like a service class, that using a DAO.

But I could be wrong...so better to be sure before I start to implement anything...

adrien frediani wrote:But I'm not really convinced by this idea that Data file (Wich is the implementation of the interface provided by sun) is actually a DAO. I can see it more like a service class, that using a DAO.