Wow, wow, wow, what a whole new world. Before starting the first task, I had to have a long theoretical conversation with AI about databases in general, and then about DAO, DAO layer and UserDAO. When I finally got some idea of what that all is about, the task appeared to be medium or even easy. At least at this stage we are nor required to do a lot.
2 days later, I'm done with the whole MVC saga. Alongside the things that I completed with understanding, there are also those that I just wrote by analogy, without a clear idea why I was doing them. That is why I'm still trying to recap what exactly I've learned from the whole set of tasks. I hope I'll be able to process it all and apply my new skills in the future:).
To be honest, It was easy for me. I did it in few hours and understood most actions.
Just before start, I readed this whole articles cycle: CodeGym: Introduction to Enterprise and did task as they instructed.
Also I got familiar with Observer and Facade design patterns (as mentioned in articles that I linked before).
Really enjoyed this lesson. Thank You CodeGym!
I find this tasks to be very complex and hard. But in contrast to the other people in the comments here I actually like them. Because for the first time in this course it felt like you're working on some kind of corporate project implementing stuff. That's what I've always looked for and that's what we need to practice more. Those single class tasks help to understand the concepts and simple stuff but these kind of tasks let you think more in software engineering patterns.
06/08/2023 Finishing up my first pass of this concept. Will most likely give it a reset so I can more completely understand the nuances within this structure. Took me just under a week to go through. This was tough, but I've learned so much about the MVC design pattern through these tasks. As Luis mentioned, there really should be some introductory tasks since this seems to be a valuable programming concept, and it may help with the growing pains of coming to understand these tasks. At any rate, this is an amazing set of tasks that I feel deserve to be repeated (despite my disagreements with the validator).
In my opinion instead of starting with something so "complicated" we could have previously done some less complicated related tasks to get familiar with the idea on how MVC works and step by step getting it more complex.
Now, after solving some of them with some help, and after having read some articles on INTERNET a have an idea on what MVC does. Now I would say that I have a rough idea about MVC.
Just finished this task. Below, I've listed everything that helped me.
https://www.youtube.com/watch?v=dTVVa2gfht8 (Taken from a comment by Andrei) - This seems very obvious at first glance, but it helps solidify what the Model, View, and Controller components DO.
Model: Knows nothing about View or the Controller. It has functions that it can perform, and it holds the
the DataSource
View: Entire purpose is to ask Controller to do things for it. It knows about the Controller.
Controller: It sees the Model, and the View. It takes requests from the view, and has the Model perform the necessary operations.
When you start, you may notice that each feature you intend to add, you have to add it 3 times. This is because you are creating a UserView function which asks to do something. It calls the controller function, which will have the Model perform the operations. Finally you have the Model which performs the function. Listed below like this:
View: fireUserDataChangedEvent(String name, long id, int level) - Ask the controller
Controller: onChangeUserData(String name, long id, int level) - Have the Model perform the task, and then refresh what the View sees
Model: Performs the task
This is a bit rambling, But try to think of the Controller as the go-between for the Model and the View. You might think "Well how about I skip all this and do each thing one time".
Based on my (very weak) understanding of MVC, its values can be derived directly from the principles of Object-Oriented Programming. You can hide away complexity (Abstraction) by making the view's functions very simple. You can very easily ask for new things (Polymorphism) by having the model perform very general tasks, which the Controller puts together in a more advanced way, etc.,
If you have any trouble with these tasks (I had tons of trouble), feel free to message me or post your code for help. It doesn't hurt to ask for help, and none of us can do everything alone. GOOD LUCK!!
I solved all tasks without getting any help - and still, I don't understand the program properly.
It would be nice to implement a simpler version of an MVC with lesser classes (like the ones you find in other MVC tutorials) before writing it like this with all the fake classes etc. Also a few proper comments in the classes would help to understand what the purpose of all the classes are.
tip - always start with the method call in the main method and go on step by step. And don't trust the validator regarding the order of calls in the main method.
Anyways- these tasks got my brain working for sure 👍
LaikaLaikakaLevel 32, United States of America, United States
7 May 2025
Same. I got completely lost at the later tasks. I just follow the instruction and have no idea what i was doing. There are so many classes with similar or probably same names and I just don't remember what I have wrote at the later stage.
GO TO FULL VERSION