QuickTopic (SM) free message boards QuickTopic (SM) free message boards
Skip to Messages
  Sign In to access your topic list  |New Topic |My Topics|Profile
Upgrade to Pro   Customize, show pictures, add an intro, and more:   QuickTopic Pro...and check out QuickThreadSM
Topic: Well designed PHP applications
Views: 3476, Unique: 1438 
Subscribers: 3
What's
this?
Printer-Friendly Page
Subscribe to get & post, or stop messages by email Subscribe
All messages            1-26 of 26        
About these ads
Who | When
Messagessort recent-top   
Post a new message
 
Sanjay Sheth  1
11-23-2004 09:22 AM ET (US)
Wordpress is considered to be one of the better php codebases out there. http://wiki.wordpress.org/

Also, I've found that doing random searches for a particular api call, etc. on koders.com turns up some interesting sample code and open source projects.
Jason Levine  2
11-23-2004 09:31 AM ET (US)
I've found that SquirrelMail is pretty good, both from an interface design standpoint (OK, it uses frames, but in a well-designed way) and a code design standpoint.
Simon Willison  3
11-23-2004 09:39 AM ET (US)
That really is the million dollar question; I have yet to see a PHP codebase that I really like and that includes the one's I've worked on. I find that language features such as magic quotes and the unfortunate lack of module-style namespace support make it very hard to write large PHP code bases that are aesthetically pleasing.

That said, I think an example of a pretty decent overall PHP project is the PHP.net site itself; you can browse the source online here: http://cvs.php.net/phpweb/

In my experience, it's very easy to fall in to a trap of over-engineering PHP applications by trying to construct "clever" class hierachies and use OOP to encapsulate things left right and center. KISS definitely applies.

I'd love to see an example of a large, well architected PHP application that uses OOP in a smart way. Please blog about it if you find one!
Sencer  4
11-23-2004 10:23 AM ET (US)
Wordpress? Are you serious? I used to use (and hack) b2 from which wordpress evolved, and unless they have done really a lot of refactoring (rewrite?) I would not describe the codebase as exemplary. I used to appreciate b2 for it's simplicity and as a starting PHP-programmer it was easy to add and change stuff, but of course this style can become a disadvantage very quickly.

I have to agree with Simon, there really isn't one application that I could point to, for which all aspects are great. I think due to the wide variety of "styles" that PHP allows, I've seen developers going from one extreme (spagetthi-procedural) to the other extreme (massive pattern-overdose).

Rafe, are you looking for "sensible hyprid" (mixed OO and non-OO) approach, or are you looking for OO-only software? Do you think the templating should be done in PHP (e.g. savant), or in a custom-made mini-language (e.g. smarty)? Would you prefer a software that relies heavily on "external" libraries provided by other php-projects used in a black-box approach, or do you think that software which re-invents things in way which fits best for the current project?

There really are several dimensions along which to measure, and everybody seems to view a different Combination and different direction of them as "top".
Patrick BerryPerson was signed in when posted  5
11-23-2004 10:54 AM ET (US)
Edited by author 11-23-2004 10:58 AM
I like Smarty (template engine) and Horde (app framework). One that I've been meaning to look into more is Mojavi (a model-view controller). I use a fair amount of PEAR, but I wouldn't exactly know which module to point you to for "good code."

You might also want to peruse Zawodny's PHP Archives, as he talks not only about php, but php in use at Yahoo.

Being a big unit testing fan, you might also want to take a peek at Simple Test for PHP
Quillian Rutherford  6
11-23-2004 11:04 AM ET (US)
Php is a functional language with object-oriented constructs, you should be writing it just like other code you write. In fact, you should be able to take a piece of paper, write psuedo-code, and implement that almost exactly the same in any language like PHP (C++, Perl, etc). Although PHP lends itself to quick and dirty coding due to be loosely typed and flexible, there is no reason you have to write it that way.
I actually did an algorithms project in PHP because it was very easy to write it fast, I just wrote all my functions and code, then went to phpbuilder.com and looked up the correct syntax. Maybe that's just how I do things, though.
rafecoPerson was signed in when posted  7
11-23-2004 11:21 AM ET (US)
I haven't done any OO in PHP at all, and don't really plan to. I have a Java application and a PHP application that I work on, and I try to move anything seriously complicated to the Java side of things, where I understand better how to design things.

On the PHP side, I'm thinking of the most basic stuff, like dividing up logic and presentation. I'm not doing anything content management related -- it's more forms processing, and I'm just making something called foo.php and foo_logic.php so that the only thing in the main page, foo.php that's not presentation related is an include of the logic page, which only has nothing but PHP code in it.
jim winstead  8
11-23-2004 11:58 AM ET (US)
i'm partial to our open-source (GPL) issue-tracking product: eventum. very clean code. (and i say that not as someone who wrote any of the code.)
kellan  9
11-23-2004 12:42 PM ET (US)
WordPress, SquirrelMail, and Horde, all of these applications work great, but Rafe's question was about coding *style*.

WordPress for example, as much as its nice to hack on, is a mess of global variables, implicit actions, and display logic squirreled away deep in methods.

Smarty is clean enough, but it is much simpler to write clean looking libraries then clean looking apps. In that vein, I found the Seagull (a framework) code pleasing to read, though I haven't actually used it.

Rafe of course you're confusing things because you asked for well designed in one breath, and then said "but no objects", maybe I'm showing my biases here, but that sounds like a contradiction to me :)

Best practices are:

      
  • use PEAR
      
  • use PHP5 if you can get away with it (better objects and exceptions)
      
  • use some sort of template system (Savant, Smarty, Flexy, etc)
kellan  10
11-23-2004 12:48 PM ET (US)
ick. sorry about the weird spacing on that last message.

btw. jim, from looking at eventum for 90 seconds it does look nicely written. i prefer a more explicit FrontController approach, but nice separation of logical components without a lot of framework baggage,
Harry Fuecks  11
11-24-2004 05:10 PM ET (US)
As Simon puts it, the $1m question. Could write loads and loads but will keep it very short;

Check out http://wact.sourceforge.net

I've been involved with this but the real author is Jeff Moore http://www.procata.com/blog. Reading through the code (over a year ago) literally blew my mind.

It initially comes across as highly abstracted but performance is not compromised and, once you really start to look at the source, what might at first have seemed like over-engineering makes deep sense.

Whether you choose to use WACT or not, there's practically every PHP "trick" you'll ever need in there. May even be another release in December.
joeldg  12
11-26-2004 12:45 PM ET (US)
Hey..
I do this stuff for a living and have a few years..
I write some tutorials and do work currently with a group called Broadband Mechanics http://broadbandmechanics.com

"Well designed" is always subjective.

I consider one tutorial I did on phpgtk (http://lucifer.intercosmos.net/tut/) to be well designed, but another might find it cumbersome.

For me, one system I looked at, that I can think of, that struck me as nice was an ad server called OASIS which led to the following SYSV-SHMOP based content caching engine.
http://lucifer.intercosmos.net/?view=SNIP&item=120

Oftentimes I would say that places like hotscripts.com and others are not necessarily the best place to be looking for "example" code.. Great to see someone's 'first' code post or to see what people are working in the general..

Cheers
-joeldg
Rogers Cadenhead  13
12-01-2004 09:07 AM ET (US)
I recently decided that the object-oriented approach is the only way to go on my future PHP projects. It makes my Java-aligned brain happy, and the inherent unmanageability of a large PHP project can be reduced by grouping common functions together as a class and giving them instance variables. I would be surprised if any exemplary PHP project wasn't making use of object-oriented programming.
ihday  14
05-07-2006 05:49 PM ET (US)
Make Money With Pay-pal!! (as seen on OPRAH!)

Get Your PAYPAL CASH Gift Today! This thing really works, all you have to do is be honest and you will love the benefits. This is a great way to make money-using pay-pal. ONLINE! With just $5, a Pay-pal account and 30 minutes you could make $$Thousands$$ in 2 SIMPLE STEPS!

Please take a moment to read and understand this program I'm sharing with you. NO IT'S NOT what you think. YOU DON'T have to send $5 to five or six people to buy a report, receipt or get on their mailing list. Nor will you need to invest more money later to get things going. THIS IS THE FASTEST, EASIEST PROGRAM EVER, you will be able to complete it in LESS THAN 30 MINUTES and you will never forget the day you first viewed this online. This is the FASTEST and EASIEST way to earn serious money online that you've ever seen so far in the history of the Internet! This program works no matter what country you are in, or what currency you use. It doesn't matter how old or how young you are. And you certainly won't need any special knowledge or talent. You won't need to run a website,
or make phone calls, or make photocopies, or send out letters through the mail, or pay for advertising, etc. The only things you will need are:

* An email address
* A Premier or Business PayPal account with at least $5 deposited in it
* 30 minutes of your time

ONLY 2 SIMPLE AND EASY STEPS!

If you are doing other programs, by all means stay with them. The more the merrier, BUT PLEASE READ ON!! First of all, there are only TWO POSITIONS, not four; five or six like many other programs. This program is more realistic and much, MUCH FASTER. Because it is so easy, the
response rate for this program is VERY HIGH and VERY FAST, and you will receive your reward in FOURTEEN DAYS. That's only TWO WEEKS - not one or two months. Just in time for next month BILLS.

TRUE STORY --> June Alscar tells how she ran this gifting summation four times last year. The first time, she received $6,000+ in cash in two weeks and then $14,000+ in cash the next three times. When this program is continued, as it should be, EVERYONE PROFITS!!

THIS CAN AND WILL WORK FOR YOU! HERE ARE THE DETAILS: Post this letter in 50 message boards, chat rooms, or newsgroups. You don't need to post 200 like others programs or email 40 people just to get started. Even if you are already in a program like the send six dollars to six people. CONTINUE IT and stay with it, THOSE DO PAY OUT, but do yourself a favor, DO THIS ONE TODAY as well, RIGHT NOW!!! It is simple and takes a very small investment! This program WILL PAY FASTER before the other programs you are working on even trickle in! Just give one person $5. THAT'S IT! Follow the simple instructions and in two weeks, you should have $10,000 because most PEOPLE WILL RESPOND due to the LOW ONE TIME INVESTMENT, SPEED AND HIGH PROFIT POTENTIAL. So let's all keep it going and help each other in these tough times. We all owe
money to bill collectors, and creditors. But, with this, if people take the time to help each other, the good fortune will follow. SO, Take the measly minutes this SIMPLE and REWARDING program offers and give the gift that gives back TODAY!.

Simply send a $5 gift to the person at POSITION ..1, if your birthday is BETWEEN JAN 1 THRU JUNE 30, OR, if your birthday is BETWEEN JULY 1 THRU DEC 31, send the gift to the person at POSITION .. 2. HERE'S WHAT YOU NEED TO DO. . .

STEP 1 Ok, if you're not already a PayPal user, the very first thing you need to do is use the PayPal link below and SIGN UP. It takes just two minutes! Here's the URL: https://www.paypal.com/cgi-bin/webscr?cmd=_pro-nonpro-welcome Be sure to use this link so you can sign up for a free PREMIER or BUSINESS account. You'll need to have a PREMIER or BUSINESS account (and not a PERSONAL account) otherwise you won't be able to receive credit card payments from other people.

STEP 2 It is an undeniable law of the universe that we must first give in order to receive. So the first thing to do when you have your Premier/Business PayPal account is to IMMEDIATELY send a $5 payment from your PayPal account to the email address in the position (1 or 2 - depending on your birthday in the timeline), along with a note saying: "HERE IS A $5 GIFT FOR YOU." Be certain to add this note, as this is what KEEPS THIS PROGRAM LEGAL. Instructions on how to send a payment
are under "SEND MONEY" at the Paypal Site. It's so Easy!! When you send your $5 payment to either address in the list, do it with a great big smile on your face because "as you sow, so shall you reap!" After you have transferred a $5 payment to the email address, something very eerie happens. It gives you an indescribable, overwhelming sense of certainty, belief and conviction in the system. You've just proved to yourself that, because you have done it, there must be a great number of other people ready to do exactly the same. Thus you have now seen for yourself, first hand, that this business actually works!

STEP 3 REMOVE the email address you are replacing (the one you sent $5 to), and REPLACE it with your own email address. REMEMBER: Use the same EMAIL ADDRESS that is used with YOUR Paypal account ! ! Paste your newly typed email address over the old one and then post to 50 Message Boards, Chat Rooms, or Newsgroups. DON'T MULL OVER IT, JUST 30 MIN OF YOUR TIME, THAT'S IT THERE IS NO MORE TO DO!! ACT FAST AND GET THE GIFT. HONESTY AND INTEGRITY MAKE THIS PLAN WORK!! DO UNTO OTHERS AS YOU WOULD HAVE THEM DO UNTO YOU!

POSITION..1 ---) mspinell53@yahoo.com
POSITION..2 ---) christine_pettway@yahoo.com

YOUR NAME COULD CYCLE FOR A LONG TIME! THIS MAKES IT THE GIFT THAT KEEPS ON GIVING. This is excellent seed money to start or expand a business, buy your dream home, car and pay off whatever bills you may have. Good luck and God Bless. Play fairly and good fortune will follow.

WHY THIS PROGRAM WORKS: Straight to the point, the reason this program is SO SUCCESSFUL is because this in 50 different message boards, there are only TWO outcomes (1) A person's birthday will fall on the same half as yours YOU GET $5.00..OR (2) A person's birthday will fall on the other half of the timeline, therefore, YOU STAY IN YOUR POSITION posted in 50 other MESSAGE BOARDS, etc.

HOW TO POST TO NEWS GROUPS? Use Netscape or Internet Explorer and try searching for various newsgroups (on-line forums, message boards, chat sites, discussions.) Log on any search engine like yahoo.com, google.com, altavista.com, excite.com, etc., then search with the subject "millionaire message board; or; money making message board; or; employment message board; or making discussions; or ''money making forum; or; business message board; etc. You will find thousands & thousands of message boards. Click on them one by one and you will find the option 'post a new message'. Then Post this article as a 'new message' by highlighting the text of this letter and selecting copy then paste from the edit menu. Fill in the Subject, this will be the header that everyone sees as
they scroll through the list of postings in a particular group, click the post message button. You're done with your first one! It only takes about 60 seconds to complete postings on message boards after you catch on. REMEMBER, THE MORE NEWSGROUPS YOU POST IN, THE MORE MONEY YOU WILL MAKE!!

So there it is. You now have the knowledge that will enable you to make over $10,000 within the next few weeks. The only thing that can hold you back now is a lack of faith or a lack of self-belief. However, any doubts you may currently have will disappear within a few days of putting this plan into practice. Trust me on this! You certainly won't regret it.
Best Regards,

P.S. Does this sound too good? Well maybe to some skeptics it is. But it actually works, and is worth the 30 minutes of your time now. So, just make a nice cup of tea and get started on it now. After all, you can't lose, and you stand to gain more in the next few weeks than many people earn in a year!
 
Messages 15-18 deleted by topic administrator between 07-23-2006 02:07 AM and 07-21-2006 09:00 AM
Camryn  19
07-21-2006 11:38 PM ET (US)
Excellent work. Very nice to see someone taking so much interest and pain on such an intresting subject. great work!! Visit acidophilus weight loss abuse webpage devoted to acidophilus weight loss abuse. acidophilus weight loss and alcohol webpage devoted to acidophilus weight loss and alcohol. too!
 Person was signed in when posted  20
07-26-2006 04:34 AM ET (US)
Deleted by topic administrator 07-26-2006 11:07 AM
metho  21
07-26-2006 04:12 PM ET (US)
4Freebie - UNLIMITED freebies - NO credit card!

Welcome to 4Freebie.com, The Source for Free Products.


http://www.4freebie.com/index.php?ref=93766534

What makes 4Freebie™ stand out from any other "free product" website?

1. There is no limit to the rewards you can earn! Continue to refer new members to complete offers and continue to earn rewards!

2. Faster reward approvals and delivery times. We approve offers generally within 48 hours and ship products same day as your reward credit has been verified.

3. We have over 20 free products to choose from at launch including: Xbox360, iPods, Video Cameras, Digital Cameras, Computers, TV Screens, Gift Cards, PayPal Cash Rewards and more!

4. We encourage a safe and trusted community environment with our online member forum.

5. We encourage referral trading and even sell quality referral leads.

So what are you waiting for?... Be sure to register today and become a valued member of the 4Freebie™ community!

http://www.4freebie.com/index.php?ref=93766534
   22
07-27-2006 06:47 AM ET (US)
Deleted by topic administrator 07-27-2006 10:05 AM
jackson  23
10-01-2006 03:18 PM ET (US)
i am jackso is there anyone with valid credit cards to hit me at jackson009@outgun.com
darren adams  24
04-23-2007 07:13 PM ET (US)
hey i really need your help
as you can see i need some referrals from people like you
i can also help refer you to as long as you help me out to my referral address is

http://NoCreditCard.YourGiftsFree.com/?id=11999

by the way “no credit card is need” to complete an offer and every thing is free

if you have questions or want me to refer you email me at darren7791_43@hotmail.com
   25
02-22-2008 04:46 AM ET (US)
Deleted by topic administrator 02-22-2008 04:22 PM
Sohaib SiddiquiPerson was signed in when posted  26
03-07-2008 12:40 PM ET (US)
Job Finder (1030)
 Are you looking to work from home but not sure which program is best for you?Visit us today and receive your FREE Work at Home Info Pack and Job Finder.We will help you find your dream job today http://www.osp.sm4.biz
RSS link What's this?
All messages            1-26 of 26        
QuickTopicSM message boards
Over 200,000 topics served
Learn more Frequently asked questions  Acknowledgements
What they're saying about QuickTopic
 Questions, comments, or suggestions? Contact Us
Read our use policy before beginning. We value your privacy; please read our privacy statement.
Copyright ©1999-2008 Internicity Inc. All rights reserved.