MVC is a design pattern that you can use.
There is an article here that might be helpful, except for this one aspect:
"Please note that this MVC discussion is within the context of desktop applications; Web applications are another story and beyond the scope of this article."