How are web sites such as amazon.com or ebay built?
By a huge team of programmers (usually offshore), dedicated
copy-righters, monkeys to manage page content, divisional infighting
and managerial self-interest!
I don't know what technology drives amazon but ebay looks like its
still written with isapi and I wouldn't go near it with a barge pole
if I were you.
That doesn't help you so come close young padawan and I will illuminate.
(Apologies for patronising but hopefully this will pick up a few
others and we can all run along.)
Back in the dawn of time web sites were simple pages (text files) with
certain codes to determine how to layout the information contained
within, this is HTML. (http://en.wikipedia.org/wiki/Html). Web sites
are just a load of pages all linked together, and the 'Web is just a
load of sites linked together. Now web sites containing just a load
of HTML files linked to each other are fine, but when they grow beyond
about 10 pages their a pain to keep updated and organised.
If you want to add another menu item for example then you have to go
through all 10 pages and update them all with the new page name. If
this site then grew to 100 pages you'd have to go through all 100
pages and change them. So what the brethren decided to do was keep
the common elements together in certain files and do a quick copy and
paste before showing them to the visitor to the site.
So you'd have 10 files and a separate file containing the links within
the menu. Every time a page would be called from a browser, the
Server would get the contents from the menu file and insert it into
the page and the visitor would be none the wiser. Add another page,
then simply add another entry in the Menu file and all would be fine.
When your site grew to 500 pages then changing this one file would be
all you need. This little trick is called the "Server-side include".
A Server is simply a program which takes your click and does something
with it. Now clicking on a link to "contactus.html" will just tell
the Server to give the visitor the contents of the file called
"contactus.html". Your web browser (and I hope your using Firefox -
www.mozilla.org) will read the file and show you the text, pictures et
al. When you see contactus.php or contactus.asp (or a host of other
file extensions) your actually telling the Server to process the file
and perform all manner of witchcraft upon it.
ASP (Active Server Pages), and PHP (Pretty Good Home-Page) are
examples of witchcraft, or as those in the know call them Server Side
Technologies. These are Scripting (or Programming if you will) that
perform a series of logical operations (Science/Magic) on the Server.
These happen between the point you click a link and the point that the
Server returns the Page to your Browser. What happens to the
information (passed over in the URL, or from a form) is determined by
the programming that happens in these files.
Consider Google for a minute. Its role is to take your search request
and find pages that match it. When you type your search in the little
box (eg sparrow) and press "Google Search" is that it will give you a
list of pages matching "Sparrow". You could also type the address
://www.google.com/search?q=sparrow this will also give the same
results. In both cases the Science/Magic takes your search term
(Sparrow) and has a look through its huge library and spits outs links
which it finds appropriate (see page rank
http://en.wikipedia.org/wiki/Page_rank for more Science). Its the job
of the Server to process the inputs (?q=sparrow) and return the
information.
All these search results are held within a Database, and the
Database's role is to hold a load of information so that it can be
referenced by a certain Key words. Think of a load of linked
SpreadSheets but much, much more powerful. The first column might
contain the word "Sparrow", and the second column would contain a site
to which it is appropriate eg. www.ihelpsparrows.com
You might also want a description of the web site, about how I have
helped sparrows. The trick with Database's is that you can have a
load of rows in the spreadsheet all associated with the word sparrow.
Also a database is not just limited to just a description I could have
more columns listing Colour, Age, Number of wings, African or
European.
The job of the server is not just limited to a search terms, this
depends on the programming contained within the code of each page. It
can be used to show details of different products or articles. A
database contains may spreadsheets and in a Database these
spreadsheets are called tables. So you could have one table called
'Products', another may be 'Customers' (which will hold your
login/delivery details), another may represent your shopping basket
Now since Amazon uses a more complex method I'll demonstrate with
OsCommerce. If you look at
http://www.oscommerce.com/osCommerce22ms2/product_info.php?products_id=5
you'll see a certain film, now change that 5 to a 9 and you'll get a
different film. Instead of listing the items in our spread sheet as
'sparrow' or 'robbins' this one uses numbers (most do). Running along
the columns we have items such as Regional Codes,Languages,Audio,
Picture etc. The programming takes the information from the Database
(Regional Codes,Languages,Audio, Picture), and pushes the information
into a standard layout (called a "Template" so that you see a
different film for sale in the same page. If I want to add a
different film to the web site, all I need to do is add another row to
the database/spreadsheet and advertise a link
...product_info.php?products_id=10. You could have hidden pages
(called back office) to allow the adding of these films by a
non-programmer.
This way of doing things is called a "Database-driven web site".
Amazon, Google, eBay, Hotmail, Forums, and virtually every other
-decent site uses it.
So where do you fit in to this?
At this moment in time it really doesn't matter what programming
language you choose to learn. If your staring college I would
concentrate on meeting people and getting laid. Their is far much
more you need to know as a programmer than will be taught in a CS
course. For instance about six months ago I had to process distance
accurately between two points on the Earths surface, and I remembered
a conversation with a Geographer about the Haverstein formula which
helped no end. As a programmer you have to hoover up all information
you can, and store it away for future use.
However here are a few tips.
You need to just pick up something and get started. I always think at
being able to program is like understanding Latin and moving to
another language as learning the syntax as nouns/verbs. The main goal
at your stage is just to get experience with programming. Maybe find
out what will happen with your course? I'll not give you any URLs as
learning the find information on the Internet is the most important
skill to learn as a programmer.
Don't bother learning PERL, its been superceded. Cold Fusion is just
too propriety, and nobody will respect you for knowing it.
Java: Applets (run in browser, or client side), JSP (Server side) are
a pain to just to install and understand how to start programming, try
a load of acronyms you don't understand and a development environment
that takes enough sweat to sink the ark.
PHP/ASP, its really just a toss of a coin between them. I started
with ASP (VBScript and JScript), but now prefer PHP. In fact I would
recommend PHP. Its FREE (as in Free Beer), and the help files are
full of helpful hints from fellow coders. Just download a copy of
Apache (its the premier Server), IIS (the Microsoft) which comes with
XP Pro and runs ASP without anything else. PHP can be found to run
with both.
I would say that PHP (since it has a C style syntax) teachers you to
be a bit more disciplined (I'm ducking) with your code. You can
switch to Java a bit more easily than with ASP (using VBScript). Even
if you move to ASP and ASP.NET (with C# - which pays the bucks) later
the skills can be used.
SQL is the language used to talk within databases. For PHP find MySQL
which is a free Database where you can cut your teeth learning the
basics. Make sure you download phpmyadmin to help you manage the
database.
For an introduction to database try MsAccess. Its not to be used for
web sites (concurrent user issues), but just getting to grips with it
and as a training tool its unsurpassed.
Once you get SQL down its a variation on a theme, and you can move to
SyBase, MS SQL Server, PostGreSQL. It doesn't matter as you will
usually get on the job/or pay for additional training.
Just chill out, pick something, party, get laid, and write code
instead of watching TV (in that order) and you'll be fine.
Oli |