▼  Site Navigation Main Articles News Search  ▼  Anime + Manga Anime Reviews Anime Characters Gallery Screenshots Manga Reviews  ▼  Misc Links to Webcomics Bible Quotes About Older Musings
site version 7.3
An introduction to web based languages
written by: admin


Date Written: 8/19/06 Last Updated: 6/20/13

I hope to refine an add to this article many times as my understanding of web based programming grows.

During my time as a free lance programmer I have discovered that there are several programming languages out there.  I don't know how many there are, but I will try to name the most popular, widely recognized, and widely supported languages out there.  I have a hard time seeing one language as being better than another.  They each seem to be able to do different things and so far as I can tell no single language does it all.  Nor should they.  From what I have seen these languages often work together rather well like building blocks to form some very creative programs.  I will now try to give a brief description of each language and how they operate.


HTML

This is the first language anyone should learn as it is often used by other languages and is mostly what you see when viewing the source code of a web page.  It is also the easiest to learn and looks the most like plain English.

HTML stands for Hyper Text Markup Language or HTML for short.  It is a client based language meaning the script is interpreted by the user and not the host server where the internet file is located.  PHP is an example of a language that is interpreted by the host server and then the processed information is sent to the client (personal computer) to be displayed on the screen.  

HTML is designed to take a text document and determine how that information will be presented to the user.  It will determine such things as the color of the text, placement on the screen, font size and style, and other properties of the text such as whether it will act as a link to another page or site when the mouse clicks on it.  HTML can also create frames so that you can have scrolling within a page or have a portion of the page act as a window to another page.  See older blogs for an example of an iframe.

HTML can also determine whether what images will surround the text or act as the background to the text.  Images themselves can be presented in various sizes and dimensions and interact with the mouse in various ways.  HTML can also be used to create forms to process information when used in conjunction with other languages.

HTML can do some mouse over tricks and is used to format the webpage often like a spreadsheet with cells and tables so that you can have a place to put your banner image and sidebars for links etc.  You can determine such things as borders between cells and columns so that the text does not run all the way to the edge of the screen and paragraphs have some space between them.

Some of the limits that I have seen with HTML is that it can not be used to store information in databases or process information very well.  HTML code is also very viewable to the client by viewing the source code of a document and there it is as plain as can be for all to view and copy.  HTML can't pull information from other web pages to be multi–layered.  HTML is also static and can't rewrite itself depending on what the client or customer wants.  HTML is like reading words on a page as opposed to writing or editing a document.  It is like the difference between reading a post as a visitor and being able to post on a forum as a registered user.  It does not do calculations.

Alone HTML is not dynamic and must have all of the information to view it in one document.  This leads to large documents and lots of code to write especially when you consider the prospect of writing more than one page let alone thousands.  In programming several pages finding shortcuts that will do exactly what you want repeatedly becomes increasingly important very quickly.  Often times the way to do this is to write a script that does what you want and assign it a value usually in the form of a a single word or a very short line of script as opposed to the hundreds or thousands that it actually is and then inserting it into other programs where ever it might be needed.  The way to do this is usually done with another language called PHP.

links:


PHP

PHP stands for hypertext preprocessor and is a very appropriate name for it in that it is used to process information before you receive the code on your computer.  It is often used in conjunction with MySQL to store information in a database where it is sorted and various descriptors are added to it.  These descriptors are determined by the individual programmer.

PHP is useful for doing mathematical processes and can use variables (think algebra) also known as strings.  These strings like $pops or $table2 can have values attributed to them that are in the form of numbers or words or even a whole bunch of code.  Strings can be multiplied or divided or sorted alphabetically or numerically.

PHP can calculate the time or act as a counter.  See my time page for more examples.  It can calculate the number of visitors to a site and see what pages they visit and for how long.  One of the more useful aspects of PHP is the security.  The PHP code is not visible to visitors to your website since the code is processed by the server and the results are sent to the visitor, often times in the form of HTML if at all.  PHP can be used to create cookies that are stored on visitors pages or to password protect certain information or pages on your website so that only those users that have the code or cookie can view that special information.

The forum is a great example of what PHP can do and also how it works with MySQL to store information, but it is the PHP that processes it to store it in the database and to retrieve it in a special order.  The PHP also can determine who can post and who can not as well as who can view which posts.


CSS

It stands for Cascading Style Sheets.  It is actually pretty simple to learn, probably more so than HTML.  HTML has a lot of default values that are hard to get around.  For example when designing a web page and placing the body of your page content here or there you will notice that your content does not go all the way to the edge of the screen and a lot of your text has a lot of default spacers around it.  CSS allows you to be a great deal more precise in your programming and also allows you to conserve code.

CSS can do things like change the background color of an individual word or determine how many pixels high a word can be as opposed to the 7 preset font sizes in HTML that are available.  You can make your words as tall or short or wide as you want.  You can determine line height or align some text to the bottom of a cell and align other text to the top of another cell.  Text can be indented and moved around and be as precise as pixels.  Pixels are the individual points of light on your monitor.  You can write text on top of other text or pictures as well.  In short it helps HTML to be more precise.  You can write a page using just CSS, but that seems a bit too complicated to me, but can be useful when you need to have your site looking exactly right.

You can attribute certain CSS to certain areas of text using "div id=XXX" where xxx can say that this text will be aligned to the top of a column and yet be 10 px from the top.  Each line will be indented and the text will be aligned to the left yet have a border of 15px.  It will also wrap when the text goes 300 px or 5em from the left of the page or cell.  The text will be in cursive and will have a background color of red, but only for the text.  I could go on and on really.  I use CSS a lot on my main page.  CSS adds style to a web page and can position content anywhere on a page.

As more advanced as this sounds CSS can actually be used to allow the web designer to be more conservative in writing code as opposed to making the code for each page longer.  I find that I can design a style for a section of text and then assign the style to any section of the page, or any other page for that matter, instead of writing it out for where ever I want to use that particular style.


MySQL

MySQL is not so much a programming language as a place to store information and variables for sorting and storage.  MySQL works together with PHP so well that they are like brothers to each other and are invaluable together.  The forum on this site is one of the best examples of what they can do together.  With MySQL you can store a word or a book in a row and add many other columns to the table to add attributes to each bit of content of a bit of content.  

Having a warehouse for your information can greatly shrink your website from thousands of pages to just two or three or even one.  I still use maybe a hundred pages for my site, but the anime pages including the writing of each review consists of about 5 pages and probably won't change much.  I have one page to write the information in and the next to send it to the database.  There is another to gather the titles of each row from the database table names anime and then list the titles of each anime file with a link to each review.  The last page gathers the selected info from the database and displays it in a certain format so that you have your review.  So I guess that is only four pages for all of the anime files and the code really is small for each of those pages as well.  Since I don't have to place the content within each page.

These languages are all free, but not all web hosting services offer each language.  I use GoDaddy, because it is cheaper than the rest and offers all of them for free as well as a horde of bandwidth and storage space.  These are the languages that I use and I learn more as I see the need, but I have a lot to learn yet on how to use these languages and what they can do.  



Note: It should be noted that my knowledge of Java and javascript is rather limited as is my experience using each.  The following is my understanding of it thus far.

Javascript

Javascript is a client based language that runs programs on the users computer.  It allows for applications such as dropdown menus and other 'special effects' on a web page like images that float around the screen or fireworks or the ability to sort a list of links on a web page based on different parameters without loading a new webpage.

Links:

http://www.comptechdoc.org/independent/web/cgi/javamanual/


Java

Java is very different.  It is not really a web based language like the above.  It is a compiled language like the object oriented C++.  It can be used by web pages to run server based programs and applets.

There are compiled programs stored on a server that can be accessed by the user to run video games.  These programs also require a Java platform that is stored on the user's computer in order to execute the program (as opposed to a script that is interpreted by the browser).  You could run tetris or super mario brothers on a website using Java.  Web languages just manipulate data as opposed to running compiled programs like java.  

Java programs can also be run independent of web browsers or internet access because it is a compiled language.


Perl

Perl stands for Practical Extraction and Report Language.  It is a scripting language with a very powerful regular expression syntax.



Later I will try to add some more links and expand this section more.  For now you should have some idea of what these languages can do and what they are used for.


Links
http://msdn.microsoft.com/en–us/beginner/default.aspx

TAGS: html, perl, php, java, mysql, css, javascript
copyright 2005–2024