Hi there,
pedrotuga wrote:OOP is a waste of time if you are not planing to integrate a team in a medium-size project at least.
OOP is based around the notion of use/reuse and modularisation and not collaboration or project size. It doesn't matter how many people use it or whether you are using your application for small projects or enterprise.
pedrotuga wrote:Like... whats the point of writing OOP aplications when you are developing them yourself and have absolute knowledge about its conception?
What if you needed the same functionality in another project? or perhaps a new concept?
You have the same components like database, request, routes, input filtering and html view helpers? These are some classes that I use in most of my projects, yes you can build a library and move it around, but what would happen if you had to maintain the application 6-7 months down the track, forgot about the concept of the application?
Do you want to rely solely on documentation or your memory? If so, then there's more pressure on documentation to be corect, it ends up playing an integral part of the application instead of the icing on the cake and on yourself to remember the concept of the application.
OOP not only opens doors for you to create modular code, but also to develop self documenting straight forward code. You'll often read/hear those who program within the Object Oriented Paradigm say that catchy kareoke spawned phrase "follow the bouncing ball", that's exactly what they mean, you can follow the process of code execution from one module, to another to another with ease because the code is almost self documenting (especially when you get the hang of it al).
pedrotuga wrote:IMO it only makes it more dificult and gives you a lot more work defining all the classes and its routines... anyway... this is just my opinion, my experience in OOP was painfull and meaningless.
THe definition of classes and routines helps you keep track of your code. What would you rather have 10 classes in 10 files on average 100 lines of code per class file? or 3 files on average 333 lines of code per file.
I know the experience is bad, I've been through it, it was a little bit more painful for me as I had just drummed in procedural programming into my brain for about 3 straight months getting off the programmers answer to crack cocaine (quick and easy spaghetti code).
It was a totally new angle and I had built many a god class before realising that my forms class was not going to work. (I had form writer, form processor and form fields classes which spanned over 10 different forms cringe). THat was painful...
But in the long run, patience and persistance will pay off. Forget what the Java programmers tell you and say that Object Oriented Programming is easy, it's NOT, especially if you are a procedural programmer - Procedural Programming is a discipline that deals with the application as a whole which have different features to it.
Object Oriented Programming divides an application into components and give them the necessary methods (functions) to talk to each other when necessary.
To answer the initial posters question:
PHP would be ideal for points 2 and 3 of your criterion. Because it's a dynamically typed language, perhaps the freedom given to you by php may give you some bad habits. Which can of course be overcome. If this is the option you choose, make sure that you learn OOP - it's crazy to create spaghetti codem dropem software. bars maintainability and reusability.
Java would be ideal to learn if you were serious about learnig good practices as it has been around the longest and is still the big player in application development.
It certainly is useful, but I do not know about its web component and how portable it is.
I've not seen Python code nor text on Python to give you constructive advice on this language.
Hopefully this helps you out somehow.
Good luck with it.
Regards,