Jump to content



Photo

php or python for web development?


  • Please log in to reply
37 replies to this topic

#1 Tech Star

Tech Star

    Neowinian Senior

  • Joined: 24-November 04
  • Location: California, USA

Posted 28 October 2012 - 01:47

I am trying to get into web development and I have been researching the different languages that I can use to start learning these things. I have a little bit of php knowledge, enough to allow me to make customization and changes to some things in wordpress but not enough to really do anything with it.

With so many different languages that can be used to code websites I am confused what would be the best one to chose to start learning. I have read good things about django (python) and how it is a better language that is more cleaner for bigger scale projects and that such. php is more widely used/supported and basically ready to go out of the box, however it has its own set of problems also. The more I read about the two different languages, the more I get indecisive.

Can you help sway me in the right direction?


#2 Kami-

Kami-

    ♫ d(-_-)b ♫

  • Tech Issues Solved: 2
  • Joined: 28-July 08
  • Location: SandBox

Posted 28 October 2012 - 01:50

I'd go with Python (Django) or Ruby (Rails) over PHP any day of the week for far too many reasons to specify here.

#3 PhilTheThrill

PhilTheThrill

    Neowinian Senior

  • Joined: 28-November 03
  • Location: Canada
  • OS: Win 8.1
  • Phone: WP8

Posted 28 October 2012 - 01:54

Where I work (small web design/development firm - dozen employees) we primarily deal with ASP.NET and javascript. Little PHP sometimes depending on the client/project.

#4 ZakO

ZakO

    Neowinian

  • Tech Issues Solved: 2
  • Joined: 21-September 07
  • Location: Finland

Posted 28 October 2012 - 04:26

I don't really think there is a 'best' option, you can write clean well-structured large scale web applications in pretty much any language as long as you follow good coding practices.

Personally I use Ruby/RoR or ASP.NET MVC (not web forms) for any new projects. I used PHP for 6-7 years before that and contributed to the interpreter... but I'm much happier with Ruby & C#, there's a ton of bad design/annoyances/inconsistencies in PHP. There are some good upcoming PHP frameworks such as FuelPHP and Laravel although obviously they can't fix the underlying annoyances with the PHP language.

I would recommend just spending a while with each language/framework learning the basics / experimenting until you find the one(s) you like best.

#5 +Matthew S.

Matthew S.

    What the what

  • Tech Issues Solved: 2
  • Joined: 15-December 05
  • Location: Georgetown, ON
  • OS: Windows 8.1 / Mac OS X 10.9.x iOS 7
  • Phone: iPhone 4S

Posted 28 October 2012 - 11:11

I would personally recommend PHP as I'm currently using Laravel for a few projects (a few customer sites and some of my own projects.). But PHP was the first web development language that I learned ... so I'm always following PHP more so than lets say Ruby or Python.

#6 The_Decryptor

The_Decryptor

    STEAL THE DECLARATION OF INDEPENDENCE

  • Tech Issues Solved: 4
  • Joined: 28-September 02
  • Location: Sol System
  • OS: iSymbian 9.2 SP24.8 Mars Bar

Posted 28 October 2012 - 11:38

Ehh, it's good to know both, and starting with something like Python might let you avoid pitfalls you'd hit if you start with PHP (Which seems to welcome bad practises through it's bad design :shifty: )

That said, Python and PHP run quite differently (PHP normally runs in-process with the server, Python runs outside), while you can setup PHP to behave like Python it's a fair bit harder.

#7 hjf288

hjf288

    Korean Crazy Man!

  • Joined: 19-April 03
  • Location: United Kingdom

Posted 28 October 2012 - 11:53

Ehh, it's good to know both, and starting with something like Python might let you avoid pitfalls you'd hit if you start with PHP (Which seems to welcome bad practises through it's bad design :shifty: )

That said, Python and PHP run quite differently (PHP normally runs in-process with the server, Python runs outside), while you can setup PHP to behave like Python it's a fair bit harder.


PHP only runs in process with the server IF you are using Apache/Mod_PHP,,, otherwise you use PHP-FPM and it really isn't "a fair bit harder" to install or configure...

#8 threetonesun

threetonesun

    Neowinian Senior

  • Tech Issues Solved: 1
  • Joined: 26-February 02

Posted 28 October 2012 - 14:25

There's probably 10 times the PHP projects out there compared to Python projects, which is worth taking into consideration. Building something from the ground up, either works.

#9 spudtrooper

spudtrooper

    Neowinian Senior

  • Tech Issues Solved: 1
  • Joined: 19-October 10
  • OS: Windows 8
  • Phone: Nokia 920

Posted 29 October 2012 - 13:17

Python.. django is just the easiest way to get going and even though there is a lot of php code out there, that doesn't mean its the best place to start. django is just so robust and easy to build robust applications with that i simply couldn't recommend php unless you specifically need to run an existing php code base.

#10 rfirth

rfirth

    Software Engineer

  • Tech Issues Solved: 2
  • Joined: 11-September 09
  • Location: Baton Rouge, Louisiana
  • OS: Windows 8
  • Phone: Nokia Lumia 620

Posted 29 October 2012 - 13:28

There's probably 10 times the PHP projects out there compared to Python projects, which is worth taking into consideration. Building something from the ground up, either works.


There are 10 times more PHP projects, but there are fewer Django (Python) developers. I get recruiters begging me for leads on Django developers pretty often because they are harder to find.

#11 LaP

LaP

    Forget about it

  • Tech Issues Solved: 2
  • Joined: 10-July 06
  • Location: Quebec City, Canada
  • OS: Windows 8.1 Pro Update 1

Posted 29 October 2012 - 14:30

What do you actually want ?

Do you want to have fun as an amateur ? Do you want to have a job one day as a web dev. Do you have a degree in computer science ?

If you are doing it to become a "pro" then you should start from scratch. Too many "web devs" these days don't master programming and are only good at using a framework. It's great cause it's easier for real programmers to find a job but anyway that's another subject ... Learn C and then get a proper oop book (one about the paradigm and not the languages). If you are already there then i suggest to learn how the web works before learning a language. If you know C and Java/C++/C# you'll have no problem getting into any languages out there. But CSS can be tricky. HTML too once you get into proper use of tags and things like WAI-ARIA. Javascript itself is easy but you need to know the DOM. I recommend learning Jquery too. After you kow how it all works you can start to learn a framework.

There's too much s***** web form dev out there knowing nothing about how the web works. It's daunting to see how much of these guys have a job when you get into a new org to help. Some of those guys can't even do a simple task in Javascript and CSS. And they can call themselves web devs go figure ...


If you do it purely for fun then try all languages and chose the one you prefer. Despite what a lot of people here will tell you there's no perfect language. They all have + and -. Ruby on rail is a good choice even if it's not used a lot. ASP.NET MVC is another good one. Php/Zend/... and even perl can be fun too from a programmer perspective. Stay away, very far away, from web form. Please do myself this favor. Personally when i want to have some fun i stay away from any framework and return to what dev used to be before people forget how to properly code because of frameworks (or maybe frameworks was created because too much people did not know how to code ;)).

#12 threetonesun

threetonesun

    Neowinian Senior

  • Tech Issues Solved: 1
  • Joined: 26-February 02

Posted 29 October 2012 - 19:32

There are 10 times more PHP projects, but there are fewer Django (Python) developers. I get recruiters begging me for leads on Django developers pretty often because they are harder to find.


True. If I had to pick one to start out, with no need to do either, I'd go with Python. It's a better language, it's more useful in general, and I think it's going to grow from here out.

That said, if I wanted to pick up an existing system, or develop something for other people to use today, PHP.

#13 n_K

n_K

    Neowinian Senior

  • Tech Issues Solved: 3
  • Joined: 19-March 06
  • Location: here.
  • OS: FreeDOS
  • Phone: Nokia 3315

Posted 29 October 2012 - 19:44

At the end of the day, php and python are both... ****. Python 2.x to 3.x broke almost everything for what reason? ABSOLUTELY NO REASON AT ALL!
PHP 5.4 removes safe mode completely and breaks PHP-GTK support and suhosain patch... WHY!? ABSOLUTELY NO REASON AT ALL!

Whichever you pick is equally as **** as the one you didn't pick, so it doesn't really matter.

#14 Aergan

Aergan

    Neowinian Senior

  • Tech Issues Solved: 6
  • Joined: 24-September 05
  • Location: Staffordshire, UK
  • OS: Windows 8.1 Pro / Server 2012 R2 / Xubuntu 14.04
  • Phone: Sony Xperia Z1

Posted 29 October 2012 - 20:12

PHP can run very easily on all the major web server products out there, great documentation to learn with and follows a C++ like syntax. Due to the similarities/blatant copying of Perl functions, it's very fast to produce something quickly.

#15 Andre S.

Andre S.

    Asik

  • Tech Issues Solved: 10
  • Joined: 26-October 05

Posted 29 October 2012 - 21:37

Almost every web site uses HTML and Javascript, client-side. That's where I'd start. After that, server-side, there are many choices: Javascript is one again (Node.js), C# (ASP.NET), Ruby (RoR), Python (Django), PHP... Although I haven't learned it personally, PHP looks like one frighteningly bad language, so if you can avoid it, by all means, avoid it.



Click here to login or here to register to remove this ad, it's free!