Question:
Best programming language to write a website in?
Stuart
2012-08-30 13:50:17 UTC
I have had a recent notion to experiment with HTML, and I decided I would like to write a sort of social network, obviously not to the extent of Facebook or Myspace etc.

I have basic understanding of C and HTML and was wondering if they are any good at writing code for a website or if another language is better?

ps. preferrably a method which does not cost anything, however i am aware that i may have to pay for server space?

any hints/tips and general advice would be much appreciated, thank you
Nine answers:
husoski
2012-08-30 16:01:17 UTC
Short answer: HTML, CSS, JavaScript, SQL, plus a server-side language to be named later. All of them are needed.



The first three handle presentation of pages on the client side. That's necessary, of course, but not enough. To have saved user data on the server, you're going to need server-side code. That's usually done in PHP or one of the .NET languages (VB or C#, usually), depending on the web server you're using. PHP is by far the most commonly used language for small websites. Large sites will often use a framework to manage pages and applications, and that might use another language, like Ruby or Java. Save that until you get to FaceBook size. :)



You're also going to need a database (or databases) to store that information in. That's where the SQL comes in. Presuming you're going to do this on the least expensive hosting, at least at first, get a book on "LAMP programming". That's short for Linux+Apache+MySQL+PHP. You can save money by getting an older and/or used book. The tools haven't changed that much in the past several years.



There's also a large pile of free, open-source applications that you can use directly as part of your site (photo album, blog, bbs, etc.) or hack on when you feel your PHP chops are up to it.
FaZe Destroyy
2012-08-30 21:15:46 UTC
The languages you'll use depend mainly on the type of content you wish to present to your audience. Here are the different languages you will need to learn. There is no better language to write website coding in, however there are different languages to present different content.



HTML - The hypertext markup language is the standard way of presenting data in a web browser. All website use HTML



CSS - Cascading Style-Sheets, isn't much of a language, but more as a subset of HTML that can be used to style your websites.



Javascript - simple client-side scripting language. It's used to add effects to your page, but it has some limitations



PHP - a server-side programming language, it is can be used to work with databases, and work with files on the server (things Javascript can't do). PHP is very similar to the C programming language.



Hope this Helps!!
amania_r
2012-09-03 14:06:08 UTC
For server side code, PHP is popular. Also Tomcat with JSP or ASP.NET with C# or VB.NET



All of this is free.



Note there are social network packages developed already and free to use. Have a look at elgg (uses PHP and mySQL)
TnT
2012-08-30 21:02:37 UTC
Required for a 'social network'.

(X)HTML - Content

CSS - Style

PHP & (My)SQL - Server Side



Optional

Javascript / jQuery / Ajax



For a basic website (static), (X)HTML and CSS are fine.
Wade Sumpter
2012-08-30 21:01:16 UTC
HTML would be the best, and well... easiest. HTML 5 would be the best, really if you can help it stay away from adobe flash. It's dead. HTML 5 is what most of the new websites are made with, that and some java script.
-DC-
2012-08-31 00:17:35 UTC
Lots of bad answers here (and a few decent ones). One free option: Download NetBeans, learn Java, and start programming in JSP. Or you can go the Microsoft route and use ASP.Net, but it's not (entirely) free.
Neeraj Kumar Singh
2012-08-31 04:35:21 UTC
You can learn Javascript and build your website completely in Javascript using Node.js.
Anas Imtiaz
2012-08-30 21:02:34 UTC
You cannot use C/C++ or any such language that requires compilation on your website.



HTML is just a markup language that displays the contents of your page on the browser. You set the styles of your page with the help of CSS. The page is made dynamic with the help of scripts i.e. JavaScript and jQuery (this means the page contents can be changed on run-time). You can connect your webpage to the server on run-time with the help of a server side language such as PHP or Ajax etc. You can store contents into databases using SQL. Learning these languages does NOT cost anything. You can learn them from the internet for free.

One of the best websites to learn all these languages is:

http://www.w3schools.com

To learn HTML: http://www.w3schools.com/html

To learn HTML5: http://www.w3schools.com/html5

To learn CSS: http://www.w3schools.com/css

To learn CSS3: http://www.w3schools.com/css3

To learn JavaScript: http://www.w3schools.com/js

To learn jQuery: http://www.w3schools.com/jquery

To learn PHP: http://www.w3schools.com/php

To learn SQL: http://www.w3schools.com/sql

To learn Ajax: http://www.w3schools.com/ajax



There are loads of examples with each tutorial to illustrate everything. Hope you enjoy learning from these sites.
Jim
2012-08-30 21:01:05 UTC
I'm sure HTML will do just fine. It may also be good to learn javascript though.


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