Anyone used Prototype and Script.aculo.us?
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Anyone used Prototype and Script.aculo.us?
I was considering reading Practical Web 2.0 Applications with PHP, but it uses several technologies I have never used, notably Prototype, Script.aculo.us, Zend Framework and Smarty. While all these new libraries and tools are a bit intimidating (particularly considering I already know jQuery, a more widely distributed library, better), it does interest me to read a project-based book that creates a reasonably large web 2.0 application from scratch using Smarty for behavior/structure seperation. While I have a good grip on PHP, I feel like I don't have very good techniques for organization of PHP, which can get ugly and disorganized very quickly due to the mixing of HTML and PHP.
So has anyone used them? Does anyone prefer Prototype and Scriptaculous over jQuery?
So has anyone used them? Does anyone prefer Prototype and Scriptaculous over jQuery?
The indelible lord of tl;dr
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Anyone used Prototype and Script.aculo.us?
The only one i have dealt with is Zend and it is used VERY widely. I do not use it myself but it has its uses. I too have been looking for some libraries to get comfortable with. I am going to look up that book.
- Lord Strife
- Posts: 104
- Joined: Wed Oct 28, 2009 3:10 pm
Re: Anyone used Prototype and Script.aculo.us?
Well i feel that smarty seems like alot extra work if you ask me. I suppose if you're building something that you plan on others maintaining or plan on realeasing it to the public for download or something, one might use smarty (such as a cms or blog type script) as it offers a "nice" structure to everything. So i guess what I am saying is it depends on what your making. I found it very hard to want to break away from the style of code I was used to writing to switch to smarty cause I felt I could display the same thing in way less steps. I made several attempts to use smarty but always fell back to not using it and everytime I speed up coding time by not having to use smarty. If you're a fast learner and understand OOP in php real well then you might have another take on it.
Prototype & Script.aculo.us = Jquery & Jquery UI (minus the large community thus minus the easily available already made plugins) there "might" be a couple things prototype & scripto has or can do better then jquery but imo not worth switching , although nothing says you cant use both on a project but I would'nt want to do it cause of the small differences or writing the js could get you mixed up at time for sure , using jquery the overall census is better performance (less coding + smaller footprint).
Prototype & Script.aculo.us = Jquery & Jquery UI (minus the large community thus minus the easily available already made plugins) there "might" be a couple things prototype & scripto has or can do better then jquery but imo not worth switching , although nothing says you cant use both on a project but I would'nt want to do it cause of the small differences or writing the js could get you mixed up at time for sure , using jquery the overall census is better performance (less coding + smaller footprint).
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Anyone used Prototype and Script.aculo.us?
Thanks for all the feedback! Basically, I was interested in Smarty because I wanted something that would make PHP more like ASP.NET (more OOP, with all of your code in one separate file; Smarty sounds a lot like ASP.NET's "Master Pages" feature). And as far as Prototype and Script.aculo.us, I guess I could take those parts of the book with a grain of salt and substitute jQuery in my own projects if I don't like P & S.A.U. I don't think Zend or Smarty are particularly dependent on it.
I will try out reading the book, and after reading the intro, I still think it will be beneficial even if I don't end up using all the same libraries and tools. I will keep an open mind with them, but they will have to wow me to make me change from things I already know how to use
Edit: Ewww, I found something I don't like about Prototype. Apparently, some of its functionality depends on actually changing the standard behavior of the DOM. So this can play havoc with other libraries. It sounds like in some cases it is 100% Prototype and Script.aculo.us or some completely different setup. Not sure if I like that. Oh well. Since pretty much everything these 2 can do can be done with jQuery and jQuery UI, I will still read the book and just substitute them for my own projects.
I will try out reading the book, and after reading the intro, I still think it will be beneficial even if I don't end up using all the same libraries and tools. I will keep an open mind with them, but they will have to wow me to make me change from things I already know how to use
Edit: Ewww, I found something I don't like about Prototype. Apparently, some of its functionality depends on actually changing the standard behavior of the DOM. So this can play havoc with other libraries. It sounds like in some cases it is 100% Prototype and Script.aculo.us or some completely different setup. Not sure if I like that. Oh well. Since pretty much everything these 2 can do can be done with jQuery and jQuery UI, I will still read the book and just substitute them for my own projects.
The indelible lord of tl;dr
Re: Anyone used Prototype and Script.aculo.us?
I suggest getting the book if only to expand your repertoire of skills. Those are all commonly found in apps on the web, so it'd be nice to learn them. I'm trying to find the time to learn Kohana and MooTools myself
w00t
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Anyone used Prototype and Script.aculo.us?
I am definitely interested in Smarty, and why not try out the Zend Framework? I have been doing 100% of my coding from scratch in PHP, and I have had just about enough of it, particularly when there are great PHP libraries out there. And I also want to spread into MVC development. It seems like every PHP library is written in that style, which is more than a small hint that MVC is really one of the only ways to create scalable, maintainable, elegant web applications.
The indelible lord of tl;dr
Re: Anyone used Prototype and Script.aculo.us?
Definitely. And while you're out there trying out Zend, you should also give some thought to the others out there. There are plenty so you have room to be choosy.
My personal run-down:
The three best IMO are CodeIgniter, Kohana and CakePHP. CodeIgniter is very light and fast, and doesn't provide some of the out-of-the-box functionality of some of the others, for instance an auth library, but this gives you room to develop on top of it exactly how you need, without extending the core too much. Kohana is similar, but provides more out of the box functionality. The downside to Kohana is that the documentation is sparse and can be a little confusing. CakePHP is like a mix of the two, albeit maybe a little slower performance-wise. I personally stray away from it because I don't feel comfortable executing shell commands just yet, and without that I'd feel like I just wasn't making the most of it.
There are others, but those are my top three picks. I'd say about Zend and Symfony that they are probably the most feature rich. And that Prado is probably the most unique, offering an "event driven programming paradigm," allowing you to attach functions to front-end events.
Zend is considered a "glue" framework, which means it doesn't enforce a whole lot of rules. This sounds perfect for you, as you've been using vanilla PHP for so long. Also, this is the exact opposite of a full stack framework, which generally enforces (at varying degrees of strictness) some rule set.
All in all I think it ultimately comes down to how they affect your work-flow. For me, CodeIgniter is perfect, though I wish it had the routing capabilities of Kohana. Happy coding!
My personal run-down:
The three best IMO are CodeIgniter, Kohana and CakePHP. CodeIgniter is very light and fast, and doesn't provide some of the out-of-the-box functionality of some of the others, for instance an auth library, but this gives you room to develop on top of it exactly how you need, without extending the core too much. Kohana is similar, but provides more out of the box functionality. The downside to Kohana is that the documentation is sparse and can be a little confusing. CakePHP is like a mix of the two, albeit maybe a little slower performance-wise. I personally stray away from it because I don't feel comfortable executing shell commands just yet, and without that I'd feel like I just wasn't making the most of it.
There are others, but those are my top three picks. I'd say about Zend and Symfony that they are probably the most feature rich. And that Prado is probably the most unique, offering an "event driven programming paradigm," allowing you to attach functions to front-end events.
Zend is considered a "glue" framework, which means it doesn't enforce a whole lot of rules. This sounds perfect for you, as you've been using vanilla PHP for so long. Also, this is the exact opposite of a full stack framework, which generally enforces (at varying degrees of strictness) some rule set.
All in all I think it ultimately comes down to how they affect your work-flow. For me, CodeIgniter is perfect, though I wish it had the routing capabilities of Kohana. Happy coding!
w00t
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Anyone used Prototype and Script.aculo.us?
Thanks for all of the rundown!
Prado sounds interesting, as that sounds just like ASP.NET's Web Forms event model. Of course, event-driven paradigms on the web are an illusion, but it is still a comfortable way for a .NET programmer to code.
I will probably try out several, but I am probably going to cut my MVC teeth on Zend since it is so well-documented. Once I get the hang of it, I will probably rip through a couple of short books on other PHP MVC libraries and see which one I will stick with. I will give CodeIgnitor a try as well. It has a Codelobster plugin, whereas there is no Zend plugin (I still prefer Codelobster even with a Zend Studio Pro license. Go figure). Thanks again!
Prado sounds interesting, as that sounds just like ASP.NET's Web Forms event model. Of course, event-driven paradigms on the web are an illusion, but it is still a comfortable way for a .NET programmer to code.
I will probably try out several, but I am probably going to cut my MVC teeth on Zend since it is so well-documented. Once I get the hang of it, I will probably rip through a couple of short books on other PHP MVC libraries and see which one I will stick with. I will give CodeIgnitor a try as well. It has a Codelobster plugin, whereas there is no Zend plugin (I still prefer Codelobster even with a Zend Studio Pro license. Go figure). Thanks again!
The indelible lord of tl;dr
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Anyone used Prototype and Script.aculo.us?
OMG, I am getting sick of trying to install the Zend Framework!! Every book has the installation all wrong (or at least it was right when they were published and it has become much more complex since then). I am surfing page-by-page through the ZF website and trying to piece together an installation procedure that works.
Is CodeIgnitor this bad? Why isn't it just a codebase I can use as I want to? I think Zend has grown and added many "convenience" features for hard-core Linux PHP devs, such as a tool that creates your basic file structure. However, it took me about an hour to get that one tool to work! It would have been 1000x easier to just make it by hand if it had told me what the structure was I needed! About 5 or 6 other things have been just like that.
All I want is a MVC framework that I can call on with include files. Is that so much to ask for?
EDIT: Wow! CodeIgnitor basically has a page set up for Zend orphans who couldn't deal with the evil installation process. I read this page here, and it reads like it was written by someone as angry as I am right now over Zend's installation process!
A quick question, though: How much has CodeIgnitor changed in the last 1 - 2 years? The only recent CodeIgnitor book has many bad reviews, and the good ones are all 1 - 2 years old. I would like to have a nice book to read to check it out, but if the style has changed severely it may do more harm than good.
Is CodeIgnitor this bad? Why isn't it just a codebase I can use as I want to? I think Zend has grown and added many "convenience" features for hard-core Linux PHP devs, such as a tool that creates your basic file structure. However, it took me about an hour to get that one tool to work! It would have been 1000x easier to just make it by hand if it had told me what the structure was I needed! About 5 or 6 other things have been just like that.
All I want is a MVC framework that I can call on with include files. Is that so much to ask for?
EDIT: Wow! CodeIgnitor basically has a page set up for Zend orphans who couldn't deal with the evil installation process. I read this page here, and it reads like it was written by someone as angry as I am right now over Zend's installation process!
A quick question, though: How much has CodeIgnitor changed in the last 1 - 2 years? The only recent CodeIgnitor book has many bad reviews, and the good ones are all 1 - 2 years old. I would like to have a nice book to read to check it out, but if the style has changed severely it may do more harm than good.
The indelible lord of tl;dr
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Anyone used Prototype and Script.aculo.us?
I have used CodeIgnitor very little but from what I have heard and read it is updated often and has a strong user base. Yes Zend can be a nightmare. Totally forgot about that. It really doesn't make a whole lot of sense why it is either.