I'm new to designing OO systems. I have a simple Flash Cards app where I'm having trouble figuring out the proper way to architect the system. The application has a simple GUI with a question, answer, and couple buttons. The questions and answers dataset are stored in a Derby embedded database.
Quick Setup:
Database Class - Handles the connect,disconnect, and returns an ArrayList based on a selected filter (currently called by a CardSet object) (the DB class is set up as static)
CardSet Class- Holds the ArrayList being used currently, holds the current Card
Card Class - holds the data for the flash card (question and answer, couple other things)
App Class - Creates the GUI and handles the action events
So here is my question: I want to separate the GUI and the application logic. I am thinking it may be a good case for MVC, but I'm not sure how to really separate it all(never used it) . Does a controller class get created in the main which then launches the GUI and then creates the other classes (in my case, the CardSet). What about access? Do certain things need to be static?
Another question- For handling the GUI events, do you just set it up to call a generic method in the controller class? For instance, the "Next Card" button is clicked, should it just call something like controller.nextCardAction()? Should I try to just use the Observer pattern to let the GUI pull the data?
Sorry for the beginner questions, but this is my first go around at a Java app. Any help would be great. Good links are welcome as well. I have the Head First Design Patterns book, but it just doesn't have enough real examples for me to fully grasp it for my app.