Download presentation
Presentation is loading. Please wait.
Published byGiles Wells Modified over 8 years ago
1
Building a Twitter Analysis Tool, Using PHP, MySQL, Yahoo UI, and the Netbeans IDE Justin Bolter, Technology Evangelist Sun Microsystems
2
Agenda Netbeans Introduction Twitter Search API Application Overview PHP Features JavaScript Features Yahoo UI NetBeans and MySQL interaction CSS Support
3
Netbeans IDE Open Source Latest Release: 6.5.1 (6.7 Beta soon!) Developer.com 2008 & 2009 Product of the Year (IDE) 20+ Million Downloads Vibrant Community 3 rd Party Plugins Windows, Linux, Mac OS, and OpenSolaris Support for many languages (Java, JavaFX, Ruby/JRuby, JavaScript, Groovy)
4
Twitter and Search API Twitter is a social networking and micro-blogging service that enables its users to send and read other users' updates (known as tweets), which are text- based posts of up to 140 characters in length. Twitter provides a search API to allow us to retrieve past tweets. (Up to 1500) Returns JSON data
6
Twitter Search Example http://search.twitter.com/search.json?q=netbeans Up to 1500 results per query 15 pages x 100 results per page { "results":[{ "text":"OMG! Django no Netbeans! http:\/\/tinyurl.com\/bc8w8b", "to_user_id":null, "from_user":"marciohiroyuki", "id":1312711342, "from_user_id":1714258, "iso_language_code":"no", "source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>", "profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/68849164\/Photo_1_normal.jpg", "created_at":"Wed, 11 Mar 2009 21:14:09 +0000" }...
7
What are we going to build? TwitterGraph A twitter analysis tool that graphs the number of tweets over time How? User Twitter search to find tweets Use MySQL to store tweets Use Yahoo UI to graph tweets over time Use PHP to provide data to Yahoo UI Use Netbeans to pull it all together!
8
How does this application work? User enters keyword(s) App creates TwitterSearch object with keywords TwitterSearch->findTweets() searches twitter and inserts up to 100 results into the MySQL database, returns init string for next page of results YUI displays chart AJAX request calls TwitterSearch->findTweets(init_str) at a set interval to find additional tweets (up to 1500, 100 at a time) YUI chart updates when new data is available in the MySQL database
9
Netbeans PHP Features Project support Run configurations Versioning Navigator Code completion Code templates Syntax coloring Hyperlinking Documentation Unit Testing Debugging
10
Netbeans JavaScript Features Bundled libraries Navigator Code completion Syntax coloring Documentation Debugging Quick fixes
11
Yahoo UI Experimental charts package Polls datasource to update chart Extend functionality to mouseover and see tweets
12
MySQL Use Netbeans with your database Database browser View/Edit your data and commit changes SQL code completion Code completion within your PHP files!
13
Cascading Style Sheets Code completion Style builder Preview window
14
Demo! TwitterGraph PHP, JavaScript, MySQL, CSS
15
What else are we missing? PHP unit testing Debugging
16
PHP Unit Testing PHPUnit 3.3.0 needed for GUI Available in 6.7M3 or daily builds
17
PHP Debugger For when echo() and var_dump() just don't cut it Set breakpoints Examine the call stack Local variables Global variables Create watch expressions
18
Demo! PHP Debugger
19
Project Kenai A platform and ecosystem for Developers to: Freely host open source projects and code Connect, Communicate, Collaborate and Code with peers Eventually easily deploy applications/services to “clouds” http://kenai.com http://kenai.com
21
Additional Resources Project Kenai twittergraph.kenai.com Netbeans Tutorials netbeans.org/kb/ netbeans.tv blogs.sun.com/netbeansphp/ Me justin.bolter@sun.com blogs.sun.com/jbolter/
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.