Creating Databases for Web Applications Twitter example Classwork/homework: Projects.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
CIS 4004: Web Based Information Technology Spring 2013
Java Script Session1 INTRODUCTION.
PHP Intro/Overview Squirrel Book pages Server-side Scripting Everything you need to know in one slide 1.Web server (with PHP “plug-in”) gets a.
INSTALLATION OF WORDPRESS. WORDPRESS WordPress is an open source CMS, often used as a blog publishing application powered by PHP and MySQL. It has many.
Multiple Tiers in Action
1 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText Transfer Protocol Performance Enhancements.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
Hints for HW#8. HW#6 Architecture Result of Query GOOG Browser with web page PHP Script client Apache web server finance.yahoo.com Send query with arguments.
. If the PHP server is an server or is aware of which server is the server, then one can write code that s information. –For example,
Presented by…. Group 2 1. Programming language 2Introduction.
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 9 JavaServer Pages (JSP) (Based on Møller.
Netbeans – jsp.zip Introduction to JSP Netbeans – jsp.zip.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
PHP : Hypertext Preprocessor
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
© 2011 Autodesk Automating Autodesk® Revit® Server Rod Howarth Software Development Manager – Bornhorst + Ward.
Creating a Basic Web Page
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
Server-side Scripting Powering the webs favourite services.
Introduction technology XSL. 04/11/2005 Script of the presentation Introduction the XSL The XSL standard Tools for edition of codes XSL Necessary resources.
Programming Games Basic HTML5 audio example. Catch-up. Work on basic video. Homework: Complete basic video.
Programming Games Show your cannonball. HTML5 video. Miro. Classwork/Homework: Acquire video, convert to multiple formats, and produce simple (just html)
JavaScript is a client-side scripting language. Programs run in the web browser on the client's computer. (PHP, in contrast, is a server-side scripting.
Twitter.  Twitter is a social networking and micro-blogging service that enables its users to send and read other user’s updates.
Sys.Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 18: Regular Expressions in PHP.
HTML5 Communication. The Setup Somewhere on the web, a server makes a ”service” available, that we wish to use in a web application The service may offer.
Session 1 SESSION 1 Working with Dreamweaver 8.0.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
1 Session 3: Flow Control & Functions iNET Academy Open Source Web Programming.
XRules An XML Business Rules Language Introduction Copyright © Waleed Abdulla All rights reserved. August 2004.
PHP - Basic Language Constructs CSCI 297 Scripting Languages - Day Two.
Advanced PHP & RSS Utilizing XML, RSS, and PHP. XML (eXtensible Markup Language) XML is the language of all RSS feeds and subscriptions XML is basically.
Continue with behavioral marketing. Tweets. Reports. Homework: capture tweets project.
Creating Databases Local storage. join & split Classwork: show 1 table application. Share designs for oscars application. Adaptive select. Homework: [Catch.
Twitter 101. What is Twitter? Twitter is a social networking and micro-blogging service that enables its users to send and read other user’s updates.
Dr. Martin Zhao Sept 4, Topics HTML and related tutorials on w3schools.com Related HTML tags Adding interesting features using JavaScript What is.
Facebook API Kelly Orser. Client Libraries Client libraries will simplify the calls to the platform by reducing the amount of code you have to write.
Asynchronous Javascript And XML AJAX : an introduction UFCEUS-20-2 : Web Programming.
CST336, Spring 2015 Week 8: PHP File Upload. PHP provides specific functions to handle binary data such as uploading a file into the server, storing it.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
Information Retrieval and Web Search Crawling in practice Instructor: Rada Mihalcea.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
Creating Databases for Web applications Server side vs client side PHP basics Homework: Get your own versions of sending working: both html and Flash!
HTML Overview Part 5 – JavaScript 1. Scripts 2  Scripts are used to add dynamic content to a web page.  Scripts consist of a list of commands that execute.
AJAX Asynchronous JavaScript and XML 1. AJAX Outline What is AJAX? Benefits Real world examples How it works 2.
4.01B Authoring Languages and Web Authoring Software 4.01 Examine webpage development and design.
Headings are defined with the to tags. defines the largest heading. defines the smallest heading. Note: Browsers automatically add an empty line before.
CHAPTER 8 AJAX & JSON WHAT IS AJAX? Ajax lets you…
How Web Database Architectures Work CPS181s April 8, 2003.
Higher Computing Science Coding the Web: HTML, JavaScript, PHP and MySQL.
MINING TWITTER 1.7 Visualizing a Graph of Retweet Relationships.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Creating User Interfaces VoiceXML. Examples. Classwork/Homework: Make proposal and start work on your VoiceXML project.
Overview Web Technologies Computing Science Thompson Rivers University.
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
5 Copyright © 2004, Oracle. All rights reserved. PL/SQL Server Pages.
PHP LANGUAGE MULTIPLE CHOICE QUESTION SET-5
Project 1 Introduction to HTML.
Creating Databases Local storage. join & split
Building a Custom Video Player
PHP Introduction.
YQL Kevin Murphy CMPS 183.
PHP.
Client-Server Model: Requesting a Web Page
API Overview Application Programming Interface
Murach's JavaScript and jQuery (3rd Ed.)
Presentation transcript:

Creating Databases for Web Applications Twitter example Classwork/homework: Projects

Twitter grab request from senior Example of application involving an XML (non-relational) database Approach: –combination of researching what is available and doing your own coding –I found and could understand a wrapper around the raw Twitter API: started-with-the-twitter-api/ started-with-the-twitter-api/

Requirements…so far grab the latest tweets with a certain hashtag –I used a search on content so will get html5 AND #html5. Can do the restriction. do NOT include retweets and replies –I do a check on the returned results. There MAY be a better way: filter these out earlier. refresh automatically: without user action, every 30 seconds –for debugging, I set this to 5 seconds –I do this strictly 'in' HTML / with JavaScript

So far Mine: meyer/twittersearch.html meyer/twittersearch.html Danielle's much prettier version:

wrapper (helper) Downloaded from thinkvitamin.com: class.twitter.php Tester script (form): twittersearch.html Working script: twittersearch.php –makes calls to the class.twitter.php functions –filters out the items starting with RT –prepares HTML for display –straight html does the refresh

xml versus json json is an object oriented format using -> The class.twitter.php code converts this. I just followed their example…. Sample of the XML is aripatila.xml aripatila.xml Note: a tweet is a status element

my twittersearch.php <?php header('Content-type: text/html; charset=utf-8'); require_once 'class.twitter.php'; // from ?> Finding tweets for a specified tag function init() { window.setTimeout(function() {location.reload(true);},5000); };

twittersearch.php, cont. <?php $t = new twitter; $tag = $_GET['key']; print "Searching for $tag..."; $s = new summize; $data = $s->search($tag); $data = $data->results;

Comment $data contains any number of items. the foreach($data as $d) loops over each one giving each the name $d Each $d has properties (using the json arrow notation), including $d->text Extra credit for someone who decodes the use of regular expression replace: preg_replace Notice going into and out of php

foreach($data as $d){ $st2= substr($d->text,0,2); $st1 = substr($d->text,0,1); if ((strcasecmp($st2,"RT") !=0) && { //case insensitive compare to RT ?> profile_image_url; ?>" alt="" /> <?php ', $d->text); ?> by <a href=" from_user; ?>"> from_user; ?> created_at; ?> from source); ?>

Classwork / homework Work on projects