Object! Object! Object!

One thing that kept  blocking my  ‘To Do’ list was writing a blogging engine. Thats because it would be cool. Adding up ,I wanted to enhance my command over the language.Thats pretty how I learn a new language.

So on one fine day, I set out to cross it out from my list, when I realized I was already a bad OOP perciever. Thats obvious b’coz the only object oriented programs I’ve written in school and college contained a class called box (or something analogous). Construct it width height width blah blah blah. Inherit it. Overload it. And apparently that tiny box doesn’t do ANYTHING!

Thats how the ‘sparkling neon bulb’ of writing a blog software implementing Object Oriented Concepts came up.
What else? So plan it up.

  • My blog will contain posts. Thats what a blog is all about.
  • It will contain properties like time it was posted, Who posted, Title, etcetera…
  • It has to encompass some operations too that would manipulate its properties uuuuhhh say, like GiveMeSomeValues(), GetMyValues(),GetMyValuesSpecifically(), PushMeToDatabase(), etcetra…
  • If am not wrong, A Post can be an object in my blog.
  • If a post is an object, I’d have to create an array of objects to retrieve GetMyValues() of all the posts.Again,If am not wrong.
  • So it has to interact with database object that will have its own properties like connect() getValues(), etcetera
  • Comments, the part I Like the most, can also be made as an object, if not essentially too! with its own properties and operations.
  • Still stuck with dilemma. Am I going the right way? Am I making it complicated? Might not be a good start for an beginner of OOP.

After all its from mistakes that we learn!

Advertisements

Speak:

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s