OOPs to POPs
Creating the Employee Object
Consider the typical
Employee object. An
Employee object may have some fields and functions. In this example, I am going show you how to create an
Employee object, and an
EmployeeCollection object which will hold a number of
var obj=new Array();
eval("var t=new "+ClassName+"()");
for(_item in t)
str="<Table border=1 width=200 ><tr><td>" +
How it works
eval" is used to perform dynamic operations. We can declare variables at runtime. The "
CreateCollection" function is used to create a collection object. A collection object is nothing but a combination of arrays and any business entity. Here the entity object is
CreateCollection" first creates the array object and it will add all the fields and functions from
EmployeeCollection to the object. So we will get both
EmployeeCollection's fields and functions.
"Manikandan Balakrishnan" Working as an IT consultant with LogicaCMG’s Global Service Delivery part-India, he has a good experience on Web/Win development (C#, Asp.net) and enterprise application integration (BizTalk) technologies. Prior to this he worked on world’s biggest e-learning product with Excel Soft Technologies, Mysore.
City: Coimbatore, TN