CS 10: Problem solving via Object Oriented Programming. Web Services
|
|
- Martin Atkins
- 6 years ago
- Views:
Transcription
1 CS 10: Problem solving via Object Oriented Programming Web Services
2 Big picture: query online photo database Flickr and display results Overview Give me pictures of cats Your computer Flickr photo database Flickr is an online photo database Internet Click next Ok, here you go Click next 2
3 DEMO: FlickrSearch.java Ask Flickr for photos matching search term Get back XML stream with data on all photos in Flickr database matching search term Fetch each photo described in XML data and display one of them 3
4 Agenda 1. Graphical user interface 2. GeSng stuff from the web 3. Web services 4. Processing XML 5. Finished product 4
5 CreaVng Graphical User Interfaces (GUIs) involves graphical elements and listeners 1. Graphical elements are items on the screen the user can interact with Found in Abstract Window Toolkit (AWT) and Swing libraries Provide a wide variety of items such as bu\ons, text fields, combo boxes Pla^orm (e.g., Windows, Mac) and device independent 2. Listeners respond to user input such as clicking or entering text on graphical elements 5
6 Java graphical elements consists of Containers and Components Containers JFrame Components JTextField JComboBox JBu\on JPanel Containers can hold other containers or components JComponent May be nested Adding these elements manually is tedious Graphic design tools make life easier Today we do it the old fashioned way 6
7 As with Blobs, a GUI program will start running and wait for events to occur FlickrSearchCore.java Like Blob GUI programs, this one will start a program running, then wait for events Steps to take: 1. Create graphical elements (e.g., buions, combo box) 2. Add event listeners that look for events such as mouse presses to occur on graphical elements and provide handling code 7
8 Step 1: Create graphical elements FlickrSearchCore.java Extends JFrame Set JComponent size Create JComponent container hold images JFrame Content Pane holds Containers Common boilerplate Will add code here to display images in JComponent Create a panel to hold buions (setupgui() is our method on next slides) Add JPanel (buion panel) and JComponent (images) to Content Pane JFrame creates a blank window with a Otle 8
9 Step 2: Add event listeners that wait for events on graphical elements // create button control JButton search = new JButton("search"); //add listener if action taken on button (e.g., clicked) search.addactionlistener(new AbstractAction() { public void actionperformed(actionevent e) { // this will run if action taken on button System.out.println("search button ); } }); Listeners are called back when event fires Located in awt.event.* (import this) Create search JBuIon graphical element Add a listener that will fire when the buion is clicked Here just print that buion was clicked AcOonEvent is an Object that gives details about the event that just occurred (e.g., buion click) 9
10 Set up JPanel that holds bu\ons, text and drop down box FlickrSearchCore.java Creates JPanel to hold buions and dropdown control Create prev JbuIon and listener that fires when buion clicked Create drop down list Create JTextField Will search for photos with keywords entered here Finally add all elements to JPanel and return Create search JBuIon and listener Will search for photos with keywords from JTextField
11 Agenda 1. Graphical user interface 2. GeSng stuff from the web 3. Web services 4. Processing XML 5. Finished product 11
12 To transfer data between computers we use pre- defined protocols Network protocols Protocols define up front how data will be exchanged so everyone knows the rules There are dozens of protocols used for different purposes: TCP/IP, FTP Wi- Fi, Bluetooth HyperText Transfer Protocol (HTTP) is the protocol commonly used by the World Wide Web to get HyperText Markup Language (HTML) documents that describe how to render a web page We use a Uniform Resource LocaVon (URL) to specify what page we want to get: h\p:// Protocol: how we will talk (hip) Computer that has data Directory where data located File (assume index.html or index.php if not provided) 12
13 Client makes a request to a Server for a resource; Server responds to request Process Give me this file: h\p:// Your browser Web server Browser interprets HTML text and renders page Sure, I have that file, here you go: <!DOCTYPE html PUBLIC "- //W3C//DTD XHTML 1.0 Strict//EN" "h\p:// strict.dtd"> <html xmlns="h\p:// xml:lang="en" lang="en"> <head> <meta h\p- equiv="content- type" content="text/html;charset=u^- 8" /> <Vtle>CS 10 Problem solving Winter 2018</Vtle> </head> <body> <div id="page"> <div id="header"> <div id="vtle">cs 10, Winter 2018</div> <div id="subvtle">problem Solving via Object Oriented Programming</div> </div> A web page is simply a text document with a descripoon of what to display on the screen (maybe some Javascript for user interacoon) in a format called HTML 13
14 Java makes it easy to get HyperText Markup Language (HTML) from the web WWWGetTry.java public class WWWGetTry { public static void main(string[] args) { try { // Create the URL; can throw MalformedURL URL url = new URL(" System.out.println("*** getting " + url); Create BufferedReader to read from URL like reading from file Close reader in finally block // Create the reader for the stream; can throw IO BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream())); // Read the lines; can throw IO try { String line; while ((line = in.readline())!= null) { System.out.println(line); } } // Be sure to close the reader, whether or not reading was successful finally { in.close(); } } catch (MalformedURLException e) { System.err.println("bad URL"); Catch bad URL } catch (IOException e) { System.err.println("problem opening/reading/closing"); } Tell Java where to look for HTML LocaOon called URL Uniform Resource LocaOon Read HTML line by line URL: Protocol hip Server cs.dartmouth.edu LocaOon /~tjp/cs10/index.php Catch network errors } } System.out.println("*** done"); 14
15 DEMO: WWWGetTry.java Read data from CS web server Get HTML at: h\p:// Write HTML to console line by line 15
16 Agenda 1. Graphical user interface 2. GeSng stuff from the web 3. Web services 4. Processing XML 5. Finished product 16
17 We can use web services to get data (as opposed to HTML) from a server Web service process Give me this data: h\p:// LocaOon Web service end point Parameters in query string provided to server Web server Sure, I have that data, here you go: XML OR JSON <Person> <name>tim</name> <class>2021</class> </Person> Your computer { Person : { name : Tim, class :2021} } REST (RepresentaVonal State Transfer) uses HTTP to transfer data 17
18 Server- side REST web service can return data that does not have to be HTML Enter the following addresses in web browser h\p://cs.dartmouth.edu/~tjp/cs10/hello.php?name=vm h\p://cs.dartmouth.edu/~tjp/cs10/hello.php?name=vm&color=blue Causes this code to run on server <?php $name = $_GET['name']; $color = $_GET['color']; if (isset($color)) {?> } else { PHP can extract query string parameters Here $name = Om and $color = null or blue echo 'Hello there '.$name.', thanks for stopping by. My favorite color is '.$color. ' too! '; Echo sends string back to client Different string returned if color provided (or not) echo 'Hello there '.$name.', thanks for stopping by!'; } There are several standard formats for data (e.g., XML, JSON) (This doesn t use one of those, next secoon does) PHP is a server- side programming language (e.g., code runs on a server) Previous Java was client- side code (e.g., code run on our laptops) Java provides query string parameters and asks PHP for data based on 18 those parameters
19 DEMO: Use browser to get non- HTML message from CS web server Start web browser (e.g., Chrome, Firefox) Enter url: h\p:// name=vm h\p:// name=vm&color=blue 19
20 Agenda 1. Graphical user interface 2. GeSng stuff from the web 3. Web services 4. Processing XML 5. Finished product 20
21 extensible Markup Language (XML) is a popular way of represenvng data Sample XML for course enrollment <enrollment> <course department="cs" number="1" term= 18W"> <student name="alice" year="20" /> <student name="bob" year="19" /> <student name="charlie" year="18" /> </course> <course department="cs" number="10" term= 18W"> <student name="delilah" year="19" /> <student name="elvis" year="00" /> <student name="flora" year="20" /> </course> </enrollment> Start of enrollment tag begins with < End of enrollment tag begins with </ XML XML groups data with an opening and closing tag 21
22 extensible Markup Language (XML) is a popular way of represenvng data Sample XML for course enrollment <enrollment> <course department="cs" number="1" term= 18W"> <student name="alice" year="20" /> <student name="bob" year="19" /> <student name="charlie" year="18" /> </course> <course department="cs" number="10" term= 18W"> <student name="delilah" year="19" /> <student name="elvis" year="00" /> <student name="flora" year="20" /> </course> </enrollment> XML XML groups data with an opening and closing tag Tags can be nested Start of enrollment tag begins with < End of enrollment tag begins with </ Nested tag called course for CS 1 22
23 extensible Markup Language (XML) is a popular way of represenvng data Sample XML for course enrollment <enrollment> <course department="cs" number="1" term= 18W"> <student name="alice" year="20" /> <student name="bob" year="19" /> <student name="charlie" year="18" /> </course> <course department="cs" number="10" term= 18W"> <student name="delilah" year="19" /> <student name="elvis" year="00" /> <student name="flora" year="20" /> </course> </enrollment> XML XML groups data with an opening and closing tag Tags can be nested Start of enrollment tag begins with < End of enrollment tag begins with </ Nested tag called course for CS 1 Another nested tag called course for CS 10 23
24 extensible Markup Language (XML) is a popular way of represenvng data Sample XML for course enrollment Course tag aiributes: department = CS, number = 1, term = 18W <enrollment> <course department="cs" number="1" term= 18W"> <student name="alice" year="20" /> <student name="bob" year="19" /> <student name="charlie" year="18" /> </course> <course department="cs" number="10" term= 18W"> <student name="delilah" year="19" /> <student name="elvis" year="00" /> <student name="flora" year="20" /> </course> </enrollment> XML XML groups data with an opening and closing tag Tags can be nested Tags can have aiributes 24
25 extensible Markup Language (XML) is a popular way of represenvng data Sample XML for course enrollment Course tag aiributes: department = CS, number = 1, term = 18W <enrollment> <course department="cs" number="1" term= 18W"> <student name="alice" year="20" /> <student name="bob" year="19" /> <student name="charlie" year="18" /> </course> <course department="cs" number="10" term= 18W"> <student name="delilah" year="19" /> <student name="elvis" year="00" /> <student name="flora" year="20" /> </course> </enrollment> Student tags aiributes: name= Flora, year= 20 XML XML groups data with an opening and closing tag Tags can be nested Tags can have aiributes 25
26 extensible Markup Language (XML) is a popular way of represenvng data Sample XML for course enrollment <enrollment> <course department="cs" number="1" term= 18W"> <student name="alice" year="20" /> <student name="bob" year="19" /> <student name="charlie" year="18" /> </course> <course department="cs" number="10" term= 18W"> <student name="delilah" year="19" /> <student name="elvis" year="00" /> <student name="flora" year="20" /> </course> </enrollment> XML XML groups data with an opening and closing tag Tags can be nested Tags can have a\ributes Typically web services provide documentaoon to help you interpret the aiributes
27 Flickr uses XML to return informavon about photos it stores Simplified Flickr XML data from search Querying Flickr for dartmouth URL (protocol, server, locaoon) h\ps://api.flickr.com/services/rest/? method=flickr.photos.search&api_key=keyhere&text=dartmouth&sort=relevance&per_page=10 Query string: method = search photos (flickr.photos.search) api_key = find on Canvas under Pages text = find photos matching this text (dartmouth) sort = by relevance, by date, etc (relevance) per_page = how many photos to return (10) 27
28 Flickr uses XML to return informavon about photos it stores Simplified Flickr XML data from search Querying Flickr for dartmouth h\ps://api.flickr.com/services/rest/? method=flickr.photos.search&api_key=keyhere&text=dartmouth&sort=relevance&per_page=10 Returns XML with informaoon about photos of Dartmouth <rsp stat="ok"> <photos page="1" pages="1111" perpage="10" total="11106"> <photo id=" " secret=" " server="3245" farm="4" /> <photo id=" " secret="c9428b8fb3" server="3434" farm="4" />... </photos> </rsp> 28
29 Flickr uses XML to return informavon about photos it stores Simplified Flickr XML data from search Querying Flickr for dartmouth h\ps://api.flickr.com/services/rest/? method=flickr.photos.search&api_key=keyhere&text=dartmouth&sort=relevance&per_page=10 Returns XML with informaoon about photos of Dartmouth Response status is ok <rsp stat="ok"> <photos page="1" pages="1111" perpage="10" total="11106"> <photo id=" " secret=" " server="3245" farm="4" /> <photo id=" " secret="c9428b8fb3" server="3434" farm="4" />... </photos> </rsp> Each photo (singular) in its own photo tag with informaoon describing that photo and where to find it All matching photos (plural) grouped into photos tag 29
30 Flickr uses XML to return informavon about photos it stores Simplified Flickr XML data from search Querying Flickr for dartmouth h\ps://api.flickr.com/services/rest/? method=flickr.photos.search&api_key=keyhere&text=dartmouth&sort=relevance&per_page=10 Returns XML with informaoon about photos of Dartmouth <rsp stat="ok"> <photos page="1" pages="1111" perpage="10" total="11106"> <photo id=" " secret=" " server="3245" farm="4" /> <photo id=" " secret="c9428b8fb3" server="3434" farm="4" />... </photos> </rsp> Flickr documentaoon says that photos can be retrieved with: h\p://farm{farm- id}.stavcflickr.com/{server- id}/{id}_{secret}.jpg h\p://farm4.stavcflickr.com/3245/ _ jpg 30
31 Agenda 1. Graphical user interface 2. GeSng stuff from the web 3. Web services 4. Processing XML 5. Finished product 31
32 FlickrSearch.java: finished product expands upon FlickrSearchCore.java FlickrSearch.java Get API key from Canvas (don t abuse it!) Will load all Flickr images into ArrayList of BufferedImages called images curr will hold the index of image currently displayed If we have some images (images.size > 0) draw the image at index curr in the canvas JComponent paintcomponent() fires on repaint() Just like with WanderingImage Blobs 32
33 FlickrSearch.java: finished product expands upon FlickrSearchCore.java FlickrSearch.java Setup previous graphical buion as before, but now add program logic If prev buion pressed, go to prior image (loop to last if at image 0) repaint() causes canvas to redraw and display the image in ArrayList images at index curr Next buion similar to previous buion 33
34 FlickrSearch.java: finished product expands upon FlickrSearchCore.java FlickrSearch.java Setup drop down combo box to track how Flickr should sort photos Each Ome drop down changes, sort instance variable updates When search buion clicked, get search text in queryf JTextField Then call loadimages method passing query text from queryf to get images from Flickr (next slide) Set current image to 0 and repaint() 34
35 FlickrSearch.java: finished product expands upon FlickrSearchCore.java FlickrSearch.java Start with search query entered by user Build request URL with query string parameters Use URLEncoder to handle spaces in String query Create new BufferedReader and read Flickr s response to request Clean up non- standard XML in collectstring() this is a hack! Loop over all photo returned Follow Oracle s example to set up XML parser Extract farm, server, and secret data elements about each photo Fetch photo and add to images ArrayList 35
36 36
37 37
Input from Files. Buffered Reader
Input from Files Buffered Reader Input from files is always text. You can convert it to ints using Integer.parseInt() We use BufferedReaders to minimize the number of reads to the file. The Buffer reads
More informationTopic 9: Swing. Swing is a BIG library Goal: cover basics give you concepts & tools for learning more
Swing = Java's GUI library Topic 9: Swing Swing is a BIG library Goal: cover basics give you concepts & tools for learning more Assignment 5: Will be an open-ended Swing project. "Programming Contest"
More informationTopic 9: Swing. Why are we studying Swing? GUIs Up to now: line-by-line programs: computer displays text user types text. Outline. 1. Useful & fun!
Swing = Java's GUI library Topic 9: Swing Swing is a BIG library Goal: cover basics give you concepts & tools for learning more Why are we studying Swing? 1. Useful & fun! 2. Good application of OOP techniques
More informationCOMP 213. Advanced Object-oriented Programming. Lecture 20. Network Programming
COMP 213 Advanced Object-oriented Programming Lecture 20 Network Programming Network Programming A network consists of several computers connected so that data can be sent from one to another. Network
More informationAdvanced Java Programming. Networking
Advanced Java Programming Networking Eran Werner and Ohad Barzilay Tel-Aviv University Advanced Java Programming, Spring 2006 1 Overview of networking Advanced Java Programming, Spring 2006 2 TCP/IP protocol
More informationWeb Design and Development ACS-1809
Web Design and Development ACS-1809 Chapter 1 9/11/2018 1 Pre-class Housekeeping Course Outline Text book : HTML A beginner s guide, Wendy Willard, 5 th edition Work on HTML files On Windows PCs Tons of
More informationCS 251 Intermediate Programming GUIs: Components and Layout
CS 251 Intermediate Programming GUIs: Components and Layout Brooke Chenoweth University of New Mexico Fall 2017 import javax. swing.*; Hello GUI public class HelloGUI extends JFrame { public HelloGUI ()
More informationCSCI 136: Fundamentals of Computer Science II Keith Vertanen Copyright 2012
Web clients in Java CSCI 136: Fundamentals of Computer Science II Keith Vertanen Copyright 2012 The World Wide Web History Main components: URLs, HTTP Protocol, HTML Web support in Java Overview Connecting
More informationGraphical User Interface (GUI)
Graphical User Interface (GUI) An example of Inheritance and Sub-Typing 1 Java GUI Portability Problem Java loves the idea that your code produces the same results on any machine The underlying hardware
More informationCS 106A, Lecture 25 Life After CS 106A, Part 1
CS 106A, Lecture 25 Life After CS 106A, Part 1 This document is copyright (C) Stanford Computer Science and Marty Stepp, licensed under Creative Commons Attribution 2.5 License. All rights reserved. Based
More informationAnnouncements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted
Announcements 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted 2. Campus is closed on Monday. 3. Install Komodo Edit on your computer this weekend.
More informationAnnouncements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted
Announcements 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted 2. Install Komodo Edit on your computer right away. 3. Bring laptops to next class
More informationH212 Introduction to Software Systems Honors
Introduction to Software Systems Honors Lecture #19: November 4, 2015 1/14 Third Exam The third, Checkpoint Exam, will be on: Wednesday, November 11, 2:30 to 3:45 pm You will have 3 questions, out of 9,
More informationIntroduction to HTML5
Introduction to HTML5 History of HTML 1991 HTML first published 1995 1997 1999 2000 HTML 2.0 HTML 3.2 HTML 4.01 XHTML 1.0 After HTML 4.01 was released, focus shifted to XHTML and its stricter standards.
More informationBeginning HTML. The Nuts and Bolts of building Web pages.
Beginning HTML The Nuts and Bolts of building Web pages. Overview Today we will cover: 1. what is HTML and what is it not? Building a simple webpage Getting that online. What is HTML? The language of the
More informationIntroduction This assignment will ask that you write a simple graphical user interface (GUI).
Computing and Information Systems/Creative Computing University of London International Programmes 2910220: Graphical Object-Oriented and Internet programming in Java Coursework one 2011-12 Introduction
More informationMicronet International College
Micronet International College Level 4 Diploma in Computing Designing and Developing a Website (DDW) Test 1 (20%) Name: /50 Class: QUESTION 1 a) I) What are W3C standards? 1 Specifications or descriptions
More informationOutline. Topic 9: Swing. GUIs Up to now: line-by-line programs: computer displays text user types text AWT. A. Basics
Topic 9: Swing Outline Swing = Java's GUI library Swing is a BIG library Goal: cover basics give you concepts & tools for learning more Assignment 7: Expand moving shapes from Assignment 4 into game. "Programming
More informationThe JFrame Class Frame Windows GRAPHICAL USER INTERFACES. Five steps to displaying a frame: 1) Construct an object of the JFrame class
CHAPTER GRAPHICAL USER INTERFACES 10 Slides by Donald W. Smith TechNeTrain.com Final Draft 10/30/11 10.1 Frame Windows Java provides classes to create graphical applications that can run on any major graphical
More informationHistory of the Internet. The Internet - A Huge Virtual Network. Global Information Infrastructure. Client Server Network Connectivity
History of the Internet It is desired to have a single network Interconnect LANs using WAN Technology Access any computer on a LAN remotely via WAN technology Department of Defense sponsors research ARPA
More informationCS 11 java track: lecture 3
CS 11 java track: lecture 3 This week: documentation (javadoc) exception handling more on object-oriented programming (OOP) inheritance and polymorphism abstract classes and interfaces graphical user interfaces
More informationGIMP WEB 2.0 MENUS. Before we begin this tutorial let s visually compare a standard navigation bar and a web 2.0 navigation bar.
GIMP WEB 2.0 MENUS Before we begin this tutorial let s visually compare a standard navigation bar and a web 2.0 navigation bar. Standard Navigation Bar Web 2.0 Navigation Bar Now the all-important question
More informationEvent Driven Programming
Event Driven Programming Part 1 Introduction Chapter 12 CS 2334 University of Oklahoma Brian F. Veale 1 Graphical User Interfaces So far, we have only dealt with console-based programs Run from the console
More informationIntroduction to Computer Science I
Introduction to Computer Science I Graphics Janyl Jumadinova 7 February, 2018 Graphics Graphics can be simple or complex, but they are just data like a text document or sound. Java is pretty good at graphics,
More informationProtocols. Networking CS 3470, Section 1 Sarah Diesburg
Protocols Networking CS 3470, Section 1 Sarah Diesburg Applications Applications need their own protocols Just like we are writing our network programs with a certain specification so that any two randomly-chosen
More informationXAP: extensible Ajax Platform
XAP: extensible Ajax Platform Hermod Opstvedt Chief Architect DnB NOR ITUD Hermod Opstvedt: XAP: extensible Ajax Platform Slide 1 It s an Ajax jungle out there: XAML Dojo Kabuki Rico Direct Web Remoting
More informationGraphical User Interfaces (GUIs)
CMSC 132: Object-Oriented Programming II Graphical User Interfaces (GUIs) Department of Computer Science University of Maryland, College Park Model-View-Controller (MVC) Model for GUI programming (Xerox
More informationCS11 Java. Fall Lecture 4
CS11 Java Fall 2014-2015 Lecture 4 Java File Objects! Java represents files with java.io.file class " Can represent either absolute or relative paths! Absolute paths start at the root directory of the
More informationpowered by Series of Tubes Senator Ted Stevens talking about the Net Neutrality Bill Jul 17, powered by
Page 1 Lecture Notes 1: The Internet and World Wide Web CSE 190 M (Web Programming), Spring 2007 University of Washington Reading: Sebesta Ch. 1 sections 1.1-1.5.2, 1.7-1.8.5, 1.8.8, 1.9 What is the Internet?
More informationHyperText Markup Language (HTML)
HyperText Markup Language (HTML) Mendel Rosenblum 1 Web Application Architecture Web Browser Web Server / Application server Storage System HTTP Internet LAN 2 Browser environment is different Traditional
More informationCOMP 3400 Programming Project : The Web Spider
COMP 3400 Programming Project : The Web Spider Due Date: Worth: Tuesday, 25 April 2017 (see page 4 for phases and intermediate deadlines) 65 points Introduction Web spiders (a.k.a. crawlers, robots, bots,
More informationLecture 5: Java Graphics
Lecture 5: Java Graphics CS 62 Spring 2019 William Devanny & Alexandra Papoutsaki 1 New Unit Overview Graphical User Interfaces (GUI) Components, e.g., JButton, JTextField, JSlider, JChooser, Containers,
More informationHeavyweight with platform-specific widgets. AWT applications were limited to commonfunctionality that existed on all platforms.
Java GUI Windows Events Drawing 1 Java GUI Toolkits Toolkit AWT Description Heavyweight with platform-specific widgets. AWT applications were limited to commonfunctionality that existed on all platforms.
More informationPart 3: Graphical User Interface (GUI) & Java Applets
1,QWURGXFWLRQWR-DYD3URJUDPPLQJ (( Part 3: Graphical User Interface (GUI) & Java Applets EE905-GUI 7RSLFV Creating a Window Panels Event Handling Swing GUI Components ƒ Layout Management ƒ Text Field ƒ
More informationCS 10: Problem solving via Object Oriented Programming. Client/Server
CS 10: Problem solving via Object Oriented Programming Client/Server Agenda 1. Sockets 2. Server 3. MulAthreaded server 4. Chat server 2 Sockets are a way for computers to communicate IP: 1.2.3.4 HTTP
More informationVirtualians.ning.pk. 2 - Java program code is compiled into form called 1. Machine code 2. native Code 3. Byte Code (From Lectuer # 2) 4.
1 - What if the main method is declared as private? 1. The program does not compile 2. The program compiles but does not run 3. The program compiles and runs properly ( From Lectuer # 2) 4. The program
More informationWhat is XHTML? XHTML is the language used to create and organize a web page:
XHTML Basics What is XHTML? XHTML is the language used to create and organize a web page: XHTML is newer than, but built upon, the original HTML (HyperText Markup Language) platform. XHTML has stricter
More informationChapter 13. Applets and HTML. HTML Applets. Chapter 13 Java: an Introduction to Computer Science & Programming - Walter Savitch 1
Chapter 13 Applets and HTML HTML Applets Chapter 13 Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Overview Applets: Java programs designed to run from a document on the Internet
More informationCSE 331 Software Design & Implementation
CSE 331 Software Design & Implementation Kevin Zatloukal Summer 2017 Java Graphics and GUIs (Based on slides by Mike Ernst, Dan Grossman, David Notkin, Hal Perkins, Zach Tatlock) Review: how to create
More informationWeb Site Design and Development. CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM
Web Site Design and Development CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM By the end of this course you will be able to Design a static website from scratch Use HTML5 and CSS3 to build the site you
More informationintroduction to XHTML
introduction to XHTML XHTML stands for Extensible HyperText Markup Language and is based on HTML 4.0, incorporating XML. Due to this fusion the mark up language will remain compatible with existing browsers
More informationTutorial 1: HTML Tutorial (Windows Version) HTML (Hypertext Markup Language) Basics Objectives
1 Tutorial 1: HTML Tutorial (Windows Version) HTML (Hypertext Markup Language) Basics Objectives In this HTML Tutorial, we will introduce you to the tools used to create, save, view and print a Web page.
More informationToday. cisc3120-fall2012-parsons-lectiii.3 2
MORE GUI COMPONENTS Today Last time we looked at some of the components that the: AWT Swing libraries provide for building GUIs in Java. This time we will look at several more GUI component topics. We
More informationHow browsers talk to servers. What does this do?
HTTP HEADERS How browsers talk to servers This is more of an outline than a tutorial. I wanted to give our web team a quick overview of what headers are and what they mean for client-server communication.
More informationWIRIS quizzes web services Getting started with PHP and Java
WIRIS quizzes web services Getting started with PHP and Java Document Release: 1 2010 december, Maths for More www.wiris.com Summary This document provides client examples for PHP and Java. Contents WIRIS
More informationCOMP-202 Unit 10: Basics of GUI Programming (Non examinable) (Caveat: Dan is not an expert in GUI programming, so don't take this for gospel :) )
COMP-202 Unit 10: Basics of GUI Programming (Non examinable) (Caveat: Dan is not an expert in GUI programming, so don't take this for gospel :) ) Course Evaluations Please do these. -Fast to do -Used to
More informationClass 16: The Swing Event Model
Introduction to Computation and Problem Solving Class 16: The Swing Event Model Prof. Steven R. Lerman and Dr. V. Judson Harward 1 The Java Event Model Up until now, we have focused on GUI's to present
More informationFrom administrivia to what really matters
From administrivia to what really matters Questions about the syllabus? Logistics Daily lectures, quizzes and labs Two exams and one long project My teaching philosophy...... is informed by my passion
More informationMidterm assessment - MAKEUP Fall 2010
M257 MTA Faculty of Computer Studies Information Technology and Computing Date: /1/2011 Duration: 60 minutes 1-Version 1 M 257: Putting Java to Work Midterm assessment - MAKEUP Fall 2010 Student Name:
More informationCS 5010: PDP. Lecture 11: Networks CS 5010 Fall 2017 Seattle. Adrienne Slaughter, Ph.D.
Lecture 11: Networks CS 5010 Fall 2017 Seattle CS 5010: PDP Adrienne Slaughter, Ph.D. ahslaughter@northeastern.edu Northeastern University 1 Agenda Networking Northeastern University 2 INTRODUCTION Northeastern
More informationJava Programming Lecture 6
Java Programming Lecture 6 Alice E. Fischer Feb 15, 2013 Java Programming - L6... 1/32 Dialog Boxes Class Derivation The First Swing Programs: Snow and Moving The Second Swing Program: Smile Swing Components
More informationCS637 Midterm Review
CS637 Midterm Review Coverage: Duckett Chapter 1-2: Basics: Can skip pp. 53-56 Chapter 3: Lists: all important Chapter 4:Links: all important Chapter 5:Images: can skip old code Chapter 6: Tables: all
More informationWeb Programming Paper Solution (Chapter wise)
Introduction to web technology Three tier/ n-tier architecture of web multitier architecture (often referred to as n-tier architecture) is a client server architecture in which presentation, application
More informationCS 231 Data Structures and Algorithms Fall Event Based Programming Lecture 06 - September 17, Prof. Zadia Codabux
CS 231 Data Structures and Algorithms Fall 2018 Event Based Programming Lecture 06 - September 17, 2018 Prof. Zadia Codabux 1 Agenda Event-based Programming Misc. Java Operator Precedence Java Formatting
More informationCome & Join Us at VUSTUDENTS.net
Come & Join Us at VUSTUDENTS.net For Assignment Solution, GDB, Online Quizzes, Helping Study material, Past Solved Papers, Solved MCQs, Current Papers, E-Books & more. Go to http://www.vustudents.net and
More informationCSE 331 Software Design & Implementation
CSE 331 Software Design & Implementation Hal Perkins Winter 2018 Java Graphics and GUIs 1 The plan Today: introduction to Java graphics and Swing/AWT libraries Then: event-driven programming and user interaction
More informationWelcome to CIS 068! 1. GUIs: JAVA Swing 2. (Streams and Files we ll not cover this in this semester, just a review) CIS 068
Welcome to! 1. GUIs: JAVA Swing 2. (Streams and Files we ll not cover this in this semester, just a review) Overview JAVA and GUIs: SWING Container, Components, Layouts Using SWING Streams and Files Text
More informationExample: CharCheck. That s It??! What do you imagine happens after main() finishes?
Event-Driven Software Paradigm Today Finish Programming Unit: Discuss Graphics In the old days, computers did exactly what the programmer said Once started, it would run automagically until done Then you
More informationWeb Security, Part 2
Web Security, Part 2 CS 161 - Computer Security Profs. Vern Paxson & David Wagner TAs: John Bethencourt, Erika Chin, Matthew Finifter, Cynthia Sturton, Joel Weinberger http://inst.eecs.berkeley.edu/~cs161/
More informationJava Programming. Computer Science 112
Java Programming Computer Science 112 Recap: Swing You use Window Builder to put Widgets together on a Layout. User interacts with Widgets to produce Events. Code in the Client Listens for Events to know
More informationControl Flow: Overview CSE3461. An Example of Sequential Control. Control Flow: Revisited. Control Flow Paradigms: Reacting to the User
CSE3461 Control Flow Paradigms: Reacting to the User Control Flow: Overview Definition of control flow: The sequence of execution of instructions in a program. Control flow is determined at run time by
More informationCONTENTS. Chapter 1 Getting Started with Java SE 6 1. Chapter 2 Exploring Variables, Data Types, Operators and Arrays 13
CONTENTS Chapter 1 Getting Started with Java SE 6 1 Introduction of Java SE 6... 3 Desktop Improvements... 3 Core Improvements... 4 Getting and Installing Java... 5 A Simple Java Program... 10 Compiling
More informationCSC 160 LAB 8-1 DIGITAL PICTURE FRAME. 1. Introduction
CSC 160 LAB 8-1 DIGITAL PICTURE FRAME PROFESSOR GODFREY MUGANDA DEPARTMENT OF COMPUTER SCIENCE 1. Introduction Download and unzip the images folder from the course website. The folder contains 28 images
More informationBeginning Web Site Design
Beginning Web Site Design Stanford University Continuing Studies CS 03 (Summer CS 21) Mark Branom branom@alumni.stanford.edu http://web.stanford.edu/people/markb/ Course Web Site: http://web.stanford.edu/group/csp/cs03/
More informationProgramming Language Concepts: Lecture 8
Programming Language Concepts: Lecture 8 Madhavan Mukund Chennai Mathematical Institute madhavan@cmi.ac.in http://www.cmi.ac.in/~madhavan/courses/pl2009 PLC 2009, Lecture 8, 11 February 2009 GUIs and event
More informationUnit 4 The Web. Computer Concepts Unit Contents. 4 Web Overview. 4 Section A: Web Basics. 4 Evolution
Unit 4 The Web Computer Concepts 2016 ENHANCED EDITION 4 Unit Contents Section A: Web Basics Section B: Browsers Section C: HTML Section D: HTTP Section E: Search Engines 2 4 Section A: Web Basics 4 Web
More informationCommand-Line Applications. GUI Libraries GUI-related classes are defined primarily in the java.awt and the javax.swing packages.
1 CS257 Computer Science I Kevin Sahr, PhD Lecture 14: Graphical User Interfaces Command-Line Applications 2 The programs we've explored thus far have been text-based applications A Java application is
More informationObject-Oriented Programming Design. Topic : Graphics Programming GUI Part I
Electrical and Computer Engineering Object-Oriented Topic : Graphics GUI Part I Maj Joel Young Joel.Young@afit.edu 15-Sep-03 Maj Joel Young A Brief History Lesson AWT Abstract Window Toolkit Implemented
More informationIntroduction to Graphical Interface Programming in Java. Introduction to AWT and Swing
Introduction to Graphical Interface Programming in Java Introduction to AWT and Swing GUI versus Graphics Programming Graphical User Interface (GUI) Graphics Programming Purpose is to display info and
More informationWindow Interfaces Using Swing Objects
Chapter 12 Window Interfaces Using Swing Objects Event-Driven Programming and GUIs Swing Basics and a Simple Demo Program Layout Managers Buttons and Action Listeners Container Classes Text I/O for GUIs
More informationCreating and Building Websites
Creating and Building Websites Stanford University Continuing Studies CS 21 Mark Branom branom@alumni.stanford.edu Course Web Site: http://web.stanford.edu/group/csp/cs21/ Week 1 Slide 1 of 28 Course Description
More informationSemantic Web Lecture Part 1. Prof. Do van Thanh
Semantic Web Lecture Part 1 Prof. Do van Thanh Overview of the lecture Part 1 Why Semantic Web? Part 2 Semantic Web components: XML - XML Schema Part 3 - Semantic Web components: RDF RDF Schema Part 4
More informationDistributed Systems COMP 212. Lecture 8 Othon Michail
Distributed Systems COMP 212 Lecture 8 Othon Michail HTTP Protocol Hypertext Transfer Protocol Used to transmit resources on the WWW HTML files, image files, query results, Identified by Uniform Resource
More informationOverview. Lecture 7: Inheritance and GUIs. Inheritance. Example 9/30/2008
Overview Lecture 7: Inheritance and GUIs Written by: Daniel Dalevi Inheritance Subclasses and superclasses Java keywords Interfaces and inheritance The JComponent class Casting The cosmic superclass Object
More informationGive one example where you might wish to use a three dimensional array
CS 110: INTRODUCTION TO COMPUTER SCIENCE SAMPLE TEST 3 TIME ALLOWED: 60 MINUTES Student s Name: MAXIMUM MARK 100 NOTE: Unless otherwise stated, the questions are with reference to the Java Programming
More informationWeb Technology for Test and Automation Applications
Web Technology for Test and Automation Applications Fanie Coetzer - FSE Demo Operator Technician Engineers Your boss Test Sequencer 3 Goal I know nothing I know what it takes to get started on web applications
More informationWindow Interfaces Using Swing Objects
Chapter 12 Window Interfaces Using Swing Objects Event-Driven Programming and GUIs Swing Basics and a Simple Demo Program Layout Managers Buttons and Action Listeners Container Classes Text I/O for GUIs
More informationCSCI-1680 WWW Rodrigo Fonseca
CSCI-1680 WWW Rodrigo Fonseca Based partly on lecture notes by Scott Shenker and John Jannotti Precursors 1945, Vannevar Bush, Memex: a device in which an individual stores all his books, records, and
More informationInstalling PHP on Windows 10 Bash and Starting a Local Server
Installing PHP on Windows 10 Bash and Starting a Local Server Bash on Ubuntu/Windows is a way to use a command line to run all kinds of programs (including git!). But we ll want a Bash terminal to run
More informationCSCI-1680 WWW Rodrigo Fonseca
CSCI-1680 WWW Rodrigo Fonseca Based partly on lecture notes by Sco2 Shenker and John Janno6 Administrivia HW3 out today Will cover HTTP, DNS, TCP TCP Milestone II coming up on Monday Make sure you sign
More informationThis page intentionally left blank
This page intentionally left blank arting Out with Java: From Control Structures through Objects International Edition - PDF - PDF - PDF Cover Contents Preface Chapter 1 Introduction to Computers and Java
More informationChapter 1. Introduction to web development and PHP. 2010, Mike Murach & Associates, Inc. Murach's PHP and MySQL, C1
1 Chapter 1 Introduction to web development and PHP 2 Applied Objectives Use the XAMPP control panel to start or stop Apache or MySQL when it is running on your own computer. Deploy a PHP application on
More informationVebra Search Integration Guide
Guide Introduction... 2 Requirements... 2 How a Vebra search is added to your site... 2 Integration Guide... 3 HTML Wrappers... 4 Page HEAD Content... 4 CSS Styling... 4 BODY tag CSS... 5 DIV#s-container
More informationCS108, Stanford Handout #22. Thread 3 GUI
CS108, Stanford Handout #22 Winter, 2006-07 Nick Parlante Thread 3 GUI GUIs and Threading Problem: Swing vs. Threads How to integrate the Swing/GUI/drawing system with threads? Problem: The GUI system
More informationEEC-682/782 Computer Networks I
EEC-682/782 Computer Networks I Lecture 20 Wenbing Zhao w.zhao1@csuohio.edu http://academic.csuohio.edu/zhao_w/teaching/eec682.htm (Lecture nodes are based on materials supplied by Dr. Louise Moser at
More informationDHANALAKSHMI SRINIVASAN COLLEGE OF ENGINEERING AND TECHNOLOGY ACADEMIC YEAR (ODD SEM)
DHANALAKSHMI SRINIVASAN COLLEGE OF ENGINEERING AND TECHNOLOGY ACADEMIC YEAR 2018-19 (ODD SEM) DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING SUB: OBJECT ORIENTED PROGRAMMING SEM/YEAR: III SEM/ II YEAR
More informationLecture 18 Java Graphics and GUIs
CSE 331 Software Design and Implementation The plan Today: introduction to Java graphics and Swing/AWT libraries Then: event-driven programming and user interaction Lecture 18 Java Graphics and GUIs None
More informationHTML HTML/XHTML HTML / XHTML HTML HTML: XHTML: (extensible HTML) Loose syntax Few syntactic rules: not enforced by HTML processors.
HTML HTML/XHTML HyperText Mark-up Language Basic language for WWW documents Format a web page s look, position graphics and multimedia elements Describe document structure and formatting Platform independent:
More informationSC/CSE 3213 Winter Sebastian Magierowski York University CSE 3213, W13 L8: TCP/IP. Outline. Forwarding over network and data link layers
SC/CSE 3213 Winter 2013 L8: TCP/IP Overview Sebastian Magierowski York University 1 Outline TCP/IP Reference Model A set of protocols for internetworking The basis of the modern IP Datagram Exchange Examples
More informationChapter 2. Network Chat
Chapter 2. Network Chat In a multi-player game, different players interact with each other. One way of implementing this is to have a centralized server that interacts with each client using a separate
More informationObject-Oriented Programming: Revision. Revision / Graphics / Subversion. Ewan Klein. Inf1 :: 2008/09
Object-Oriented Programming: Revision / Graphics / Subversion Inf1 :: 2008/09 Breaking out of loops, 1 Task: Implement the method public void contains2(int[] nums). Given an array of ints and a boolean
More informationInternet: An international network of connected computers. The purpose of connecting computers together, of course, is to share information.
Internet: An international network of connected computers. The purpose of connecting computers together, of course, is to share information. WWW: (World Wide Web) A way for information to be shared over
More informationREST Easy with Infrared360
REST Easy with Infrared360 A discussion on HTTP-based RESTful Web Services and how to use them in Infrared360 What is REST? REST stands for Representational State Transfer, which is an architectural style
More information5/19/2015. Objectives. JavaScript, Sixth Edition. Introduction to the World Wide Web (cont d.) Introduction to the World Wide Web
Objectives JavaScript, Sixth Edition Chapter 1 Introduction to JavaScript When you complete this chapter, you will be able to: Explain the history of the World Wide Web Describe the difference between
More informationVALLIAMMAI ENGINEERING COLLEGE
VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 60 0 DEPARTMENT OF INFORMATION TECHNOLOGY QUESTION BANK III SEMESTER CS89- Object Oriented Programming Regulation 07 Academic Year 08 9 Prepared
More informationFachgebiet Technische Informatik, Joachim Zumbrägel
Computer Network Lab 2017 Fachgebiet Technische Informatik, Joachim Zumbrägel Overview Internet Internet Protocols Fundamentals about HTTP Communication HTTP-Server, mode of operation Static/Dynamic Webpages
More informationGraphical User Interface (GUI)
Graphical User Interface (GUI) An example of Inheritance and Sub-Typing 1 Java GUI Portability Problem Java loves the idea that your code produces the same results on any machine The underlying hardware
More informationGraphic User Interfaces. - GUI concepts - Swing - AWT
Graphic User Interfaces - GUI concepts - Swing - AWT 1 What is GUI Graphic User Interfaces are used in programs to communicate more efficiently with computer users MacOS MS Windows X Windows etc 2 Considerations
More informationJava.net Package and Classes(Url, UrlConnection, HttpUrlConnection)
Java.net Package and Classes(Url, UrlConnection, HttpUrlConnection) Sisoft Technologies Pvt Ltd SRC E7, Shipra Riviera Bazar, Gyan Khand-3, Indirapuram, Ghaziabad Website: www.sisoft.in Email:info@sisoft.in
More informationAssignment: Seminole Movie Connection
Assignment: Seminole Movie Connection Assignment Objectives: Building an application using an Application Programming Interface (API) Parse JSON data from an HTTP response message Use Ajax methods and
More information