VbScript/ASP Classic good OOP Pattern

willielemon

New Member
Hy all, I have to create a website in Classic ASP, and i really want to do a clean design so i will try to put everything in Classes and Models to emulate the ViewModel Pattern.So can you tell me if this approch of creating objects is good because i will use it everywhere\[code\]Class UserPublic NamePublic AdressPublic TitlePublic Text Public Rights 'ArrayList of Right objects Private Sub Class_Initialize() Initialize End Sub Private Sub Class_Terminate() Dispose End Sub Private Sub Initialize() Name = "" Adress = "" Title = "" Text = "" Set Rights = Server.CreateObject("System.Collections.ArrayList") ' Arraylist .net End Sub Private Sub Dispose() End SubEnd ClassClass Right Public Name Private Sub Class_Initialize() Initialize End Sub Private Sub Class_Terminate() Dispose End Sub Private Sub Initialize() Name = "" End Sub Private Sub Dispose() End SubEnd Class\[/code\]And then i do this for instantiating objects : \[code\]Dim myUser Set myUser = New User'Do some workSet myUser = nothing 'Dispose the object \[/code\]Any idea, suggestion or correction is welcome.Thanks for help.
 
Back
Top