TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: django vs php: a hard choice

14 pointsby kammeover 16 years ago
I'm making plans to start my own killer-webapp and I just can't decide in what I will develop it.<p>I am currently a php developer so I know my way around php and I'm able to make the application I have in mind without any problems. But I'm also very interested in django, a relatively new thing for me but it sure does look promising and worth my time to invest further.<p>I tend to choose php because I know it, I know it is well supported, it scales without large problems, I can configure it and optimize it without a problem.<p>While django is very fast in terms of development time, it's a challenge, probably good for my career if I can add django/python developer to my CV and it has a great community.<p>But I have doubts for choosing django... For starters, I don't know if it's 'economical' to choose django in terms of performance. Does django beat pure php in complex sites pageviews? In other words, do I have to scale faster with django then with php? Will I be able to find additional programmers if my website becomes a success? I live in Europe and I don't have the impression django/python developers are common here (prove me wrong!). How is the support going to be? I'm always surprised to see very old php4 code runs fine on the newest php5 release, but I heard djando changes quite often and you have to re-write code if you want to use a newer release.<p>Like I said, I don't have any real-world experience with django, so I'd like your advice/thoughts on this.

19 comments

mixmaxover 16 years ago
A few points:<p>- Don't worry about scaling problems - if you have scaling problems you have a succes already. 99% of startups unfortunately never get to have scaling problems.<p>- The main focus should be to get the killer-webapp up and running, not getting a CV or trying out a new technology. Starting a company is in itself a huge challenge. No need to add to the risk by trying to do it in a language you're not familiar with. If you're good at PHP stick with it.<p>Just my two cents...<p>Where in Europe are you from btw?
run4yourlivesover 16 years ago
You do realize you're comparing apples to oranges right?<p>django is a framework, and PHP is a language. You should be comparing django to CakePHP (or whatever) or PHP to Python.<p>Assuming the latter, having gone from C++ to VB (pre-.com) to ASP to PHP to Ruby (briefly) to Python, I really prefer python as a language.<p>I think mixmax's advice though should be heeded.
评论 #314178 未加载
评论 #314198 未加载
simonwover 16 years ago
Do a weekend project in Django and see how it works for you.<p>It's certainly a good skill to have from an employment point of view - the Django job market has exploded over the past year, see <a href="http://www.djangogigs.com/" rel="nofollow">http://www.djangogigs.com/</a>
tdavisover 16 years ago
Stick with what you know. Having said that, at some point I recommend learning a better language than PHP, like Python. Coming from a PHP background myself, I can honestly say that my programming life got noticeably better after having started writing everything in Python instead. That was a couple years ago and I wouldn't go back for anything.
maxkleinover 16 years ago
Trust me, go with PHP. Django is good to use if you are interested in learning a new language an improving your skills in python, but if you are interested in starting a company, then absolutely go with PHP. I've used Django for 2 big projects now, and I'm telling you this from experience. Here is why:<p>1. Django is quite difficult to learn. You'll waste a month or two getting into the framework<p>2. You will NOT find developers to work on Django, and the ones you do will be VERY expensive<p>3. Once you know Django well, you'll find that there is not that much of a faster development cycle than PHP, unless you are doing something newspaper related. For newspaper related sites, there are shortcuts, but for everything else, it's pretty much the same routine<p>4. Hosting for django is expensive. On a $10 a month host, a PHP site will run fast. For Django you need to get a $100 virtual server. Big difference.<p>5. Django does very little PR, so the language seems to be cooling off in terms of visibility. This means - less applications, less snippets, few books. It's becoming a bit of an elitist culture, which sucks big time<p>6. The IRC channel is becoming like the C++ channel. Snobby and condenscating.<p>Recently, a person I know decided to rewrite his entire Django app in Rails because he could not find any developer for his Django app.<p>It's not a hard choice. Go with PHP.
评论 #584360 未加载
gtaniover 16 years ago
One of my deciders is how many people are blogging or writing to mailing lists with problems or tutorials or sample code, whatever. Django is really a nice framework, but when you start googling specific issues, e.g. working with an ajax lib or finding/deploying to a VPS/ shared host, ther'es a lot more blog entries on specific issues/techniques that people have used in PHP than in Django. Also true for PHP activity in delicious, subreddits, stackoverflow, and the wall of PHP books at Borders.<p>You might want to look at the recetn django articles<p><a href="http://jeffcroft.com/blog/2008/jul/25/top-ten-things-suck-about-django-revisited/" rel="nofollow">http://jeffcroft.com/blog/2008/jul/25/top-ten-things-suck-ab...</a><p><a href="http://42topics.com/blog/2008/04/five-things-i-hate-about-django/" rel="nofollow">http://42topics.com/blog/2008/04/five-things-i-hate-about-dj...</a><p><a href="http://justin.harmonize.fm/index.php/2008/09/django-round-2/" rel="nofollow">http://justin.harmonize.fm/index.php/2008/09/django-round-2/</a>
bootloadover 16 years ago
<i>"... tend to choose php because I know it, I know it is well supported, it scales without large problems, I can configure it and optimize it without a problem. ..."</i><p>Then stick with it.
bockrisover 16 years ago
Django released version 1.0 earlier this month so your concern about it changing out from under you is probably a non-issue.<p>You should try it for a small test site. Either you will like it or you won't. IMO, scaling problems in web apps are a application design issue, not a technology issue. JM2C.
midnightmonsterover 16 years ago
I'm a longtime PHP developer who has been flirting with server-side JavaScript frameworks recently, including building a couple production apps in Helma.<p>For my current RAD project, the client has their own IT staff who don't want to support another environment, so it was back to PHP. On Rasmus' good words, I tried using the CodeIgniter framework (never used a pre-existing PHP framework before) but ran into pain with its many kludges to support PHP 4. Then found Kohana, which is CodeIgniter rebuilt for PHP 5 only. I'm lovin' it.<p>I was all gung-ho for server-side JS, but Kohana combined with my own ORM is going very nicely. (I don't know about Kohana's ORM--I started working on mine before I had decided to use any framework.) The biggest benefits, of course, are that it runs most everywhere and my long experience with PHP prevents the odd surprises I was always running into with the JS frameworks.<p>And, hey, first class functions and closure are coming in PHP 5.3!<p>So the grass isn't always greener--it seems what I was missing was a better way of organizing my code as much as straight language power. So try a good PHP framework--I recommend Kohana. And even though python and js are more powerful languages, having a whole bunch of stuff already built for you and ready to run anywhere beats power and a clean room most of the time.
评论 #314373 未加载
adatta02over 16 years ago
check out the symfony framework for php - <a href="http://www.symfony-project.org/" rel="nofollow">http://www.symfony-project.org/</a><p>It has MVC architecture, is decently fast, and has an active community behind it.
评论 #314526 未加载
评论 #314306 未加载
walesmdover 16 years ago
I have been bouncing back and forth between Django, Ruby on Rails, merb and many other frameworks/languages for the exact same reasons. I'm a nerd, I enjoying learning new languages and it would look great on a resume to have a few more under my belt.<p>But - I always come back to PHP (and the wonderful CodeIgniter framework) when I actually need to get something accomplished. I know it like the back of my hand and I don't care what any of you say about the other languages and frameworks - I could not develop my applications anywhere near as quickly as I could in PHP.<p>Yes, some of those frameworks are designed for rapid development - once you know the parent language! I say find a powerful framework for PHP designed for rapid development and stick with what you know. Play with Python and Ruby on your own time.
whacked_newover 16 years ago
Django 1.0 was released recently. It's a good time to jump in. Strange as it may seem, you can use both. I do.<p>But all advice is quite pointless -- suppose you decide not to try out Django. Without actually realizing how it works, you will always have lingering doubts about whether it would have served your purpose better.<p>A lot of people don't understand the difference between Flash and Flex. There is a large overlap in functionality, but a big difference also. Should I use Fs or Fx? Without actually using it for a bit, you can't tell.<p>It's like going to a restaurant and seeing somebody eating something. They look happy eating it, but you don't know if it fits your own appetite unless you try it yourself :)
danwover 16 years ago
Django v php is a strange comparison. Framework vs language.<p>Python is a nicer language than PHP, and Django is a nice framework. If you already have knowledge of php then you can probably get your app running faster with a php framework such as Symfony.
jonny_noogover 16 years ago
I agree with other posters. If your one and only goal is to get your site up and running, then for sure stick to what you know... Use straight PHP or a PHP framework.<p>If however, you have the dual goals of getting your site up and running and also learning new and better technology that has the possibility of making you more effective in the future (initial development on your current project will be slower, but it will pay off in the long run), then go with Django... Or Rails... I'm a recovering PHP-aholic, who's moving onto Ruby, so I just had to put that in.<p>Good luck.
jamongkadover 16 years ago
I'm surprised nobody recommended CodeIgniter to this guy. Which is by far IMHO one of the better PHP frameworks out there. Also do try Kohana as well! as I heard it's a more powerful version of CI.<p>Thankfully my day job consists of me hacking in CI (which is a Godsend) but my current passion lies in HaXe. So if anything try out other languages to expand your mind. But if you don't have the time and luxury and you want to get that killer app up and running. You might as well stick to your main competency and slug it out in PHP.
评论 #314722 未加载
awadover 16 years ago
If you know it, stick with PHP...you can create your app rapidly instead of picking up the nuances of a new language/framework. While there are a lot of criticisms of the language, the fact is there are tons of resources available if(when?) you need it.<p>And, reiterating what some of the other posters have said, don't worry about the scaling. A well designed app in PHP or Django or Java or Rails (Twitter failed because of its flawed design...not because Rails sucks) or whatever else will scale.
cosmo7over 16 years ago
You're kind of asking two questions in one:<p>PHP or Python? and Framework or homebrew?<p>If you switch from PHP to Python and things don't work out, you'll blame Python. I'd stick with PHP.<p>If you use a framework and it doesn't work out you can just code away from the framework. I'd go with Zend Framework. It takes some effort to learn the router stuff, but never seeing another url that ends with .php is worth it on it's own.<p>Good luck!
robover 16 years ago
Most people in the real world use PHP, but those on reddit and HN tend to go against the grain and use Python (or Ruby). If you know PHP, don't bother changing; there's nothing wrong with it.
trezorover 16 years ago
A few points:<p>- Don't worry about scaling, like mixmax said.<p>- The main focus should be to get the killer-webapp up and running, not getting a CV or trying out new technology. However, you don't have to step far outside the PHP communities to see people shitting on PHP <i>everywhere</i>.<p>If PHP is the only thing you know, do yourself a favour and widen your horizons. Not necessarily for this particular project, but because when the time comes, and you are getting fed up with PHP's shortcomings, at least you know there is a way out.<p>Me, myself? I'm a heavily invested C#/.Net developer, but prior to that I have worked with Atmel AVR Assembly, Motorola 68k assembly, Basic, Pascal, Python, Arexx, C, VHDL, Verilog, LabView, Matlab, Java and god knows what. Oh, and yes, PHP.<p>I may stick to C#, but I know there is another world out there. So should you.