Section 01: MWF 11:30am-12:20pm VH 1236
- Office: Violette 2166
- Phone: x7600
- Email: email@example.com
- Webpage: http://vh216602.truman.edu/agarvey/
- See my schedule.
Syllabus for this class
Safari online books relevant for this class.
- There will be two in class exams and a comprehensive final.
Using the ice Web Server
This class is going to use ice.truman.edu, a Math/CS department Linux machine, as our web server. A quick lab to get you started building a web page on ice is available at web.html. You do not need to turn in this lab. Just do it for your own knowledge. Please let me know if you have any trouble connecting to ice. Wherever the lab says "sand" you can replace it with the word "ice".
Ice is configured to only allow web access from Truman IP addresses. Thus, by default, people from outside Truman won't be able to see your web site. For most purposes that is probably fine. If you would like your website to be visible outside of the Truman IP space, then look at how to allow access.
All of the w3.org validator sites are allowed to access ice web pages, so all of the validation methods I will show you should work.
- Image presentation advice
- Information Architecture, Fourth Edition by Arango, Morville and Rosenfield, 2015 is a detailed look at important ideas about how to organize and design web sites.
- Information Architecture thoughts that are totally irrelevant to Truman.
- Inline style example
- Document style example
- External style example
- CSS Zen Garden look here for lots of examples
- A longer discussion of the box model
- boxout.html from Essential Guide showing a way to create a boxout, with related file boxout.css.
- two-divs.html with related CSS two-divs.css shows how to create a sidebar with faux-column backgrounds. pinkflag.com/colin-newman.php shows a real website that uses this idea.
- multiple-boxouts.html and related file multiple-boxouts.css show how to extend the boxouts idea easily to multiple boxouts.
- ACM Queue Magazine article about Mobile Web Development
- A simple AJAX example
- Another AJAX example with hack2.js and hack2.phps on the backend.
Non-PHP CGI Examples
- Really old Java Applet and Servlet files
- Other Really old CGI examples
- phpinfo.php just calls the phpinfo() function to return information about the PHP environment on sand.
- Programming PHP is a pretty good reference with lots of PHP examples.
- How to create a PHPS file
- How to limit access to a directory, which is especially useful for PHP files.
- powers.php is a simple script. The source is here.
- sorting.php shows various sorting functions. The source is here.
- popcorn3.html is yet another version of the popcorn form. popcorn3.phps is the source for the code that processes it.
- date.phps shows preg_match and preg_split. Try it using date.php.
- uploadf12.phps is a simple example of using PHP for file uploads that I use for CS 180. This is disabled.
- prefs.html is a form that lets you set preferences using cookies. prefs.php (with source in prefs.phps) is the PHP that processes the form and sets a cookie. prefs-demo.php is code that demonstrates the use of the preferences (with source prefs-demo.phps)
- prefs-session.html is a form that lets you set preferences using a session. prefs-session.php (with source in prefs-session.phps) is the PHP that processes the form and starts the session. prefs-session-demo.php is code that demonstrates the use of the preferences (with source prefs-session-demo.phps). See endsession.phps to see how to end a session.
- hello.php with hello.phps source from the Ajax with PHP 5 book.
- phpMyAdmin is a nice tool to give you access to your mysql database over the web.
- W3Schools Prepared Statements example document. Scroll down to find the PDO version of the example.
- An (updated) step-by-step guide to setting up your tables in a Mysql database should help you get started. The online Mysql manual is especially helpful.
- An example of pages that allow you to insert and select elements from a simple database table using the PDO commands in a correct way. bookInsert.phps and bookTable.phps are links to the source files.
- An older example of something similar to the above that uses older technology is also still available. booklistpub.php is a site that uses forms and a database to keep information about books. bookreportpub.php shows the manipulatable stored data. Sources are in booklistpub.phps and bookreportpub.phps and bookstuff.txt (which has the SQL table information).
- An online tutorial takes you through the process of using PHP and MySQL with PDO to let users set up username/passwords, then authenticates them against these passwords and remembers this using sessions. Not all of this is totally up-to-date, but I don't think sand/ice support the absolute most up-to-date way to do this. A local version of this that works uses files index.phps, home.phps, config.phps, logout.phps, session.phps, and class/userClass.phps. Go to index.php to try it all out. The database definition is available at users.sql.txt.
- Useful code sniplets for Perl and PHP.
- Perils of SQL injection
- a directory full of authentication example files.
- A more recent example of how to use PDO to do authentication in PHP with a database backend.
- A good tutorial that describes the components of Rails.
- A quick look at Ruby on Rails in action.
- Ruby on Rails demo on YouTube.
- Node JS vs Ruby on Rails video on YouTube.
- example1.xml is a simple well-formed XML file. Browsers recognize this as XML and have a special way of presenting it. The exact contents of the XML can be seen when you View Source.
- example2.xml shows a valid XML document. It is valid because it conforms to the DTD included at the top of the file.
- bookexample.xml is another example of a more complex DTD.
- ex2extdtd.xml shows example2 with an external DTD file. ex2.dtd is the external DTD file.
- attexample.xml shows an example of a DTD that declares attributes.
- schema-example.xml is an XML file that can be validated using the schema schema-example.xsd.
- A W3C Website that has both a DTD and an XML Schema definition for the XML Schema language.
- meditate.xml is an XML file that has its display formatted using meditate.css.
- meditate2.xml is an XML file that has its display formatted using meditate2.css. This shows how to use :before and :after pseudo-elements with the content CSS attribute to add text to the displayed file.
- planets.xml is an XML file that is transformed using a really simple XSLT style sheet planets.xsl. (You need to use View Source to see the xsl file.)
- planets2.xml is the same XML file with a more interestingly complex XSLT style sheet planets2.xsl.
- xhtml1-strict.dtd is a local copy of the XHTML 1.0 Strict DTD
- In theory, you can extend XHTML by adding new tags. You define the tags in a DTD that includes the XHTML DTD, such as extend.dtd. You say how to present the new tags using CSS, such as extend.css. In theory you could use the tags in XHTML, such as extend.html, but browsers don't notice, because they don't look at DTDs. But you can make this work as XML, such as extend.xml.