Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Middle Tier Object Design

    This is just a quick question on your view of creating objects.

    Is it better to have an object for each method?

    i.e. obj1read, obj1write, obj1val - 3 objects

    or - 1 object with 3 methods?

    i.e. obj1 - - object
    obj1_read - - method
    obj1_write - - method
    obj1_val - - method


    What are your views on this?

  • #2
    New Coder
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    OO vs structured

    When you have an object per method you are really doing structured programming. When you have one object with three methods you are doing object oriented programming. Most people consider OO the better approach of the two.

    I have done both (which shows my age) and prefer 00. The big advantages with OO are inheritance and data encasulation. The best use of structured programming that I found was the jods where millions of rows of data were being crunched in some nasty algoritm and run time was the major consideration. By doing some really bad programming, you could make the program run much faster.

    Rita


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •