This is somewhat a theoretical question. I'm trying to write my first application with MVC design pattern in mind.
The app is a memo writing app. As this is the first time trying to apply this design pattern I would appreciate some feedback on how to plan my project.
In my model part I plan to have a hash map as the data structure with the date being the key and the memo being the value. so I'll have a Date
class and a Memo
class and a Model
class with the hash map that will interact with the other 2 classes.
In the view part I'm planning 3 combo boxes for the date following with a button to show existing memos for that date or an empty text area for adding a memo and a save button. I though of having one class that extends JFrame
with the rest of the components inside.
The controller part is where I get stuck. how do I go about it? I'm use to having the view part dealing with the data on it's own. Another tip I got was to separate the different parts with interfaces but I'm not sure how exactly.
Lastly, where do I put the Listeners for the buttons in the frame class or in the controller?
Any insights or feedback would be greatly appreciated.