PDA

View Full Version : PEAR - How would you rate it?



Clicken
07-19-2011, 01:17 AM
PHP Extension and Application Repository
PEAR - a framework and distribution system for reusable PHP components.
http://pear.php.net/index.php


I came across this during my search and study of php mail forms and thought before getting involved with it, I would ask around for feedback from those who have experienced it. I have read the online manual and it looks really good but thought I would ask for some opinions before 'going for it'.

Basically i want to know if it is a worthwhile effort to immplement and use or if perhaps there is something comparable but better to work with.

Any comments from those who have experienced PEAR would be appreciated.

mikmik
07-19-2011, 02:18 AM
Speaking as someone that has a little bit of PHP experience some time ago, I liked using Pear. I seem to remember using it for implementing ajax or something in regards to Google maps and it was great. That was three years ago, however, so I'm not sure these days. I wonder if it is still being developed or supported?
Pretty cool library, I sure liked it.


Sweetie!

weegillis
07-19-2011, 02:20 AM
Just tossing this one out there:

I knew this topic had come up before. There are 233 listings in this SERP.

PEAR site:www.webproworld.com (http://www.google.ca/search?q=PEAR+site%3Awww.webproworld.com)

weegillis
07-19-2011, 02:29 AM
One of those results has this line jump out right off the top:


The first question you should ask yourself is do you need to use it?

Clicken
07-19-2011, 03:24 AM
The following quote is from the same post as the one you quoted weegillis...

I don't use any of the pear libraries myself, most php programmers will find them bloated and overkill for most situations and usually end up developing their own php framework that handles db abstraction, templating, mailing, sessions, input sanitization and more depending on the level of application they are developing.Note the phrase "most php programmers"... "find them bloated and overkill"...
"end up developing their own php framework"...

That is why I was interested in it. It is php ready, I can't write php but I might could peice together the different pear packages, such as for e-mailing forms.

I will keep reading through the different post from that link as I await more imput from others.


That was three years ago, however, so I'm not sure these days. I wonder if it is still being developed or supported?The link I posted to the PEAR website has an entry "Hot off the Press" dated July 2011!

mikmik
07-19-2011, 11:59 AM
The following quote is from the same post as the one you quoted weegillis...
Note the phrase "most php programmers"... "find them bloated and overkill"...
"end up developing their own php framework"...

That is why I was interested in it. It is php ready, I can't write php but I might could peice together the different pear packages, such as for e-mailing forms.

I will keep reading through the different post from that link as I await more imput from others.

The link I posted to the PEAR website has an entry "Hot off the Press" dated July 2011!
Thanks, I'll check it out. I'm getting hosting (again) next week so I'll fool around with it a bit. I'm like you and can't really write much php right now so I Love scripts and libraries.

Clicken
07-19-2011, 06:12 PM
Thanks, mikmik!

@ weegillis,… the link you provided with the WPW topic search results has really helped, Thank-you very much. You also showed me a new way to search the engine by using the keyword before the site: prompt. ‘PEAR site:webproworld,com’. I used the wpw search box before starting this thread and got a lot of results however those results do not have a snip-it displayed. Most helpful!

Back to topic… After reading the responses to some of those results I am feeling reassured about using PEAR.

This thread by k-gun shows an example using the email form which I am wanted to try as my first lesson. I really value his opinion so his, along with others, gives me the confidence to ‘Go for It’.
http://www.webproworld.com/webmaster-forum/threads/49933-The-low-hanging-fruit-of-OO-PHP

The Package he referred to in the thread has been updated to HTML_QuickForm2 which is what I am interested in.

THANKS K-GUN!

weegillis
07-19-2011, 08:41 PM
@Clicken, glad you found the post by kgun. I was sure he had written on the topic, and that you would discover it in due course, which you did. Now to let the learning begin.

kgun
07-20-2011, 09:40 AM
THANKS K-GUN!
Changing my nick:lol:8-)


PHP Extension and Application Repository
Basically i want to know if it is a worthwhile effort to immplement and use or if perhaps there is something comparable but better to work with.
Pear is a php framework http://www.phpframeworks.com/

Some frameworks set at strict frame for what you can do. Others are more flexible. A framework is meant to implement some form of DRY=Don't Repeat Yourself, since the wheel is invented once. For simple tasks a framework may be overkill.

Pear was invented by Norwegian http://stigbakken.com/ that often sets a standard for both syntax and a good framework. He also coauthored this http://www.computer-books.us/php_2.php free book that may be better than many bought books.

http://en.wikipedia.org/wiki/Andi_Gutmans is another co author of the book. That should speak for itself.



In 2004 he wrote a book called "PHP 5 Power Programming" [10] (http://en.wikipedia.org/wiki/Andi_Gutmans#cite_note-PHP5-Power-Programming-Amazon-9) together with Stig Bakken (http://en.wikipedia.org/w/index.php?title=Stig_Bakken&action=edit&redlink=1) and Derick Rethans (http://en.wikipedia.org/w/index.php?title=Derick_Rethans&action=edit&redlink=1).

Clicken
07-20-2011, 12:47 PM
Pear is a php framework http://www.phpframeworks.com/
Wondering why PEAR wasn’t on that table of comparison?
Of those frameworks listed, Yii was checked for everything except PHP4, which I am guessing doesn’t matter.

I have time to explore my options. I have to wait for misterscreenjeans to finish his project before he will have time to guide me through the installation process. I have never had to install anything, he has always done that. I know I will need guidance as I tend to get lost in the paths when working on sites, however being female, I am not shy about asking directions!

kgun
07-20-2011, 05:35 PM
Wondering why PEAR wasn’t on that table of comparison?
Of those frameworks listed, Yii was checked for everything except PHP4, which I am guessing doesn’t matter.

I was wondering about the same.

Another very small framework is neither on the list http://sourceforge.net/projects/ulyssesframewor/



An open-source, powerful but lightweight application development framework for PHP 5 and PHP6 running on Linux, UNIX and Mac OS X platforms.


That framework is mentioned and used in one of my favourite php books: http://www.wrox.com/WileyCDA/WroxTitle/Professional-PHP6.productCd-0470395095.html that may be ahead of time.

That framework is so small 34.4 kb that it should be able to modify it yourself. If you download it be sure that you get the last version.

Also note that on the http://www.php.net/ net page there are some recent news about

5.4.0 Alpha2
5.3.7 RC

That is long awaited since php 5.3.6 has been the offical stable version for a fairly long time now.

Also scroll down to php documentation update that has a small note about pear that I personally regard as a support for pear on the official php site. I can not find similar mention of other frameworks:wink:

Also note:



The recent release of PHP 5.3 included most of what was originally desirable about PHP6. At last year's Zendcon there was a presentation titled "State of PHP 6", you can see the slides of this presentation here: http://zmievski.org/files/talks/zendcon-2009/php-code-ideas-people.pdf


Source: http://stackoverflow.com/questions/2610763/what-is-the-holdup-on-php-6

An important feature like php namespaces http://php.net/manual/en/language.namespaces.php are supported in php 5.3.6.

So if you choose one php framework be sure that you find one that is prepared for php 6 or whatever it is called.



By that it's a bit early to decide whether the next version of PHP will be called PHP 5.4, PHP 6 or maybe even PHP 7. PHP is alive and kicking!



Source: http://schlueters.de/blog/archives/128-Future-of-PHP-6.html

nichibocars
07-20-2011, 09:56 PM
PEAR has a lot of helpful classes that can save you time when you are creating your application. Also unless you are wanting to learn HOW to do something by yourself or you are trying to achieve better performance, there's no reason to re-invent the wheel.

Clicken
07-21-2011, 01:01 AM
Ulysses Download Status: not much going on there. 1 (one ) download, in Norway of all places.
http://sourceforge.net/projects/ulyssesframewor/files/stats/timeline
I couldn’t find much of anything about that framework. It might become something as it gets more attention and it might be good for those who know PHP. And it is probably good for kgun to post in this thread as a reference for others to check out.


Also scroll down to php documentation update that has a small note about pear that I personally regard as a support for pear on the official php site. I can not find similar mention of other frameworks Yes,… that speaks volumns..


PHP has several new documentation features that the community should be aware of: …
 pman - PHP man pages
 $ pear install doc.php.net/pman…Very reasurring!


I hear you nichibocars, along with others making the same comments…
PEAR has a lot of helpful classes that can save you time when you are creating your application. Also unless you are wanting to learn HOW to do something by yourself or you are trying to achieve better performance, there's no reason to re-invent the wheel. I need ‘lots of help’ and just maybe, in time, I will learn a little about PHP from the experience.


This too is from the PHP documentation update linked to above

 Enhanced CHM - contains user notes (over 25,000)
 This additional CHM file is downloadable

Clicken
07-21-2011, 04:10 AM
But Wait...

I was looking further into the Yii framework and was very surprised to find the following features. This code generator might take all of the fun out of it for those who enjoy writing code.

http://www.yiiframework.com/tour/


After downloading and installing the Yii framework, run a simple console command to generate a skeleton Web application built with Yii. The application is fully functional, with nice features including user login and contact form. It is a good starting point for implementing more sophisticated features.

Using the built-in Web-based code generator, you can turn database table definitions into model classes instantly, without writing a single line of code. The model classes will allow you to access the database tables in an object-oriented fashion.

Using the aforementioned code generator, you can further generate code that implements the typical CRUD (create, read, update, delete) features for the selected database tables. The generated code is highly usable and customizable, following the well-adopted MVC (model-view-controller) design pattern. Again, Yii does all the dirty work without requiring you to write a single line of code.

Finally you need to customize the code to fit your exact needs. For example, to hide the password column on the user administration page, simply cross out the 'password' element shown in the following user admin view file:


"Holy key-strokes, Batman!"

weegillis
07-21-2011, 04:32 AM
But Wait...

"Holy key-strokes, Batman!"

Kinda takes a lot of the work out of it, eh? It does sound like what you want.

Clicken
07-21-2011, 04:56 AM
If it sounds too good to be true...

I will keep reading to see what the catch is.

kgun
07-22-2011, 06:16 AM
PHP Extension and Application Repository
PEAR - a framework and distribution system for reusable PHP components.
http://pear.php.net/index.php

What does that link tell you? That pear is a sub domain of the php.net official site.



... a framework and distribution system for reusable PHP components.

My bolding. In my view a library is a better word, and that may be the rason why pear is not mentioned on the http://www.phpframeworks.com/ site, but the well known Norwegian CMS system http://ez.no/ (English text in upper right corner) is:confused:.

kgun
07-22-2011, 06:46 AM
If it sounds too good to be true...

I will keep reading to see what the catch is.

I see that http://www.yiiframework.com is voted to the top in July 2011 http://www.phpframeworks.com/top-10-php-frameworks/ . Some very important questions you should get an answer to:

Flexibility - How easy is it to combine with other libraries / frameworks.
Does the latest version support name spaces and can other frameworks / libraries be included in their own name space?
Support and distribution. Does it have a big community? What about a FAQ / Wiki?
Mention of the framework on well recognized slites like stackoverflow / sitepoint etc.

php frameworks site:stackoverflow.com/ (Many interesting hits)

php frameworks site:sitepoint.com/
http://www.sitepoint.com/rasmus-lerdorf-php-frameworks-think-again/ from the mouth of the horse
( http://en.wikipedia.org/wiki/Rasmus_Lerdorf )
Here http://stackoverflow.com/questions/2985413/php-frameworks-codeigniter-vs-yii-vs-custom is an interesting discussion of the well known Codeigniter framework vs Yii that may interest you.
How can the framework be combined with blogging platforms like wordpress and CMS systems like Drupal. Is there a seamless integration? An analogy, the well known JavaScript library jQuery ( http://javascriptlibraries.com/ ) are easily integrate4d into both Wordpress and Drupal.
Backward and forward compatibility, where forward compatibility (name spaces is one example) is most important in my personal opinion. I don't drive a car by looking in the mirror:shock: