Sep 16

PDO: PHP Data Objects
Wez Furlong (Message Systems, Inc.)
2:45pm Tuesday, 09/16/2008
The Basics Room 209

PHP 5.1 features a new data access layer, PHP Data Objects (PDO), that provides a clear, simple (but powerful), unified API for working with all our favorite databases. Features include prepared statements with bound parameters (for all databases, even those that don’t natively support them), transactions, cursors, LOBs, and flexible error handling. Also examined are the issues of cross-database portability and how best to use PDO to avoid some of the pitfalls associated with that topic. Join Furlong to learn more about the future of database access in PHP.
Photo of Wez Furlong
Wez Furlong
Message Systems, Inc.

Wez Furlong is Director of Engineering at Message Systems where he works on the fastest MTA on Earth.

Wez is a PHP Core developer and active OpenSource contributor. He currently resides in Sykesville, Maryland with his wife, son and loyal pup.

Website – http://netevil.org/

PDO::ERRMODE_SILENT
PDO::ERRMODE_WARNING
PDO::ERRMODE_EXCEPTION

forward-only cursors
-a.k.a. “unbuffered” queries in mysql parlance
-they are the default cursor type
-rowCount() doesn’t have meaning
-FAST
-other queries are likely to block
-you must fetch all remaining data before launching another query
-$stmt->closeCursor();

Fetch modes
-PDO::FETCH_COLUMN

Iterators
        $dbh = new PDO($dsn);
        $stmt = $dbh->query(
                “SELECT name FROM FOO”,
                PDO::FETCH_COLUMN, 0);
        foreach ($stmt

Changing Data
        $deleted = $dbh->exec(
                “DELETE FROM FOO WHERE 1”);
        $changes = $dbh ->exec(
                “UPDATE FOO SET active=1”
                “WHERE NAME LIKE ‘%joe%’”);

Autonumber / sequences
        $dbh->exec(
                “insert into foo values(…)”);
        echo $dbh->lastInsertId();

Prepared Statements
$stmt = $dbh -> prepare(
        “INSERT INTO CREDITS (extension, name)”
        “VALUES(:extension, :name)”);
$stmt -> execute(array(
        ‘extension’ => ‘xdebug’
        ‘name’ => ‘Derick Rethans’
));

written by Cousett \\ tags: , , , ,

Sep 16

PECL Picks – Extensions to make your life better
Elizabeth M Smith (OmniTI)
1:30pm Tuesday, 09/16/2008
Advanced Hall B

PECL is undergoing a transformation, new developers, new tools, and a clearing away of the old cruft. Learn the history and idea behind PECL and where the future is leading, and who is involved in the process.

Then take a walk through PECL and learn about the best and the brightest. PECL extensions fall into three rough categories. Library wrappers take a C library and bring the functionality to PHP, general libraries add new functionality to PHP through internal C code, and engine level extensions allow you to do cool things with PHP.

Each extension will have a brief overview, who maintains it, the requirements and purpose of the extension, and a quick “how to use it”. There are 184 extensions in PECL and more on the way, we’ll see how many useful ones fit into an hour.
Elizabeth M Smith
OmniTI

Elizabeth M. Smith has been using PHP since time immemorial (PHP 4.0beta), but has used PHP 5 for so long now she’s forgotten how she ever got by without SPL and a real object model. Elizabeth is a certifiable (yes, we mean men in white coats coming to put on strait jackets) windows geek, if it can be compiled on windows, she’ll compile it, if not… she’ll fix it so it does. She enjoys doing very perverse things to Windows using PHP as well – all this in between caring for her 4 kids and husband.

* Web site

Text Extensions
        - bbcode
        -colorer
        -doublemetaphone
        -enchant
        -namazu
        -stem
        -xdiff

bbcode
        provides various tag types, high speed tree based parsing

tell it how to parse what to parse

Search
        - clucene
        - mongosearch
        -swish
        -sphinx
                -libsphinx www.sphinxsearch.com
PHP do bad things
        -runkit
        -funcall
        -intercept

        Runkit
        - replace rename remove user defined functions and classes
define customized superglobal variables for general purpose use

        Funcall
        - code.google.com/p/funcall
        - call callbacks before or after specified call

http://elizabethmariesmith.com/slides/pecl-picks.pdf

http://elizabethmariesmith.com/slides/

http://pecl.php.net/

written by Cousett \\ tags: , , , ,

Sep 16

Static and Dynamic Analysis at Ning
David Sklar (Ning, Inc.)
11:15am Tuesday, 09/16/2008
Advanced, Best Practices, Performance Hall B

Ning’s “Your Own Social Network” application is 160,000 lines of PHP that powers hundreds of thousands of social networks, each different than the others. To keep our platform humming along smoothly, as well as to keep our internal development processes sane, we need to know what all that PHP code is doing and how it’s structured.

Documentation is nice (and essential) but there’s no substitute for relying on the code itself as the canonical source for information about, well, the code. That’s where static and dynamic analysis come in.

Static analysis is scanning, parsing, munching, and otherwise processing our PHP source code to answer whatever questions we have about it. Who calls this function? What parts of the code do disk write operations? Are there any untranslated strings in our localization message catalogs?

Dynamic analysis gathers information from running code. How many times is a function called? How long does it take? When does our PHP code access the filesystem?

This talk discusses the static and dynamic analysis techniques that we use at Ning to understand and optimize our platform, including the PHP tokenizer, regular expressions, the vld and xdebug extensions, and the PHP DTrace provider.

David Sklar
Ning, Inc.

David Sklar is a Software Architect at Ning, Inc., and the author of PHP Cookbook (O’Reilly), Learning PHP 5 (O’Reilly), and Essential PHP Tools (Apress). He speaks regularly at many conferences, including the O’Reilly Open Source Convention, the O’Reilly Emerging Technology Conference, USENIX, and various PHP conferences. He keeps a blog at http://www.sklar.com/blog/ and maintaings the PX (http://px.sklar.com/), a PHP code exchange he created in 1996. David has a degree in Computer Science from Yale University and lives in New York City, where he enjoys riding the subway, eating salt-baked scallops, and admiring the 18th- and 19th-century American furniture at the Metropolitan Museum of Art.

written by Cousett \\ tags: , , , ,

Sep 16

Join-fu: The Art of SQL Tuning for MySQL
Jay Pipes (MySQL)
10:00am Tuesday, 09/16/2008
Advanced, Best Practices, Performance Hall B

Join-fu is the art of performance-tuning your application’s SQL. Join Jay in a fun, irreverent look at the common ways application developers misuse and abuse their database.

We will cover a number of important topics in tuning your SQL application layer. We will not be covering tuning server variables or benchmarking, but instead the slides will be full of SQL and PHP code that the audience can immediately use to dramatically increase the performance of their schemas and applications.

The talk focuses on MySQL, but the tips and techniques used can easily be used to increase performance in a number of RDBMS-driven applications.
Photo of Jay Pipes
Jay Pipes
MySQL

Jay Pipes is the North American Community Relations Manager at MySQL. Co-author of Pro MySQL (Apress, 2005), Jay has also written articles for Linux Magazine and regularly assists software developers in identifying how to make the most effective use of MySQL. He has given sessions on performance tuning at the MySQL Users Conference, RedHat Summit, NY PHP Conference, OSCON, PHP-Quebec, ZendCond and Ohio LinuxFest, amongst others. He lives in Columbus, Ohio, with his wife, Julie, and his four animals. In his abundant free time, when not being pestered by his two needy cats and two noisy dogs, he daydreams in PHP code and ponders the ramifications of __clone().

vertical partitioning – split tables with many columns into multiple tables
horizontal partitioning – split table with many rows into multiple tables

vertical partitioning
- mixing frequently and infrequently accessed attributes in a single table
- space in buffer pool at a premium
        - splitting table allows main records to consume the buffer pages without the extra data taking up space in memory
- need FULLTEXT on your text columns?

create a myisam indexing
        -replication answer master both in db slave … do fulltext indexing on slave

the MYSQL query cache
        - you must understand your application’s read/write patterns
        -internal query cache design is a compromise between CPU usage and read performance
        -stores the MYSQL_RESULT

http://jpipes.com/

written by Cousett \\ tags: , , , ,

Mar 11

Content Management System Roundup
Room 18ABCD
Tuesday, March 11th
10:00 am – 11:00 am

This panel discussion will bring together a group of experienced Web designers, developers, and businesspeople to talk about their experiences building sites using a variety of content management system (CMS) products. A variety of widely-used CMS products will be covered, including Drupal, Expression Engine, SharePoint, and Collage, and the panel will also cover the challenges of developing a “home-grown” CMS from scratch. Panelists will include front-end interface designers, back-end programmers, and consultants who will provide an overview of each system and discuss their experiences using them in corporate, academic, and not-for profit environments. The goal of the discussion is to provide an overview of what kinds of CMS products are available, and what their respective strengths and weaknesses are.
George DeMet   Owner,   Palantir.net
Jeff Eaton  Lullabot
Tiffany Farriss   Pres,   Palantir.net
Mike Essl   Owner Operator,   mike.essl.com
Matthew McDermott   Principal Consultant,   Catapult Systems

Order of items in Drupal – Stack including theme modules etc.
Drupal Sucks

  1. “I just want to make a page”
  2. “I’m the next Twitter …”
  3. Static sites
  4. Just Another Blog

Drupal Rocks

  1. User-generated content
  2. Communities
  3. Many kinds of content
  4. Many views of content
  5. Open APIs, Web Standards

Expression Engine
        I thought Expression was like Dreamweaver but Expression Engine is actually a CMS engine. – http://expressionengine.com/

Custom Options

  1. Collage – http://plone.org/products/collage
  2. Comparison of CMS Systems – http://www.cmsmatrix.org/matrix

written by Cousett \\ tags: , , ,

Mar 10

Tuesday, 11 March 2008

  1. 10:00AM Content Management System Roundup (18ABCD)
  2. 11:30AM Core Conversation: Can .edu Act Like a .com? (Ballroom E)
  3. 11:30AM Core Conversation: Next Generation Education: Bringing the New Web to Campus (Ballroom E)
  4. 02:00PM The Mexican Manifesto (5)
  5. 03:30PM Creative Collaboration: Building Web Apps Together (A)
  6. 05:00PM Taking Over the World: the Flickr Way (A)

written by Cousett \\ tags: , , , ,

Mar 10

Client-Side Code and Internationalization
Room C
Monday, March 10th
3:30 pm – 4:30 pm
This presentation will cover tips, techniques, best practices, and gotchas for designers working with XHTML, CSS, and JavaScript in multiple languages. Special attention will be given to right-to-left and bidirectional content. XHTML + CSS + JS + UTF8 + LTR + RTL = client-side i18n fun
Jon Wiley   User Experience Designer,   Google

pig latin Google!!

globalization
punctuation
vacation

internationalization = translation

internationalization -> i18n (i take out 18 characters in middle n)

enabling product for localization
localization -> L10n
globalization -> don’t use
translation
transliteration -> take word for word machine translation

localization is more than just translation

legal compliance
keyboards

Lots of character encodings
-ASCII
-ISO 8859-1 (ISO Latin 1)
-Windows-1256
-Unicode
-UTF-8

No need for character escapes &#169

Character escapes
-when you need markup characters
&lt; (<) or &gt; (>) or &amp; (&)

when you need hard to see characters &nbsp;

Tell the browser
-Content Type declaration in response header
        Content-Type: text/html; charset=utf-8
-meta element in document header
-external CSS (or just use response header)

Language
find content in the right language

says nothing about character encoding and direction

tell the browswer

-lang and xml:lang attribute on html element

<html lang=“en” xml:lang=“en”>

- meta element in document header
<meta http-equiv=“Content-Language” content=“en” />

-Content-Language in response header
Content-Language: en

Scripts have a default direction

Markup is left to right

Some languages eliminate spaces
German – compound nouns

some scripts have wider scripts – japanese

some scripts require greater line height – thai

CSS Janus
launched last week
created at google

-script for flipping CSS-based layouts
-table based layouts don’t have this problem
-not a total solution

http://cssjanus.commoner.com

*** cursor: ne-resize; ****

JavaScript

written by Cousett \\ tags: , , , , ,

Mar 10

Browser Wars: Deja Vu All Over Again?
Room 10
Monday, March 10th
2:00 pm – 3:00 pm

In the fairly recent past, the only direction the emerging Web platform could take was largely determined by the often acrimonious competition between Netscape and Microsoft via their respective browsers. Today, with hot mobile devices like the iPhone using Webkit, the popularity of Firefox, an IE7 that’s gaining adoption, and the constant demand for cool Web apps, the Web Platform is once again heating up. Once again, it’s about the ingredients that constitute a Web application, and who’s putting them in their browsers for us developers to build stuff on. Proprietary technology again competes against open standards. This panel will ask the hot questions to the browser titans – Firefox, Microsoft, Apple, and Opera. What’s with HTML5? And Silverlight and other proprietary stuff? And who’s building what feature into JavaScript? And what about the mobile web? Last year we had a spirited discussion about the future of the Web. A year later, can we revisit the same debates, and still throw in a good punch or two, and perhaps even agree on some sort of common vision? Brendan invented JavaScript and is CTO of Mozilla; Chris worked on every version of IE that you’ve used; Charles is the public face of standards at Opera. And Arun’s going to try and keep them all civil.
Arun Ranganathan   System Architect
Chris Wilson   Platform Architect,   Microsoft
Brendan Eich   CTO,   firefox
Charles McCathieNevile   Chief of Standards,   Opera

written by Cousett \\ tags: , , , ,

Mar 10

True Stories from Social Media Sites
Room A
Monday, March 10th
11:30 am – 12:30 pm

Social websites are funny places. What stories do you tell over drinks with friends? About the time when someone accidently uploaded the *wrong* folder of pictures to your site? Or the time you had to manage a full-scale user revolt? Several creators and users of such sites will share five-minute stories of funny bugs, features with unintended consequences, and crazy customer emails. This panel will help you understand about first, second & third order effects when designing such social sites. How nothing goes exactly as planned. You will learn about the importance of being agile and responsive to users when things go wrong. This panel will be a chance to learn from others’ mistakes and avoid making the same ones!

Moderator: Rashmi Sinha , SlideShare
Rashmi Sinha  SlideSharehttp://www.slideshare.net/
Guy Kawasaki  Garage Technology Ventureshttp://www.garage.com/
Style Diary – www.stylediary.net
Erica OGrady – http://www.opmom.com/
Laura Fitton – http://pistachioconsulting.com/blog/
Guy Kawasaki – http://truemors.com/
Patricia Handschiegel
http://stylediary.stylehive.com/

75 cents to a dollar what woman get paid

written by Cousett \\ tags: , , ,

Mar 10

Lost in Translation? Top Website Internationalization Lessons
Room B
Monday, March 10th
10:00 am – 11:00 am

One of the most exciting aspects of social networking online is the concept of building communities that are defined by common goals and interests rather than common geography. The nature of the Internet allows instant participation from people around the globe. However, most successful social networking companies have learned that providing users of multiple cultures and backgrounds with a consistent community experience becomes a tremendous challenge. And, while the challenge of authentic localization can be significant, the rewards can be huge.
Stephanie Booth   Web Consultant & Commentator,   Climb to the Stars
Brian McConnell   Founder,   Worldwide Lexicon
Kelly Thompson   Exec VP,   iStockphoto Inc
Stephanie Troeth   Director of Interactive Technology & Solutions,   CloudRaker
Kevin Marks   Dev Advocate,   Google

written by Cousett \\ tags: , , ,