I did some research on the Prototype library and the general consensus seems to be that the jQuery Library is far more popular than that of its Prototype counterpart. I also read some concerns that some of the Prototype Library uses code that may be rendered obsolete with future iterations of the Document Object Model (true?).
With this in mind would I be wise to adopt this Library in more projects in the future? Or perhaps It would be advantageous to stick stick to my tried and tested Procedural style of code?
I very much look forward to your opinions on the subject!
Kind regards and thanks,
This might not be helpful but to be frank, it depends on what you are doing.
Like for example, if you are creating a jQuery style image slider, OO techniques will most likely be overkill; unless you have a heap of customization options or if its particularly advanced.
If you are just checking whether a form field is completed, a procedural script is fine.
If you are however creating a RIA then you'll probably want to use OO as the size of the application will probably benefit from it and even then a procedural approach may be fine.
Basically, it depends on the application you are working on & knowing which is best is something that will come from experience and understanding of what OO is and what the benefits of both approaches are (in the context of what you are doing).
But even then, with PHP; I usually create stuff using OO as my framework is an OO framework using an MVC design pattern. If I look at some of the smaller applications I have created that are OO, there are quite a few where I could have used a procedural approach and I wouldn't have really lost anything from doing so; but then I wouldn't have really gained anything either.
Also your application design will be influenced by the above. A bit chicken and egg I know.