Get Smart Use Smarty

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

    Favorites, Groups & Events

    Get Smart Use Smarty - Presentation Transcript

    1. Get Smart Use Smarty Michael Bourque Boston PHP May 6, 2009
    2. What I hope to cover
      • Why Smarty?
      • Installation
      • Smarty syntax overview
      • Some examples and demos
      • L10n & I18n (AKA Localization)
      • Cool effects to add to your web app
      • Q & A
    3. What’s so smart about smarty?
      • Separate view from business logic
        • If your not already using an MVC framework
      • Designers cant break the business code
      • Easy to read / Easy to use
      • Useful built in functions and modifiers
      • Optional content caching
      • Configuration files
    4. What’s not smart about smarty?
      • What critics say…
      • Performance
        • Nothing is faster than PHP
      • Security Claim
        • No extra security
      • Better templating solutions
      • Debugging is better with Firebug / FirePHP
      • etc…
    5. Have you ever done this?
    6. Have you ever had to work on this?
    7. MVC
      • Model
      • View
      • Controller
    8.  
    9. Controller Controller View View Model
    10. Easier to maintain this!
    11. Controller View Model Business Logic Data layer Flow control Presentation
    12. Get Smart : Installation
      • Download it from smarty.net, Subversion, or Pear:
        • pear channel-discover pear-smarty.googlecode.com/svn
        • pear install smarty/smarty
      • Create cache and template folders
        • cache
        • templates_c
      • Include it
        • include('Smarty.class.php');
        • $smarty = new Smarty;
    13. Get Smart : Usage
      • Basic syntax
    14. Get Smart : Examples
      • Comments
        • {* this is a comment *}
      • Variables
        • {$variable}, {$array[4]}, {$array.key.key}, $object->property}
      • Functions
        • {config_load file=}, {include file=}, {if}{else}{/if}, {foreach}
      • Modifiers
        • {$date|date_format}, {$title|truncate:40:'...'}
      • $smarty
        • {$smarty.get.page}, {$smarty.cookies.username}, {$smarty.request.username}
    15. Get Smart : Tips
      • Loops
      • Config Files
      • Sending emails
      • Escaping
      • Caching
      • Debugging
    16. Get Smart : Demo
      • Get Smarty Demo
      • Language files
      • Sending emails
      • Progressive Enhancement
      • jQuery
    17. Q/A
    18. Thank you…
      • Contact me
      • [email_address]

    + Michael BourqueMichael Bourque, 6 months ago

    custom

    852 views, 0 favs, 0 embeds more stats

    Although Smarty is known as a "Template Engine", it more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 852
      • 852 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    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