It is necessary to implement something like a visualizer. The application should be implemented on the basis of the MVC pattern (a set of interfaces is specified for the model, the view and the controller - respectively, my application should implement them). I do not know how to design the application logic, that is, build the same UML diagrams! Advise where to start? What to read?
- The final application is a visualizer of what? - Costantino Rupert
- @ Kotyk_khokhet_kusat - algorithm, in general, a sophisticated search in depth. - Pavel
2 answers
Starting with UML diagrams with no software design experience is, excuse me, suicide.
The task of visualizing the algorithm is a classic and good way to understand MVC . Specifically for your case, breaking the Model - View - Controller seems to be a rather obvious way:
There is a data model - this is the input of your algorithm. Since most algorithms can be identified with finite automata, the data at any time of the algorithm is uniquely determined. The model works with some functional object
Step, which performs one step of the algorithm (changing the model accordingly).There are one or more possible representations of the data model. Depending on the programming language used, this class most often expands / uses any system classes for display (in your case it’s convenient to extend
MovieClip)There is a controller that projects actions into the model. In the trivial case, this will be a single action - * to make an algorithm step using the
Stepmutator object.
After you can implement the tasks described above in your application, expand the functionality.
Provide the ability to set the properties of the model, the properties of the algorithm (ie, the properties of Step ) , the ability to take steps back, different types for the model, etc. At this stage, you can already generate a ready-made UML diagram for your project and think about what can be done better.
I strongly recommend that you familiarize yourself with at least the basics of the PureMVC library - Mediator , Observer , Proxy , etc., since the knowledge and ability to use them greatly facilitates programming using MVC .
- I don’t see where about the language, but if it’s on asp.net, then there is already a ready-made framework - Gorets
- @Gorets This is of course a very important point, but
ActionScriptis indicated in the question tags. And even more so,PureMVChas ports for all popular languages. - Costantino Rupert
I would start like this if for myself, then
- sat down with a pencil and paper and drew the main classes, their methods
- would draw a database schema and its table with columns
If, not for myself, everything is the same, only at the end I transferred everything to a form convenient for others (to the same UML)
Then, I looked at what I already know, and I still don’t understand what, for example, figured out MVC. Well, then, with incomprehensible moments - again to the forum =)