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: Learn PHP or django?

5 pointsby butwhyabout 10 years ago
I primarily work in ops but want to explore some dev work. Is it worth picking up PHP from scratch (I don&#x27;t know any), or learning how to use django? I&#x27;m wondering what is easier.<p>I know a bit of python right now so that could make it better to pick up django, but I&#x27;m not quite how sure intertwined they are. AKA. if you have an existing python script, how much would be involved to integrate it with django and display output on a webpage. And as for PHP, I suppose I would like to avoid picking up another language (AKA if I improve my python.. it could help my serverside scripting as well as for web stuff, whereas PHP is only web), but would do it if the barrier to entry is easier&#x2F;quicker than django.

6 comments

markbranlyabout 10 years ago
PHP is _not_ Web only. You can write CLI tools and server scripts with it. Look at Composer. That is pure PHP.<p>PHP is a highly marketable skill. WordPress, with their mission to power 50% of the Web, is PHP. Not to mention … the Book of Faces.<p>There are modern frameworks for PHP like Laravel that play the same role as Django.<p>But, if you&#x27;re learning a new language, why not JavaScript? Everything is JS now—server side scripts, full stack Web dev, &quot;Internet of Things.&quot; It is well on its way to Total World Domination.
评论 #9355970 未加载
gt565kabout 10 years ago
Let me weigh in here. I&#x27;ve worked with Rails, ported a php application to Django, currently working with Spring MVC and Angular JS.<p>PHP is a scripting language, Django is a framework. I think you are comparing 2 different things.<p>If you want to get into web development, there are 2 major concepts&#x2F;skills you need to get down. First, understanding of MVC, or &quot;MTV&quot;[0], as in Django&#x27;s case, or whatever other variation of said design pattern (MVP, MVVC, etc..). Second, writing and consuming REST APIs. The frameworks will handle or at least guide you through the rest. CSS, HTML, and JS will help you with the front end, but I think as someone who works in ops, you&#x27;d be more comfortable establishing a solid back-end first. You can always bootstrap the front-end.<p>Personally, I try to stay away from anything PHP based. I don&#x27;t think anyone in their right mind would start a new project with a PHP stack. Frameworks like Django, Rails, and other JS frameworks are much more mature, in terms of utility, than anything you&#x27;ll find in PHP.<p>Since you already have experience with it, it would be fairly easy to work with Django after running through a few tutorials.<p>IMO if you go the PHP route, you&#x27;ll get stuck with old technologies, as in your job prospects would involve maintaining legacy php apps. I haven&#x27;t heard of anyone starting a new project with PHP.<p>A developer should be concerned with building applications to meet requirements, writing and consuming REST APIs, and implementing features and utility functions around those.<p>Once you become fairly experienced with one web framework, whether it&#x27;s Django or Rails, explore another framework. Don&#x27;t get stuck with a single technology stack. That&#x27;s the mistake most developers make. They never get out of their comfort zone. Become a polyglot.<p>Fact of the matter is, some frameworks have better integration with certain tools, because of community support. Learn one framework, then learn another, and keep going.<p>Personally, Django is one of my favorites, but I also love Rails. Both do certain things better than the other. There&#x27;s no perfect framework.<p>Check this book out, it&#x27;s free if you read it online. It is a really good resource on TDD with Python and Django <a href="http:&#x2F;&#x2F;www.obeythetestinggoat.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.obeythetestinggoat.com&#x2F;</a><p>0. <a href="https:&#x2F;&#x2F;docs.djangoproject.com&#x2F;en&#x2F;1.8&#x2F;faq&#x2F;general&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.djangoproject.com&#x2F;en&#x2F;1.8&#x2F;faq&#x2F;general&#x2F;</a>
评论 #9360090 未加载
rfc791about 10 years ago
I worked in ops for several years but never really got passed simple scripts in various languages. Then out of pure frustration with the lack of tools to do my job I decided to dig deeper into Python.<p>I started off with a project to track Application Outages using Django. It took me three months and a lot of reading but the application is still in use after 3 years with very little maintenance. I have then gone on to use Django and Flask for various one off web apps. Pandas for data analysis and a lot of third-party packages.<p>During that time I have looked at Javascript(Node stuff), Ruby and Go. Python keeps winning because my brain can understand it and I get things done the fastest in it. You need to find what works for you there will be plus and minus for it all but getting things done is where it matters.
giaourabout 10 years ago
What&#x27;s your end goal?<p>Picking up PHP will make it very easy for you to find work as a developer, but python will make your soul hurt less.
mrorbitmanabout 10 years ago
It doesn&#x27;t really matter what server side language you use. If you like python, absolutely dive into django :)
luttabout 10 years ago
Django