490 likes | 513 Views
Explore fundamental concepts of internet programming. Learn about the Internet, WWW, programming, computer science, and more. Understand and apply knowledge through analysis, synthesis, and evaluation. Enhance cognitive skills and delve into key technologies and languages.
E N D
Internet System Programming Overview Yingcai Xiao
What to learn? Knowledge Comprehension Application Analysis Synthesis Evaluation Create
Knowledge: What is What is the Internet? What is the WWW? What is a Computer Program? What is Programming? What is a Computer? What is Computer Science?
Comprehension: How Interpretation & Extrapolation Is a smart phone a computer? Is the Internet a computer? How does it work? Why does it this way?
Application Solving new problems with acquired knowledge. Search: sequential, binary and quick Find an over-weight golf ball from a group of 8.
Analysis Examine information to find causes. What bug? Debugging
Evaluation • Making judgments based on a set of criteria. • Student Learning Outcomes assessment rubrics • UA CS Student Learning Outcomes (BSCS System Track) • UA CS Student Learning Outcomes (BSCS Management Track)
Synthesis/Create Compile information in a different way by forming a new pattern. Converting code from sequential to parallel Finding the bad golf ball faster?
Cognitive Skills http://en.wikipedia.org/wiki/File:BloomsCognitiveDomain.svg
What is this? How does it work? Why should it work this way? What is the shortcoming? Can we do better? What to learn?
Basic Knowledge about the Internet
The Internet is an interconnected computer networks based on the Internet Protocol (IP)
Basic Knowledge about the WWW
The World Wide Web is a software platform built on the Internet
What ending? Little-endian (Intel) Big-endian (IBM) https://en.wikipedia.org/wiki/Endianness
Tim Berners-Lee (the father of the WWW) • ASCII text (ISO/IEC 8859-1) is platform-independent. • “A” is 64 regardless big or little endian of the platform. • HTML (Hyper Text Markup Language) High-level language for the Internet • Entirely text based (platform independent) A Common Language for the Internet
HTML • HTML (Hypertext Markup Language) • Defines syntax and semantics of the Web language. • Entirely text based (platform independent) • Hypertexts are tagged in < >, not to be displayed. They are metadata describing regular text. (http://www.w3schools.com/tags/) simple.html: <html> <body> Hello, world </body> </html>
Important Versions of HTML • Originally proposed by Tim Berners-Lee in 1989. • HTML 2.0, 1995 • HTML 4.01 became XHTML 1.0 in 2000 (More strict) • HTML 5.0, 2014, Multimedia (audio and video), 3D Graphics (WebGL). • http://www.w3schools.com/html/default.asp
The science of data processing using computers. What is a Computer Science?
From the Webster’s New World Dictionary: 1. A person who computes. 2. A device used for computing (an electronic machine which by means of stored instructions and information, perform rapid, often complex calculations or compiles, correlates, and selects data). What is a Computer?
A modern computer runs stored programs to process data. (von Neumann architecture) It has five basic components: CPU, Input, Output, Memory, Secondary Storage What is a Computer?
Programs: stored computer instructions for data processing. Programming = Data Structures + Algorithms Professor Donald E. Knuth http://www-cs-faculty.stanford.edu/~knuth/ What is a program and what is programming?
Programming for the Internet. Coding on any platforms! Run on any platforms! What is Internet System Programming?
From C++ to the Internet
Source Code for Language 1 Source Code for Language 1 Language 1 Compiler on OS1 Language 1 Compiler on OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2 • Traditional Compilation (Linking)
The trend to support OS-independent binary code is to compile the source code into the binary format of an intermediate language. • And to provide an interpreter for the intermediate language on each OS to translate the binary code of the intermediate language into the native binary code of the OS. OS-Independent Code: Intermediate Languages
OS-Independent Compilation: Intermediate Language Source Code for Language 1 Language 1 Compiler on OS1 Language 1 Compiler on OS2 Intermediate Binary Code Intermediate Code Interpreter OS1 Intermediate Code Interpreter OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2
Java Intermediate Language: Java Bytecode Java Source Code (.java) Java Compiler (javac) on OS1 Java Compiler (javac) on OS2 Java Bytecode (.class) Java Interpreter on OS1 (java) Program statements are interpreted one at a time during the run-time. Java Interpreter on OS2 (java) Binary Code for OS1 Binary Code for OS2 OS1 OS2
An interpreter interprets intermediate code one line at a time. Slow execution. • A JIT (Just-In-Time) Compiler compiles the complete code all at once just into native binary code before execution. Faster execution. JIT Compiler
JIT Complier: Java Bytecode Compiler Java Source Code (.java) Java Compiler (javac) on OS1 Java Compiler (javac) on OS2 Java Bytecode (.class) Java JIT Compiler on OS1 All programming statements are compiled at compile time. Java JIT Compiler on OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2
MSIL: Microsoft Intermediate Language Source Code for Language 1 Language 1 Compiler on OS1 Language 1 Compiler on OS2 MSIL Code MSIL JIT Compiler on OS1 .NET OS-Platform-Independence MSIL JIT Compiler on OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2
To make .NET language independent, CLR (Common Language Runtime) is defined as the runtime environment. • CLR defines CTS (Common Type System) which should be followed by all languages to be used in the .NET framework. • Syntax: int, for, …, struct, class, • Semantics: multiple inheritance not allowed in CTS • Object Oriented: encapsulation, inheritance and polymorphism Visual Basic (.Net) redesigned to be OO • The code that follows CTS standard is called managed code. regular C++ supports multiple inheritance managed C++ does not support multiple inheritance .NET Common Language Runtime
CLR: Common Language Runtime Source Code for Language 1 Source Code for Language 2 Language 1 Compiler on OS1 Language 2 Compiler on OS2 MSIL Code Confirming CTS (Managed Code) CLR on OS1 .NET Language-Independence CLR on OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2
Source Code for Language 1 Source Code for Language 2 Language 1 Compiler on OS1 Language 2 Compiler on OS2 MSIL Code Confirming CTS (Managed Code) CLR on OS1 .NET Architecture for Language and Platform Independence (fan-in and fan-out on MSIL) CLR on OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2
CLI (Common Language Infrastructure) CLR/CTS for Everyone?
Source Code for Language 1 Source Code for Language 2 Language 1 Compiler on OS1 Language 2 Compiler on OS2 CIL (Common Intermediate Language) Code Confirming CTS (Common Type System) CLR for OS1 CLI (Common Language Infrastructure) Specification Open Architecture for Language and Platform Independent Programming CLR for OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2
Even though, CLI/CTS/CLR can make a program written in any language to run on any platform, the entire program (including all libraries used) has to be on the platform before running. Can we have part of a program on one computer and another part of the same program on another computer? Distributed Computing. A program is divided into multiple parts and different parts are distribute on different computers. Web Services: online runtime libraries Cloud Computing: distributed programs based on Web Services.
A Common Programming Language and Common Data Format for the Internet (free of compilation and translation)?
What is the Internet? Interconnected networks of Computers communicating via the Internet Protocol.
Internet Protocol IP: Internet Protocol: The data transmission protocol (standard) for the Internet. • DARPA Vint Cerf and Bob Kahn in 1974 • Each device on the Internet is identified by its Internet Address: 130.101.10.102 or pausch.cs.uakron.edu • Data transmitted between computers as packets. • Each packet has an IP header followed by data. • The first 2 entries in an IP header are the receiver’s address and the sender’s address. IP is similar to postal mailing (Packet Switching), not phoning (Circuit Switching). • Routers/Gateways forward packets based on network topology and traffic. • IPv4 (32bit addressing, 4B), IPv6 (48bit addressing, 256T) • The headers are in the standard IP format, platform-independent. • Data (any type) is transmitted over the Internet bit-by-bit. No restrictions on what can be transmitted.
Internet Protocol More on IP • Any IP device can join and drop off the Internet at anytime. (Not so for IBM’s token ring networks.) • Packets received may not in the order they were sent. • Wait and send again if network is busy. Transmission speed decreases as traffic increases. DoS attacks. • Binary data are platform-dependent.Binary data transmitted from one computer to another computer may not be readable by the receiver if it has a different binary data format than the sender.
JSP / ASP.NET WEB S E R V E R WEB C L I E N T Application 1 Application 2 Application 3 JSP/ASP.NET HTTP