Search This Blog

18 February 2013

Too Many Defs


Before I wrote my last post, I came across few def words (ClassDef, InterfaceDef, RelDef, PropertyDef etc.). SPF schema definitions have very clear architecture of Object Oriented Modelling. It makes sense, as the more I learn, the more I get clearer picture. Let’s talk about some classic data modelling terms here.

Orthodox definition for class is a group of objects. The objects in classes have similar properties or attributes, common behaviour or operations, common relationships to other objects and common semantics. For instance, the posts in* my blog can be a class, and this particular post can be considered as objects. Smartplant being a class, SPF will become an object.

Interface talks about roles. What I can do? What am I destined to do? What is my designated work? Interface, in terms of SPF, defines the role of an object. Let’s say, role of SPF is to integrate data among tools and manage documents. Interface is important to define the designated responsibility.

Property talks about the figure. It describes an object with all of its description. Each property has a value for each object instance. For example, SPF has site name, plant name, PBS, version, etc. These attributes may be defining different aspects of an instance. To have a selective set of property, we should have a rigid (well defined to be specific) role of object in Instance.

Property Scope

Property should be scoped. While coding a program, if a variable has scope (or data type) string, and the Database has value DBNull, it would be inappropriate to return the value to variable. It will always cast an error. For example, if you tell some girl’s age as 250, either the girl will commit suicide or will kill you. You should say 250 months (better be specific in SPF, not in real life ;-) ).

This was just an introduction for succeeding posts. This will be helpful in future...

Happy Smartplanting...

* Added as per comment made in a Linkedin Discussion. Thanks to 'Mariusz Lubkowski'.