• Forum
  • Lounge
  • Which language to start with Web Program

Which language to start with Web Programming?

Pages: 12
I have been learning C++ for 2 years now, i want to learn web programming..
which language should i start with?
i know very basics of PHP, do you think i should learn JAVA?
please i have very little knowledge about web programming and i would like to increase it
web programming is a vast topic, do you mean server programming, web page programming, app programming?
I'd say every web programmer should, as a bare minimum, have strong knowledge of HTML, CSS, JavaScript, PHP, some flavor of SQL, XML and Ajax.
closed account (1yR4jE8b)
In addition to everything ascii has listed, it wouldn't hurt to learn some Ruby/Rails and Python/Django.
If you mean server side, then:
Tiny sites: PHP
Medium sites: Python, Ruby, Scala
Big sites: Java, Scala
Last edited on
Try node.js. I don't know how good it is for real web development, but it sure is easy & fun to play around with.
@rapidcoder - Why would you only recommend php for tiny websites?

If performance is an issue, facebook has published the HipHop project which compiles php into C++ code for faster runtimes. The now native APC in php also makes quite a difference.
Not running PHP as an apache module also makes quite a difference in the server load.

Just curious if there is anything else you're basing that statement on which I'm not aware of.

All the best,
PHP has excellent cheap hosting support. If you need to create a simple website with a few dynamic elements, PHP is also the easiest one to start with, and perfectly sufficient. Using a full MVC framework for such a thing is an overkill - it would take more time to setup than real coding.
I'm afraid I don't quite follow you - sorry.
Do you mean to say that PHP is not efficient for large projects because you would feel obliged to use an existing MVC framework?

So what would be the advantage of other languages, you could just opt to not use the MVC framework and write your own stuff in PHP, could you not?

Again, I'm not criticising you - just trying to understand.

All the best,
PHP is not efficient for large projects because it was never designed to be used in such projects. Even the acronym originally was "Personal Homepage Preprocessor". It is slow [1], has poor memory management, crappy database drivers, no consistent naming / API design conventions - it feels like built by 13-year old kids.

But it really rocks at small things - it is installed on almost every webserver out there, hosting is cheap, it is very easy to learn, it has an extremely simple and clean execution model [2], and it is very easy to add some dynamic content in PHP to a static website. Don't try to shoot mosquito with a bazooka.

[1] automatic translation of PHP to C++, according to Facebook gives only 2x-3x speedup, so it is still 50x slower than Java written by an average corporate programmer. Actually Facebook realized that PHP doesn't scale, but it was too late.

[2] most MVC or component frameworks don't

Last edited on
A few years ago I applied for a job as a web dev for my university. They strongly recommended proficiency in Javascript, asp.net, PHP, SQL, HTML and XML. Mind you their code base was one gigantic kludge with some some server side perl scripts acting as glue. But, that skill set can't hurt in any web-dev job and some combination thereof will likely be expected of you if you're doing client side coding. I'd recommend getting a footing in SQL, PHP, XML and HTML. It's what I'm doing now, so that I can reapply for that job. Because I didn't have those skills before.

and on a side note, I'm hoping they offer a full time web-dev position, full time employees get 12 free credit hours.
Technically a bazooka would be more effective against a mosquito than a smaller weapon because bazookas have an area of effect; with a smaller weapon you'd have to actually hit it which would be really, really hard.
closed account (1yR4jE8b)
let's just nuke it.
Nuke it? Nuclear reaction based weapons are child's play. We have a tachyon particle cannon that'll knock you into last week!
Why kill it when you can just befriend it? Much easier, cheaper, less destructive and safer that way.
That there's quittin' talk.
Someone has to choose to quit, otherwise we would keep going until the whole world gets destroyed.
Or knocked back into last week.
automatic translation of PHP to C++, according to Facebook gives only 2x-3x speedup, so it is still 50x slower than Java written by an average corporate programmer

Could you refer me to some benchmark data? I'm having a difficult time believing that PHP is between 100 and 150 times slower than Java. I ask because most of the time I've found that benchmarks are unfairly biased in Java's favor by its brainwashed over-zealous disciples.
Last edited on

It seems they made the interpreter better now, because median is "only" 23x slower. But this is for computational heavy tasks, and it is not relevant to what websites do. Add to that poor memory management[1], lack of good database connection pooling [2], lack of in-memory object caching, lack of threading support, lack of non blocking IO / mmap support and you are good 200x slower for any serious work.

[1] This is by design in PHP: every request = separate execution of the script. Separate execution means loading all the libraries in memory, so if you use a complex MVC framework, you can waste several milliseconds just for loading stuff instead for real work. This also means, that the same MVC framework stuff is loaded several times if you have concurrent connections. Each connection can easily take a few MBs. On the other in Java most of the things are shared in memory, and while a framework can easily take a few hundred MBs or RAM, this RAM is reused by all connections. I've seen Java serve 500,000 concurrent connections with ease from a middle sized server, I seriously doubt even 10,000 concurrent connections is possible with PHP.

[2] http://serverfault.com/questions/160119/mysql-problem-with-many-concurrent-connections
Last edited on
Pages: 12