I won’t spend much time on explaining Object Oriented Programming as there already million of words have been written by the experts and few of them are really worth reading (to name a few, I presently read Pter Lavin’s book on OO in PHP finding it simply brilliant.).
What I just try to do is very simple, find a simmilarity between creating ‘Class’ in ASP.NET and PHP and using access modifiers I set their properties from private to public.
First, let me show how Class being written in ASP.NET
Let me crate a class called Person
_name = value;
Person person1 = new Person();
person1.Name = “Person1’s Name”;
Response.Write(“Person1’s Name is ” + person1.Name);
The thing is, I tried to keep codes of both great dynamic web language almost similar. So that one can follow the simmilarity between those get and set properties that make private variables public so that you can ultimately access them in different class, in different situation.
Hope, curious people find it interesting.