Re: [PHP] A question of style....

2004-10-06 Thread Chris Boget
  Anything that doesn't use the word 'flava' :)
 What if I name all my variables after Rocky characters? ;)

Hey!  You stole my method!  Actually, mine are Rocky and
Bullwinkle, but still! :p

thnx,
Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] A question of style....

2004-10-05 Thread bclem
So I'm sitting here writing code and I'm thinking about my own style of writing
and formatting my php code(I use a mix of the pear standard and my own flava).
What else do you guy's use?

What style should I base my code formatting on in order to be accepted widely by
the php community at large?


-Brent



This message was sent using IMP, the Internet Messaging Program.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] A question of style....

2004-10-05 Thread Jay Blanchard
[snip]
So I'm sitting here writing code and I'm thinking about my own style of
writing
and formatting my php code(I use a mix of the pear standard and my own
flava).
What else do you guy's use?

What style should I base my code formatting on in order to be accepted
widely by
the php community at large?
[/snip]

Anything that doesn't use the word 'flava' :)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] A question of style....

2004-10-05 Thread Ed Lazor
Chapter 1 of Advanced PHP Programming, by George Schlossnagle, ISBN
0-672-32561-6.

http://www.blueshoes.org/en/developer/coding_guidelines/


 -Original Message-
 So I'm sitting here writing code and I'm thinking about my own style of
 writing
 and formatting my php code(I use a mix of the pear standard and my own
 flava).
 What else do you guy's use?
 
 What style should I base my code formatting on in order to be accepted
 widely by
 the php community at large?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] A question of style....

2004-10-05 Thread John Nichel
Jay Blanchard wrote:
Anything that doesn't use the word 'flava' :)
What if I name all my variables after Rocky characters? ;)
Now for the real can of worms...
On odd lines, I use spaces, and on even lines, I use tabs.
serious mode
The above is an attempt at humor.
The below is an attempt at addressing the question.
/serious mode
http://www.google.com/search?hl=enie=UTF-8q=php+code+standardsbtnG=Google+Search
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] A question of style ...

2002-07-12 Thread Jay Blanchard

Howdy group,

   Over the past couple of days I have come under some fire for my style
of coding, most particularly the use of PHP scripts to process information
between pages or interfaces shown to various users. An example;

   An agent goes to an interface that reveals a list of customers from a
database. These customers have provided referrals which now reside in a
database. The agent selects a referral which is processed by an intermediary
script which sets a flag in the database saying that this agent is, has,or
will be contacting this referral (to prevent duplicate contact). Then this
redirects to the referral's interface where the details about this referral
are revealed.

Interface A
   ++
   | Customer   |
   | Submitted  |
   | Referral   |
   ++
 |+--+
 +---| PHP Script   |
  | (for processing) |
  +--+
|
Interface B |
   ++   |
   | Referral   |   |
   | Info   |--+
   ++

While this is a rather simplistic example (I use some intermediary scripts
that are much more complex, some that call other script if the situation
warrents it) I have found that for many applications this makes the code
easier to maintain, gives me a way ID certain processes when something
breaks (I use a lot of error logging), and also prevents some code from
being aborted by the user when the results of doing something like that
might be undesirable.

I know that this might start a holy war, but it is likely that discussion on
this would enhance all of our coding styles. I realize that this may not
help me strengthen my position with regards to the fire I have come under,
but I had to ask. Thoughts?

Thanks!

Jay

*
* Want to meet other PHP developers *
* in your area? Check out:  *
* http://php.meetup.com/*
* No developer is an island ... *
*



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] A question of style ...

2002-07-12 Thread Martin Clifford

I see no problems whatsoever in utilizing an intermediary script to do processing of 
information.  However, there IS a problem when this script sets flags that are 
unwanted by the client.  An example of a good intermediary script application would be 
as below.

Person A and Person B both remotely log into their website's Content Management 
System.  They both navigate to the same file on the server, because their boss told 
them it needs updating.  Person A clicks on the link to edit the file first, thereby 
setting an intermediary script into action which sets a flag, say checked_out to 
true.  Person B across the hall is denied access to this file because Person A already 
has it checked out.  This is much in the tradition of DreamWeaver FTP.

The above is a great example of how intermediary scripts can be used to help avoid 
critical misunderstandings.  You do NOT want two people to edit the same file at the 
same time, otherwise it'll get messed up REALLY fast.

In your example, though, if the agent simply wishes to view the customer's 
information, but has no interest in contacting the person at all (perhaps for research 
purposes), then the flag that says that the agent is, has or will be contacting the 
customer is obtrusive.

Overall, I think the coding style is very good, and you're right that it does in fact 
make code much easier to interpret.  However, there is a big difference between an 
intermediary script being helpful, and it being a hinderance.

Just my $20.00 (big mouth, you know)

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


 Jay Blanchard [EMAIL PROTECTED] 07/12/02 09:40AM 
Howdy group,

   Over the past couple of days I have come under some fire for my style
of coding, most particularly the use of PHP scripts to process information
between pages or interfaces shown to various users. An example;

   An agent goes to an interface that reveals a list of customers from a
database. These customers have provided referrals which now reside in a
database. The agent selects a referral which is processed by an intermediary
script which sets a flag in the database saying that this agent is, has,or
will be contacting this referral (to prevent duplicate contact). Then this
redirects to the referral's interface where the details about this referral
are revealed.

Interface A
   ++
   | Customer   |
   | Submitted  |
   | Referral   |
   ++
 |+--+
 +---| PHP Script   |
  | (for processing) |
  +--+
|
Interface B |
   ++   |
   | Referral   |   |
   | Info   |--+
   ++

While this is a rather simplistic example (I use some intermediary scripts
that are much more complex, some that call other script if the situation
warrents it) I have found that for many applications this makes the code
easier to maintain, gives me a way ID certain processes when something
breaks (I use a lot of error logging), and also prevents some code from
being aborted by the user when the results of doing something like that
might be undesirable.

I know that this might start a holy war, but it is likely that discussion on
this would enhance all of our coding styles. I realize that this may not
help me strengthen my position with regards to the fire I have come under,
but I had to ask. Thoughts?

Thanks!

Jay

*
* Want to meet other PHP developers *
* in your area? Check out:  *
* http://php.meetup.com/*
* No developer is an island ... *
*



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] A question of style ...

2002-07-12 Thread Analysis Solutions

Hi Jay:

On Fri, Jul 12, 2002 at 08:40:31AM -0500, Jay Blanchard wrote:
 
 The agent selects a referral which is processed by an intermediary
 script which sets a flag in the database saying that this agent is, has,or
 will be contacting this referral (to prevent duplicate contact). Then this
 redirects to the referral's interface where the details about this referral
 are revealed.

Modularizing things makes TOTAL sense.  At the same time, I'd have all
processing done by the second (Interface B) page.  This is more robust
than having the system transparently stopping along the way at
intermediate scripts.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php