Alexander

Alexander

  • NA
  • 18
  • 85.3k

How to use OOP in a real application

Aug 14 2012 7:31 AM
Hey,

it's me again, I know I have asked a lot last time, but I am new to C# and I think here's the right place to ask, u helped me very much.
I want to create an application with OOP, I have read a lot about it and I think I know what it is (Objects, Accesss Modifiers, ...) but I don't know how to use it in a real Application.
For example if u have a form "Customers", where u can add, list, edit and delete customers (CRUD) should I create on class for each form where I put all my functions in like
saveCustomer(vars), getCustomer(id), ... or should I create to classes like
Controller (where I put all my programing logic in, handle inputs...) and a Model (where I handle the database access, queries)
I hope I have explained it understandable and someone can help me.
A little example application would be also great.

Thanks

Answers (7)