473,396 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

PHP and large projects

I've used PHP for many smaller projects, but now im embarking on large
corporate websites.

After reading this:
http://www.ukuug.org/events/linux200...php/index.html

PHP does not sound like the right language for large scale sites. My main
concern was Namespaces...

What would you suggest any why?

My application is relying heavily on databases, with around 200-500
co-current people using it at any one time,
Jul 17 '05 #1
5 2615
Hayden Kirk wrote:
I've used PHP for many smaller projects, but now im embarking on large
corporate websites.

After reading this:
http://www.ukuug.org/events/linux200...php/index.html

PHP does not sound like the right language for large scale sites. My main
concern was Namespaces...
This is fixed in PHP5, you can use Static methods as namespaces.
And you can introduce your own package naming:
class db_mysql_Connection is the class for connections in the mysql package,
while the mysql package is a part of the db package.
The location of this file could be:
/db/mysql/connection.class.php

This way you can use the auto loader function...
What would you suggest any why?

My application is relying heavily on databases, with around 200-500
co-current people using it at any one time,

--
Rutger Claes rg*@rgc.tld
Replace tld with top level domain of belgium to contact me pgp:0x3B7D6BD6
Do not reply to the from address. It's read by /dev/null and sa-learn only

Jul 17 '05 #2
I have read that article and IMHO it smacks of failures at the
designer/developer level, not the language.

(1) Separation of Presentation from Business Logic

It is not a function of PHP, or ANY language for that matter, to provide
out-of-the box separation of presentation and business logic. It is up to
the designer/developer to create his/her own infrastructure. I have built my
own which is described in
http://www.tonymarston.co.uk/php-mys...structure.html. Other people
have built their own infrastructures which work along completely different
lines. There is no "one size fits all" that is built into PHP, you have to
plug in one of your choosing.

(2) Using a Team of Developers

Just because PHP gives you the ability to redefine functions does not mean
that you HAVE to use this ability. It should be used when absolutely
necessary. Any such failures are due to lack of discipline among the
developers and NOT a failure with the language.

This so-called "namespace problem" is really getting on my wick. I have
programmed with various language over the past 25+ years and none of them
used namespaces, therefore I do not miss them. I do not see what problem is
caused by the lack of namespaces, therefore I do not see the need for a
solution. Just because a previous language you may have used had namespaces
does not mean that PHP should have exactly the ame feature which works in
exactly the same way. PHP is a diferent language. Learn the differences and
live with them, otherwise go back to your previous language.

(3) Deployment Problems

So PHP allows the developer to change configuration settings? Big deal. If a
developer screws up it is a developer problem, not a language problem.

The restriction of only one php.ini file per web server has workarounds
which are clearly documented.
- You can use ini_set() within individual scripts to change standard
settings.
- You can use .htaccess files within individual directories to change
settings.

As for the fact that you cannot rely on a particular web hosting company to
have the most current version of PHP with all the required set of extensions
loaded, this has got absolutely nothing to do with the language. If your web
hosting company cannot supply what you require then switch to a different
company.

(4) Oversimplification Leading to Excessive Complexity

Every language evolves. Nothing is created perfect first time. The fact that
PHP is now a collaborative effort of many talented programmers instead of
just one or two cannot be held up as a disadvantage or a failing.

The fact that funtion names do not follow a consistent pattern is not a
problem. I agree that some tidying up may be a good idea, but it does not
stop me, or millions of other developers, from using the language to build
web pages. Different languages have different naming conventions, but that
does not prevent those languages from being used successfully.

The comments on arrays shows that you are fixated on how arrays are handled
in another language. Well, I have news for you - PHP is not that other
language. It is different. Get used to it. If you have a problem when using
arrays in PHP then the failure is yours and not a failure in the language.

This constant comparison with other languages is a waste of time. I have
used many languages in my long career, and I have had to get used to the
differences. Some things are easier to achieve, some things are harder, but
that is what you should expect from a different languages. There is a
different set of commands, a different set of capabilities. If you don't
like the differences then stick with your previous language, but for Pete's
sake STOP COMPLAINING ABOUT THE DIFFERENCES. If these differences give you a
problem then the problem lies with you, not the language.

Rant over.

--
Tony Marston

http://www.tonymarston.net
"Hayden Kirk" <ha******@hotmail.com> wrote in message
news:9J********************@news.xtra.co.nz...
I've used PHP for many smaller projects, but now im embarking on large
corporate websites.

After reading this:
http://www.ukuug.org/events/linux200...php/index.html

PHP does not sound like the right language for large scale sites. My main
concern was Namespaces...

What would you suggest any why?

My application is relying heavily on databases, with around 200-500
co-current people using it at any one time,

Jul 17 '05 #3
Good explanation.

Thanks.

"Tony Marston" <to**@NOSPAM.demon.co.uk> wrote in message
news:ct*******************@news.demon.co.uk...
I have read that article and IMHO it smacks of failures at the
designer/developer level, not the language.

(1) Separation of Presentation from Business Logic

It is not a function of PHP, or ANY language for that matter, to provide
out-of-the box separation of presentation and business logic. It is up to
the designer/developer to create his/her own infrastructure. I have built
my own which is described in
http://www.tonymarston.co.uk/php-mys...structure.html. Other people
have built their own infrastructures which work along completely different
lines. There is no "one size fits all" that is built into PHP, you have to
plug in one of your choosing.

(2) Using a Team of Developers

Just because PHP gives you the ability to redefine functions does not mean
that you HAVE to use this ability. It should be used when absolutely
necessary. Any such failures are due to lack of discipline among the
developers and NOT a failure with the language.

This so-called "namespace problem" is really getting on my wick. I have
programmed with various language over the past 25+ years and none of them
used namespaces, therefore I do not miss them. I do not see what problem
is caused by the lack of namespaces, therefore I do not see the need for a
solution. Just because a previous language you may have used had
namespaces does not mean that PHP should have exactly the ame feature
which works in exactly the same way. PHP is a diferent language. Learn the
differences and live with them, otherwise go back to your previous
language.

(3) Deployment Problems

So PHP allows the developer to change configuration settings? Big deal. If
a developer screws up it is a developer problem, not a language problem.

The restriction of only one php.ini file per web server has workarounds
which are clearly documented.
- You can use ini_set() within individual scripts to change standard
settings.
- You can use .htaccess files within individual directories to change
settings.

As for the fact that you cannot rely on a particular web hosting company
to have the most current version of PHP with all the required set of
extensions loaded, this has got absolutely nothing to do with the
language. If your web hosting company cannot supply what you require then
switch to a different company.

(4) Oversimplification Leading to Excessive Complexity

Every language evolves. Nothing is created perfect first time. The fact
that PHP is now a collaborative effort of many talented programmers
instead of just one or two cannot be held up as a disadvantage or a
failing.

The fact that funtion names do not follow a consistent pattern is not a
problem. I agree that some tidying up may be a good idea, but it does not
stop me, or millions of other developers, from using the language to build
web pages. Different languages have different naming conventions, but that
does not prevent those languages from being used successfully.

The comments on arrays shows that you are fixated on how arrays are
handled in another language. Well, I have news for you - PHP is not that
other language. It is different. Get used to it. If you have a problem
when using arrays in PHP then the failure is yours and not a failure in
the language.

This constant comparison with other languages is a waste of time. I have
used many languages in my long career, and I have had to get used to the
differences. Some things are easier to achieve, some things are harder,
but that is what you should expect from a different languages. There is a
different set of commands, a different set of capabilities. If you don't
like the differences then stick with your previous language, but for
Pete's sake STOP COMPLAINING ABOUT THE DIFFERENCES. If these differences
give you a problem then the problem lies with you, not the language.

Rant over.

--
Tony Marston

http://www.tonymarston.net
"Hayden Kirk" <ha******@hotmail.com> wrote in message
news:9J********************@news.xtra.co.nz...
I've used PHP for many smaller projects, but now im embarking on large
corporate websites.

After reading this:
http://www.ukuug.org/events/linux200...php/index.html

PHP does not sound like the right language for large scale sites. My main
concern was Namespaces...

What would you suggest any why?

My application is relying heavily on databases, with around 200-500
co-current people using it at any one time,


Jul 17 '05 #4
Tony Marston wrote:
I have read that article and IMHO it smacks of failures at the
designer/developer level, not the language.

hehe

Just what I was going to say.

The only problem I have using PHP compared to other languages is that of
collisions in the namespace (use of 'namespaces' is just one solution to
this). It's far from insurmountable - strict rules on coding style will
solve it.

I'm sure some smrty will point out that this makes conformance optional -
but if you don't enforce coding standards in ANY language you're storing up
problems anyway.

Hayden Kirk wrote:
My application is relying heavily on databases, with around 200-500
co-current people using it at any one time,


....which has nothing to do with namespace problems, and everything to do
with scalability. PHP is the dog's danglies for this.

C.

(3 million hits/day, ~600000 lines of PHP code)
Jul 17 '05 #5

"Hayden Kirk" <ha******@hotmail.com> wrote in message
news:9J********************@news.xtra.co.nz...
After reading this:
http://www.ukuug.org/events/linux200...php/index.html

PHP does not sound like the right language for large scale sites. My main
concern was Namespaces...
Don't tell me you actually agree with this guy that the use of namespace
promotes teamwork? If Bob won't walk over to Joe to tell him that "hey, I
got a function that does this already," then Bob and Joe are not much of a
team.

Forget namespace and abstract stuff like separation of logic. Base your
decision on more concrete factors. I way I see it, it's a question of
performance vs. time to delivery. A site built using a more robust
technology like JSP will probably perform better and more stably. On the
other hand, building it with PHP will be a whole lot quicker.
My application is relying heavily on databases, with around 200-500
co-current people using it at any one time,


Hmmm. That would give me some pause about using PHP. What is the nature of
this application? How many actual page hits are you expecting? 500
concurrent could mean 1 hit per second, or it could be 100.
Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
by: assaf__ | last post by:
Hello, I am beginning to work on a fairly large project and I'm considering to use python for most of the coding, but I need to make sure first that it is reliable enough. I need to make sure...
36
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but...
1
by: Adriaan Renting | last post by:
I think the point you want to make is that Python needs vastly less lines of code as a similar application written in C++. I think Python might on average be 50-60% of comparable C++ code, but not...
2
by: -DG- | last post by:
Does anyone have preferences for how to set up directory structures in larger multi-project C# 'solutions'? (Hate that ad-speak cliche). I realize that this is arbitrary, but it seems that...
9
by: Da~One | last post by:
This message has been posted to 2 groups, one to the VB.NET group, and the other to C#. I am trying to decide which language to commit to for a large scale project. I am looking for the input of...
5
by: Tim Marsden | last post by:
HI, I am developing a application in vb.net. I split down my functionality into several separate DLL's. The solution is becoming very large, nearly 100 projects, each project a dll's. There is...
3
by: Dan Munk | last post by:
Hello, I am working on a very large multi-tier Web application. The application consists of approximately 100 middle-tier/back-end projects and 200-300 presentation projects. Obviously this is...
8
by: Axter | last post by:
I normally use a program call Doxygen to document my source code.(http://www.stack.nl/~dimitri/doxygen) This method works great for small and medium size projects, and you can get good...
1
by: Rolf Welskes | last post by:
Hello, I have a large web which has PartA, PartB, PartC and MainPart. MainPart WebPage01 ... WebPage_n PartA .... PartB WebPageB01 ... WebPageB_m PartC ... So I would like to do the...
1
by: =?Utf-8?B?RG91Zw==?= | last post by:
We have a very large code base and use the partitioned solution model for development and deployment. The problem is that in .NET 2005 the setup projects cause severe performance problems when...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.