vendredi 29 septembre 2017

Design pattern observer useful?

For my example:

I do a graphic turtle. So, I have 2 JFrame, one to display the turtle and its movement and some button like "Return", "Change mode". The other one is still a command where user can write commande like "Move forward".

Before I develop, I need to do an UML for the conception.

I will use design pattern MVC and i'm thinking about design pattern Observer for this which will help me to notify thanks to my second JFrame (command interface) to the first JFrame (turtle screen).

I don't know if it's the good idea because I think Observer is when you have dynamic or a lot of View to manage no? (I have only 2 in this example).

Maybe, i'm a little bit confuse with the Observer pattern

Aucun commentaire:

Enregistrer un commentaire