Re: [WSG] PHP Standards

2008-05-24 Thread Joe Ortenzi
not to self advertise, Ian, but the group I organise, ( http:// 
webstandards.meetup.com/130/ ) has quite a few standards-keen  
PHP'ers, as does the PHP London group.


But as others have mentioned, it really is te (X)HTML portion that  
matters for standards compliance, at least in this context.

Joe

On May 16 2008, at 16:32, Ian Chamberlain wrote:

Fingers crossed this is not too far off topic; being a newby to  
PHP; any
clues where I can find how-to's, snippets, libraries or even  
application
suites built from PHP that are built to a good minimum standard  
please.


I am guessing that PHP is much like JavaScript in that a lot of  
what is
floating about is either poor or pooh the result of all the good  
programmes

stending their time on ASP or J2EE.

Thanks

Ian



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Joe Ortenzi
[EMAIL PROTECTED]
www.typingthevoid.com
www.joiz.com





***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] PHP Standards

2008-05-21 Thread Keryx Web

Ian Chamberlain skrev:
Fingers crossed this is not too far off topic; being a newby to PHP; any 
clues where I can find how-to's, snippets, libraries or even application 
suites built from PHP that are built to a good minimum standard please.


I am guessing that PHP is much like JavaScript in that a lot of what is 
floating about is either poor or pooh the result of all the good programmes 
stending their time on ASP or J2EE.


There is no standard for PHP, but there are best practices. And they 
mimick what's happening on the client.


Client: Separation of concerns between design, content and behavior.
Server: Separation of concern between different kinds of logic.

The number one priority having grasped the basics of the language would 
be to separate presentation logic from business logic, the second to 
separate business logic from data storage logic. When you evolve as a 
developer you may have even more tiers.


Some people like to call this MVC. However, the web and PHP are ill 
suited for *pure* MVC implementations. But PHP has never been about 
purity...


Another thing they have in common. Frameworks ar good, but not something 
you can use to avoid learning the language 
http://www.456bereastreet.com/archive/200701/learn_javascript_before_tasting_the_library_koolaid/


A third thing in common: All devs should agree on a style guide! Naming 
conventions, indentation, bracket placement, etc.


A few more notes:
PHPDoc is something that should be picked up ASAP. I teach it to newbies.

Read the manual and search it thoroughly. The strength of PHP are the 
numerous built in functions. Replication of built in functions in 
userland PHP code is a waste of time, CPU cycles and makes the code bloated.


And PHP 4 really is dying. PHP 5 is faster and has a ton of goodies. Do 
not bother with PHP 4 any more!


Good books:
Learning PHP
PHP 5 Unleashed
PHP Power Programming
Advanced PHP Programming


Lars Gunther


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] PHP Standards

2008-05-20 Thread James Jeffery
There are a number of ways to get tasks done on the intnernet. Some hard
core programmers would use plain old C and CGI.

As for PHP Standards, follow the manual and best practices. Get a book on
design patterns, especially the one by the Gang Of Four, as these patterns
can crossover to the majority of programming languages.

There are also plenty of MVC (Model-View-Controller) frameworks such as
cakePHP and Symphony.


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] PHP Standards

2008-05-20 Thread Matijs
I haven't had time to look into other frameworks but make sure to check out
Zend as well. It's at version 1.5.2. at this time and it has a nice built-in
templating system.

On Tue, May 20, 2008 at 10:05 AM, James Jeffery 
[EMAIL PROTECTED] wrote:

 There are a number of ways to get tasks done on the intnernet. Some hard
 core programmers would use plain old C and CGI.

 As for PHP Standards, follow the manual and best practices. Get a book on
 design patterns, especially the one by the Gang Of Four, as these patterns
 can crossover to the majority of programming languages.

 There are also plenty of MVC (Model-View-Controller) frameworks such as
 cakePHP and Symphony.


 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] PHP Standards

2008-05-20 Thread Ian Chamberlain
Thanks for all the tips folks, very useful.

In response to Michael, I have just escaped the large corporate, global 
enterprise world that seems to fund much of the IT work done and in my 
experience most such organisations are only just now waking up to the 
concept and benefits of open source.

My ex-organisation for example tended to code either in ASP or .NET for 
small / medium scale or some flavour of Java for portals and heavy 
transaction stuff so I had no experience or libraries of PHP.

Upon my excape, pausing only to don my hopelessly optimistic hat I went 
looking for a PHP site; something similar to the sites we all use that show 
how semantic mark-up should be used; or how good quality CSS can make site 
look good.

Even poor old JavaScript thanks to gentlemen ( I use the word carelessly) 
like Jeremy Keith are busy helping our communities to play nicely with the 
DOM; which left just the back-end.

The problem is that right now unless we have one or two clearly signposted 
places where people can learn to do the right thing, young new programmers 
or  even old f***s like me will get what help they can from the net and 
libraries, as I am sure you may have noticed such sites, books and courses 
are not always of the highest quality.

Ian

(Freelancing with a grin - ex Head Of Web Strategy BT Global Services)




- Original Message - 
From: Michael Horowitz [EMAIL PROTECTED]
To: wsg@webstandardsgroup.org
Sent: Tuesday, May 20, 2008 4:02 AM
Subject: Re: [WSG] PHP Standards


I am guessing that PHP is much like JavaScript in that a lot of what is
floating about is either poor or pooh the result of all the good
programmes stending their time on ASP or J2EE

Why woul you think the good programmers spend their time and ASP or J2EE?

Michael Horowitz
Your Computer Consultant
http://yourcomputerconsultant.com
561-394-9079



Designer wrote:
 I think that it's basically your responsibility Ian, in that there are
 many sources of snippets available and if you use them you just
 validate the generated code and put right what is wrong in the php.
 Then, you check for best practice too . . .

 Bob



 Ian Chamberlain wrote:
 Fingers crossed this is not too far off topic; being a newby to PHP;
 any clues where I can find how-to's, snippets, libraries or even
 application suites built from PHP that are built to a good minimum
 standard please.

 I am guessing that PHP is much like JavaScript in that a lot of what
 is floating about is either poor or pooh the result of all the good
 programmes stending their time on ASP or J2EE.

 Thanks

 Ian


 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***








 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] PHP Standards

2008-05-20 Thread Jason Pruim

Hey Ian,

Sorry for coming in late in this thread, but I would like to recommend  
the php.net site and their mailing lists as well. I am a subscriber to  
a few of their lists and am just learning the language, but the people  
who post to the php-general list are some of the most knowledgeable  
people I have run across.


There are a few of the core programmers that post to that list as  
well. I would highly recommend joining, and watching the list for a  
few days. Or jump right in and start working on a project. The most  
simple form of which is a simple Hello world! script. Do something  
like this:


?PHP
$hi = Hello;
$earth = World;
$time = time();
$currentTime = date(H:i:s M-d-y, $time);
echo $hi $earth! it is $currentTime;

?

Just something that you could play with :)


On May 20, 2008, at 5:35 AM, Ian Chamberlain wrote:


Thanks for all the tips folks, very useful.

In response to Michael, I have just escaped the large corporate,  
global

enterprise world that seems to fund much of the IT work done and in my
experience most such organisations are only just now waking up to the
concept and benefits of open source.

My ex-organisation for example tended to code either in ASP or .NET  
for

small / medium scale or some flavour of Java for portals and heavy
transaction stuff so I had no experience or libraries of PHP.

Upon my excape, pausing only to don my hopelessly optimistic hat I  
went
looking for a PHP site; something similar to the sites we all use  
that show
how semantic mark-up should be used; or how good quality CSS can  
make site

look good.

Even poor old JavaScript thanks to gentlemen ( I use the word  
carelessly)
like Jeremy Keith are busy helping our communities to play nicely  
with the

DOM; which left just the back-end.

The problem is that right now unless we have one or two clearly  
signposted
places where people can learn to do the right thing, young new  
programmers
or  even old f***s like me will get what help they can from the net  
and
libraries, as I am sure you may have noticed such sites, books and  
courses

are not always of the highest quality.

Ian

(Freelancing with a grin - ex Head Of Web Strategy BT Global Services)




- Original Message -
From: Michael Horowitz [EMAIL PROTECTED]
To: wsg@webstandardsgroup.org
Sent: Tuesday, May 20, 2008 4:02 AM
Subject: Re: [WSG] PHP Standards


I am guessing that PHP is much like JavaScript in that a lot of what  
is

floating about is either poor or pooh the result of all the good
programmes stending their time on ASP or J2EE

Why woul you think the good programmers spend their time and ASP or  
J2EE?


Michael Horowitz
Your Computer Consultant
http://yourcomputerconsultant.com
561-394-9079



Designer wrote:
I think that it's basically your responsibility Ian, in that there  
are

many sources of snippets available and if you use them you just
validate the generated code and put right what is wrong in the php.
Then, you check for best practice too . . .

Bob



Ian Chamberlain wrote:

Fingers crossed this is not too far off topic; being a newby to PHP;
any clues where I can find how-to's, snippets, libraries or even
application suites built from PHP that are built to a good minimum
standard please.

I am guessing that PHP is much like JavaScript in that a lot of what
is floating about is either poor or pooh the result of all the good
programmes stending their time on ASP or J2EE.

Thanks

Ian


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***









***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***





***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***




--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
[EMAIL PROTECTED]





***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join

Re: [WSG] PHP Standards

2008-05-19 Thread Michael Horowitz
I am guessing that PHP is much like JavaScript in that a lot of what is 
floating about is either poor or pooh the result of all the good 
programmes stending their time on ASP or J2EE


Why woul you think the good programmers spend their time and ASP or J2EE?

Michael Horowitz
Your Computer Consultant
http://yourcomputerconsultant.com
561-394-9079



Designer wrote:
I think that it's basically your responsibility Ian, in that there are 
many sources of snippets available and if you use them you just 
validate the generated code and put right what is wrong in the php.  
Then, you check for best practice too . . .


Bob



Ian Chamberlain wrote:
Fingers crossed this is not too far off topic; being a newby to PHP; 
any clues where I can find how-to's, snippets, libraries or even 
application suites built from PHP that are built to a good minimum 
standard please.


I am guessing that PHP is much like JavaScript in that a lot of what 
is floating about is either poor or pooh the result of all the good 
programmes stending their time on ASP or J2EE.


Thanks

Ian


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***









***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***





***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] PHP Standards

2008-05-19 Thread Ray Cauchi

Hi Ian

You may want to check out some pre-existing PHP coding standards:

http://pear.php.net/manual/en/standards.php and the incomplete 
http://pear.php.net/manual/en/pear2cs.php


http://framework.zend.com/manual/en/coding-standard.html

Both PEAR and Zend Framework are Open source repositories of PHP 
code, written to their respective standards, and well documented. For 
less organised code, try http://www.phpclasses.org


Ray

At 01:32 AM 17/05/2008, Ian Chamberlain wrote:

Fingers crossed this is not too far off topic; being a newby to PHP; any
clues where I can find how-to's, snippets, libraries or even application
suites built from PHP that are built to a good minimum standard please.

I am guessing that PHP is much like JavaScript in that a lot of what is
floating about is either poor or pooh the result of all the good programmes
stending their time on ASP or J2EE.

Thanks

Ian



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

RE: [WSG] PHP Standards

2008-05-18 Thread Michael MD

The php site - php.net
is always a good place to start for php

There are often some good snippets to be found in user comments too 

Its not as good as it was a couple of years ago though, as they seem to have
removed a lot of useful stuff that you could do in pure php because they can
now be done by extensions (often needing php to be recompiled to install -
very annoying!)

Still a good place to start though...






***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] PHP Standards

2008-05-16 Thread Designer
I think that it's basically your responsibility Ian, in that there are 
many sources of snippets available and if you use them you just validate 
the generated code and put right what is wrong in the php.  Then, you 
check for best practice too . . .


Bob



Ian Chamberlain wrote:
Fingers crossed this is not too far off topic; being a newby to PHP; any 
clues where I can find how-to's, snippets, libraries or even application 
suites built from PHP that are built to a good minimum standard please.


I am guessing that PHP is much like JavaScript in that a lot of what is 
floating about is either poor or pooh the result of all the good programmes 
stending their time on ASP or J2EE.


Thanks

Ian 




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***









***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] PHP Standards

2008-05-16 Thread Andrew Maben

On May 16, 2008, at 11:32 AM, Ian Chamberlain wrote:

Fingers crossed this is not too far off topic; being a newby to  
PHP; any
clues where I can find how-to's, snippets, libraries or even  
application
suites built from PHP that are built to a good minimum standard  
please.


I am guessing that PHP is much like JavaScript in that a lot of  
what is
floating about is either poor or pooh the result of all the good  
programmes

stending their time on ASP or J2EE.

Thanks

Ian


Seems like this may be a ways OT, and you may be better off  
consulting one of the PHP lists, but...


Are you asking about PHP Standards or (X)HTML Standards within the  
context of PHP? Even the sloppiest of PHP (or any server-side  
scripting) can deliver impeccable standards-compliant markup, and  
conversely even the most carefully crafted PHP can deliver the most  
hideous tag soup. Though I think you will find that following best  
practices will be mutually reinforcing.


If you're interested in PHP Coding Standards, a Google search will  
open the door to a wealth of information, and there are PHP mailing  
lists as well.


For (X)HTML Standards, this list is an extraordinarily useful  
resource, and if you spend a little time with the archive you can  
find many useful links.


good luck,

Andrew







***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] PHP Standards

2008-05-16 Thread Matthew Pennell
On Fri, May 16, 2008 at 4:32 PM, Ian Chamberlain 
[EMAIL PROTECTED] wrote:

 Fingers crossed this is not too far off topic; being a newby to PHP; any
 clues where I can find how-to's, snippets, libraries or even application
 suites built from PHP that are built to a good minimum standard please.


There's a good ongoing thread in the Sitepoint PHP forum filled with best
practices:

http://www.sitepoint.com/forums/showthread.php?t=456441

-- 

- Matthew


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] PHP Standards

2008-05-16 Thread Andrew Boyd
On Sat, May 17, 2008 at 3:32 AM, Andrew Maben [EMAIL PROTECTED]
wrote:

 Are you asking about PHP Standards or (X)HTML Standards within the context
 of PHP? Even the sloppiest of PHP (or any server-side scripting) can deliver
 impeccable standards-compliant markup, and conversely even the most
 carefully crafted PHP can deliver the most hideous tag soup. Though I think
 you will find that following best practices will be mutually reinforcing.

 If you're interested in PHP Coding Standards, a Google search will open the
 door to a wealth of information, and there are PHP mailing lists as well.

 For (X)HTML Standards, this list is an extraordinarily useful resource, and
 if you spend a little time with the archive you can find many useful links.

 good luck,

 Andrew


Andrew,

good point. Generating web standards-compliant (X)HTML with PHP is one
thing, and writing re-usable code is another.

If I could make a small plug on behalf of the latter - please people, take
the time to document your code properly. The life/job/sanity you save may be
your own.

Best regards, Andrew

-- 
---
Andrew Boyd
http://onblogging.com.au


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] PHP Standards

2008-05-16 Thread James Ellis
Hi

Using both Tidy (1) and HTML Purifier (2) can improve tag soup no end -- 
although even they have their limits. They also add a bit to processing time, 
especially HP as it is written in PHP - you can solve that issue with page 
caching, though.

(1) php.net/tidy
(2) htmlpurifier.org
HTH
James

On Sat, 17 May 2008 09:56:25 am Andrew Boyd wrote:
 On Sat, May 17, 2008 at 3:32 AM, Andrew Maben [EMAIL PROTECTED]

 wrote:
  Are you asking about PHP Standards or (X)HTML Standards within the
  context of PHP? Even the sloppiest of PHP (or any server-side scripting)
  can deliver impeccable standards-compliant markup, and conversely even
  the most carefully crafted PHP can deliver the most hideous tag soup.
  Though I think you will find that following best practices will be
  mutually reinforcing.
 
  If you're interested in PHP Coding Standards, a Google search will open
  the door to a wealth of information, and there are PHP mailing lists as
  well.
 
  For (X)HTML Standards, this list is an extraordinarily useful resource,
  and if you spend a little time with the archive you can find many useful
  links.
 
  good luck,
 
  Andrew

 Andrew,

 good point. Generating web standards-compliant (X)HTML with PHP is one
 thing, and writing re-usable code is another.

 If I could make a small plug on behalf of the latter - please people, take
 the time to document your code properly. The life/job/sanity you save may
 be your own.

 Best regards, Andrew




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***