This content has been marked as final. Show 4 replies
I come from a Delphi / VB background, where the basic application structure has been GUI layer talking directly to the DAOs.
Recently I've been using Java, and I get the impression the drive is to use patterns "where possible"
I'm trying not to be "obsessed", but I'm aware there are best practices of linking up GUI aspects with the DAOs.
That's why I asked for a "practical" solution to the problem, as using MVC just for sake of it - didn't feel right.
I want to use these small scale utility applications, to learn and explore how to structure better GUI applications in Java.
I'm just looking for people's experiences, and ideally some examples, in how to go about this ( in small applications - where the MVC is unnecessary).
Again, any help would be appreciated.
What I mean is "don't focus on using a 'pattern' for the sake of using one".
Separation of concerns is good, but there's no need to straightjacket yourself into something written in some book as being the best way to achieve it.
Knowing you have a problem is often half the solution, common sense will provide the rest.
So you want to get separation of concerns but consider a full MVC approach to be overkill.
Maybe try adding a lightweight layer based on JPA, that would effectively delegate the actual database logic to that while you can still keep the controlling code in the forms (or near them).