Quantcast
Channel: flounderCode() » btg5679
Viewing all articles
Browse latest Browse all 10

MVC GUI Design

$
0
0

So recently my schedule at work has limited the amount of time that I have been able to dedicate to coding. I am still working on my Baseball prediction application although progress has been slow. I am successfully scraping game data(schedules, teams, starting pitchers, etc..) from baseball-reference.com. I found that jsoup is the simplest java library that I came across when it comes with working with HTML from sites. There are a lot of really good, simple demos of jsoup out there.

After 2 weeks of barely looking at my application, I came back only to realize that the code that I was looking at seemed foreign. I barely remembered writing it. I decided that it needed a re-write and I wanted to find some tips on GUI code design and patterns. That’s when I stumbled across the MVC(Model View Controller) design pattern. The basics are as follows:

The model consists of the data, rules, logic and functions for the application.
The view contains the display that is visible to the user.
The controller is the intermediary between the view and the model. It accepts input and converts it to commands for either the model or the view

See this great simple MVC example. I am in the process of converting my GUI now to the MVS method.

Ben



Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images