1 / 83

Programming Methodology and Web Rapid Prototyping (Session 1)

Programming Methodology and Web Rapid Prototyping (Session 1). TC101 , 5 Sessions course, Conducted by Solvith http://solvith.com/ACJC. Today. Session 1 [25 May] Introduction to computing ( 30 mins ). History and Trends Overview of Web Service Delivery (1.5 Hours)

gamma
Télécharger la présentation

Programming Methodology and Web Rapid Prototyping (Session 1)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming Methodology and Web Rapid Prototyping (Session 1) TC101 , 5 Sessions course, Conducted by Solvith http://solvith.com/ACJC

  2. Today Session 1 [25 May] • Introduction to computing (30 mins). • History and Trends • Overview of Web Service Delivery (1.5 Hours) • Server-Side Language , dynamic web pages. The web infrastructure. HTTP protocols. Client-side Language • Lab setup (30 mins) • Acjctc.com lab setup • Introduction to PHP language (1.5 hour) • Control flows (If,loopsetc). Logic • Take-home Lab (3 Questions)

  3. The Computing Story • The Shortage Of Computing Professionals “According to one recent report, in the next decade American colleges will mint 40,000 graduates with a bachelor's degree in computer science, though the U.S. economy is slated to create 120,000 computing jobs that require such degrees. ” “Singapore is experiencing a severe drought of mobile app developers, much less skilled ones, according to industry voices ”

  4. The Computing Story • Tumblr $1.1B, David Karp (26 Years Old) • Summly , $30M ,Nick D’Aloisio (17 Years Old) • FB ,Zuckerberg, $13.3b net worth , (29 years old) • YT , Chad Hurley, 1.65b (now 35 years old) • Instagram , Kevin Systrom1b acqusition (29 years old) (Reading: Facebook Effect , Chp1)

  5. History • http://www.youtube.com/watch?v=UHGF_BQi1PM

  6. 1945 – Vannevar Bush writes about “memex”, a futuristic, automatic, personal library system 1960s – Advanced Research Projects Agency (ARPA) does research on “internetwork”, connecting small and large networks

  7. “The Demo” 1968 – Doug Engelbartdemonstrates NLS, a hypertext system that uses a “mouse” http://technologyyz.blogspot.com/2012/12/engelbart-mouse.html

  8. 1969 – ARPANET goes online with 4 nodes Dec 1969 June 1970 Dec 1970 Sept 1971 Aug 1972 June 1975 http://www.mappingcyberspace.com/gallery/figure1_2.html

  9. 1971 – Ray Tomlinson sends first e-mail (sent to himself and probably read “QWERTYUIOP”) • 1972 – Telnet allows user to login to a remote computer • 1973 – FTP (File Transfer Protocol) allows files to be transferred between computers • 1981 – ARPANET (Internet) has 200 nodes

  10. 1982 – ARPANET standardizes its use of TCP/IP (Transmission Control Protocol / Internet Protocol) to send data packets across the network • 1984 – Over 1000 nodes on Internet • 1986 – Over 10,000 nodes on Internet. Govt splits ARPANET into MILNET (military-only network) and turns over ARPANET to NSF (National Science Foundation).

  11. 1988 – Over 100,000 nodes on Internet • 1988 – First Internet worm by Robert Tappan Morris crashes 6% of servers on Internet Figure by Roy Brander at http://www.cuug.ab.ca/~branderr/csce/Ihistory.html

  12. Images: http://www.radford.edu/sjennings15/text.htm http://en.wikipedia.org/wiki/Tim_Berners-Lee • 1990 – Tim Berners-Lee and others at CERN develop the WorldWideWeb (WWW), HTML documents transmitted over the Internet by a web server to web browsers using URIs and HTTP (1st web page online on Aug 6, 1991)

  13. Image: http://en.wikipedia.org/wiki/File:NCSAMosaic1.0Mac.png • 1992 – ViolaWWW browser for UNIX. 50 web servers • 1993 – 500 web serversMosaic web browser – multi-platform and1st browser to display inline images, written by Marc Andreesen

  14. 1994 – 2,500 web serversWWW Consortium (W3C) beganNetscape 1.0 Yahoo! Web directory started by Jerry Yang and David Filo

  15. Image: http://en.wikipedia.org/wiki/File:Internet_Explorer_1.0.png • 1995 – VRML (Virtual Reality Markup Language) releasedNetscape 2.0 – Supported plug-ins, frames, Java applets, JavaScriptInternet Explorer 1.0 released by Microsoft

  16. 1996 – Macromedia Flash 1.0 (previously called FutureSplash Animator) Internet Archive begins archiving the Web

  17. “Netscape 72, Microsoft 18” Image: http://home.snafu.de/tilman/mozilla/stomps.html 1997 – HTML 4.0 de facto standardBrowser Wars I: Netscape vs. IE

  18. 1998 – Network Solutions registers 2 millionth domain nameEmergence of <XML>Google founded by Larry Page and Sergey Brin

  19. 1999 – Over 5 million domain namesInternet growth rate is approximately one computer added per secondInternet2 (code name Abilene) debuts • 2000 – Napster sued over music sharingWeb size estimates by NEC-RI and Inktomi surpass 1 billion indexable pages.XHTML 1.0 recommended by W3C

  20. 2002 – Approximately 45 million web sitesBlogs become popular The Political Blogosphere and the 2004 U.S. Election by Adamic & Glance

  21. Image: http://www.engadget.com/2007/10/16/apple-officially-cuts-drm-free-track-prices-to-99/ • 2003 – iTunes.com and other legal Internet music downloading services appear. iTunes.com registers 25th million song download in Dec (“Let It Snow! Let It Snow! Let It Snow!” by Frank Sinatra).

  22. Image: http://www.lbl.gov/ITSD/CIS/compnews/2003/August/01-Sobig-worm.html • 2003 – Securityproblems • SQL Slammer worm - largest and fastest spreading distributed denial of service (DDoS) attacks ever • Sobig.F virus - the fastest spreading virus ever • Blaster (MSBlast) worm – one of the most damaging worms ever

  23. 2004 – MySpace and Facebook popularize online social networking

  24. Image: http://www.usatoday.com/tech/news/2006-10-11-youtube-karim_x.htm • 2005 – YouTube founded by three former PayPal employees and sold to Google the next year for $1.65B

  25. 2006 – Time Magazine’s person of the year: You. Acknowledges significance of user- generated content (Web 2.0)

  26. 2007 – One of the first massive cyber attacks: Estonian websites attacked by Russian hackers after relocating the Bronze Solider of Tallinn monument Image: http://en.wikipedia.org/wiki/File:Tallinn_Bronze_Soldier_-_May_2006_-_029.jpg • 2006 – Twitter launches 140 character limit micro-blogging service; ignites use of URL shortening serviceshttp://bit.ly/c1htE

  27. Image: http://en.wikipedia.org/wiki/File:Browser_Wars.svg 2008 – Firefox 3 sets Guinness World Record for the “largest number of software downloads in 24 hours.” (8 million downloads)

  28. Image: http://www.google.com/googlebooks/chrome/big_04.html 2008 – Google releases their own web browser called Chrome

  29. 2008 – W3C releases First Public Working Draft of HTML5 spec 2012 – Mobile devices account for 10% of all web page views (StatCounter)ICANN reveals 1,410 new generic top-level domains (gTLDs) like .apple, .catholic, and .dad

  30. http://www.youtube.com/watch?v=eZSPWDMn730&list=PLC40D55C3253816C3http://www.youtube.com/watch?v=eZSPWDMn730&list=PLC40D55C3253816C3

  31. Big Trend • Data Analytics (Very Hot !) • Big Data • AI Financial Traders • Energy Analytics • Business Intelligence • Wearable Computers • Google goggles • Cloud Computing

  32. The Anatomy Of A Web Request • “Many Requests” • Request 1 • Download page (Now it knows it has to download pictures and video) • Request 2 • Download the Pictures • Request 3 • Request for Video Stream TEXT Pictures VIDEO

  33. Client Scripting Web Service Delivery Infrastructure WWW Database Server GET facebook.com (HTTP) (Query Language) Eg: SQL (Server-sided Scripting) Eg: PHP Facebook HTTP Server DNS SERVER CGI Server (User Agent) eg: Firefox Browser FILE SERVER

  34. HTTP Request Example1: GET / HTTP/1.1 <blank line> Example2: HEAD / HTTP/1.1 Accept: */* Connection: Keep-Alive Host: somehost.com User-Agent: Generic <blank line>

  35. HTTP Request • Mainly two types of HTTP Request • GET , POST • Get is usually through url • Eg: www.example.com?page=page_1 • Post is through forms (Chrome Demo)

  36. Client-Sided Scripting • Scripting that occurs on the client side • Processed by the browser • We use HTML , Hyper Text Marked Up Language • And sometimes Javascript • AJAX is a javascript component.

  37. Server-Sided Scripting • Scripting that occurs on the Server side • Processed by the server(Or generally shifted to cloud) • Sometimes called CGI • Typically more complex, sometimes involve connection to DB • EG: PHP , ASP.NET , .JS etc..

  38. Computing Methodology • An algorithm is a well-defined computational procedure consisting of a set of instructions, that takes some value or set of values, as input, and produces some value or set of values, as output. Algorithm Input Output

  39. Algorithm • Each step of an algorithm must be exact. • An algorithm must terminate. • An algorithm must be effective. • An algorithm must be general. • Can be presented in pseudo-code or flowchart.

  40. Find maximum and average of a list of numbers (1/2) • Pseudo-code sumcount 0 // sum = sum of numbers // count = how many numbers are entered? max 0 // max to hold the largest value eventually for each num entered, countcount + 1 sumsum + num if num > max then maxnum avesum / count print max, ave Are there any errors in this algorithm?

  41. Find maximum and average of a list of numbers (1/2) Terminator box • Flowchart start Process box sumcount  0 max  0 Decision box end of input? Yes No increment count sum sum + num ave sum/count No Yes print max, ave max num num > max? No end

  42. Data Representation • Internal representation: bits (binary digits) 0 and 1 • 1 byte = 8 bits • We will not deal with bit level and bit operations • Data types (lists here are not exhaustive): • Integers: • Real numbers: • Characters: char • Strings • A variable holds some data and it belongs to a data type and occupies some memory space, shown as a box in the following slides.

  43. Data Representation

  44. Variables used: num1 num2 final1 final2 Algorithm: Example • Example : Arrange two integers in increasing order (sort). Algorithm A: enter values for num1, num2 // Assign smaller number into final1, // larger number into final2 if (num1 < num2) then final1num1 final2num2 else final1num2 final2num1 // Transfer values in final1, final2 back to num1, num2 num1final1 num2 final2 // Display sorted integers print num1, num2

  45. Euclidean algorithm • First documented algorithm by Greek mathematician Euclid in 300 B.C. • To compute the GCD (greatest common divisor) of two integers. • Let A and B be integers with A > B ≥ 0. • If B = 0, then the GCD is A and algorithm ends. • Otherwise, find q and r such that • A = q.B + r where 0 ≤ r < B • 4. Replace A by B, and B by r. Go to step 2.

  46. Prime Number Checker • Prompt Student for pseudo code..

  47. Step-wise Refinement (1/3) • From the examples, we see that in general an algorithm comprises three steps: • Input (read data) • Compute (process input data to generate some answers) • Output (display answers) • The ‘compute’ step is the most complex. • Step-wise refinement – break down a complex step into smaller steps.

  48. The History of PHP • Rasmus Lerdorf • Not a trained computer scientist • Consultant building dynamic web sites - got tired of doing the same thing over and over in C • Reusable bits + HTML Templates http://www.vimeo.com/6215179

  49. Science Calculations System System C uses curly braces { } for code blocks. Scripting/ Interpreted http://en.wikipedia.org/wiki/History_of_programming_languages

  50. Request / Response Cycle • You enter http://server.com into your browser’s address bar. • Your browser looks up the IP address for server.com. • Your browser issues a request for the home page at server.com. • The request crosses the Internet and arrives at the server.com web server. • The web server, having received the request looks for the web page on its hard disk. • The web page is retrieved by the server and returned to the browser. • Your browser displays the web page.

More Related