Open StrykeSlammerII opened 8 years ago
from wikipedia:
"The central component of MVC, the model, captures the behavior of the application in terms of its problem domain, independent of the user interface.[11] The model directly manages the data, logic and rules of the application. A view can be any output representation of information, such as a chart or a diagram; multiple views of the same information are possible, such as a bar chart for management and a tabular view for accountants. The third part, the controller, accepts input and converts it to commands for the model or view."
Interactions are rather cyclical: the user sees the View, uses the Controller, which manipulates the Model, which updates the View. (The controller "can also send commands to its associated view to change the view's presentation", such as scrolling or showing a different type of graph)
So our Model is split between Dragon, DragonTree, and Analysis? and our View will be in Display / DragonDisplay... Controller is in DAL9001 or not yet specified? UI is not my strongest suit and two thirds of MVS are immediately UI >_<
I learned about MVC in my web programming class, so here's how it worked there: the model was the HTML, which was a tree structure. The view was CSS, which describes how things look. The controller was JavaScript, which can change things around and make them move.
So it's obvious that main model is the DragonTree, where Dragon is really a subclass of it. Analysis is kind of it's own thing, since it does not actually hold data, but since it then updates the view and takes orders from the controller I guess it counts as model.
View will be the display, yes. The thing I am unsure of it how to divide the view from the controller. You need to display the buttons of the controller somehow, right? So maybe the view (Display class) will just be the main screen bit, and the controller (DAL9001 class) will be the rest of the UI (buttons etc.)
Since you don't like UI, do you want to work more on the DragonTree and Analysis and I'll take a stab at making a View?
I haven't done Java UI in...over a decade, I think? So I'm not sure how to split it up yet, either. We may end up slapping something together for alpha/proof-of-concept and then refactor it into "proper" MVC. (maybe? I dunno, just throwing ideas around) Having the Controller be the main UI, and the View is just the frame that shows the Model stuff makes sense to me, but I honestly don't know if that's "proper" MVC or not. -shrugs-
MVC isn't a design requirement afterall, it's just a framework that works for a lot of projects. You keep the three parts separate, and if there's a big change to one of them then you don't have to redo the entire project. So if we decide to have extra types of Views, we adjust the View stuff, maybe add some buttons to the Controller, and don't have to touch the Model: all the machinery is in the View class(es). It was a little more obvious with your website projects as there were three languages involved XD
I can do UI but placing buttons/making a layout is boring ;) so if you wanna get that started it'll probably get done faster, haha. If there are any specific things you see that need done on the DragonTree/Analysis side, make an issue for 'em and one of us can assign me to it? I think that's one of the things GitHub does...
Wow, you've been avoiding UI for longer than I have known how to code.
I'm totally OK with just slapping something together. As long as it works on the outside and we do not mind the inside mess too much, it's OK. It's not like we're going to be selling it or anything.
To be fair I've also mostly not done Java in a decade ( it was the primary language used in my college courses around the turn of the millenium... so yeah, I'm a little bit old :p )
but I always avoid UI when possible, it's just not interesting to me. Regrettably, most new projects need more of a UI focus so that you can throw things at the computer and get results XD
This may be more of a looking forward thing, since I should stop being lazy and wrap up the rest of the known-wanted methods:
We've got the Model class pretty well set up, but what do the View and Controller classes do/need?
I don't have any understanding of MVC yet, so I'll be doing research on this a little later as well and infodumping here--but feel free to add stuff or beat me to it ;)