Programming a website?

Started by
6 comments, last by ChaosEngine 9 years, 4 months ago

I want to create my own website but I have no clue how to do this or what language I need to know. I only code in c++ and a little HTLM. What would I need to know to give my website life with unique functionality I desire?

Advertisement

Hello,

If you're interested in doing this to learn creating websites I'd recommend reading up on HTML5, CSS and Javascript (in that order). There's lots of resources available online about these topics. After doing some google searching I found https://www.codeschool.com/courses/front-end-formations.

If you are more interesting in just getting results, making something serious like a company website or what ever I'd recommend using any already existing CMS (content management system), these are basically big frameworks which lets you modify the look and content of the website through a control panel. There's also plugins for some extra features like blogs, forums, calendars etc. Here's a list of some different systems for this: http://spyrestudios.com/free-content-management-systems/

I don't have much experience in making websites myself, so I wouldn't be able to provide good advice on creating the unique functionality you desire.

Good luck :)

The classical resource for learning web technologies is w3schools (http://www.w3schools.com/). Start with the html5 and css3 tracks, then do the javascript track, as advised by alexw.

Then, you will need to learn frameworks that will make your life *a lot* easier. A must-know is twitter bootstrap (http://getbootstrap.com/). It basically eliminates the need to write your own css (but you still have to know how it works in order to tweak small things).

For simple sites, that's all you are going to need. If you need a little bit more complicated stuff, get familiar with XMLHttpRequest (https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest - mozilla's site is another great resource for web-related technologies) - this is the backbone of the modern web (in tandem with responsive design, which bootstrap will mostly handle for you). Then you may want to get familiar with jQuery/jQueryUI - do not learn it, just browse the demoes to know what is possible. The popular kid on the block these days for javascript is called anglular js (https://angularjs.org/), so you might want to learn that if you need more complicated web site (99% of people don't, although they they it might be kewl to sprinkle some useless crap to slow down their web site on slower smartphones, which are still prevalent). Still, it doesn't hurt to know what is possible with Angular.

This, mind you, is all on the client - defines the look&feel of your web site. The backend, however, is a different beast. ASP.NET MVC is a good start, since Microsoft have a ton of tutorials and it is easy to get started. If you don't like it, there's Django (if you are familiar with Python), Rails (if you prefer Ruby), CakePHP (if you are familiar with PHP), and.. I'm not a Java person, but I've heard of Spring. Pick the one whose programming language you are most familiar with and you'll find a lot of tutorials online.

Remember, you don't need complicated and fancy stuff just because everybody else is doing it.

Firebug is your best buddy for client web development :)

Now, these are more more complicated advices, so you might want to ignore them at first. Make your site work fast, make it work beautifully on smartphones/tablets via responsive design and don't overuse javascript. Web sites are fast if you do stuff with CSS, not Javascript, and also if you don't use AJAX for everything (if at all). Learn about bundling and minifying javascript/css, learn to use spritesheets with CSS for your images (if you are curious, look at the images in facebook). The goal, just like game programming, is to reduce the number of requests the browser makes to the server for files. The less files the browser has to download, the better. If something is static, put it in CDN. If parts of your site are static, cache them (different serves use different technologies to achieve this).

A little coming from C++ to website development myself. Page loads from top to bottom. There is not event listener out of the box and the site doesn't run in a loop. Once the page loads that is it. You can create listeners using javascript or create event driven websites but that is a little more advanced for a beginner. Also don't worry about a MVC framework or any other framework right away worry about the basics of HTML, CSS, Javascript, Server side language such as PHP, Ruby, etc...

If you are a Windows guy start by getting XAMPP and setting up the webserver locally. If you are using Linux that look at setting up a lamp stack for which flavor of Linux you are running. For Macs I don't like MAMP so much so you can use brew for Mac or MAMP if you think that is better for you to follow.


little HTLM

Build on what you know. Some other languages like Javascript should be useful, as well.

What will you make?

There is a dirty little secret.

Creating a webpage is really just playing around with HTML (and CSS). No programming involved really.

You can make really really nice looking professional websites with just HTML and CSS and a few images.

HTML is just a markup language meaning its just a bunch of tags enclosing text (just like the bbcode tags we have on this forum).

CSS is used to manipulate the properties of every HTML tag to change how the browser renders it.

Now if you start creating websites with animations and drop down menus and stuff then you will need javascript.

I'll save you the shock. Javascript is nothing like Java. Its a scripting language where every variable is a var type (has hidden data types internally) and classes are really functions. It's totally weird.

If you want to have connectivity to a database and use forms and the like then you will probably want to learn PHP which is a scripting language that is ran by the webserver and stdout from your script is feed to the web browser (your script prints out the webpage).

Now you can have it where all of the logic happens on the server (in your php code) and HTML is printed out to the browser OR you can have javascript call your script and parse data printed out from your PHP script and it can repopulate fields on the screen (more advanced).

However, C++ won't be of any use to you unless you take a walk on the wild side.

There is this ancient concept called the CGI-Bin or CGI binary: basically your web server calls up an executable on the command line passing the get string in the command line and passing the post string as stdin. The CGI-Bin will print out the webpage as stdout. It will also have environmental variables set by the webserver (like what browser they used etc).

I used the CGI-Bin way to create an e-commerce site entirely in COBOL for a school project (showing off of course).

PERFORM VARYING INSANITY BY 1 FROM 0 UNTIL 9000 ... END PERFORM.

As someone noted:

http://www.w3schools.com

http://www.codecademy.com/learn

A basic website can be made with HTML alone, and styled with CSS. It can be made interactive with Javascript. To program on the server side, you could use PHP.

But many types of languages can be involved in making a website.

Terms I have come across in my learning have been:

XML

XHTML

JSON

You can use the new HTML5 Canvas tag to create more Flash-like graphics and animation.

They call me the Tutorial Doctor.

There is a dirty little secret.
Creating a webpage is really just playing around with HTML (and CSS). No programming involved really.
You can make really really nice looking professional websites with just HTML and CSS and a few images.
HTML is just a markup language meaning its just a bunch of tags enclosing text (just like the bbcode tags we have on this forum).
CSS is used to manipulate the properties of every HTML tag to change how the browser renders it.

Now if you start creating websites with animations and drop down menus and stuff then you will need javascript.
I'll save you the shock. Javascript is nothing like Java. Its a scripting language where every variable is a var type (has hidden data types internally) and classes are really functions. It's totally weird.

If you want to have connectivity to a database and use forms and the like then you will probably want to learn PHP which is a scripting language that is ran by the webserver and stdout from your script is feed to the web browser (your script prints out the webpage).
Now you can have it where all of the logic happens on the server (in your php code) and HTML is printed out to the browser OR you can have javascript call your script and parse data printed out from your PHP script and it can repopulate fields on the screen (more advanced).

However, C++ won't be of any use to you unless you take a walk on the wild side.
There is this ancient concept called the CGI-Bin or CGI binary: basically your web server calls up an executable on the command line passing the get string in the command line and passing the post string as stdin. The CGI-Bin will print out the webpage as stdout. It will also have environmental variables set by the webserver (like what browser they used etc).
I used the CGI-Bin way to create an e-commerce site entirely in COBOL for a school project (showing off of course).
PERFORM VARYING INSANITY BY 1 FROM 0 UNTIL 9000 ... END PERFORM.

Or you could use a web development methodology from this century :)

Things have long since moved past PHP and cgi. There's no reason to use either of them unless you're maintaining a legacy project. PHP in particular is an unholy abortion of a language.

On the client side, you need to know HTML, some CSS and JavaScript. But really most development uses various js libraries, so you'll want to learn jquery, node.js, etc. if you want a framework to tie it all together angular.js is pretty cool.

On the server side, REST is the way to go. You can use pretty much any language you want, as long as you provide a RESTful web api. You Can even use C++ is you want
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

This topic is closed to new replies.

Advertisement