Re: [PHP] Put all class in one file or different files

2010-08-29 Thread Haulyn Jason

On 08/29/2010 02:04 PM, Eric Cash wrote:

I'm out and about right
now, so I can't link you to the autoload documentation page


Thanks Eric, I have read the autoload document, but not pay attention on 
it. I will search more about it now, thanks.


--
Thanks!

VVThumb Microproduction

Location:Room 807,QiLuRuanJianDaSha Qilu Software Park
 No. 1 Shunhua Rd High-Tech Development Zone
 Jinan, China 250101
Website: http://www.haulynjason.net/haulyn
Mobile: +86 15854103759

Haulyn Jason


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



Re: [PHP] Put all class in one file or different files

2010-08-29 Thread Peter Lind
On 29 August 2010 08:14, Haulyn Jason saharab...@gmail.com wrote:
 On 08/29/2010 02:04 PM, Eric Cash wrote:

 I'm out and about right
 now, so I can't link you to the autoload documentation page

 Thanks Eric, I have read the autoload document, but not pay attention on it.
 I will search more about it now, thanks.


For maintainability: 1 class, 1 file
For performance: all critical/core class in same file (i.e. the ones
you WILL load no matter what), the rest loaded as needed

It's a tradeoff. If you don't know which to pick, go with 1 class, 1 file.

Regards
Peter

-- 
hype
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
BeWelcome/Couchsurfing: Fake51
Twitter: http://twitter.com/kafe15
/hype

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



Re: [PHP] Put all class in one file or different files

2010-08-28 Thread Haulyn Jason

On 08/29/2010 01:06 PM, Josh Kehn wrote:

On Aug 29, 2010, at 12:56 AM, Haulyn Jason wrote:

   

Hi, all:

I have many classes, from Java I have to put a class in one java files, in PHP 
I know I can put all of them in one file, but this make my class files too 
large, is there any best practice to guide these basic?

Thanks.

--
Thanks!

VVThumb Microproduction

Location:Room 807,QiLuRuanJianDaSha Qilu Software Park
 No. 1 Shunhua Rd High-Tech Development Zone
 Jinan, China 250101
Website: http://www.haulynjason.net/haulyn
Mobile: +86 15854103759

Haulyn Jason


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

 


Your question is clear as mud, can you clarify at all?

Regards,

-Josh

Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com

   

Sorry, I mean:

In php project, I am using OOp feature, I want to know, which way the 
following is better. 1, write a new class, create a new file. 2. write 
all class in one php file.


Thanks.



--
Thanks!

VVThumb Microproduction

Location:Room 807,QiLuRuanJianDaSha Qilu Software Park
 No. 1 Shunhua Rd High-Tech Development Zone
 Jinan, China 250101
Website: http://www.haulynjason.net/haulyn
Mobile: +86 15854103759

Haulyn Jason


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