Monday, August 15, 2005

Intro to Web Scripting

General programming principles

  • Webpages can sometimes require server-side scripting for example a shopping-cart or for a webpage to dynamicy create webpages. Client-side scripting can also be needed to provide people with a "web application" to do simple operations.
  • A "variable" is a reference to a space in memory, which holds the data that you can use in your program. Or you could say its a label to the data.
  • Programming languages have control structions so you are able to make choices, and to take different paths for differnet types of data, answers and situations.

Object-Oriented Programming principles

  • Object Oriented Programming (OOP) is a way of sperating the code in to "Object's" these objects can be seen as real-world objects. A bike has wheels and gears. Instead of writting a program to have gears and wheels, you will end up with dupilcated code. So you create a Wheel Object which you can create and place in to the required positions on the bike.
  • A Property is like weather an Object likea pencil in red or blue. And a method is a set of movements, so the pencil can be used to draw.
  • The "dot" is used to reference a call to, example: The object frame.setVisible(); will get the "varible" frame and call the method setVisible. Basiclly the "." allows you to look in to the object that the varible frame is. Also a "->" can be used in C++ instead of the "." when using Pointers (call by reference"->" and call by value".").
For the following I used this website:
Javascript Objects
Also this is recommened:
Core JavaScript Reference
  • Object: Window
Properties:
defaultStatus
frames
opener
parent
scroll
self
status
top
window
  • Object: History
Properties:
length
forward
go
  • Object: Navigator
Properties:
appCodeName
appName
appVersion
mimeTypes
plugins
userAgent

Web Programming(Scripting) languages

Investigate 3 of the following languages, identifying features, pro's and con's etc.

  • php(PHP: Hypertext Preprocessor) Pros: C style syntax, free Cons: No software certification
  • ruby on rails Pros: Changable at Runtime, free Cons: syntax is a mix of C++/Pascal/Smalltalk, Class name is just a label pasted on an object
  • jsp(Java Server Pages) Pros: Java/C style syntax, Class name directly identifies the class, free Cons: Unchangable at Runtime, software certification

0 Comments:

Post a Comment

<< Home