Home » Php » php – Django or CodeIgniter for Turn-Key Web Application

php – Django or CodeIgniter for Turn-Key Web Application

Posted by: admin July 12, 2020 Leave a comment

Questions:

I’m going to build a turn-key solution for a vertical market, and would like to offer both options: software as a service, and give them the opportunity to host the application on their own. In other words, I’m aiming to have similar deployment options as Joel’s FogBugz.

I’m a Python programmer, and I could fly over the project with Django. There are several reasons I prefer PHP though:

1) Django installation, and configuration assumes you have access to a shell (my target is not the programmer type). Although I could offer installation service, but not on their servers.

2) Django runs only on some specific hosts that must take special care to enable it. Installing mod_python/mod_wsgi, and most likely the minority of my potential clients would have root access, or even a cpanel.

3) Using PHP would mean I could run it on their existing server. I would have no need to move them to a Django-enabled server, and no downtime for their emails, while the DNS updates.

On the other hand, I have very little experience with PHP. Smarty as a templating language looks nice, and works similarly to Django templates. It doesn’t offer template inheritance though, except in a very hackish way in which I wish not to use as it could break the application if the designer messes them up. What do you think? Thanks in advance!

How to&Answers:

Deployment is clearly a problem for all non-PHP based web apps, but I think things are getting better with the DreamHost/Engineyard type ISP’s who provide Ruby/Python etc. out of the box. It also looks like there’s going to be a lot of discussion at PyCon this week about ways to fix deployment problems. The growth in popularity of Django, Turbogears, and Pylons is driving demand for better deployment solutions.

That said, if your target market are people hosting on the very low end $12 a year type ISP’s then I don’t think you have much choice other than PHP.

Finally, one thing I disagree with you is running PHP and Django on the same server. I’m running a few PHP apps on my server with Apache and dozens of Django sites with mod_wsgi in daemon mode. Running it that way means the Python interpreter doesn’t use up ram in the Apache workers and vice versa, the PHP interpreter isn’t contaminating my mod_wsgi daemons 🙂

Answer:

If you want your application to be mainstream then your almost forced to go with PHP. Going from Django to PHP is alot easier than going from PHP to Django. You know the standards, you just need to learn the PHP syntax and functions.

I would definitely use a PHP framework. Symfony and akelos are very similar to Rails (close to Django). On the other than theres Code Igniter which does what it should – organise your code.

Answer:

Based on your own conclusions, I would go with CodeIgniter. It seems like there would be a ton of work helping your customers install your web app, and I assume you don’t want that.

Build a simple-to-install web app so that you can concentrate your efforts on making it better and selling it, instead of working extra as a sysadmin or writing extensive installation tutorials.

(With that said, FogBugz wasn’t easy to install on our Linux server, even though it is written in PHP. It took me and my colleague (both programmers!) more than a full work day to install. So I think there will always be problems with installation of self-hosted web apps.)