|
Web Development |
#EW7 Grading Criteria for: Extra Credit: ASP and PHP Server-Side scripting languages for Dynamically created Web pages. Include files. |
|
| Description: JavaScript and Behaviors
(such as Pop-up messages and Swap images) use Client
Side scripts to
allow dynamic interaction or DHTML on the
local client computer. PHP (.php), CGI, ASP (.asp or .aspx), and Cold Fusion (.cfm) are Server-Side scripting languages for Dynamically created Web pages. This Grading Criteria Web page was saved as a PHP file so that a small PHP demo could work (notice the .php extension in the URL/Address bar). Note1: You can view .htm files locally. However, you cannot view .php, .cfm, or .aspx files locally without special software installed on your computer. Note2: You will need a separate Web page for each Server Side scripting language. So perhaps the best and easiest way to do this assignment is do an ASP script, an ASP script calculation, access a database through ASP, and add an Include file to your Web page. That is the order of the first four 25 point items shown below, for a total of 100 points maximum. Note3: This assignment will probably be graded live in class as you take your practice final on the last day of class. Include file: A server-side file that can be "included" in multiple Web pages, so that if the external include file is modified, all of the Web pages that contain the include link are also immediately modified. An example might be an include Footer with your contact email and a Last Modified Date script. Another example may be an include NavBar so that if you add a Web page, all the other pages will immediately have access to it through their menu navigation. Sample code added to the <body> tab for the Include NavBar: <?php include ("navBar.htm"); ?> |
||
| Topic | Directions | Points |
| Add an Include File that works with multiple pages. Note: you can view .htm files locally. However, you cannot view .php, .cfm, or .asp, locally without special software installed on your computer. If you open a Web page with Include files in your browser and click View Source, the Web Server will convert all the include lines into pure HTML, so you will not see the true local source code. Suggestion/Directions: 1. Copy index.htm to index.php or index.shtml 2. Copy your navigation code in index.php to a new page and save it as navBar.htm 3. Replace your navigation code in index.php with <?php include ("navBar.htm"); ?> All the code in navBar.htm : <a href="index.htm">Home</a> <a href="Resume.htm">Resume</a> <a href="PFolio.htm">Portfolio</a> <a href="Contact.htm">Contact</a> |
To see how to add an ASP Include file: http://www.w3schools.com/asp/asp_incfiles.asp <!--#include file ="somefilename"--> See SamplesHTMLcode/IncludeFiles/ In Dreamweaver click Insert | Server-Side Include Basic Include File Directions: 1. Create your Include File - for instance, build a navBar.htm (I suggest you simply copy your Navigation code from your index.htm file and save those few lines in a separate file named navBar.htm) 2. Replace your navigation code in index.htm with one of the include calls below: <?php include ("navBar.htm"); ?> : PHP <!--#include file="navNar.htm"--> : SHTML <!--#include file ="navBar.aspx"--> : ASP <cfinclude template = "navBar.htm"> : Cold Fusion 3. Appropriately rename index.htm as index.php or index.shtml or index.cfm (in the end you will rename Contact.htm to Contact.php and replace your nav code with <?php include ("navBar.htm"); ?> and then do the same for Portfolio.htm... (If you use any php code on a Web page, you need a .php extension, and the same for .asp, .cfm...) 4. Typically you cannot view server-side script files on the client (local machine) so you will probably have to upload both to test it. |
Up to 25 points Criteria: Relevant Functional Well laid out |
| P269 Create or download a relevant ASP script,
upload it to your Web server, and confirm that it runs live on your Web
site. Modify and customize any downloaded scripts. Also be sure to give credit through comments when required. |
File | New | ASPX The language directive line is placed immediately above the <html> tag. By default it is C# but can easily be changed to VB: <%@ Page Language="C#" %> Expression Web has a built-in server to manage ASP.net pages. |
Up to 25 points Criteria: Relevant Functional Well laid out |
| P275 Create or download an ASP script to calculate
something relevant to your Web site. Upload it to your Web server, and
confirm that it runs live on your Web site. Modify and customize any downloaded scripts. Also be sure to give credit through comments when required. |
ASP code begins with <% and end with
%> Reminder: .style1 is not a meaningful name: -5 Reminder: Every page needs a Title: -5 |
Up to 25 points Criteria: Relevant Functional Well laid out |
| P275 Create or download an ASP script to access
and update an online database with
something relevant to your Web site. Upload both the database and the
ASP page to your Web server, and
confirm that it runs live on your Web site. Modify and customize any downloaded scripts. Also be sure to give credit through comments when required. |
With ASP.Net you can access either a Microsoft Office Access
database or a SQL database. Snippets of gdform.asp script: <% Dim landing_page, host_url Dim fso, outfile, filename, dirname, myFolder Dim bErr, errStr, bEmpty Function FormatVariableLine(byval var_name...) Dim tmpStr tmpStr = tmpStr & "<GDFORM_VARIABLE NAME=" & var_name & " START>" & vbCRLF tmpStr = tmpStr & var_value & vbCRLF tmpStr = tmpStr & "<GDFORM_VARIABLE NAME=" & var_name & " END>" FormatVariableLine = tmpStr end function Sub OutputLine(byVal line) outfile.WriteLine(line) end sub if err.number = 0 then... |
Up to 25 points Criteria: Relevant Functional Well laid out |
| P259 Create or download a relevant PHP script,
upload it to your Web server, and confirm that it runs live on your Web
site. Modify and customize any downloaded scripts. Also be sure to give credit through comments when required. For PHP Tutorials and details see: http://php.net See: http://webscripts.softpedia.com |
File | New | PHP Note: unless you have server software installed on your computer, you will not be able to test it on your computer. One solution is to not link your new PHP page to your Web site until it well tested. Instead of accessing the PHP page from your normal menu navigation links, type the full URL to test it. For example, this Grading Criteria page was saved as a PHP file and tested live online before it was linked: 2820Web/1GradingCriteria/EW7_PhpAsp.php PHP code starts with <?php Tap Ctrl + L for PHP IntelliSense inside a PHP block Below is a live and very short working PHP example to show today's date. PHP output of 4 lines of code below: 03-19-10 <?php echo 'PHP Date Demo<br />'; echo date("m-d-y"); ?> |
Up to 25 points Criteria: Relevant Functional Well laid out |
| PP266 Create or download a PHP script to calculate
something relevant to your Web site. Upload it to your Web server, and
confirm that it runs live on your Web site. Modify and customize any downloaded scripts. Also be sure to give credit through comments when required. See: EW7_PhpDemo.php EW7_PhpCalcDemo.php EW7_PhpInputAndCalcDemo.php |
For a sample PHP calculation that you can modify see: http://rickleinecker.com/HTDE/Chapter13.aspx <?php $width = "60"; $height = "20"; echo "If Height=60px and Width=20px, then area is "; echo "$width * $height px"; ?> See P260 to test pages locally in Expression Web. You can install a PHP Web server, go to http://php.net/downloads.php/a> |
Up to 25 points Criteria: Relevant Functional Well laid out |
| Create or download a relevant Cold Fusion script,
upload it to your Web server, and confirm that it runs live on your Web
site. Modify and customize any downloaded scripts. Also be sure to give credit through comments when required. |
hhttp://www.adobe.com/products/coldfusion/ |
Up to 25 points Criteria: Relevant Functional Well laid out |
| Create or download a Cold Fusion script to calculate
something relevant to your Web site. Upload it to your Web server, and
confirm that it runs live on your Web site. Modify and customize any downloaded scripts. Also be sure to give credit through comments when required. |
Cold Fusion Tutorials: http://www.quackit.com/coldfusion/tutorial/ |
Up to 25 points Criteria: Relevant Functional Well laid out |
|
images [Dir] contact.htm favicon.ico index.htm navBar.htm portfolio.htm resume.htm yourSiteNameLayout.css |
Maximum: 100 points |
|
| Home | Top | |