I Have a website that is coded using objects in php, and someone told me 1)Can you explain what that means? 2) Can you tell me downsides of OOP in php Vs other coding styles 3) Can you tell me advantages in using OOP in php Vs Other coding styles 4) What is IDE in php? Rep will be given to all that help me understand
Here are the points raised: * The OOP principles employed by the PHP language are not to my liking. * I find the way Visual Studio interacts with objects to be exceptional. Intellisense makes me so much more productive, I can hardly bare to use another IDE. * Retyping/Remembering method and property names is a thing of the past for me - due to intellisense. That's my attempt at translating the above, not my opinion. Read more about OOP principles here: http://en.wikipedia.org/wiki/Object-oriented_programming IDE = Integrated development environment, see: http://en.wikipedia.org/wiki/Integrated_development_environment
I looks like they are asserting that Microsoft's Visual Studio and C# or Visual Basic are better than PHP. C# was designed as an object oriented language, whereas objects are relatively new to PHP. Object oriented programming or OOP has many fans, including the fanatical kind. I learned to program using a blend of C and C++. I am therefore wired to use objects when they make sense to me, and to ignore them when I believe they do not make sense. Visual Studio is an IDE or integrated development environment. Some offer drag and drop functionaility, insofar as you can drag an cion, which represents a bunch of underlying code, and plop it in place in your program. This is nice for creating forms and using buttons, boxes, lists, and text entry blocks. Microsoft bundles an IDE with the programming languages it makes available. Others, such as PHP and perl, do not come bundled with an IDE. There are IDE's for PHP or varying levels of complexity, completeness, and usefulness. Personally, I just use a text editor, a local instance of Apache, a web browser and the command line to create and test code in PHP. That is not an IDE, but it gets the job done. I do not believe there are any downsides to using OOP in PHP, although it might be overkill for small projects. The whole notion behind OOP is that it can be used to create reuseable blocks of code. The advantage of OOP is that you extend the functionality of exiting blocks of code through inheritance. In my experience, OOP is not always as readily reuseable as its proponants argue. In order to be eminently reuseable, some objects or classes become inordinately large. This can be a problem in situations where memory and execution speed are issues. Leaner objects may not offer the functionaility needed and you need to inherit that underlying object to build a new one which fits your project. Often that rebuilt object is not useful in other projects. Really, I think the best way for you tpo get your feet wet is to try it and see if OOP speaks to you. The MS products are all available as free downloads. So, the only resouyrce spent is download time from Microsoft's servers and a weekend or two playing around in the new environment. If you have XP-Pro or Windows server, you have IIS and you can run any web creations locally to see if you like their look and feel, when compared to PHP. To get a feel for PHP OOP, try playing with Smarty or TemplateLite or ADOdb Lite. A major upside to trying to use classes and understand how they work is that you will probably start to clean up your own procedural coding style. You will be more alert to situations where you are writing the same or similar bits of code to accomplish the same task throughout a project. That will lead to cleaner code, whether through increased use of locally created functions or classes.
WOW!!! Great responses Guys/Girls... Thank you so much for spending the time and responding to this thread. I am leaving you rep !!! Thank you sooo much!
From my experience that is 100% true. I still use OOP when appropriate which happens to be most of the time for me but the reusability is certainly not what it is hyped up to be.
What a bizarre thing to say... they're comparing PHP as a language against VS's IDE. They're comparing apples and oranges! Now of course, the 'intellisense' type support in PHPIDE and the like is not great, but I think it's unfair to compare the two that way.
Codegear (delphi) has a new RAD ide for php with drag and drop bits and pieces, that i will be checking out, as soon as a raise a spare $249. It's another piece of the puzzle, which the 'shitty' commentator isn't probably familiar with.