Project

General

Profile

MVC Design Pattern in Wt for Code Reusability

Added by Joseph Witanto almost 9 years ago

Hi, I'm trying to implement MVC (Model-View-Controller) Design Pattern in Wt, so that the code can be reused, because I may try to implement it in other platforms using C GUI toolkits (I have used SFML for school projects, but I plan to use Qt or wxWidgets in the future)

I tried to study from the blog example and realized there are model classes (+ session) and view classes. But it seems that there is also business logic in the view classes?

I also found several discussions:

- Wt Desktop (Wt, Qt, FOX), backend and frontend http://sourceforge.net/p/witty/mailman/message/26137596/

- WTemplate for html & c separation http://redmine.webtoolkit.eu/boards/1/topics/2898

But I don't understand quite much how to implement it in code (I'm still grasping the concepts), especially because Wt uses signal and slots which I don't find in simple application I've tried using other libraries.

Can someone give hints / thoughts about this? Example classes and how they interact will be very helpful

Thanks very much for the help

Happy New Year :)