How Do You Compare Structured and Object-Oriented Programming Against Each Other?
Structured Programming can save time and energy when writing simple programs that implement classes or complex functions as would be the case in object-oriented programming. In most cases straightforward pieces of code would get the job done. Structured programming is ideal for development of small programs as it would beat the purpose spending a lot of time and energy designing classes when an entire working program could be developed within the same time period.
This will also hold true in that small programs are easy to maintain and most fit within a single page or so, making more sense for the Web developer to visualize the program code. It therefore make structured programming well suited for small to medium website which would probably not require much maintenance.
Structured programs are easy to read and understand as you would simply need to follow the source code as it is written on the file as you would be guaranteed that there are no jumps or deviations to other pieces of code in other files. This however does not mean such a program would necessarily be easier to maintain; that brings me to the reason why object-oriented programming would be suited in other situations.
Object-oriented programming takes pride in its suitability for sustaining huge software and web development projects. This is a far better option than using structured programming when you have massive code bases. The sheer nature of object-oriented programs allows the developer to save a lot of time and energy when developing programs as the components of the programs are in the form of objects which can be plugged into the program wherever they are needed. So having an application with several hundred buttons implemented as objects would be pretty easy to maintain, for example, if the developer wanted to change the style or behavior of all the buttons, it would simply entail changing a single object which defines everything about the button and this would change every instance of the button object.
Even though object-oriented programming is suitable for large project and long term maintenance of software of web projects, this method of programming poses its own disadvantages as object-oriented programming tends to be more complex than structured programming as there is a lot as far as design the decisions that need to be made and consequently the entire task of managing the project may be a bit difficult to the inexperienced web developer.
As for performance, from a user stand point, the difference between structured and object-oriented programming may be minimal. However in some cases the fact that object-oriented programs are slower seeing as there is extra work the interpreter has to go through to compiler the classes as opposed to the structure method of running in a top down sequence. This could make one consider what method to use for their next web development project.
You can follow up on this topic by reading this article on the principles of structured programming and this article on defining object-oriented programming in layman's terms.