eZ App Factory
                  mobile apps
                made fast and easy


Igor Vrdoljak
www.netgen.hr
Who


Igor Vrdoljak
@ivrdoljak
igor@netgen.hr



Netgen
@netgentweets
http://www.netgen.hr
What

•   eZ App Factory
    •   Mobile application builder solution
    •   Quick
    •   Easy
    •   Multiplatform (iOS and Android)
    •   Connected to your eZ Publish CMS
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 
The big picture
Class mappings
Class mappings

[ClassMapping_article]
title[title]=default
summary[intro]=default
body[body]=default
images[image]=default
audio[intro_song]=default
videos[youtube_video_code]=youtube
Categories
Extension point - Virtual categories
Extension point – Virtual categories


interface eZAppFactoryCategoryHandlerInterface
{
  static public function getCategoryPosts(
          array $params, $offset, $limit, $term = '' );
  static public function getCategoryPostsCount(
          array $params, $term = '' );
  static public function getHandlerName();
}
Extension point - Custom attribute
handlers
Extension point - Custom attribute
 handlers

[ClassMapping_article]
title[title]=default
summary[intro]=default
body[body]=myspecialsummaryhandler
images[image]=myrelatedimageshandler
audio[intro_song]=default
videos[youtube_video_code]=youtube
Extension point - Custom attribute
  handlers



interface eZAppFactoryAttributeHandlerInterface
{
  static public function getData(
          eZContentObjectTreeNode $node,
          eZContentObjectAttribute $att= null );
VIDEO
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
QA?

•   Any time left?




igor@netgen.hr
@ivrdoljak

eZ App Factory - mobile apps made fast and easy

Editor's Notes

  • #3 Netgen – working on eZ Publish projectssince 2004,eZ Publish silver partner
  • #7 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.
  • #8 Configuration file exampleEach line is a mapping of eZ Publish class attribute to App Factory API field.
  • #10 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.
  • #11 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
  • #12 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.
  • #13 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.
  • #14 The developer needs to implement a PHP class that implements a simple interface.
  • #15 Video!