Question:
What is the most widely used programming language for the web?
Cr@zyhard
2014-02-14 22:57:17 UTC
Im starting this course in web development. It started with HTML5 and CSS, then went onto Javascript. All of this i expected to be in the course because i have a little knowledge of building websites.

However the course has now started talking about C# and Java. Until today I had no idea that other programming languages such as these were even used to create anything on the web.

So, my questions are:

aside from desktop applications, Is it only web 'applications' that are built using programming languages, or are standard websites also built using these?

Do all websites have to use HTML as their base or can programming languages be used instead?

What are the more popular languages for web applications?

Thanks,
Three answers:
?
2014-02-14 23:04:05 UTC
There is a difference between the website itself and web applications. The website just displays content on a page, and that is almost always done through HTML. A web application will actually do something, like interacting with the user.



The most common website design language is HTML, the most common web applications language is Javascript (different from Java). Other web application languages are Python, PHP, etc.
Ratchetr
2014-02-14 23:32:35 UTC
The first thing you have to understand is that there are 2 sides to any non-trivial web application:

• Client Side.

• Server Side.



The client side stuff is what the server hands to the web browser to display and execute. That is primarily HTML, CSS and JavaScript. (There are other things, such as Flash, Client side Java, and Silverlight. But you can ignore those for now).



One simple way to create a web site is to write an HTML file, a CSS file and a JavaScript file, and simply have the server send the contents of those files to the client. It is very simple: The server reads the files, and sends them to the client (the web browser) byte for byte.



But in the real world, it gets harder than that. Think about the very simple case where you want users to register and log in to your site. And you want to display the users name on the top of the page once they are logged in. Now it isn't so simple. You certainly aren't going to create a brand new HTML page for every user, right?



That is where server side programming comes into play. Instead of sending a simple, static HTML page, you now need to *inject* stuff into the HTML code. Things like the users name. Or in a more complex example, the contents of a user's shopping cart.



There are quite a few programming languages out there that work well for the server side code.

C# (or any other .NET language) is an excellent choice here. But it comes with a cost: It is a Microsoft proprietary language. You may have to pay money to use it on a real web site.



Java is also a viable choice. But it isn't the greatest language for doing this. Java is getting a bit old, a bit behind the times. But it does work here.



Most beginners turn to PHP, because it is free and widely supported. That is sort of unfortunate, because as programming languages go, PHP is just plain gawd-awful. And if you just blindly follow the bazillion and 1 tutorials on the internet, you stand a really good chance of creating a web site with serious security problems. Hackers ***LOVE*** php based sites created by amatuers. Java or .NET based sites, not so much.



For every major web site (sites like Facebook, Yahoo, Amazon, etc.) the HTML/CSS/Javascript code is just a tiny piece of the iceberg. The vast majority of lines of code on any of these sites is the server side stuff.



HTML and CSS are not real programming languages. They are Markup languages...languages that only dictate how content should be displayed. JavaScript is a real programming language. And an interesting, non-trivial one at that. But the server side is where all the interesting stuff happens.
?
2014-02-14 23:15:30 UTC
Programming languages typically are not used to directly "build a Web site," rather they are used to build enhanced functionality to a Website. HTML and CSS are most commonly used for displaying the frames, boxes, and text, but a "call" to a javascript (a programming language) would be used to check your IP address against a database/table for what country it is and return an image or text that says "Hi Australian."



Nothing says that a Web site MUST use HTML. For example, the source code to a Web address could be nothing but a simple javascript that checks your browser heads and returns an alert box that says, "You're using Internet Explorer." But apart from very specific sites and services, it would be impractical to not use it for the basic formatting and text.



Most standard Web sites (at least in the sense that we think of them) are developed using Content Management Systems (CMS) like Wordpress and Joomla. Larger corporate Web sites are typically very feature rich using a plethora of Web programming applications and Application Programming Interfaces (APIs).



By an overwhelmingly large majority Javascript is the most common programming language used to interact directly with the user/browser (the front end). Once you get to the"back end," the possibilities are limitless, but to name a few of the most popular ones: PHP, Java, ASP.NET, C/C++/C#, Python, Ruby....


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...