Hacker News new | past | comments | ask | show | jobs | submit login

http://news.ycombinator.com/item?id=2061877

"The obvious answer is to rewrite WordPress with Django"

Done.




Ease of installation is one of the biggest SOP of WordPress. I am sure anything written in Py would not have that level of ease for common developers, at least for a few years to come and it become more tough in shared hosting environment.


Au contraire - it is the implementation details (create database tables for you? handle install exceptions gracefully? blablablabla) and not the platform (in the case of PHP/Python/Ruby/Perl from personal experience) that makes installation "easy". There are a large set of shared hosts that boast Python and Ruby support - fact of the matter is, WordPress exists and it was written in PHP and nobody from the other language camps has cared to do anything like it in x language.

No need to go sowing seed like this!


The platform does make a difference in this case. With the way PHP is set up on most servers, you can have static files and dynamic files (PHP files) in the same folder (although you'd probably separate them into subfolders). This makes everything easier installation-wise.

I'm a big fan of Django, but you'd have to admit that Django's "one virtual host for Python, another for static files" would over-complicate installation. Even on a made-for-Django host like WebFaction it would still be easier to install PHP-WordPress than Django-WordPress.


I still disagree. I don't use Django so I actually don't know what you have to go through in order to install it but a python app can be packaged and installed on a shared host with mod_wsgi installed. All you need is an index.wsgi to act as your front controller.

Setting that up? You just have to install a python egg in the app directory and you should be good to go.

Like I said, it's implementation details - a python application could be made easy-to-install. It's just that no one has built a special purpose application with a single minded install path (Django can be self-hosted, mod_python, or mod_wsgi but it is a framework and not an application in the sense that WordPress is an application and CakePHP is a framework) that is relevant to WordPress, closest probably being Plone.


Since the framework and the server(s) can be set up in a multitude of ways (including two-server setups with Apache serving Django and nginx serving static files), I'm finding it really hard to believe that you'd be able to distribute a one-size-fits-all Django-WordPress egg.

Sure you could have RPMs or Debian packages tailormade for a specific distribution, but WordPress has the advantage that it's a downloadable package that can easily be (S)FTP'd into a folder on a shared host and run, and it'll work with most hosts. You just can't do that with Django-WordPress.

Again, I use Django/Python more than PHP these days, so it's not a PHP versus Python thing.


True, there are many possible configurations, but a few (I don't have widespread experience with Python based hosts because most of my Python work has been on my own servers) hosts I've used have mod_wsgi installed with a WSGIDaemon process pointing at the application directory with index.wsgi being one of the index handlers. What you are supposed to provide is an application with a route through an index.wsgi file. In Pylon's case (this is how I have my server setup) index.wsgi is simply loading the Pylons app and providing it as a wrapped "application" class as a callable. Very standard and very easy.

As an example, here is the index.wsgi front-controller that loads my Pylons app (note, mine is more complicated than I'm showing here because I use virtualenv to contain the app):

    from paste.deploy import loadapp
    application = loadapp('config:/home/my_app/production/production.ini')
The host makes sure that the Apache vhost has mod_wsgi configured to run a WSGIDaemon process for the /home/my_app/production directory - typically (in the case of WebFaction) they give you an interface that handles all of that (so you can run multiple apps out of the same top level directory) in the course of creating your "sites", the same exact process you would go through for creating "sites" for a PHP based application.

Also, you don't need to tailor RPM's to the distribution, you can package your app as a python egg (which is cross-platform and contains the dependency links in your setup.py). I almost think this is easier than (S)FTP'ing the app up to your host. If your host gives you SSH access (which all $5 a month hosts do as far as I know - the crappier ones put you through a verification process, but a good one will give it to you the minute you are signed up) you can easily rsync the app up and then run "python setup.py whatevercommandyourappuses" and bam - you're good to go.

You could even put the database creation steps into the setup.py routine - "python setup.py build", "python setup.py install" <---- build necessary directories, then build your database tables for you. Much safer (and easier) than supplying an install script that can be accessed publicly.

I will concede though, that the whole scenario I've just described wouldn't be easy and fast for the average joe due to their inexperience with Python and/or the command line... That kind of thing makes me wonder though why we don't have basic programming courses as a requirement in high-school. If only my father (a lawyer) knew what sed/grep/awk could do for his manipulation of documents... I'm digressing now and I'll stop.

I know it isn't a PHP vs. Python thing - it just frustrates me when people make the argument for an inferior tool in favor of ease of use when ultimately (as per the scenario I gave above) the more powerful tool can save you time... I came from PHP land and will not go back - thanks in part to Python and the other methodologies I've learned.


Your level of knowledge in administration is not common. PHP wins on deployment because every $5 host your average beginner programmer uses already has PHP on it, and deploy is just ftp/sftp. By comparison, a beginner in python will probably also need to learn some *nix and/or get a root account.

When wide acceptance is the goal, even small frictions can be material.


Uh, nope. You definitely don't need root to use Django.


I know. I think you're missing the point. The fact that one may make an informed decision does not change the fact that many make uninformed decisions and judge the situation based on their perception rather than independent reality.

This matters, facts or no.


In a previous comment I conceded the fact that some trappings of an excellent Python deployment solution would require more knowledge than is common to the average "I want a site that I can post content to" user.

However. I still think a well engineered application that could cater to many of the $5 hosts' python setups could be just as easy to setup as a PHP app.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: