Nashville Php Symfony Presentation

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

    Nashville Php Symfony Presentation - Presentation Transcript

    1. Symfony 1.2
      • Brent Shaffer
      • Travis Black
    2. Getting Started
      • Download and install symfony
      • Sandbox
        • http://www.symfony-project.org/tutorial/1_0/my-first-project
      • $ ./symfony generate:project projectname
      • $ ./symfony generate:app frontend
      • $ ./symfony freeze ~/Sites/symfony/1.2/data/
              • edit config/ProjectConfiguration.class.php
      • edit config/databases.yml
      Getting Started $this-> enableAllPluginsExcept ( array ( 'sfPropelPlugin' , 'sfCompat10Plugin' )); all: doctrine: class : sfDoctrineDatabase param: classname: DoctrinePDO dsn: mysql :dbname=topos;host=localhost
      • edit your schema.yml
      • Build your database, models, and forms
        • $ ./symfony doctrine:build-all-reload
      • Take a second to examine generated classes
      Create your Blog Model BlogPost: columns: title: type: string( 255 ) description: type: clob notnull: true pubdate: type: timestamp author: type: string( 255 )
    3. Create your Blog Module
        • $ ./symfony generate:module blog_post
        • By default, pages are viewable at /:module/:action
        • browse to http://localhost/myproject/blog_post
          • Default action is index
    4. Add your Data Fixtures
        • create a data/fixtures/BlogPost.yml
      BlogPost: my_blog_post: title: First Post description: | <p> ante. egestas. augue, Vestibulum lacus Nam senectus sed, sagittis sit Mauris erat commodo tincidunt dui vitae, egestas Aenean Donec malesuada tincidunt eleifend tortor fames metus accumsan quam condimentum rutrum eros pulvinar Pellentesque et egestas Donec neque Ut amet leo. pharetra. sit ullamcorper est placerat et non quam, eu dapibus, tempus orci, fermentum, in amet, facilisis. semper. dui. netus ac tempor erat enim vitae faucibus, mi, vulputate elit amet sit ornare eget erat. eros turpis ipsum wisi, ultricies Praesent mi cursus habitant felis. tortor </p> timestamp: &quot;2009-30-31&quot; author: Brent Shaffer
      • Now we can manipulate our data
    5. Edit your Actions
      • Pull in your Blog objects
      public function executeIndex(sfWebRequest $request) { $q = Doctrine_Query:: create () -> from ( 'BlogPost b' );   $this-> posts = $q-> execute (); }
      • Edit your View (templates/indexSuccess.php)
    6. Examine your Layout
      • Layout is rendered after modules
      • $sf_content, $sf_request, $sf_user, $sf_response, $sf_request available
    7. Admin Generator
      • $ ./symfony doctrine:generate-admin backend BlogPost
      • Examine generator.yml, Form Classes
      • Out-of-the-box Authentication
      • Form Framework
    8. Doctrine Behaviors
      • Install csActAsCommentablePlugin
        • $ svn co path/to/plugin/csActAsCommentablePlugin plugins/csDoctrineActAsCommentablePlugin
      • Add behavior to schema.yml
      BlogPost: actAs: Commentable:
    9. Doctrine Behaviors
      • Rebuild your models, clear your cache
      • Add the component to your view
      <div class = 'comments' > <?php include_component( 'csComments' , 'thread' , array ( 'record' => $post)) ?> </div>
    10. Closing Points
      • cascading configuration
        • routing.yml
        • app.yml
        • view.yml
      • filters
      • test framework
      • nested forms
      • auto caching
      • i18n support

    + Brent ShafferBrent Shaffer, 1 month ago

    custom

    243 views, 0 favs, 0 embeds more stats

    Travis Black and I gave a brief Symfony overview at more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 243
      • 243 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 5
    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

    Tags