Sabtu, 24 April 2010

fourth


Pengantar Teknologi Web 3
Teknologi Web Client
• Web browser
• HTML / XML / XHTML
• Javascript / VBScript
• CSS
• Flash player
• Java Applet
• ActiveX / Plugin: program yg terintegrasi dgn browser
• Helper: program yg terinstall di client
Pengembangan sisi client
• Local environment (prosesor, browser, memory, vga, dll)
• Tidak ada kontrol oleh web developer
• Memberikan saran kepada user
– Cth: resolusi 1024 x 768
• Memberi pilihan kepada user
– Cth: javascript harus aktif
• Client / user profiling
Pengembangan sisi client
Pilihan client
Pertimbangan Client
• Kebutuhan dan keinginan user berbeda satu dengan yang lain.
• Pengaruh gender, umur, pendidikan, hobi, pengalaman, latarbelakang, budaya, dll.
• User memiliki tujuan, tugas web developer adalah membantu user mencapai tujuannya (download program, akses jadwal, mencetak daftar harga, dll)
Pertimbangan jaringan
• Bandwidth
– Modem = 56KBps; T1 = 1.5MBps
• Latency: waktu yang diperlukan sebuah paket data untuk menempuh jarak yang menghubungkan dua buah sistem
• Utilization, lalu lintas data pada suatu jaringan.
Web Browser
• MS Internet Explorer (Windows)
• Netscape Navigator/Communicator (Windows & Linux)
• Mozila Firefox (Windows & Linux)
• Opera (Windows & Linux)
• Konqueror (Linux)
• lynx, berbasis teks (Linux)
HTML
• Hypertext Markup Language
• Text based
• Menggunakan tag (tanda) <>
• Tujuannya: untuk tampilan di halaman web
• Bahasanya baku
• Ekstensi : .html , .htm
HTML tag


Judul Halaman






Tags vs. elements
• HTML specifies a set of tags that identify structure and content type
– tags are enclosed in < >

specifies an image

– most tags come in pairs, marking a beginning and ending

• and enclose the title of a page
HTML
Aligning text
• can specify how elements should be aligned (default is left-justified)
– utilize STYLE attribute of tag


• to justify more than one element as a group, use DIV tags
– ell elements enclosed in DIV are formatted similarly


Text styles
• can specify styles for fonts

specify bold
specify italics
specify typewriter-like (fixed-width) font

increase the size of the font
decrease the size of the font

specify a subscript
a superscript

for paragraphs

for inline text


• Note: if elements are nested, the order of opening/closing is important! (LIFO)
Font
Lists

• there are 3 different types of list elements

specifies an ordered list (using numbers or letters to label each list item)
  • identifies each list item

    • can set type of ordering, start index


    specifies unordered list (using a bullet for each)
  • identifies each list item


    specifies a definition list
    identifies each term
    identifies its definition
    Tabel 1 baris 2 kolom
    Tabel 2 baris 2 kolom
    URL
    Hyperlinks
    • perhaps the most important HTML element is the hyperlink, or ANCHOR



    • where URL is the Web address of the page to be displayed when the user clicks on the link

    • if the page is accessed over the Web, must start with http://

    • if not there, the browser will assume it is the name of a local file




    • causes the page to be loaded in a new window

    Hyperlinks - anchor
    • for long documents, you can even have links to other locations in that document



    • where ident is a variable for identifying this location





    • will then jump to that location within the file




    • can jump into the middle of another file just as easily

    Images
    • can include images using IMG
    – by default, browsers can display GIF and JPEG files
    – other image formats may require plug-in applications for display

    alternate text


    • again, if file is to be accessed over the Web, must start with http:// (if not, will assume local file)
    Frames
    • frames provide the ability to split the screen into independent pages
    – must define a FRAMESET that specifies the layout of the pages
    – actual pages to be displayed must be in separate files
    Frame controversy
    • frames are probably the most controversial HTML feature
    – some people love them, some people hate them


    • 2 reasonable uses for frames
    – as a navigational aid:
    • can divide the screen into a static menu frame and the main frame for navigating a site
    • e.g., www.creighton.edu/~davereed

    – as a means of separating program input from output:
    • can divide the screen into a static man input form frame and the main frame for displaying output
    • e.g., www.creighton.edu/~davereed/csc551/JavaScript/story.html

    Menu frame
    • to create a menu, need to be able to direct links to the main frame
    – name the frames in the FRAMESET
    – specify the frame name as TARGET in the link
    – specify _top as target to return to top level of browser
    Content vs. presentation
    • most HTML tags define content type, independent of presentation
    – exceptions?


    • style sheets associate presentation formats with HTML elements
    – CSS1: developed in 1996 by W3C
    – CSS2: released in 1998, but not fully supported by browsers

    – HTML style sheets are known as Cascading Style Sheets, since can be defined at three different levels
    • inline style sheets apply to the content of a single HTML element
    • document style sheets apply to the whole BODY of a document
    • external style sheets can be linked and applied to numerous documents

    lower-level style sheets can override higher-level style sheets

    Inline style sheets
    • Using the style attribute, can specify presentation style for a single HTML element

    – within tag, list sequence of property:value pairs

    font-family:Courier,monospace
    font-style:italic
    font-weight:bold
    font-size:12pt font-size:large font-size:larger

    color:red color:#000080
    background-color:white

    text-decoration:underline
    text-decoration:none
    text-align:left text-align:center
    text-align:right text-align:justify
    vertical-align:top vertical-align:middle
    vertical-align:bottom

    text-indent:5em text-indent:0.2in
    Inline style sheets (cont.)
    • more style properties & values

    margin-left:0.1in margin-right:5%
    margin:3em
    padding-top:0.1in padding-bottom:5%
    padding:3em

    border-width:thin border-width:thick
    border-width:5
    border-color:red
    border-style:dashed border-style:dotted
    border-style:double border-style:none

    whitespace:pre

    list-style-type:square
    list-style-type:decimal
    list-style-type:lower-alpha
    list-style-type:upper-roman
    Document style sheets
    • inline style sheets apply to individual elements in the page
    – can lead to inconsistencies as similar elements are formatted differently
    • e.g., might like for all H1 elements to be centered

    – inline definitions mix content & presentation
    •  violates the general philosophy of HTML
    Document style sheets
    • document style sheets ensure that similar elements are formatted similarly
    – can even define subclasses of elements and specify formatting

    p.indented defines subclass of paragraphs
    • inherits all defaults of


    • adds new features

    to specify this newly defined class, place class="ID" attribute in tag


    • note how "clean" the BODY is

    External style sheets
    • modularity is key to the development and reuse of software
    – design/implement/test useful routines and classes
    – package and make available for reuse

    – saves in development cost & time
    – central libraries make it possible to make a single change and propogate
    Modularity & style sheets
    • ideally, the developer(s) of a Web site would place all formatting options in an external style sheet

    • all Web pages link to that same style sheet for a uniform look

    – simplifies Web pages since only need to specify structure/content tags

    Web rules of thumb
    • HTML provides for lots of neat features,
    but just because you can add a feature doesn't mean you should!
    – don't add features that distract from the content of the page

     use color & fonts sparingly and be careful how elements fit together
    e.g, no purple text on a pink background, no weird fonts

     use images only where appropriate
    e.g., bright background images can make text hard to read
    e.g., the use of clickable images instead of buttons or links can slow access

     don't rely on window or font size for layout
    e.g., font size may be adjusted by viewer, window constrained

     don’t be annoying
    e.g., no pop-up windows, excessive advertising, silly music

     break large document into smaller or provide a menu (either internal or frame)

     stick to standard features and test using both IE and Netscape

     utilize style sheets to make changes easy & ensure consistency

  • Tidak ada komentar:

    Posting Komentar