Study Guides (238,554)
Canada (115,195)
Prof (7)

Compsci Midterm.docx

27 Pages
Unlock Document

Western University
Computer Science
Computer Science 1032A/B

Midterm Notes Lesson 1 INTERNET PROTOCOLS & USES Electronic Mail Simple Mail Transport Protocol (SMTP) • Sends mail over the internet • mailto: [email protected] Exchanging Files File Transfer Protocol (FTP) • Exchanges files over the internet • E-Commerce & WebApplications Hypertext Transfer Protocol (HTTP) • Transmits files on the WWW • E-COMMERCE THREE TIER ARCHITECTURE User Tier: Computers that have browsers that request and process Web Pages Server Tier: Computers that run Web Servers generating Web pages in response to requests from browsers and processing the application programs.Afacility running multiple Web Servers is sometimes called a Web Farm. Database Tier: Computers that receive and process the requests to retrieve and store data. Structured Query Language (SQL) is the language used for Database requests. • AnActive Example: You are looking for specific climbing equipment at To produce this page, the commerce server accessed a database to obtain the product, picture, price, special terms for purchasing item, product information and related products. WEB TECHNOLOGY HTTP Exchanges Web pages over the Internet Web pages Encoded in HyperText Markup Language (HTML) HMTL – Defines structure & layout of web pages – Transmitted by Web servers – Used by Browsers (IE, Netscape, Mozilla) • Processes HTTP protocol • Receives & displays document • Transmits responses MARKUP LANGUAGES Annotations in the text Instructions on how text is to be displayed/used. Types: Presentational: Infer structure directly from the file Procedural: Focuses on presentation of text Used in professional publishing applications Descriptive Text fragments with descriptive information • GML/SGML: General/Specialized Markup Language • HTML/XHTML: (Extensible) Hypertext Markup Language • XML: Extensible Markup Language Hyper Text Markup Language • First markup language of the WWW • Used to deliver content on the web • Open standard (W3C - World Wide Web Consortium) • Readability • Easy of use • Portability HTMLStructure Content • Anything that is not an instruction Instructions • Instructions inserted as “tags” • Describe how to display/process content HTMLTags Predefined Tags • Control how the text is displayed • Insert images into the document • Insert links to other documents HTML tags normally occur in pairs Apair of tags surround the content Start tag • Indicated with angle brackets: End tag • Indicated with a slash after the opening angle • Bracket: Tags are NOT case sensitive • = DOCUMENT TAGS 1 - Entire document Every HTML document has: 2 - Head containing browser information 3 - Body 4 - Contains content & associated presentation HEAD & TITLE TAGS tag appears in the tag and is used to display the contents between the start and end tag in the title bar of the browser Heading Tags There are 6 heading levels – H1, H2, H3, …, H6 – H1 is the largest – H6 is the smallest Creates a heading – Enclose the heading text between the opening and closing heading tags My Webpage Formatting & Layout Tags Formatting _ .. - italics _ .. - bold _ .. - underline Layout _ .. - center the text _ .. - paragraph (creates space before and after paragraph) _ - break, start a new line (no end tag) _ - horizontal rule, draw a line (no end tag) Nesting Tags HTML tags can be nested HTML: Bold underlined text Web Page Result: Bold underlined text Image Tag • Images are added using tag • A tag is not required • The SRC parameter is used to indicate the SouRCe of the image • Format: – Filename enclosed in quotes – By Default, Browser looks for image in the same directory as the HTML file • Image Tag Example • • To include the image • (midsex1.jpg) in a web page Standard Web Image Formats • Image formats typically used: • GIF – Graphics Interchange Format • JPG ( JPEG ) – Joint Photographic Experts Group • BMP – Windows Bitmap HTML Example When a browser presents a Web document, the browser scans the document and applies the presentation instructions to the content URL • Uniform Resource Locator (URL) • URL contains information about – Address of a document on the Internet – Protocol used to access the document • When no file name specified in URL, Browser assumes (by default) the filename is “index.html” Accessing images from a location on the Internet: • Specify location, as a complete URL in src attribute of the image tag • Anchor Tag • Anchor tags ( & ) insert – Hyperlinks o Link to another web page on the Internet – Bookmarks o Link to a specific location within the web page or link to a specific location within another web page on the Internet Anchor Tag - Hyperlink • Link declared with HREF attribute. • Hypertext REFerence (HREF) • HREF specifies the URL of the web page • Content inside the anchor tag (.. ) – Displayed (default appearance) o blue underlined text – When content selected o link is activated & user taken to specified web page • Format: information Anchor Tag - Hyperlink Format information Example This is a link to Western’shome page. This is a link to Western’s home page. Anchor Tag Example – Hyperlink as an image Anchor Tag – Bookmarks • Name parameter – Specifies bookmark location on the web page – Provides bookmark name (in quotes) – • Link to a bookmark on same web page – Use HREF specifying bookmark name – Bookmark name preceded with # and in quotes – information • Link to a bookmark on another web page – Include URL in HREF parameter – information Example Name parameter at beginning of Chapter 1 Link to Chapter 1 on the same web page Go to Chapter 1 Link to Chapter 1 from another web page Go to Chapter 1 Bookmark Example Sample bookmark webpage Bookmark Example Information More Information Even more Information Go to the top of the page Table Tag • & mark the beginning and end of a table declaration • Attribute BORDER – Controls the width of the table border – Typical setting: border=1 – If omitted table displayed without a border Table Definitions • Tables declared one row at the time – Rows enclosed in & tags – Rows contain one or more cell declarations • Cells specified with & • Content inside the TD tags is displayed as the content of the cell Table Example Row 1, Cell 1 Row 1, Cell 2 Row 1, Cell 3 Row 2, Cell 1 Row 2, Cell 2 Row 2, Cell 3 Lists Ordered – Displayed with numbers/letters – Defined with & tags – Within tag o list item, tag indicates the items on the list o Numbered list by default (1,2,3,4,...) – TYPE parameter controls the list numbers/letters o “A” – Letters( A,B,C,D,…) o “a” – lowercase letters (a,b,c,d,…) o “I” – Roman Numbers (I,II,III,IV,…) o “i” – lowercase roman numbers (i,ii,iii,iv,…) Example Sunday Monday Tuesday Wednesday Thursday Friday Saturday Example 2 Ordered List Examples Letters list: Apples Bananas Lemons Lowercase letters list: Apples Bananas Lemons Roman numbers list: Apples Bananas Lemons Lowercase Roman numbers list: Apples Bananas Lemons Unordered – Displayed with bullets – Defined with & tags – Within tag o List item, tag indicates the items on the list – TYPE parameter controls the list bullets o “Disc” – solid disc (default) o “Circle” – hollow circle o “Square” – solid square symbol Example Sunday Monday Tuesday Wednesday Thursday Friday Saturday Example 2 Unordered List Example Disc bullets list: Apples Bananas Lemons Circle bullets list: Apples Bananas Lemons Square bullets list: Apples Bananas Lemons Nested List example Sunday Monday Tuesday Wednesday Thursday Friday Friday Morning FridayAfternoon Friday Evening Saturday Creating a Web Page • Using Notepad (text editor) – Type HTML code – “Save as” with an HTM/HTML extension o Example: my.html – Only use a text editor (for this course) o Other editors (Word, etc…) will generate additional Html code when creating a Web Page Viewing a Web Page • Start browser (e.g., IE) • Select File > Open • Select Browse, locate & open HTML file • Page will be displayed in browser • To allow others to see the Web page it must be published on a web server Learning from other WebPages • View page in browser (IE) • Select View > Source – Will show html source codes • Select File > Save – To save the page and images on your PC HTMLEditors • MS Word – Documents can be “saved as” web page (html) – Does not allow for the more advanced features of HTML:Animations, Forms, Scripting – Typically adds extra and unnecessary HTML code • Dreamweaver & Frontpage – Generates HTML and Javascript code • Text Editors – Once HTML code is created, text editor can be easily used to adjust HTML code as needed Message & Data Exchange Technologies • Telephone • Paper (Fax, Postal mail) • Email • Electronic Data Interchange (EDI) • eXtensible Markup Language (XML) Electronic Data Interchange (EDI) • Standard of formats for common business documents • Provides for the exchanging of documents • Used in point-to-point exchanges • Now can be used over the internet XML & Data Exchange • eXtensible Markup Language – Offers advantages over other methods – Developed by W3C • Not dependant on any hardware/software • Does not do anything • Importance: Enables data sharing • Can be used on the Web XML • Allows interaction between: – independent computer systems – different operating systems • Allows independent systems to interact with one another – Defining data (structure, syntax & type) – Validating, interpreting & processing data • Applications may be written in any programming language • Provides for integration of applications • Organization/Industry can define tags for their specific data Example: o Invoicing information may require:  Supplier name  Contract number Using XMLin Business • XML can improve efficiencies – Structure of data defined in an XML schema document – Documents containing data created in XML – Information can be validated against schema – Schema may be published on the Web • Providing all businesses, information on how to exchange data and validate documents received Examples of XML Industry Standards • Financial Reporting – XBRL, • General Ledgers – XBRL GL, • eContracts Business Narrative – BNML, • Insurance – ACORD, • Human Resources – HR-XML, XML Uses – Data Transfer Example from Western – Peoplesoft used to manage student data – WebCT used for delivery of Course materials – Applications are different, but need to exchange information – Peoplesoft application writes student registration information to an XML data file – WebCT application reads XML data file and adds students into their appropriate courses XML Uses - Web Services XMLWeb services – Supported by the majority of software vendors – Standards that facilitate distributed computing using the Internet – Latest & Greatest tool for application interaction – Allows programs to access each other remotely without the need to develop a proprietary system – Data transmitted in XML documents o XML schemas defined o Automatic validation XMLWeb Services Supply Chain Example – Retailer develops a Web Service to share its Customer Sales information (service description- available over the Internet) – To obtain sales information Distributors and Manufacturers create service requests based on the Web Services description. – Retailer processes the service requests by reading data from the customer database and formatting an XML data document as a response. – Because of the standards, no joint development meetings or other coordination activities are required. XMLWeb Services provides cost savings, time saving and tremendous flexibility of applications. Markup Language: XML • Simple “easy” format • Types of XML files: – Document Type Definition (DTD) – XML Schema – Document (data) • XML files are text file with tags – Similar format to HTML – No predefined tags, tags are descriptive XML Document • XML document contains: – XML tags • Define data (structure, syntax & type) – Metadata (text) • Data about the data XML Document - Elements • Tags within the document • Start & End Tags: content • Tags are case sensitive (name =/= NAME) • Create descriptive tag names (no spaces) • Document should have 1 root element • Structure defined by the grouping and/or nesting of elements – Elements can follow other elements – Elements can be nested within other element XML Document – Attributes • Additional data to describe elements • Name/Value pairs, in the start tag • Attribute value contained in quotes • content Well Formed XML Document • Complies to a character set definition • One & only one root element • Elements delimited by start & end tag • Tags nested not overlapping • Attribute values quoted XML Example – Travel Expense Data Employee travel expenses: Employee: Name: Jane Winston Department:Accounts Payable Expense: Date: 2007-01-07 Item:Airfare Amount: $500 Expense: Date: 2007-01-07 Item: Hotel Amount: $200 Expense: Date: 2007-01-07 Item: Taxi Fare Amount: $50 XML Namespace • XML document may contain Elements from different sources and these Elements may have duplicate names • Provides method to avoid element names conflicts • Used in XML schemas • Placed in the start tag of an element • Syntax: – xmln
More Less

Related notes for Computer Science 1032A/B

Log In


Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.