Debating web development toolsets

CLIFFORD ILKAY clifford_ilkay-biY6FKoJMRdBDgjK7y7TUQ at public.gmane.org
Sun Jan 13 23:38:06 UTC 2008


Aaron Vegh wrote:
> Hi Kareem,
> 
>> I've looked into Ruby on Rails, and I have to admit the concepts of "Agile
>> Development" sound sweet, but is it too good to be true?
> 
> I've taken some time to learn Rails, and have found it enforces a lot
> of great coding practices, such as MVC. The limitations are that it
> makes a lot of things easy, but the functionality that you want to
> integrate becomes very hard.
> 
>> PHP: The defacto web standard?  It seems to be supported everywhere, scales
>> well, and has lots of libraries, but can be difficult to maintain and get up
>> to speed on.
> 
> I also think you'll find there are more PHP developers than any other
> kind out there. It has broad support on any platform, has a very large
> community behind it. From our previous discussion I can see that many
> people think it's insecure, but again, with good coding practices you
> can alleviate that point. I don't honestly think that it's hard to get
> up to speed on.


I know of a certain operating system that is ubiquitous and yet, it is 
not particularly good. If popularity meant good, that OS, and PHP, would 
be the best technologies in their respective categories. I used to use 
PHP but there is nothing I miss about it. PHP is as ubiquitous as it is 
because it started out as a totally different thing than what it has 
become, not because it is good. It started out as an extension to HTML 
and but it has eventually morphed into a crappy, bloated, and slow 
language. Name a language in which the op-code optimizer crashing would 
be considered acceptable 
<http://2bits.com/articles/php-op-code-caches-accelerators-a-must-for-a-large-site.html>. 
The workaround to this is apparently to restart Apache with a cron job, 
just in case the opcode optimizer has segfaulted. Crazy.


>> Ruby On Rails: If you believe the marketing hype, it'll do everything
>> including walk the dog three times a day with one line of code.  Is this yet
>> another web fad, or is RoR something worth pursuing?
> 
> I definitely think it's worth pursuing. If I were starting out today
> I'd probably be neck deep into Rails. It has a large community, and
> there's no question that it's a legitimate environment. Rails isn't
> going anywhere. Not to mention that learning Ruby will give you
> leverage in other parts of your computing life, as it's a full-on
> object oriented language.


I have used and developed Omnis (a proprietary 4GL), PHP, Drupal, Zope 2 
and 3, Plone, WebWare for Python, and Django web applications. I have 
evaluated Ruby, RoR, Perl, Java, .NET, Boo, Pylons, and TurboGears. I 
realize I am mixing languages and frameworks but my interest in the 
language sparked my interest in frameworks in that language, not the 
other way around.

PHP is by far the worst of the languages I have used or evaluated. Ask 
an experienced PHP developer how they debug PHP applications and they 
will start mumbling and looking at their shoes. The debugging is 
primitive, at best, and most resort to just printing things out in the 
browser, which is a lame replacement for a good debugger. No namespaces, 
object orientation that is primitive by comparison to Python or Ruby, a 
worthless interactive shell, miserable debugging facilities, useless 
error messages, and a standard function library that desperately needs 
to be refactored all conspire to make PHP one of the worst of choices.

Perl did not look like it was meant to be read by humans so I gave it a 
pass. I saw nothing compelling about it. It is supposedly a good 
language for system scripting but I find I can accomplish what I need 
with Python.

Ruby looked interesting but I gave it a pass because at the time, it did 
not support Unicode, its documentation was quite poor (unless you could 
read Japanese), it was slow, and the variety of modules and extensions 
were limited by comparison to Python.

If you are detecting a bias towards Python, you would be right. Python 
is compact, clean, and quite often, the way to do something in Python is 
quite obvious. I criticized PHP for primitive debugging and the irony is 
that I rarely use Python's very capable debugger, pdb, because the 
Python interactive shell is good enough for me to spot problems right 
away when I am doing web development. I did use pdb more frequently when 
I was developing PyQt and PyGTK applications. Speaking of the Python 
interactive shell, I highly recommend ipython as a replacement shell.

Python is a general-purpose language. I have used it for system 
scripting, something for which people normally use Perl, for GUI 
application development, and for web application development. It has 
excellent support for various databases, PDF libraries (Reportlab), a 
variety of GUI library bindings, wxPython, PyQt, and PyGTK, to name a 
few, and plenty of useful and well-supported modules. As others have 
pointed out, some Linux distros, like Red Hat, use Python extensively. 
There is one, Pardus, that uses Python for package management and init. 
It is relatively easy to incorporate C or C++ code in Python. In my 
opinion, there is no other interpreted language that is quite as 
versatile and covers such a broad range of applications as Python. There 
is also an implementation of Python on the .NET framework, IronPython, 
but if you prefer to stick with the standard Python, which is also known 
as CPython since core bits are developed in C, there are excellent 
platform-specific modules for Windows, OS X, and Linux.

Python does not impose a particular style of coding on the developer. 
You can write procedural, object-oriented, or functional code. It is 
your choice.


>> Java:
> 
> Bah.
> 
>> ASP.NET:
> 
> Double-bah! You can't seriously expect a good answer on this list. ;-)
> 
>> Python:
> 
> Not familiar with this, but Python isn't exactly known for its
> suitability for web app development.


... by you, apparently :) There are many capable Python-based web 
application frameworks. In fact, a running joke is that you cannot 
really be a Python developer unless you have developed your own Python 
web framework. Python excels at web application development. There is a 
rich array of choices, too many for some people perhaps, and well 
thought-out deployment models.

Django, one of my favourite Python-based frameworks, is every bit as 
good as any web framework as I have evaluated or used and it strikes the 
right balance between flexibility and rigidity. Django is agnostic when 
it comes to databases (SQLite, MySQL, PostgreSQL are all well-supported 
and there are people who are using it with Oracle), agnostic when it 
comes to JavaScript libraries, and it does not provide any schema 
evolution capability because non-trivial cases are very hard to get 
right. With a couple of lines of code, you can have auto-generated CRUD 
forms for free in the admin interface. Those forms are often good enough 
for many applications. That sounds like damning by faint praise but it 
is not meant to be so. The forms look and behave better than 90% of the 
forms on the web but it will depend on the particular use case if they 
will suffice or not. If they do not, creating your own forms in Django 
is quite simple.

I meet many PHP refugees on irc.freenode.net, #django whose first 
exposure to Python is through Django. They are learning both at the same 
time. That is a testament to how approachable Python and Django both are.

Django has excellent documentation and a very helpful and active 
community. The tutorial was good enough to get me started with it but I 
had already been using Python for a few years prior to encountering 
Django. If you would like to try Django, do not hesitate to check out 
svn trunk. With very few exceptions, I have not had a problem with 
tracking trunk.
-- 
Regards,

Clifford Ilkay
Dinamis Corporation
1419-3266 Yonge St.
Toronto, ON
Canada  M4N 3P6

<http://dinamis.com>
+1 416-410-3326
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list