Designing OOP : tips from Peter

  • what objects will you have, what they will do (their methods), what data they will contain (their properties) and how they will interact with other objects or be used in the grand scheme of things
  • usually helps to think of how you can break down the problem into objects first… before going into their methods and properties… just think about what this object’s main purpose is
  • an object should be good at doing one thing… dealing with taht type of object… you dont’ want an object that just does everything
  • you want to have everything that method does “encapsulated” in the object, meaning that only it knows how to do things best… everything else that uses it is only concerned with “hey, i want this done, go do it” and it will do it and no one else has to care how it’s doing it
  • if you can, it’s good to think about the different layers of the app… you’ve got the GUI side, then you have the Data side, then you’ll need somethign that controls everything…. this is the typical way of doing apps — it’s called the MVC pattern (model view controller)
  • MVC

Leave a Reply

You must be logged in to post a comment.