ICTWEB502 Create Dynamic Web Pages
Total Page:16
File Type:pdf, Size:1020Kb
ICTWEB502 Create dynamic web pages Learner Guide © Copyright, 2015 by North Coast TAFEnow Date last saved: 9 September 2015 by Amanda Walker Version: 1.0 # of Pages = 39 Tersem Rugbir – Content writer and course adviser TAFEnow Resource Development Team – Instructional and graphic design Copyright of this material is reserved to the Crown in the right of the State of New South Wales. Reproduction or transmittal in whole, or in part, other than in accordance with the provisions of the Copyright Act, is prohibited without written authority of North Coast TAFEnow. Disclaimer: In compiling the information contained within, and accessed through, this document ("Information") DET has used its best endeavours to ensure that the Information is correct and current at the time of publication but takes no responsibility for any error, omission or defect therein. To the extent permitted by law, DET and its employees, agents and consultants exclude all liability for any loss or damage (including indirect, special or consequential loss or damage) arising from the use of, or reliance on, the Information whether or not caused by any negligent act or omission. If any law prohibits the exclusion of such liability, DET limits its liability to the extent permitted by law, to the re-supply of the Information. Third party sites/links disclaimer: This document may contain website contains links to third party sites. DET is not responsible for the condition or the content of those sites as they are not under DET's control. The link(s) are provided solely for your convenience and do not indicate, expressly or impliedly, any endorsement of the site(s) or the products or services provided there. You access those sites and use their products and services solely at your own risk. Contents Getting Started .................................................................................................................................. i About this unit .................................................................................................................................................................... i Elements and performance criteria ............................................................................................................................. i Icon Legends....................................................................................................................................................................... ii Topic 1 – Identify client and server-side dynamic content ............................................................ 3 Review Technical Requirements ................................................................................................................................. 3 Setting Up a Development Server .............................................................................................................................. 7 Client-Side Dynamic Content .....................................................................................................................................10 Server-side Dynamic Content ....................................................................................................................................11 Select Appropriate Languages and Technology .................................................................................................15 Sample Answers ..............................................................................................................................................................18 Topic 2 – Create dynamic content ................................................................................................. 20 Create pages using appropriate languages ..........................................................................................................20 Topic 3 - Test dynamic pages ......................................................................................................... 33 Getting Started About this unit This unit describes the performance outcomes, skills and knowledge required to produce both server and client-side content. Welcome to ICTWEB502 Create Dynamic Web Pages. This unit supports the creation of dynamic web pages that include both client and server-side dynamic content with efficient and effective code to meet technical requirements. The characteristic feature of dynamic website is the compartmentalization of the content and design. Its ‘dynamism’ lies in its vibrancy and interactivity, both in the client-side scripting and server-side scripting. In this unit, you will follow the development of a web application that allows users to view and update a product catalogue with a login facility. This unit assumes that you have some foundation of creating a simple markup language and control structures as well as exposure to using some JavaScript. The materials in this unit are to be used as a guide to your study. To get the most out of this guide, make use of other resources such as the Internet or fellow students to further your understanding. The internet is a fantastic resource to assist your learning. Elements and performance criteria Elements define the essential outcomes of a unit of competency. The Performance Criteria specify the level of performance required to demonstrate achievement of the Element. They are also called Essential Outcomes. Follow this link to find the essential outcomes needed to demonstrate competency in this Unit: http://training.gov.au/Training/Details/ICTWEB502 i | Page ICTWEB502_LG_V1 TAFEnow Icon Legends Learning Activities Learning activities are the tasks and exercises that assist you in gaining a clear understanding of the content in this workbook. It is important for you to undertake these activities, as they will enhance your learning. Activities can be used to prepare you for assessments. Refer to the assessments before you commence so that you are aware which activities will assist you in completing your assessments. Readings (Required and suggested) The required reading is referred to throughout this Learner Guide. You will need the required text for readings and activities. The suggested reading is quoted in the Learner Guide, however you do not need a copy of this text to complete the learning. The suggested reading provides supplementary information that may assist you in completing the unit. Reference A reference will refer you to a piece of information that will assist you with understanding the information in the Learner Guide or required text. References may be in the required text, another textbook on the internet. ii | Page ICTWEB502_LG_V1 TAFEnow Topic 1 – Identify client and server- side dynamic content Review Technical Requirements Introduction These notes will serve as an introduction to the concepts. You are encouraged to do further research to fully understand the concepts. Further resources can be found at the end of the notes. Before you start your design you need to: > Identify the goals of your website > Identify your target audience 3 | Page ICTWEB502_LG_V1 TAFEnow > Create a list of content that will achieve your goals and be of interest to your audience It is important that you know the network context within which you will be developing the application. Tech Reader architecture suggests that the web application would be ideal and that it will be installed in-house, an important security consideration. You will need to employ the three layer application architecture (based on client-server architecture) to allow separation between user interface, programming logic and database operations. These separations should be observed as far as it is practical given the technology that you are working with. Dynamic Web Page A dynamic web page is a web page that provides custom content for the user based on the results of a search or some other request. The ‘dynamic’ term is used when referring to interactive Web Pages created for each user. There are two main ways to customise Web Pages and make them more interactive. The two are often used together because they do very different things. A script is a set of instructions. For Web Pages, they are instructions either to the Web Browser (client side scripting) or to the server (server side scripting). Scripts provide change to a Web Page. When you visit a web page, sometimes you’ll notice that there are changes each time you visit it (or during a visit). They probably use scripting. Client-side scripting is generally referring to the class of computer programs on the web that are executed client-side, by the user’s web browser instead of on the web server. JavaScript is the main client-side scripting language for the Web. Client-side scripts are interpreted by the browser. The process with client-side scripting is: 1 The user requests a Web Page from the server 2 The server finds the page and send it to the user 3 The page displayed on the browser with any scripts running during or after display 4 | Page ICTWEB502_LG_V1 TAFEnow Client-side scripts are often embedded within an HTML or XHTML document but they may also be contained in a separate file, which is referenced by the document(s) that use it. Client- side scripts may also contain instructions for the browser to follow in response to certain user actions, (e.g., clicking a button). Often, these instructions can be followed without further communication with the server. In summary, client-side scripting is used to make Web Pages change after they arrive at the browser. These scripts rely on the user’s computer. For the Tech