Results 1 to 8 of 8
  1. #1

    Default It's not all about OOP, for new learners in programming/software DEV


    I wrote this thread to help the new learners for programming and software development.
    For those who are professionals and experienced in the field, please excuse this thread for a moment, let's help our future programmers.

    ..
    ..
    ..

    If talking about programming and development, it's not all about about OOP. Object Oriented programming language was developed in order to re-organize the programming coding conventions and techniques for the programmer convenience.

    OOP concept are necessary when it comes to develop large systems or difficult systems. When another programmer takes over the job, at least he/she can read and understand the previous programmer's works. That's why companies implemented coding conventions. Coding convention is only limited within the company only.
    Different companies/teams has their own coding conventions.

    When it comes to develop something... it could involve anything. From customized algorithms to programming techniques. Sometimes OOP are unnecessary when it comes to special tasks. There are tasks/scripts that are too short for you to bother to create a class object, some might suggest that creating object is unnecessary.


    Most C#(c's),java,php, MFC, ..etc.... already have OOP entities that are ready to use. We call it built-in classes or built-in libraries. In that part, it is necessary to study OOP in order to appreciate the power of that programming language.
    Only create OOP or class from scratch if really needed or part of the requirement of your project.

    Sometimes algorithms are greater than OOP coding style. So it really depends how the process goes or you want it to be. Sometimes basic programming techniques are more important OOP,

    *divide and conquer
    *overloading
    * recursion
    *customized algorithms
    *pass by value, pass by reference
    *string/int/data/binary manipulation
    *nested functions, nested if else flow
    *trace logging or debugging

    without them you can't perform a better OOP.


    knowledge and information is free
    Last edited by dodie; 10-28-2009 at 01:11 AM.

  2. #2
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    there are areas that need OO Programming and there are areas suitable for a combination of Procedural & Functional Programming. Functional & Procedural is fairly easy to implement and it is useful in solving specific problem especially that involves Numerial Computation, System Routines and etc...

    for example you just join on the company, and your manager open this problem to you, that they have an existing system and one of its task is to gather logs files from the user across the network, before it runs very fast and finish its report within a couple of minutes...you have found out that increasing of the clients & subdomains makes the system slow. From here you can write a simple functional programs that help the system pre-processed the file, instead of letting the system scan the entire network as it requires to do some procedures if it is running or not, what you will do is to write a program that sends the file directly to the system (considering it has multiple threads waiting to do the task)


    before:

    SYSTEM --> SCAN NETWORK --> Client Running ---> Check Finish ---> Check Logs ---> SYSTEM.

    now:

    Client ---> Finish ---> Send Log to SYSTEM.


    on the other hand, OOP is really useful eg. Polymorphism in object-oriented programming, a ability of one type to appear as ike another type.

    Class Square, Class Triangle, Class Circle, Class Rectangle

    all of the classes above has a method of .Area() your problem is to get the area of all shapes that user's created.
    so instead of calling:

    ObjectSqauare.Area(),
    ObjectTriangle.Area(),
    ObjectRectangle.Area()


    you can do this at the same time. consider this example, written in python.

    class Triangle:
    def __init__(self, b, h):
    self.base = b
    self.height = h

    def getArea(self):
    return (0.5 * self.base) * self.height

    class Square:
    def __init__(self, l):
    self.length = l

    def getArea(self):
    return self.length ** 2

    class Rectangle:
    def __init__(self, w, h):
    self.width = w
    self.height = h

    def getArea(self):
    return self.width * self.height

    a = Triangle(5,10)
    b = Square(10)
    c = Rectangle(5,10)

    for i in [a,b,c]:
    print i.getArea()
    output of this is:
    25.0
    100
    50
    the code below is not magic:

    for i in [a,b,c]:
    print i.Area()
    even though a, b, and c is totally different shapes, but they have a common method of getting the area. if you were asked to separate 100,000 shapes that having a less than of an area of 50 then you probably know what you will gonna do. This is just one simple topic in OOP, there's a lot more, like combining it with multiple inheritance over Polymorphism, Abstraction, Encapsulation etc... especially in my favorite Decoupling, a practice of using reusable code to prevent rewritting it, and this is only where I can explained, teach, introduce or understand the real meaning of "OVERHEAD"

    just imagine all your classes, objects, are loaded into memory, why would you create another one where you have a chance to decoupled that people keep saying, don't do that, or do this, to avoid overhead... they only saying it because they heard from it, if you asked them what makes it overhead none of them can explained... better go back to functional programming no overhead :-p

    have fun learning cheers...

  3. #3
    OOP very useful

  4. #4
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    as useful as your comment :-p

  5. #5
    Quote Originally Posted by INFRACTION View Post
    OOP very useful
    OOP is very useful especially for the Business applications like Object Relational Model(ORM).

  6. #6
    Quote Originally Posted by eax View Post
    OOP is very useful especially for the Business applications like Object Relational Model(ORM).
    not only ORM's but also Business Objects..

  7. #7
    OOP is the new generation of the Programming languages, it is very useful..one of the most comprehensive OOP programming language i've encountered is Delphi...

  8. #8
    it doesn't matter how you write your codes, in the end they will be converted to native machine codes.

    most important is: problem solving skills, patience and curiosity

  9.    Advertisement

Similar Threads

 
  1. All about DIAPER for your little ones
    By nobadz in forum Family Matters
    Replies: 189
    Last Post: 07-13-2011, 10:02 AM
  2. Replies: 10
    Last Post: 02-06-2011, 11:44 PM
  3. Replies: 11
    Last Post: 05-12-2010, 02:19 AM
  4. Looking For: TSRs for new account in convergys!
    By blueleigh25 in forum Jobs
    Replies: 10
    Last Post: 11-15-2009, 05:28 PM
  5. Kinsa naa banda dira / looking for new bands in town
    By MERCONCEPT in forum Parties & Events
    Replies: 12
    Last Post: 10-22-2009, 11:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top