Monday, March 26, 2012

OOP I need some game time!

Hi everyone,
So i'm making the move from ASP to C# .NET, and I'm new to OO, but i'm reading all about Object Oriented principles and it makes sense, the theory anyway. So I'm thinking of doing a new football tipping competition application in .NET... but I don't really see how I can apply the theory of objects to this application... eg should I be defining a user class? What would this achieve that I couldn't do in ASP already? What classes should I be defining given the usual scope of an online tipping competition?

How can OOP make for a better online tipping comp?My understanding is that first of all you will have to sit down and work out what objects you need to create and their functions, subroutines...

For example...

Imports System
Imports System.Data

Namspace Online Tipping

Public Class Login

'This class will handle all user details...

Function LoginUser
Sub AddUser
Function GetUserDetails
End Class

'This class will handle all tipping...

Public Class Tipping
Sub PlaceTipAmount
Function GetCurrentTipAmountForGivenUser
End Class

'This class will handle all the results of our football tipping
Public Class Results
Sub View Results
Function GetWinningAmountForGivenUser
End Class

End Namespace

This is a guideline of how you should structure it. Also there are many books on OOP application design etc.

0 comments:

Post a Comment