eZ App Factory - mobile apps made fast and easy


Published on

  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Netgen – working on eZ Publish projectssince 2004,eZ Publish silver partner
  • A way of tapping into eZ Publish content model.Mapping eZ Publish content class attributes into fields defined by App Factory APIThis is specific to each installation and needs to be set-up via configuration files. Examples are provided with the extension.
  • Configuration file exampleEach line is a mapping of eZ Publish class attribute to App Factory API field.
  • Previous slides represent too simplified solution for most eZ Publish instalations. There is almost allways some site-specific logic, that is usually contained in eZ Publish templates or operators. To enable eZ Publish developers to use such specific logic we provide 2 extension points: Virtual categories and Custom attribute handlersVirtual categories enable developers to use PHP for fetching the data that is outputted to mobile apps, implementing whatever logic is needed. In administration interface we can choose which category handler to use, and define the parameters that can be used in PHP code.
  • The developer needs to implement a class that adheres to a simple interface with 3 PHP functions. getCategoryPostsfetches the datagetCategoryPostsCountfetches the count of items available in virtual category. Used for paging.getHandlerNameoutputs the name of the category handler
  • Custom attribute handlers enable the developers to use more complex logic when presenting the content item in mobile app. For example, image could be fetched from related object in eZ Publish, some attributes could be merged before sending to the app, etc.
  • Configuration file exampleEach line is a mapping of eZ Publish class attribute to App Factory API field. In this case body and images fields use custom attribute handlers.
  • The developer needs to implement a PHP class that implements a simple interface.
  • Video!
  • eZ App Factory - mobile apps made fast and easy

    1. 1. eZ App Factory mobile apps made fast and easyIgor Vrdoljakwww.netgen.hr
    2. 2. WhoIgor Vrdoljak@ivrdoljakigor@netgen.hrNetgen@netgentweetshttp://www.netgen.hr
    3. 3. What• eZ App Factory • Mobile application builder solution • Quick • Easy • Multiplatform (iOS and Android) • Connected to your eZ Publish CMS
    4. 4. Why?• Mobile is the current big huge thing • M iOS devices sold – June 2012 • M Android devices activated – June 2012 • % Facebook users mobile only• The best mobile strategy? • It depends 
    5. 5. The big picture
    6. 6. Class mappings
    7. 7. Class mappings[ClassMapping_article]title[title]=defaultsummary[intro]=defaultbody[body]=defaultimages[image]=defaultaudio[intro_song]=defaultvideos[youtube_video_code]=youtube
    8. 8. Categories
    9. 9. Extension point - Virtual categories
    10. 10. Extension point – Virtual categoriesinterface eZAppFactoryCategoryHandlerInterface{ static public function getCategoryPosts( array $params, $offset, $limit, $term = ); static public function getCategoryPostsCount( array $params, $term = ); static public function getHandlerName();}
    11. 11. Extension point - Custom attributehandlers
    12. 12. Extension point - Custom attribute handlers[ClassMapping_article]title[title]=defaultsummary[intro]=defaultbody[body]=myspecialsummaryhandlerimages[image]=myrelatedimageshandleraudio[intro_song]=defaultvideos[youtube_video_code]=youtube
    13. 13. Extension point - Custom attribute handlersinterface eZAppFactoryAttributeHandlerInterface{ static public function getData( eZContentObjectTreeNode $node, eZContentObjectAttribute $att= null );
    14. 14. VIDEO
    15. 15. Finally...• Not an universal solution• Good for • Content oriented sites and applications • Fast build, simple administration • Multiplatform • Evolving solution• Not good for  • Application – like installations • Very complex mobile apps
    16. 16. QA?• Any time left?igor@netgen.hr@ivrdoljak