php vs python
Jerry Stuckle
jstucklex at attglobal.net
Sun May 25 15:07:09 EDT 2008
Ivan Illarionov wrote:
> Jerry Stuckle wrote:
>> Lie wrote:
>>> On May 22, 12:28 pm, NC <n... at iname.com> wrote:
>>>> On May 21, 1:10 pm, notbob <not... at nothome.com> wrote:
>>>>> So, here's my delimna: I want to start a blog. Yeah, who doesn't.
>>>>> Yet, I want learn the guts of it instead of just booting up some
>>>>> wordwank or whatever.
>>>> Here's a simple computation to consider... WordPress' codebase is
>>>> approximately a megabyte of PHP code and megabyte of JavaScript code.
>>>> Assuming that the average line of that code is 50 characters long, you
>>>> are looking at 20,000 lines of code in PHP and as many in JavaScript.
>>>> Based on the notion that the average developer out there writes 100
>>>> lines a day, either you're in for a two-year project or your product
>>>> is going to have seriously reduced functionality compared to something
>>>> that's been freely available for years. What's your choice?
>>> Nope, the core functionality of a blogging software could be
>>> replicated in just a few lines of PHP codes, in the range of tens to
>>> hundreds of lines. If you're creating your own blogging software, you
>>> wouldn't seriously think you'd recreate all those things such as
>>> pingbacks, commenting system, etc, etc, etc. No, you'd start with some
>>> basic core functionalities: a few simple server side includes only.
>> As he said - it's either a two man-year project or your product is going
>> to have seriously reduced functionality. It looks like you are opting
>> for the latter.
>>
>> Also, you still need to write the server-side includes. But they won't
>> do nearly enough for everything WordPress does.
>
> If the OP wants to learn the guts of the blog or to implement the blog
> from scratch, Python/Django would be a better choice than PHP. The
> reason is that he can reuse and customize existing high quality
> components for all these auth/auth, admin, comments, etc, etc, etc.
> Another reason is that Python and Django encourage very clean design
> while PHP is too often ends up in "spaghetti SQL wrapped in spaghetti
> PHP wrapped in spaghetti HTML". 2 man/year in PHP == 2 man/week in
> Python/Django.
>
You can do the same in PHP. And PHP doesn't create spaghetti code -
programmers do. Good programmers write good code in any language. Poor
programmers write lousy code - in any language.
And I'd love to see you write WordPress in 2 weeks in Python. That's
about 2K LOC. Can't be done with the same functionality - unless you
have some 50K lines.
It's going to be very close to the same 2 man years that PHP takes.
> And there are Python/Django blog applications that already do almost
> everything (and maybe more) that WordPress does. http://byteflow.su/
> is one of them (IMHO the most promising).
>
> Ivan
>
And there are many CMS's written in PHP which do much more than
WordPress does. Drupal, Joomla and Mambo come to mind.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex at attglobal.net
==================
More information about the Python-list
mailing list