Coding OOPs

Well, we all know the features of OOPS – it serves a lot of advantages for a complex system – Code reuse, Security, and many more…

Oops (Photo credit: dingler1109)

But does just writing/implementing the module with OOPS complete your job? No.  It should also be meaningful when you define a variable/method for the Class.

Keep the following points very clear when you write a code in OOPS.

  • Make use of the real features of OOPS – Method Overloading, Data Encapsulation and Inheritance.
  • Understand OOPS principle here – Code Reuse Principle.
  • Give meaningful name for any variables/methods used in the class.
  • Make sure that when anyone looks at your code they should not have any doubts/questions except for the business requirements.

Naming Convention

A good naming convention is more than a nicety. It lets you write program that don’t need to be told about the relationship among variables and methods. Talking about coding convention reminds me one thing which helps understand the purpose of the script, called File/Method Description.

It is best explained here about coding-standard. It also have few examples which will help you to improvise the way your program should look like.

File/Method Description

  1. Give brief introduction about the script/method.
  2. Add any example which will help the reader to understand the syntax (if any) better.
  3. Add the date of the script when it is created.
  4. Give author name along with EMail ID – this helps if the reader/developers needs to clarify any doubts.
  5. Give @Copyright message if any.
  6. Give the design pattern if applicable.

help me extend this….

Have a happy coding!

Coding OOPs

One thought on “Coding OOPs

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s