Pure truthiness; the appearance of factual information without the
substance. (10+ years of PHP and 5+ years of Python experience here, so...)

Attract more developers? Several times more Websites are developed in PHP
than Python, and PHP is growing faster in relative (and therefore also in
absolute) terms.  Check out any of the web-trends/analytics sites for
details. Look at how many development communities are built around PHP
projects than Python, and how many new ones start every day. SourceForge and
PHPClasses.org are your friends here.

PHP is not a good language for building large, maintainable applications?
Tell that to Facebook, NASA, Google (lots of Python code, but way, way more
PHP) and dozens of thousands of other shops serving billions of pages every
day. The largest PHP project I¹ve personally been associated with was a
secure government site that had extremely bursty usage up to several dozen
thousand hits per minute for an hour at a time.... and if the site broke or
the server crashed, Very Bad Things happened, quickly. Yeah, that means
³mission critical.² That site is still in production ­ and it¹s now fully OO
and legacy-free (fully tested and audited, with solid CI practices).

OO in PHP took ages to get here, but with 5.3 it¹s finally as good as your
ability to use it. I develop using a very nice HMVC framework (there¹s your
separation of presentation and code); there are dozens of other HMVC and MVC
frameworks for PHP out there, with a solid half-dozen having a combined 90%+
share. There are mature, rich frameworks for PHP that support whatever
architecture or workflow you prefer... the most widely-used framework, Zend,
encourages an MVC application architecture but its components can be used
effectively in non-MVC apps as well.

The standard PHP toolchain (PHPUnit, PHPDocumentor, PHPUnderControl, etc.)
encourage if not downright require clean OO design, particularly for large
projects.

Python is ³fully OO,² including in places where the subtleties of that are
opaque to less-than-expert developers. PHP has its share of those, too, but
the ease of finding relevant information makes what would be opaque in PHP
transparent: whatever potential issue you run into has been hit, identified,
solved and documented by those who came before you. Python is still in such
a state of transition that everybody¹s on a learning curve ‹ if not a cliff.
(I¹ve got three different versions of Python on the machine I¹m typing this
email on... and a couple dozen Python apps from the Net that care very much
which version they¹re running against.)

Python¹s a lot of fun, yes. ³Everything¹s an object² gives you the
flexibility to write in a lot of different styles... Including several that
closely resemble APL. It¹s a very intelligently-designed language, and it¹s
very aware of that.

It¹s my firm professional opinion that there will be plenty of opportunity
for both PHP and Python for the foreseeable future. Which one is ³better?²
That depends, as it always has, on the project and on the strengths and
weaknesses of the team tasked with accomplishing it. Clean, scalable, OO
code can be written in either language, as can hopelessly-obfuscated
effectively procedural code. We¹ve just got a much wider experience base in
PHP than Python. I don¹t see that changing in the next five years ­ which is
a good working definition of ³medium- to long-term² in this industry.

Just my two rupiah worth.

Jeff
-- 
Jeff Dickey         Seven Sigma Software and Services
Email:              [email protected]
Phone/SMS:          +65 8333 4403
Website:            http://www.seven-sigma.com/
More contact info:  http://card.ly/jdickey




From: CL Chow <[email protected]>
Reply-To: "A general discussion list on Free/Open Source Software in
Malaysia." <[email protected]>
Date: Fri, 6 Aug 2010 10:59:34 +0800
To: <[email protected]>, <[email protected]>, "A general
discussion list on Free/Open Source Software in Malaysia."
<[email protected]>
Subject: [general] [Sahana Eden] Why replace PHP with Python?

Sahana, a FOSS disaster Management System, 
Project homepage: sahanafoundation.org/ <http://sahanafoundation.org/>
Wikil: en.wikipedia.org/wiki/Sahana_FOSS_Disaster_Management_System
<http://en.wikipedia.org/wiki/Sahana_FOSS_Disaster_Management_System>

Originally written in PHP(which is now call Agasti) has recently branch a
Python version called Sahana Eden.
Here are some interesting reasons from the Eden developers according to the
wiki.

As quoted from the project's wiki
eden.sahanafoundation.org/wiki/FrequentlyAskedQuestionsPython
<http://eden.sahanafoundation.org/wiki/FrequentlyAskedQuestionsPython>

== Why replace PHP with Python? ==
We believe we can attract more developers if we change from PHP to Python.

PHP is not a good language for building large, maintainable applications:
http://www.ukuug.org/events/linux2002/papers/html/php/index.html
 * especially when using it to write out complex Javascript (the syntaxes
are always tripping you up)
 * doesn't enforce Object Orientation
 * poor separation of Presentation & Code

Python is fully Object Oriented ('everything is an Object')

Python is an interpreted language, similar to PHP & relatively easy for
developers to adapt to.

Java would be a reasonable choice, but the barrier to entry with Java is
much harder - setting up the compiler environment, etc
 * this doesn't fit the RAD needs of the project.
 * we can still access any useful Java libs via Jython:
http://www.jython.org/

Ruby-on-Rails might be a good choice, but that's primarily for Web2.0 apps
still & Sahana is more than just that.[[BR]]
Performance is also worse than for Python:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=python&lan
g2=ruby

Python also supports a wide range of libraries for adding extra
functionality, including in the GIS space:[[BR]]
(There are no PHP libraries for GIS)
 * http://trac.gispython.org/lab/wiki
 * http://featureserver.org
 * http://tilecache.org
 * http://mapfish.org

Python is also the language in which the support infrastructure is written:
Bzr, Trac

 * ESR's take on Python: http://pythonology.org/success&story=esr
 * Python as an Agile language:
http://agiletesting.blogspot.com/2005/02/python-as-agile-language.html
 * Python is fun!: http://xkcd.com/353/
----

Enjoy ;)

Regards,
CL Chow




_______________________________________________
general mailing list
[email protected]
http://lists.foss.org.my/mailman/listinfo/general

_______________________________________________
general mailing list
[email protected]
http://lists.foss.org.my/mailman/listinfo/general

Reply via email to