13, May 2008

10 projects every php developer should use - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: 10 projects every php developer should use
« previous next »
Pages: [1] 2 Print

Author Topic: 10 projects every php developer should use  (Read 43910 times)
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7824
39879 credits
Members referred : 3



« on: Nov 09, 2007, 12:50:35 PM »




As a php web developer, you should know that php is probably the language that has the biggest code repository. So no matter what module you want to include in your project there should be an open source solution.

This can help in various ways, but just in case you can't think of one, here I put a few :
  • Open source is worked by many people, so the result is for sure better than one man's work
  • You can have free updates to your code, while otherwise you should code the updates each time something new comes up
  • You save development time while your project is getting better
   
Anyway, after many years as a web developer, I've compiled a list of php classes that can be easily integrated in any project and I am regularly use.

Sending Emails

Sending emails is something very common for every web site. Php's mail() Visit through proxy function is good for this, but what if you want to attach a file, or send through an SMTP server, etc? Well in that case you should use phpmailer Visit through proxy

User Manipulation

Another common module is the user module. With that you can manipulate users (login, logout, register, etc.) Personally I've never found a project that is good enough, so I created my own Smiley

Php user class Visit through proxy is a module that can be used even in established projects, as it uses variable data for database tables, fields, session variables, etc.

Fetching RSS Feeds

Ever wanted to fetch an rss feed from your project? Well there is always an easy way to fetch a feed Visit through proxy but in most cases you need more than that. When that is the case you should definitely use Magpie RSS Visit through proxy

Geotargeting

There are many times that you need to know where are your visitors coming from. Maxmind Visit through proxy gives a solution to this. For a complete tutorial check this article Visit through proxy

Grabbing Remote Content

Some times RSS is not enough so you need to grab the content of a web page and parse it. If you are a huge fun of preg you should not continue reading, but if you are not you definitely need the htmlSQL class Visit through proxy The htmlSQL class allow you to access html values with SQL code. Nice huh? Smiley

Trackback

Sending and receiving trackbacks is vital for a web site in our age. And in fact it is very easy if you are using a class like php trackback Visit through proxy

Template System

Another thing that all sites use is a template. A template engine can save you lots of time, while it can make display changes very easy. A complete template engine that most projects use is Smarty Visit through proxy

BBcode

BBcode used to be a functionality for forums, but as more and more sites use it in order to be more friendly to their users, you might want to use BBcode to your site. The problem is that BBcode requires a lot of coding and I am not sure if you have the time for this. If you don't you'll find StringParser_BBcode class Visit through proxy very useful Smiley

Paypal Payment Integration

As you may know paypal has a nice API for developers who want to integrate paypal payments in their sites. The paypal IPN integration class Visit through proxy helps you make use of it and start accepting payments in 20 minutes.

Editor Controls

I don't have a problem to make changes to a site using phpMyAdmin or a simple text area, but when it comes to my clients I have to give them more than that. A javascript WYSIWYG editor is a perfect solution but as it requires countless hours to get it done I would suggest you to use the tinyMCE control Visit through proxy

Hope you enjoyed this list. If I forgot something feel free to comment above Smiley


Trial and Error my two best teachers Cool
Promote your blog for free.... Visit through proxy

Last blog : Keep it Legal - Tims guide to legal notices
Global Moderator
Internet Junkie
*****
Gender: Male
Posts: 1807
9006 credits
Members referred : 6



« Reply #1 on: Nov 09, 2007, 01:40:28 PM »

Thats a nice list of classes and I have used most of them before. Can't think of any other good ones at the moment, but if I do I'll add them here.


Last blog : Are You Stumbling Yet?
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6236
38242 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: Nov 09, 2007, 01:44:16 PM »

great list Nick, I'm sure I will use some of them in future projects


Last blog : Database Management with phpMyAdmin
Global Moderator
Internet Junkie
*****
Gender: Male
Posts: 1517
6803 credits
Members referred : 8


Gimme all your cookies!!!


« Reply #3 on: Nov 10, 2007, 02:19:37 AM »

Thanks Nik, great list! I am sure I will use some at a later stage too...


Last blog : Site of the Month - August 2007
OMG!I am geek
**
Gender: Male
Posts: 57
370 credits
Members referred : 0



« Reply #4 on: Nov 10, 2007, 08:23:45 AM »

Thanks, Nik! This list came just on perfect time for me Smiley
Community Supporter ?
World Wide Whale
***
Gender: Male
Posts: 159
1042 credits
Members referred : 1



« Reply #5 on: Nov 10, 2007, 10:42:43 PM »

Thanks for sharing Smiley
Bill Cosby is my Father
*
Gender: Male
Posts: 4
24 credits
Members referred : 0


www.garlisch.net


« Reply #6 on: Nov 10, 2007, 11:26:03 PM »

Good stuff. I am always looking for more code to "borrow"!   Wink

But, I have a Q of a technical nature...

I have not been able to justify the use of a templating engine (such as smartie) over using PHP itself as the templating engine. It just seems to me that non-PHP templates would be far less efficient than PHP templates.

Can you give me any technical reasons why a templating engine approach is superior to PHP templates? What am I missing here?

thanks!!
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7824
39879 credits
Members referred : 3



« Reply #7 on: Nov 10, 2007, 11:29:27 PM »

First of all welcome to webdigity dbgarlisch Smiley

The main reason to have a template engine is that you separate your code from your template. This way you code much more easily, and you can outsource design without problems.

Trial and Error my two best teachers Cool
Promote your blog for free.... Visit through proxy

Last blog : Keep it Legal - Tims guide to legal notices
I crack Photoshop!
*
Posts: 3
22 credits
Members referred : 0


« Reply #8 on: Nov 11, 2007, 12:39:19 AM »

I signed up for this forum from digg because of this article.  I hope to see it grow.  The paypal IPN class will definitely be helping me out quite a bit in the future.  Oh the hairs I've pulled trying to work with their API. 
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7824
39879 credits
Members referred : 3



« Reply #9 on: Nov 11, 2007, 12:52:25 AM »

Yeah working with the API directly can be a big pain in the *** Smiley

Trial and Error my two best teachers Cool
Promote your blog for free.... Visit through proxy

Last blog : Keep it Legal - Tims guide to legal notices
Bill Cosby is my Father
*
Gender: Male
Posts: 4
24 credits
Members referred : 0


www.garlisch.net


« Reply #10 on: Nov 11, 2007, 02:45:49 AM »

Sorry Nikolas, I didn't present my original question very clearly.

I fully understand, and agree with the use of templates to separate back end logic from visual presentation (i.e. MVC pattern).

I was referring to the choice of which templating engine to use. You recommended Smarty in your original post. And, from what I have read and heard, Smarty is a very robust engine!

However, I have been using (in my limited experience) PHP itself as the templating engine. Instead of embedding Smarty syntax in the template files, I just embed PHP code. These links explain this approach very well:
  http://thephppro.com/articles/pte.php Visit through proxy  and  http://www.massassi.com/php/articles/template_engines/ Visit through proxy

I am just looking for feedback as to why PHP as a template engine is a good or bad idea.

thanks again!
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6236
38242 credits
Members referred : 374


It's time to use PHP5!


« Reply #11 on: Nov 11, 2007, 10:56:29 AM »

@dbgarlisch

hi and welcome at webdigity.

It's nothing wrong to mix your html with php snippets, a lot of people doing this. The reason to use a real parser is that it will take less server resources. Since php parses the html on the server side php has to do a lot of more work (parsing diff. peaces) while parsing one (bigger) peace of code is a one time action.

I hope that helps Wink


Last blog : Database Management with phpMyAdmin
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7824
39879 credits
Members referred : 3



« Reply #12 on: Nov 11, 2007, 11:28:53 AM »

I think dbgarlisch means something different Olaf.

For instance you are creating a mini site that every page has the same template everywhere. In that case Smarty may be too much because you are actually need a template that uses just a few variables with the content your engine creates.

Smarty is better when you have different templates (or pages that use different parts of your template bits) and when you need extra things like caching.

Trial and Error my two best teachers Cool
Promote your blog for free.... Visit through proxy

Last blog : Keep it Legal - Tims guide to legal notices
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6236
38242 credits
Members referred : 374


It's time to use PHP5!


« Reply #13 on: Nov 11, 2007, 11:31:48 AM »

Nick I answered this question Cheesy

Quote
I am just looking for feedback as to why PHP as a template engine is a good or bad idea.


Last blog : Database Management with phpMyAdmin
Google dot what?
*
Posts: 2
12 credits
Members referred : 0


« Reply #14 on: Nov 11, 2007, 06:58:04 PM »

One reason you might want to use Smarty rather than just straight PHP is that you can limit how much control the template pages have. If you have someone else writing your templates, this can be helpful. However, if you're coding the templates yourself, I agree that it makes more sense just to use PHP, so long as you are smart about keeping your logic and presentation code separate.

As for sending mail, I've found Swift Mailer Visit through proxy to be superior to phpmailer.
Bill Cosby is my Father
*
Gender: Male
Posts: 4
24 credits
Members referred : 0


www.garlisch.net


« Reply #15 on: Nov 12, 2007, 04:10:55 AM »

One reason you might want to use Smarty rather than just straight PHP is that you can limit how much control the template pages have. If you have someone else writing your templates, this can be helpful.

Thanks for the feedback!

I have heard/read this reason before. And I can definitely see the merit if you have "untrusted" 3rd party people creating the templates.

But I have to wonder if the security concern is worth the performance hit?

And I say "performance hit" assuming that Smarty and other template engines are actually more resource intensive than using PHP as the engine? It just seems "obvious" to me that PHP would be more efficient. But my assumption could be wrong!

Has anyone ever done or heard of any performance comparisons between the various template engines including using PHP as the template engine? I have not.
Bill Cosby is my Father
*
Gender: Male
Posts: 4
24 credits
Members referred : 0


www.garlisch.net


« Reply #16 on: Nov 12, 2007, 04:16:32 AM »

Smarty is better when you have different templates (or pages that use different parts of your template bits) and when you need extra things like caching.

Caching is aslo possible using PHP as the template engine. See the CachedTemplate class here Visit through proxy

David
Just another rainy day
*
Posts: 1
6 credits
Members referred : 0


« Reply #17 on: Nov 20, 2007, 02:05:13 PM »

Well half of the stuff such as email, RSS or user auth is included in Zend Framework Smiley

Zend Framework is salvation for PHP world Smiley
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6236
38242 credits
Members referred : 374


It's time to use PHP5!


« Reply #18 on: Nov 20, 2007, 02:07:02 PM »

Well half of the stuff such as email, RSS or user auth is included in Zend Framework Smiley

Zend Framework is salvation for PHP world Smiley
lol this is great Smiley (check the blog link bvelow my signature)


Last blog : Database Management with phpMyAdmin
Just another rainy day
*
Posts: 1
6 credits
Members referred : 0


« Reply #19 on: Nov 20, 2007, 10:13:26 PM »

I have not found Smarty to be useful at all.  I use a PEAR module called HTML_Template_IT.  This seems to separate the HTML more from the PHP programs than Smarty so the web designers can do their thing and I can do mine - PHP programming.
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7333
Tags : php open source class Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] 2 Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: 10 projects every php developer should use
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 13, 2008, 11:15:46 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 34.931
Total Topics: 7.262
Total Members: 3.482
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: ondho

21 Guests, 4 Users online :

11 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.