finishing up js
Discuss homework; see where people are. Go over what didn't work last time : javascript animation.
News: pirate bay, posterous etc
jquery, and jsprototype examples.
- We looked at a jquery example; see the attachment.
- scriptaculous (built on top of prototype) does more of the "visual effects" stuff, and their examples seem easier to follow.
What we've done:
- http : web page protocol
- xhtml : page structure; browser client-side
- css : page style format; browser client-side
- js : programming; browser
This is enough to do quite a lot, actually, and
many developers are moving towards "tiny applications"
that use just those technologies.
Where we're going :
- a bit server side tech :
- PHP
- databases
- content management systems (i.e. wordpress, joomla, drupal)
- some security / crypto
PHP
Show how to run PHP on emptywidgets.com : just upload files with .php extension.
Particularly useful example : the include statement, which can help you avoid duplicating the same framework for many pages.
---- header.php -----
<html>
<head>
<title>...</title>
<!-- ... include css -->
</head>
<body>
--- footer.php -----
<div>
<!-- ... date, author, license -->
</div>
</body>
</html>
--- page1.php ------
<? include("header.php") ?>
<h1>page 1</h1>
<div>any other page 1 specific content...</div>
<? include("footer.php") ?>
An example :
Working at emptywidgets from the command line :
$ ssh emptywid@emptywidgets.com
emptywid@emptywidgets.com's password: ****
[~]# ls # list directory
[~]# cd public_html # change to directory
[~/public_html]# ls
[~/public_html]# cd jimtest
[~/public_html/jimtest]# ls
[~/public_html/jimtest]# nano test.php # edit a file
Moving files from the command line :
laptop$ sftp new_file.php emptywid@emptywidgets.com:public_html/jimtest/
password: ***
... or use the web interface ...
Readings to explore for this week
PHP :
Security and crypt :