search
Login | Signup | Support
  • 0
  • ×

    Add as Friend Internet Programming

    by: Rogers

    Current Rating : Rate It :

    298

    Views

    Download
     
    1 : 1 4. Internet Programming
    2 : 2 Reference H.M. Deitel, P.J. Deitel and T.R. Nieto, Internet and World Wide Web: How to Program, Prentice Hall, 2002
    3 : 3 Web site development To develop a Web site, three steps: Obtain the appropriate equipment Web Server – hardware and software Register the Web Server to an Internet Service Provider (ISP) Obtain the IP address and DNS address Develop the contents Internet Programming
    4 : 4 Internet Programming Web service is a kind of client / server process Need interaction between client and server Programming for providing Web service can also be divided into Client-side programming: to define the operation to be performed on the client’s machine Server-side programming: to define the operation to be performed on the server
    5 : 5 Server-side Programming Skills that are often required: CGI PHP ASP Perl Java Servlet, … Web Client Web Server Internet Client-side Programming Skills that are often required: XHTML Javascript Java Dreamweaver Flash SMIL, XML … Database
    6 : 6 4.1 XHTML – Extensible HyperText MarkUp Language
    7 : 7 Web programming using XHTML Nowadays, there are many tools that help to develop Web page Dreamweaver, Visual studio Provide sophisticated tools to allow Web page developed in a graphical manner Finally, the job of these tools is to convert the user design to XHTML code Understanding of XHTML allows us fine tuning the codes generated by these tools understand the source of a Web page
    8 : 8 What is XHTML? Unlike procedural programming languages, e.g. C, C++, XHTML is a markup language that specifies the format of document to be seen in browser XHTML has replaced the HTML as the primary means of describing the Web page content Become a World Wide Web Consortium (W3C) recommendation W3C is an industry consortium Seeks to promote standards for the evolution of the Web and interoperability between WWW products by producing specifications and reference software Compared with HTML, XHTML provides more robust, richer and extensible features
    9 : 9 Features of XHTML Platform independent The same piece of code can give the same display in Mac, Linux and Windows Text-based Program is written with ASCII characters Can be written using a text editor, such as notepad An XHTML file must have an extension of .html or .htm Information is generally enclosed inside paired tags E.g. … There are many tags in XHTML. They specify different information required to display the Web page content start tag end tag (with a /)
    10 : 10 Basic Structure of XHTML This is title, describing the content This is body, main part of the page
    11 : 11 Internet and WWW How to Program - Welcome

    Welcome to XHTML!

    Example define the namespace of html useful for validating the code to see if they meet the xhtml standard comment define the title of the web page

    - new paragraph

    12 : 12 See the title defined in head That’s the content defined in body
    13 : 13 An XHTML document can be divided into 2 sections head section contains information of how the page is formatted e.g. can be found in head section to indicate the title of the Web page when it is shown in browser body section contains the actual page contents e.g.

    Welcome to XHTML!

    shows a line of text “Welcome to XHTML!” on the new paragraph
    14 : 14 Tags Tags: case sensitive For XHTML,
    is different from
    For HTML, it is case insensitive Browse will not display information within tag that does not understand Tags: no precise positioning Many start tags define attributes that provide additional information E.g. start tag attribute name attribute value
    15 : 15 Common Tags – Headers Some text may be more important the others XHTML provides six headers, called header elements, for specifying the relative importance of information

    ,

    to
    It is assumed the text in

    is more important than that in

    and so on so forth By default, the size of the text that is more important is bigger

    16 : 16 Internet and WWW How to Program - Headers

    Level 1 Header

    Level 2 header

    Level 3 header

    Level 4 header

    Level 5 header
    Level 6 header
    6 headers are all used to indicate the relative importance of text
    17 : 17 Text under

    has the largest size

    18 : 18 Meta Tag HTML interacts with the search engines through using meta tag These words are compared with words in search requests Description of a page seen on searching
    19 : 19 Linking Webpage One of the most important XHTML features is the hyperlink Link to another resources, such as web page, image, etc. Achieve by using the anchor tag : To a web page: PolyU anchor attribute Value of the attribute: The address of the Web page The name on the Web page that represents this link
    20 : 20

    Here are my favorite sites

    Click a name to go to that page.

    PolyU

    EIE

    Dr Daniel Lun's Home

    ENG224 Home page

    strong tag lets the text to be displayed with bold font Other similar tags include underline and italic Four links create Don’t introduce spaces between different parts of a URL address
    21 : 21 Four links are included This line is shown with a bold font
    22 : 22 Linking Email Addresses To a mail address: Email me With a subject: Email me Multiple recipients: Email me
    23 : 23 Linking Images Background Image can be defined as an attribute of the body tag: To show an Image inside a page: “text We can create an image hyperlink
    24 : 24

    XML How to Program book cover Java How to Program book cover

    Will scale to this size to display jhtp.jpg in fact cannot be found. With the alt attribute, the statement is displayed if the image is not found empty element: do not markup text
    25 : 25 “alt” statement (may not display the same for Netscape) The image displayed at the specified size
    26 : 26 Color 2 ways to specify: Use hexadecimal numbers RGB format: FF: strongest, 00 weakest #FF0000 #00FF00 #0000FF Use color names Black, White, Red, Cyan, Green, Purple, Magenta, Blue, Yellow, OrangeRed, SpringGreen, BlueViolet, Gold, DarkGoldenrod, Burlywood, …
    27 : 27 Color Background color: … … Text color, links, visited links and activated links: Font color:
    28 : 28 Formatting Text The format of displayed text can be changed by using Attributes: Color: Size: Relative: +1, +2, -3, … Absolute: 10, 12, … Face: Font used Arial, Verdana, Helvetica, Times, … Multiple fonts:
    29 : 29

    This is a test.


    This is a test.

    This is a test.
    This is a test.

    This is a test.

    horizontal ruler background color is yellow the backslash is only to improve readability the text is placed at the center See the difference between

    and

    30 : 30 default size size = +1, +2, +3 size = 24
    31 : 31 Lists Unordered list a list that does not order its items by letter or number
    creates a list where each item begins with a bullet List items:
  • For example
    • Apple
    • Orange
    • Banana
    32 : 32 Lists Ordered list List that order their items by letter or number
    When style equals to 1: decimal, 1, 2, 3, … I: uppercase Roman, I, II, III, … i: lowercase Roman, i, ii, iii, … A: uppercase Latin, A, B, C, … a: lowercase Latin, a, b, c, … List items:
  • 33 : 33 Table Organize data into rows and columns Table header Table body Table footer Table border Table caption
    Insert a table row: … The head, body and foot sections are defined by … … …
    34 : 34 …
    Attribute examples: border=“1” ? the larger the number, the thicker is the border. “0” means no border align=“center” ? the table is aligned at the center of the browser width=“60%” ? to set the table width to 60% of the browser’s width Caption of the table:
    35 : 35 The tr tag insert a new row The use of th tag defines the content of header or footer cells
    Price of Fruit
    Fruit Price
    Apple $0.25
    36 : 36
    Orange $0.50
    Banana $1.00
    Pineapple $2.00
    Total $3.75
    The use of th tag defines the content of header or footer cells The use of td tag defines the content of body cells
    37 : 37
    38 : 38 Col span and Row span colspan and rowspan allow merging columns/rows data cell spans more than one column data cell spans more than one row
    39 : 39
    Average Grades
    Report
    2000 2001 2002
    Maths A B C
    English C A
    first row 2nd row 3rd row 4th row vertical alignment
    40 : 40
    41 : 41 Forms When browsing web sites, users often need to provide information such as email address, search keywords, etc Forms allows user to input information
    42 : 42 Web Client Web Server Internet CGI App
    43 : 43 A form element is inserted into a web page by the tag … Attributes: method = “post” or “get” Indicates the way the Web server will organize and send you the form output post: causes changes to server data, e.g., update a database get: does not cause any changes in server-side data, e.g., make a database request action = “” Path to script, e.g., CGI
    44 : 44
    large medium small
    script that will be called to execute in the server use post method Only the radio button of large is checked
    45 : 45 Forms Elements inside a form are introduced by the tag type=“hidden” name=“variable name” value=“value that sends to the server” type =“text” name=“” value =“” size=“25” type =“submit” value =“” type =“reset” value =“” type =“checkbox” value =“” name=“”
    46 : 46 Form example I Ham Sweet Corn Mushroom Chicken Peas Indicate all 5 checkboxes belong to the same group The words show on screen Thing that sends back to server
    47 : 47 Form example II

    send the input the textbox to server clear the content of textbox Data that would send to server but do not display on screen
    48 : 48 Form example III

    Space is counted here Masked by asterisk
    49 : 49 Form example IV

    The “selected” value here mean Amazing is selected default value Change to default value when reset

    Presentation Tags

    Copyright © 2019 www.slideworld.com. All rights reserved.