Past Meeting Archive | Los Angeles ACM home page | National ACM home page | Click here for More Activities this month |
Check out the Southern California Tech Calendar |
Regular Meeting of the Wednesday, December 1, 2004 "Experiences with the PHP language and RSS Feeds" John Bagwell Have you noticed that RSS in the status bar of your Firefox browser and wonder what it means? Or, have you asked yourself what is PHP? Well if these are some of the questions on your mind as you browse, then this is the talk you have been waiting for. John will start his talk with a brief introduction to the PHP language. He will give a few examples of its use. Then he will make some comments about the very popular MySQL database. John will then answer the question: What is an RSS Feed? He will provide examples and discuss simple XML files to create RSS Feeds which are useful in portal development. He will conclude his talk by showing off the web site and discuss its implementation and use of PHP, MySQL, CSS, and Javascript. A brief question and answer period will follow. John Bagwell received his Master's degree in Math from the University of Alabama. He then spent six years at University of Illinois working as a compiler developer. He then moved on to work at Computer Sciences Corporation (CSC) in El Segundo for 34+ years. At CSC he worked in compiler development, where he became an expert on Fortran 77. He also spent time as a system developer, consultant and analyst, which led him to be a web site designer. After retiring from CSC in June 2003, he created a reference and entertainment web site: www.GuessWho ThisIs.com, which is about real names of famous people. There are over 4,900 interesting people listed in the database. |
~Summary~
LA ACM Chapter December Meeting LA ACM Chapter December Meeting. Held December 1, 2004. The presentation was "Experiences with the PHP language and RSS Feeds" by John Bagwell who after his retirement from Computer Sciences Corporation (CSC) created a reference and entertainment web site. This was a regular meeting of the Los Angeles Chapter of ACM. John started out with a demonstration of how to get to his web site and at the web site showed a list of the last changes he had made to the site as a demonstration on what can be done with RSS feeds. His web site, "Guess Who This Is" is a reference site for entertainment. It currently uses a database with about 5,000 records and is growing. He commented that it is a project to keep him involved during his retirement. He wanted it to be inexpensive, but hosted by a stable company. He uses Yahoo Business Standard at a cost of $20 per month. Why does he use PHP and MySQL? Both of them are widely used by millions of sites and he wanted to develop a new skill. They are open source and free to use. PHP resembles the C language which was an asset for John because he has 18 years of experience with C. PHP is in use by more than 500,000 developers worldwide and a recent survey indicates it has surpassed Microsoft’s Active Server Pages (ASP) for the greatest number of server installations on the Internet. According to a survey published by Netcraft in May 2002, PHP was running on more than 9 million Web domains worldwide. Apache leads the Web server market with more than 67.1% market share and Microsoft IIS is second with 21%. 46 percent of Apache servers employ PHP. The second most popular scripting language in Apache is Perl, with 18%. Nearly 7% of PHP sites run on Windows and this has doubled over the last year. PHP will probably overtake Cold Fusion as the most popular non-Microsoft scripting language used on Windows during the next year. PHP is object oriented in PHP4 and PHP5. John uses PHP4 because PHP5 is new and not yet available for his use. There are syntax changes in PHP-5 and new rules for referencing parameters in methods. PHP5 is a single inheritance, access-restricted, and overloadable object model. PHP has many features including extensive database support, ability to create and manipulate graphic images, file and folder manipulation, FTP support, sockets, E-mail, regular expressions, read/write ZIP and GZ files and LDAP support. All PHP variables, arrays, and objects have $ on the front and that probably makes it easy for the compiler. PHP variables are not typed and can be used for anything. Numbers are typically double type. There is no "character" type; it is a 1 character string. Boolean True is nonzero and False is zero. For strings you can use either apostrophe or quote marks such as 'a simple string' or "there are $total members in the group." But they are different in terms of handling of content. Apostrophes enclose exact content. Quoted strings can have variable inserts (such as the $total in the example) and special characters like \r or \n. Strings can span lines and can be concatenated. The period "." acts as a concatenation operator and this surprises Java and C++ programmers. John presented an example that included a PHP function and noted that functions do not start with $ signs. Arrays are associative and can be created by simple assignments. Numeric indexes are assumed to begin with 0. There are a number of useful rules for creating arrays and assigning values and indexes. Arrays can be merged and multidimensional arrays, arrays of arrays, can be formed. John presented examples of how PHP arrays can be constructed and used. If you use objects, note that PHP5 is a major change from PHP4. It uses pass by reference rather than by copy, assignment moves a handle rather than a copy-it is faster. It allows destructors and provides better garbage collection. However PHP5 is not widely supported yet and how to use it is not covered in tonight’s presentation. John described use of the MySQL database. It is open source, widely used and simple. Easy management is provided using a free web page interface named phpMyAdmin. John described use of the LIKE operator to find names containing parts of names such as searching for names ending in son and finding Carson, Jackson, Masterson, Tyson, etc. He showed how to open a connection and select a database and how to do a MySQL SELECT operation to get a result set. He showed how to read a row as an object and how to get a row array style using keys. He provided several ways to use MySQL and showed how to close the connection. He pointed out that even if you don’t use the connection closing command it closes automatically anyway. Other database systems supported in PHP are ODBC access on Windows servers, Oracle, Postgres, Sybase, MS SQL Server, DB2, Informix and InterBase. John described how he uses CSS2 to control the appearance of his web site. He tries to make the site work "almost" the same for MicroSoft IE6, Mozilla FireFox 1.0, Mozilla and Opera 7. He still uses TABLE tags and also uses DIV and SPAN. He edits all PHP and HTML and other source using TextPad text editor rather than a web page editor program. He controls fonts with CSS, not a FONT tag and there is some usage of JavaScript. He doesn’t use session control (cookies). He supplies a FAVICON.ICO image that he believes is a little-used but nice feature. He gets 10 to 30 visitors a day; most of them want to look up real names of hip-hop rappers. He says that he tries to keep the content "clean" so that it is appropriate for people of all ages to use his site. He says that so far he has not made any money. He uses RSS Feeds. RSS has been defined several ways, "Really Simple Syndication" or "Rich Site Summary" or "RDF Site Summary". An RSS Feed is a standard formatted XML file and is often used for news assignments. He uses RSS standard RSS 2.0 and a very good description of that standard is found at: http://blogs.law.harvard.edu/tech/rss An article that shows how to make a feed is "Making an RSS Feed" by Danny Sullivan. http://searchenginewatch.com/sereport/article.php/2175271 In addition to RSS 2.0 the older standard 0.91 is also commonly used. There is a competing standard 1.0 which is more complex and it also calls the file RDF rather than RSS. Version 0.91 is a strict subset of 2.0. A supplier of RSS files is a syndicator. A program or site that gets the feed and displays it is a reader. It may be a portal page like my.yahoo.com. Sometimes an RSS file creator has to notify the portal that an update exists, a process called pinging. It may follow a standard called XML-RPX or REST or it may look like a web page request. There are validators which will check the format of an RSS file. This original site is somewhat slow. This site is regarded as better. John said you must use http:// in the input box for either site and wondered why they didn't supply it. (Secretary Note: I visited both sites and both had http:// already in the validation box so apparently there have been some recent improvements.) RSS feeds are often used by bloggers and may be called an Atom Feed. RSS feeds are XML files. The RSS tags are not in a namespace, for compatibility with 0.91, yet anyone can add new tags by adding a name space. John presented an example of making a simplified RSS file. The RSS 2.0 standard allows a means to implement a "cloud". A cloud is a site which can be pinged when a new feed is published, and others can find out from the cloud that there is new data without continually bothering the publisher. John said it is not clear to him how to use "cloud" so he pings My.Yahoo instead. John needed HTML LINK tags to tell search bots that his site has an RSS feed and tell browsers there is a favorites icon. John demonstrated how to look up things at his website: John showed the logic he used to develop things on his web site and gave a very entertaining demonstration of how it is used and the outputs it produces. John Bagwell gave an interesting, informative and entertaining presentation. If you go through this article you can follow links that give many of the technical details he presented, although you won’t get the informative examples he presented in considerable detail. You can go to his web site to see the results of John’s development or you can just go there for entertainment and check out real and stage names of celebrities whose careers you find interesting. This was fourth meeting of the LA Chapter year and was attended by about 15 persons. |
The next chapter meeting will be on Jan. 5th. Watch this space in December for program information. |
|
The Los Angeles Chapter normally meets the first Wednesday of each month at the
LAX Plaza Hotel, 6333 Bristol Parkway, Culver City. The program begins at 8 PM. From the San Diego Freeway (405) take the Sepulveda/Centinela exit southbound or the Slauson/Sepulveda exit northbound.
5:15 p.m. Business Meeting
6:30 p.m. Cocktails & Social
7:00 p.m. Dinner
The menu choices are listed in the table above.
Avoid a $3 surcharge!!
Reservations must be made by the Sunday preceding the meeting to avoid the surcharge.
Make your reservationsearly.8:00 p.m. Presentation
To make a reservation, call or e-mail Matt Reese, (626)794-5626, and give your name and telephone number, by the Sunday before the dinner meeting.
There is no charge or reservation required to attend the presentation at 8:00 p.m.. Parking is FREE!
For membership information, contact Mike Walsh, (818)785-5056 or follow this link.
Other Affiliated groups
SIGAda SIGCHI
SIGGRAPH SIGPLAN
Please visit our website for meeting dates, and news of upcoming events.
For further details contact the SIGPHONE at (310) 288-1148 or at Los_Angeles_Chapter@siggraph.org, or www.siggraph.org/chapters/los_angeles
Past Meeting Archive | Los Angeles ACM home page | National ACM home page | Top |
Last revision: 2004 1207 [Webmaster]