Web Development

Ein Lehrbuch für das Informatik oder Medien-Informatik Studium.

Ein kleiner Exkurs für Alle, die Internet-Standards lesen wollen, um Beispiel die Definition einer URL.

Backus-Naur-Form

Ein kurzes Beispiel:

Plain Code Beispiel für BNF mit vier Ableitungsregeln

studiengang = "MMA" | "MMT"
jahrgang  = studiengang "-" boderm jahr
boderm    = "B" |  "M"
jahr      = ziffer ziffer ziffer ziffer
ziffer    = "0" |  "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"

Eine letzte Ableitungsregel liest man so: eine ziffer ist entweder eine 0 oder eine 1 oder … oder eine 9. Ein jahr ist vier ziffern hintereinander.

Leichter zu lesen ist das sogenannte “Railroad Diagram”:

jahrgang studiengang - boderm jahr studiengang MMAMMT boderm B M jahr ziffer ziffer ziffer ziffer ziffer 0 1 2 3 4 5 6 7 8 9

Hier eine gekürzte Darstellung der http url aus dem RFC:

Plain Code HTTP URL laut RFC 1738

httpurl        = "http://" login [ "/" hpath [ "?" search ]]

login          = [ user [ ":" password ] "@" ] hostport
hostport       = host [ ":" port ]
host           = hostname | hostnumber
hpath          = hsegment *[ "/" hsegment ]

user           = *[ uchar | ";" | "?" | "&" | "=" ]
password       = *[ uchar | ";" | "?" | "&" | "=" ]
port           = digits
hsegment       = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
search         = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
alphadigit     = alpha | digit

unreserved     = alpha | digit | safe | extra
uchar          = unreserved | escape
xchar          = unreserved | reserved | escape
alpha          = lowalpha | hialpha
digits         = 1*digit


safe           = "$" | "-" | "_" | "." | "+"
extra          = "!" | "*" | "'" | "(" | ")" | ","
national       = "{" | "}" | "|" | "\" | "^" | "~" | "[" | "]" | "`"
punctuation    = "<" | ">" | "#" | "%" | <">
reserved       = ";" | "/" | "?" | ":" | "@" | "&" | "="
hex            = digit | "A" | "B" | "C" | "D" | "E" | "F" 
                       | "a" | "b" | "c" | "d" | "e" | "f"

escape         = "%" hex hex

lowalpha       = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" |
                 "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" |
                 "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" |
                 "y" | "z"
hialpha        = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" |
                 "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" |
                 "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z"

digit          = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"