The menu selections on this page are as follows, Web Scripting
is specifically Internet programming, by this I mean JavaScript,
CSS and using Dynamic HTML against the document object model.
There is also an extra section relating to Visual Basic, after
all I did spend many years writing two and three tier applications
in VB incorporating SQL.
The Graphic Workshop is related to the pictorial side of page
presentation, basic image presentation, creation of animations
and using interesting third party software programs.
Favorite links will basically concern sites that offer in my
opinion, exceptional examples of web presentation.
Pastimes/Interests will be for any flotsam or jetsam that grabs
my attention.
Section 1 - JavaScript
JavaScript is an object-based scripting language for developing
Internet applications. JavaScript is meant to tell an application
what to do. Unlike languages used to create applications,
it cannot do anything without the application. JavaScript
is an extension to HTML that allows you to create more sophisticated
Web pages than you could with HTML alone.
For example, my last project (an
Internet booking screen) I needed to program events against
user actions. For instance page navigation, the highlighting
of input boxes when focused, detecting key press or key values,
server-side report generation, search routines accessing dynamic
arrays etc.
Cross Browsers
Years gone by Netscape was always my preferred choice of browser,
if you asked me why I might have replied because Microsoft
appeared overbearing and almost forced you to use their product.
I seem to recall Netscape did the same thing with Mosaic but
you didn't hear too much about it.
How times have changed, I now write commercial web applications
which require interactive responses from user actions and
predefined page layout. Using MSIE this is easily accomplished,
however try it with Netscape and retain sanity. Just to make
it more annoying, try creating identical pages for Win32 Netscape
(4) and Linux Netscape (4). The Linux version doesn't support
half the functionality of the Win32 version. I spent so much
time just making the Netscape pages look and behave the in
the same manner, something which was so easy with Microsoft's
Internet Explorer.
If I were asked to write another application for Netscape
I would have to think twice about it !!
Section 2 - CSS - Cascading Style Sheets
CSS is a new standard for making web pages. The main difference
with HTML is that in CSS you don't have to describe each of
the same elements over and over, no matter how many pages
you access they all reference the same CSS script thus reducing
the overall size of each page and making them load faster.
For instance most of the colour and text properties of these
pages are controlled by CSS.
There is however a drawback, because CSS is still very new,
it's not supported by old browsers and to make matters worse
Netscape Navigator and Microsoft Internet Explorer support
different tags. So it's not advisable to use only CSS in your
documents, you can however program using JavaScript to write
the Style parameters dependent on browser platform and restrict
old browsers trying to read your CSS Style tags by enclosing
them within comments tags.
Section 3 - ASP & PHP
Active Server Pages. ASP enables server-side scripting for
IIS with native support for both VBScript, Jscript or Javascript.
PHP (Hypertext Preprocessor) also allows you create dynamic
web pages that can display a variety of data, both ASP or
PHP web pages often work in conjunction with a database of
information they draw from.
I originally used ASP as the primary means to retrieve data
from the SQL server (reports or general information), I then
discovered that PHP does it just that little bit better and
is less platform dependent.
Currently I have IIS installed on my home computer and run
both ASP and PHP pages in a local intranet environment to
test various database and graphics routines.
Section 4 - Visual Basic & SQL
Before I started writing commercial web pages, I was employed
as a System Analyst interpreting other programmers code and
converting it into Visual Basic applications. It's funny to
think that some of the database scripts I wrote then are now
being used in web pages. Visual Basic is a high level programming
language it is a visual and events driven Programming Language.
By this I mean VB is programming in a graphical environment.
Because users may click on a certain object randomly, so each
object has to be programmed independently to be able to response
to those actions(events). Therefore, a VB Program is made
up of many subprograms, each has its own program codes, and
each can be executed independently and at the same time each
can be linked together in one way or another.
Structured Query Language (SQL) allows users to access data
in relational database management systems, such as Oracle,
Sybase, Informix, Microsoft SQL Server, Access, and others.
What do we use SQL for? Well, for example we can use it to
select data from the tables located in a database.
The most basic SQL structure is:
SELECT "column_name" FROM "table_name"
To illustrate the above example, assume
that we have the following table:
Table Employees
| employee |
section |
joined |
| Bill |
Sales |
15-05-1999 |
| Fred |
Sales |
01-07-1999 |
| John |
Admin |
10-08-2000 |
| Ray |
Store |
23-09-2000 |
To select all the employees in this table, we key in,
SELECT employee FROM employees
Result:
employee
Bill
Fred
John
Ray
We could now try to put a condition on our query, like
only return the employees from the sales section.
SELECT employee FROM employees where section = 'sales'
Result:
employee
Bill
Fred
As you can see this is just a very simple
example of what is possible, I haven't mentioned combining different
tables using the join commands or table editing. There are many good publications on
SQL and database connectivity, such as Sams Publishing
'SQL Unleashed' which is a reasonable book with good practice
examples.
SQL strings can become quite large, the example below is from one of my web report programs.
In this program I set up a parameters page where clients can modify the way a report is presented
by selecting or not selecting nominated fields for the final display.
When scripts get this large and complicated using a query analyser to test the string
makes life a lot easier especially when your statement is not quite right
and needs modification.
SELECT Top 50 Jobs.AuditID, Jobs.Status, Jobs.ClientID,
Jobs.Cancelled, Jobs.CompanyID_book, Jobs.CustomerID , CONVERT(varchar,
Jobs.Booking_date, 106) AS [Date] , Jobs.Booking_number , OrigAddress
= (select details from jobaddressinfo where jobaddressinfo.auditid
= jobs.auditid and jobaddressinfo.legnum = 0) , Origsuburb =
(select [name] from suburb where suburb.suburbid = (select suburbid
from jobaddressinfo where jobaddressinfo.auditid = jobs.auditid
and jobaddressinfo.legnum = 0)), DestAddress = (select details
from jobaddressinfo where jobaddressinfo.auditid = jobs.auditid
and jobaddressinfo.legnum = (jobs.legs)) , Destsub = (select
[name] from suburb where suburb.suburbid = (select suburbid
from jobaddressinfo where jobaddressinfo.auditid = jobs.auditid
and jobaddressinfo.legnum = (jobs.legs))), CONVERT(varchar,
Jobs.Time_booked, 102) AS Booked, Completed = CASE WHEN Jobs.Time_completed
> CONVERT(datetime, '1970-01-02', 102) AND Jobs.tandc = 0
THEN CONVERT(varchar, Jobs.Time_completed, 100) WHEN Jobs.Time_completed
> CONVERT(datetime, '1970-01-02', 102) AND Jobs.tandc !=
0 THEN 'Delivered' WHEN (SELECT TimeReported FROM JobaddressInfo
WHERE JobAddressInfo.AuditID = jOBS.AuditID AND JobAddressInfo.LegNum
= 0) > CONVERT(datetime, '1970-01-02', 102) THEN 'Picked
up' ELSE 'Booked' END, convert(varchar, Jobs.TotalFee, 1) as
TotalFee, convert(varchar, Jobs.TotalFee + Jobs.GST_fee, 1)
as TotalFeeinc, Jobs.Goods, Jobs.Reference, Jobs.Reference2,
Jobs.Caller, jobs.legs, POD = (select authorisation from jobaddressinfo
where jobaddressinfo.auditid = jobs.auditid and jobaddressinfo.legnum
= (jobs.legs)) FROM Jobs WHERE ((Jobs.CustomerID = 83913188)
and (Jobs.CompanyID_Book = 1)) and (jobs.Dont_invoice = 0 or
jobs.test_account <> 0) and jobs.time_booked <= '2001-08-15
23:59:59' and jobs.time_booked > '2001-07-16 23:59:59' order
by jobs.Time_booked desc