1 / 7

Symfony2 - Step-by-step

Symfony2 - Step-by-step. Portfolio 3.0 Symfony 2.0 MongoDB jQuery UI RESTfull services. Week 2 – Symfony 2 Advanced. Purpose: a completed blog application Requirements: ORM – entities with relationships Form advanced Twig with layouts. 1 – ORM Entities relationship.

danika
Download Presentation

Symfony2 - Step-by-step

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Symfony2 - Step-by-step • Portfolio 3.0 • Symfony 2.0 • MongoDB • jQuery UI • RESTfull services

  2. Week 2– Symfony2 Advanced • Purpose: a completed blog application • Requirements: • ORM – entities with relationships • Form advanced • Twig with layouts

  3. 1 – ORM Entities relationship • Requirements: • Add entities Post, Comment, Category • Add relationships (described in next slide) • Tutorial: http://symfony.com/doc/current/book/doctrine.html#entity-relationships-associations • Achievement: • OneToMany, ManyToMany • Fetch relative objects • Notice: • Add relationships in Entity then generate to database.

  4. Relationships: • Blog vs Post: • Blog can have 0-many Posts • Post only belong to a Blog • Post vs Comment: • Post can have 0-many Comments • Comment only belong to a Post • Post vs Category: • Post can have to 0-many Category • Category can have 0-many Post • Category: • Category can have 0-many Category children

  5. 2 – ORM Repository • Requirements: • Create 4 custom repository classes for 4 entities • Write some custom functions (see in note) • Tutorial: http://symfony.com/doc/current/book/doctrine.html#custom-repository-classes • Achievement: • Query Builder with DQL • Join tables. • Note: • Use setParameter() • ORM Expr class

  6. 3 – Layouts • Requirements: • Create a layout with the design layout.png • 4 sections (header, footer, left, content) should be in separated view. • Assert to add css, javascript, image to layout. • HTML5 Boilerplate • Tutorial: http://symfony.com/doc/current/book/templating.html • Achievement: • Block • Twig render, include functions • Assert • Note: • Must use Block • Must use Assert

  7. 4 – Blog Application • Requirements: • Build a complete application • Achievement: • Pages management • Routing • Layouting • Note: • Page listing in notes • Link all available pages in views

More Related