Page 1 of 1

Kingdom, Phylum, Order, Class, Family, Genus, HTTP???

Posted: Wed Sep 27, 2006 7:21 pm
by neophyte
How might one group the following classes that create and edit Cookies and http headers?

class HTTP_Headers?

Would you group them in a directory called "HTTP"?

Posted: Wed Sep 27, 2006 7:41 pm
by LiveFree
Kingdom, Phylum, Class, Order, Family, Genus, Species! I still remember a little song for that from life science 8)

Posted: Wed Sep 27, 2006 7:43 pm
by Christopher
Yes, I think a number of frameworks put then in a HTTP(or Http) directory.

Posted: Wed Sep 27, 2006 7:45 pm
by Jenk
or "Request" directory :)

Posted: Wed Sep 27, 2006 8:38 pm
by Ambush Commander
I don't think Request would be quite correct: Headers and Cookies are the Response.

HTTP is a reasonably good name. I would also consider not grouping them together and having Cookie and Header classes. :-P

Posted: Wed Sep 27, 2006 8:54 pm
by Christopher
Ambush Commander wrote:I don't think Request would be quite correct: Headers and Cookies are the Response.
I think they are actually in both. It would depend on whether neophyte's classes were getting or setting them.

Posted: Wed Sep 27, 2006 8:58 pm
by Ambush Commander
Yeah, for Cookie that's right. Headers, less so. PHP programmers usually don't dabble in request headers (although there are fringe cases).

Posted: Wed Sep 27, 2006 10:31 pm
by neophyte
My classes will be setting headers and cookies. No getting here. Probably will be getting the cookies with a request object. In a different class. So HTTP is a good name then?

Posted: Wed Sep 27, 2006 11:40 pm
by Christopher
I'd call it Http_Response (which is what I call mine).

Posted: Thu Sep 28, 2006 3:50 am
by Jenk
Ambush Commander wrote:Yeah, for Cookie that's right. Headers, less so. PHP programmers usually don't dabble in request headers (although there are fringe cases).
Any data found with HTTP_ prefix is from the headers sent by the user agent. (With one or two exceptions) So developers do often mix with request headers. :)

Posted: Thu Sep 28, 2006 4:23 pm
by Ambush Commander
Heh... I guess I mean we don't usually deal with raw request headers. Got me again.

Posted: Thu Sep 28, 2006 5:22 pm
by Jenk
Sorry, I'm pedantic at times :)