Stuff They Never Taught You At Website School

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites

    Stuff They Never Taught You At Website School - Presentation Transcript

    1. Stuff you
      need
      Preamble:Ruby or go home
      For Ruby
      Sinatra
      http://www.sinatrarb.com/
      Ruby on Rails
      http://www.rubyonrails.org
      For PHP
      Junior
      http://github.com/madpilot/junior
      The World’s smallest PHP Framework†
      + Apache (with mod_rewrite)
      † Probably...
    2. The Setup
      Junior:World’s smallest PHP framework
      You will need:
      A web server that supports URL rewrites
      PHP 4 (5 is better)
    3. The Setup
      Junior:The guts
      You will need:
      A web server that supports URL rewrites
      PHP 4 (5 is better)
    4. Friendly URLS
      Lesson 1: Make your URLs nicer
      You will need:
      A web server that supports URL rewrites
    5. Friendly URLS
      Lesson 1: Make your URLs nicer
      You will need:
      A web server that supports URL rewrites
    6. Tags and Abstracts
      Lesson 2: Dynamic Redirects
      Moving stuff around?
      Most would use .htaccess – not happiness
      Store from URLS and to URS
      Redirect with 301 Permanent
      Bask in Google love
    7. Tags and Abstracts
      Lesson 2: Dynamic Redirects
    8. Tags and Abstracts
      Lesson 2: Dynamic Redirects
    9. Tags and Abstracts
      Lesson 3: Auto generate tags and descriptions
      Google might not care about meta tags anymore, but some sites do. Also useful for internal search...
    10. Tags and Abstracts
      Lesson 3: Auto generate tags
      In five easy steps
      Strip out all the HTML and non-alpha characters
      Split the all the text into tokens (single words)
      Strip out common words (stop words)
      Count the frequency of the remaining words
      Return the top 10 (or whatever)
    11. Tags and Abstracts
      Lesson 3: Auto generate tags
      You will need:
      A list of stop words
    12. Tags and Abstracts
      Lesson 3: Auto generate tags
      You will need:
      A list of stop words
    13. Tags and Abstracts
      Lesson 4: Auto generate abstract
      Most users will just use the first paragraph for descriptions – let’s do it for them
      Find as many paragraphs as you can, without going over the word count.
      OR
      Find as many sentences in the first paragraph as you can, without going over the word count
      OR
      Find as many works in the first sentence as you can without going over the word count (and add a ellipses)
      OR
      Truncate the world’s longest word (and add a ellipses)
    14. Tags and Abstracts
      Lesson 4: Auto generate abstract
      You will need:
      PHP + Tidy Plugin
      or
      Ruby + Nokogiri
    15. Tags and Abstracts
      Lesson 4: Auto generate abstract
      You will need:
      PHP + Tidy Plugin
      or
      Ruby + Nokogiri
    16. Search
      Lesson 5: Adding Search
      You will need:
      MySQL with MyISAM
      or
      acts_as_indexplugin
    17. Search
      Lesson 5: Adding Search
      MySQL has full text search:
      CREATE TABLE `searches` (
      `id` int(11) unsigned NOT NULL auto_increment,
      `title` varchar(255) default NULL,
      `abstract` varchar(255) default NULL,
      `copy` text,
      `keywords` varchar(255) default NULL,
      `permalink` varchar(255) default NULL,
      `entry_id` int(11) default NULL,
      `entry_type` varchar(255) default NULL,
      `created` datetime default NULL,
      `modified` datetime default NULL,
      PRIMARY KEY (`id`),
      FULLTEXT KEY `title` (`title`,`copy`,`keywords`)
      ) ENGINE=MyISAM
      You will need:
      MySQL with MyISAM
      or
      acts_as_indexplugin
    18. Search
      Lesson 5: Adding Search
      You will need:
      MySQL with MyISAM
      or
      acts_as_indexplugin
    19. Search
      Lesson 5: Adding Search
      acts_as_indexed :fields => [ :title, :body, :generate_keywords ]
      You will need:
      MySQL with MyISAM
      or
      acts_as_indexplugin
    20. Did you mean?
      Lesson 6: Did you mean?
      Correct misspelled search terms
      Split the term into tokens (on spaces)
      Spell check each token
      If it is wrong, show the correction
      Make the corrected string a link
      You will need:
      PHP + Pspell
      or
      Ruby + raspell
    21. Did you mean?
      Lesson 6: Did you mean?
      You will need:
      PHP + Pspell
      or
      Ruby + raspell
    22. Did you mean?
      Lesson 6: Did you mean?
      You will need:
      PHP + Pspell
      or
      Ruby + raspell
    23. Clean up
      Lesson 7: Cleaning up user HTML
      First thing clients do: Write their copy in Word, then paste it in
      You tell the client not to cut-and-paste word documents
      The second thing the client does: Write their copy in Word, then paste it in...
      Also, RTE’s produce bad code, and each produces different bad code.
      You will need:
      PHP + Tidy/HTMLPurify
      or
      Ruby + sanitize
    24. Clean up
      Lesson 7: Cleaning up user HTML
      You will need:
      PHP + Tidy/HTMLPurify
      or
      Ruby + sanitize
    25. Clean up
      Lesson 7: Cleaning up user HTML
      You will need:
      PHP + Tidy/HTMLPurify
      or
      Ruby + sanitize
    26. Shpelling
      Lesson 8: TinyMCE Spell check
      This is a TinyMCEplugin.
      Just need to define two JSON endpoints, and use the same library from the “Did you mean” section
      You will need:
      TinyMCE + Pspell or raspell
    27. Shpelling
      Lesson 8: TinyMCE Spell check
      You will need:
      TinyMCE + Pspell or raspell
    28. Shpelling
      Lesson 8: TinyMCE Spell check
      You will need:
      TinyMCE + Pspell or raspell
    29. Uploader
      Lesson 8: File Uploader
      Why are they so HARD!? It’s 2009 for god’s sake...
      There is an apache module. Not so good for shared servers, but it works.
      You can use a jqueryplugin, to turn normal uploaders into better uploaders
      Oh, if any Adobe people are here: SORT FLASH UPLOADERS OUT.
      Also. If there is any W3C people here: LET ME UPLOAD USING AJAX.
      You will need:
      mod_upload_progress
      Some jquerymagic
      AND NOT PHP
    30. Uploader
      Caveat: PHP has not happiness
      You CAN use the APC. It’s pretty flaky.
      The shared memory fills up, and it breaks. #balls
      You will need:
      APC PECL module
      A lot of patience
    31. Uploader
      Lesson 8: File Uploader
      You will need:
      mod_upload_progress
      Some jquery magic
    32. Uploader
      Lesson 8: File Uploader
      You will need:
      mod_upload_progress
      Some jquery magic
    33. Uploader
      Lesson 8: File Uploader
      You will need:
      mod_upload_progress
      Some jquery magic
    34. Links
      Sinatra:http://www.sinatrarb.com
      Junior:http://www.github.com/madpilot/junior
      Apache Uploader: http://github.com/drogus/apache-upload-progress-module
      TinyMCESpellchecker for Rails: http://github.com/madpilot/tinymce_spellcheck
      Acts as Indexed: http://github.com/dougal/acts_as_indexed
      HTMLPurifier: http://htmlpurifier.org/
      Sanitize: http://wonko.com/post/sanitize

    + Myles EftosMyles Eftos, 3 weeks ago

    custom

    668 views, 2 favs, 1 embeds more stats

    This presentation, given at the Edge of the Web, 20 more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 668
      • 666 on SlideShare
      • 2 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 21
    Most viewed embeds
    • 2 views on http://yataue.blogspot.com

    more

    All embeds
    • 2 views on http://yataue.blogspot.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories