SlideShare a Scribd company logo
Mobile Channels in eZ PublisheZ Conference 2011
Łukasz SerwatkaMobile Lead Engineer at eZ SystemseZ Systems employee since March 2005		Member of the Engineering Division	8 years experience with eZ Publish	2 years experience with native mobile applications development (iOS, Android)	Author of many print and online publications about eZ Publish	Creator of many eZ Publish extensionsWeb: www.serwatka.netTwitter: @lserwatka11-06-20Presenter: Łukasz Serwatka2Mobile Channels in eZ PublisheZ Conference 2011
Mobile channels available in eZ Publish	mobile web channel		web technologies			HTML5			CSS3 & SASS			JavaScript	REST interface		web service oriented			lightweight client-server communication			JSON as output format11-06-20Presenter: Łukasz Serwatka3Mobile Channels in eZ PublisheZ Conference 2011
Content channels in eZ Publish11-06-20Presenter: Łukasz Serwatka4Mobile Channels in eZ PublisheZ Conference 2011
Mobile channels in eZ Publish11-06-20Presenter: Łukasz Serwatka5Mobile Channels in eZ PublisheZ Conference 2011
Environments: fragmentation	Symbian (Nokia)Andorid (Google)Bada (Samsung)	Windows Phone (Microsoft/Nokia)iOS (Apple)	BlackBerry (RIM)webOS (Palm/HP)MeeGo (Intel/Nokia/Maemo)11-06-20Presenter: Łukasz Serwatka6Mobile Channels in eZ PublisheZ Conference 2011
The Web	Cross-platform	Familiar skills & tools	Easily updated	Decentralized	Indexed	Well-understood	… but11-06-20Presenter: Łukasz Serwatka7Mobile Channels in eZ PublisheZ Conference 2011
Caveats	Performance: slower to execute, limited on CPU/GPU resource	Browser support: some needs to be ignored	Device access: limited access to hardware, not fully there yet	Debug: more difficult on the client side	Discoverability: no official app store, yet	Monetization: more difficult	App ‘experience’11-06-20Presenter: Łukasz Serwatka8Mobile Channels in eZ PublisheZ Conference 2011
Mobile web: engines	WebKit: ~57% market share		iOS		Bada		BlackBerry 6.0+		Symbian		Andorid		webOS		MeeGo	Presto: ~21% market share		Opera Mini		Opera Mobile	Others: ~22% market share		Gecko, Trident, Mango, UC, Obigo …11-06-20Presenter: Łukasz Serwatka9Mobile Channels in eZ PublisheZ Conference 2011
Mobile HTML5Presenter: Łukasz Serwatka10Mobile Channels in eZ PublisheZ Conference 2011semanticsmultimediaoffline & storage3D, graphics & effectsdevice accessperformance & integrationconnectivityCSS311-06-20
Technologies	accelerometer	-webkit	@page	CSS Text	localStorage	@media	manifest		transform	<video>		WebSQL		GeoLocation	type=camera		canvas		keyframe	gradient		touch events	<audio>		Web Workers		CSS3 	SASS	… and more	11-06-20Presenter: Łukasz Serwatka11Mobile Channels in eZ PublisheZ Conference 2011
Cross-browser	mobile web frameworks		JavaScript-based (programmatic approach)			Sencha Touch			SproutCore		Markup-based (progressive enhancement approach)			jQTouch			jQuery Mobile11-06-20Presenter: Łukasz Serwatka12Mobile Channels in eZ PublisheZ Conference 2011
Mobile web frameworks: why?	Provide user interface components		toolbars, buttons, navigation bars, etc.	Smooth browser inconsistencies		normalization is done under the hood, abstractions 	Mimic native or server paradigms		UI elements, drop shadows, insets,	Create consistent application architecture		MVC framework11-06-20Presenter: Łukasz Serwatka13Mobile Channels in eZ PublisheZ Conference 2011
jQTouch	sponsored by Sencha Labs	markup-based	UI layer on top of jQuery	library progressively enhances	MIT license	wide browser supporthttp://jqtouch.com11-06-20Presenter: Łukasz Serwatka14Mobile Channels in eZ PublisheZ Conference 2011
jQuery Mobile	still in alpha version	markup-based	UI layer on top of jQuery	library progressively enhances	MIT or GPL2 license	wide browser supporthttp://jquerymobile.com11-06-20Presenter: Łukasz Serwatka15Mobile Channels in eZ PublisheZ Conference 2011
Sencha Touch	self-contained library	built on ExtJS	JavaScript-based approach	standalone MVC applications	commercial and open source licenses	wide browser supporthttp://www.sencha.com/products/touch/11-06-20Presenter: Łukasz Serwatka16Mobile Channels in eZ PublisheZ Conference 2011
	Back to eZ Publish …11-06-20Presenter: Łukasz Serwatka17Mobile Channels in eZ PublisheZ Conference 2011
Mobile web channel in eZ Publish	accessible via eZ Publish “siteaccess” system;	supports URI, HOST and PORT based access;	permissions handling;	can provide mobile optimized content and layout;	template engine;	content engine;11-06-20Presenter: Łukasz Serwatka18Mobile Channels in eZ PublisheZ Conference 2011
Mobile web channel in eZ Publish: configuration	Web server configuration		Virtual-Host setup	eZ Publish configuration		Siteaccess settings		Permissions setup		Design extension11-06-20Presenter: Łukasz Serwatka19Mobile Channels in eZ PublisheZ Conference 2011
Mobile web channel in eZ Publish: mobile detection		Apache Mobile Filterhttp://www.apachemobilefilter.org/		No built-in solution11-06-20Presenter: Łukasz Serwatka20Mobile Channels in eZ PublisheZ Conference 2011
Mobile web channel in eZ Publish: mobile detection		Smart detection but let user choice.			Place link to the desktop version of your site as well.11-06-20Presenter: Łukasz Serwatka21Mobile Channels in eZ PublisheZ Conference 2011
Mobile web channel in eZ Publish: VH setup	Possible scenarios		Use a separate domain altogether (e.g www.mobile-example.com)		Use a subdomain (e.g m.example.com)			Probably the most popular option			URI approach as alternative (e.g example.com/mobile)		Use a .mobi top level domain	Combine with smart detection11-06-20Presenter: Łukasz Serwatka22Mobile Channels in eZ PublisheZ Conference 2011
Mobile web channel in eZ Publish: siteaccess	/settings/override/site.ini.append.php	...	[SiteAccessSettings]	AvailableSiteAccessList[]	AvailableSiteAccessList[]=example	AvailableSiteAccessList[]=mobile	MatchOrder=host	HostMatchMapItems[]=www.example.com;example	HostMatchMapItems[]=m.example.com;mobile	...11-06-20Presenter: Łukasz Serwatka23Mobile Channels in eZ PublisheZ Conference 2011
Mobile web channel in eZ Publish: viewport	Use the viewport meta tag to improve the presentation of your web content	<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=yes" /> 11-06-20Presenter: Łukasz Serwatka24Mobile Channels in eZ PublisheZ Conference 2011
DEMOPresenter: Łukasz SerwatkaSLIDE 2511-06-20
Mobile web channel in eZ Publish: hybrid appsNative shell for a mobile web		Embedded WebView	PhoneGap		access to device APIs		online build tool		wide range of supported platforms	Distributed via AppStore, Android Market, etc.	Access to download statistics	Access to the application via native shell (Icon on device screen)11-06-20Presenter: Łukasz Serwatka26Mobile Channels in eZ PublisheZ Conference 2011
DEMOPresenter: Łukasz SerwatkaSLIDE 2711-06-20
REST
REST	REpresentational	State	Transfer11-06-20Presenter: Łukasz Serwatka29Mobile Channels in eZ PublisheZ Conference 2011
REST	REpresentational	State	TransferREST is a set of principles that how Web standards, such as HTTP and URIs, are supposed to be used.	Give every “thing” an ID	Link things together	Use standard methods	Resource with multiple representations	Communicate statelessly11-06-20Presenter: Łukasz Serwatka30Mobile Channels in eZ PublisheZ Conference 2011
REST	REpresentational	State	TransferKey goals of REST include:	Scalability of component interactions	Generality of interfaces	Independent deployment of components	Intermediary components to reduce latency, enforce security and encapsulate legacy systems 11-06-20Presenter: Łukasz Serwatka31Mobile Channels in eZ PublisheZ Conference 2011
Life before eZ Publish REST interfacecustom siteaccess s and template based XML output	custom web service implementations involving eZ Publish modules/viewezjscore based web service implementations11-06-20Presenter: Łukasz Serwatka32Mobile Channels in eZ PublisheZ Conference 2011
eZ Publish REST interface	available as a core feature since version 4.511-06-20Presenter: Łukasz Serwatka33Mobile Channels in eZ PublisheZ Conference 2011
eZ Publish REST interface	available as a core feature since version 4.5	dedicated front-end controller (index_rest.php as REST endpoint)11-06-20Presenter: Łukasz Serwatka34Mobile Channels in eZ PublisheZ Conference 2011
eZ Publish REST interface	available as a core feature since version 4.5	dedicated front-end controller (index_rest.php as REST endpoint)11-06-20Presenter: Łukasz Serwatka35Mobile Channels in eZ PublisheZ Conference 2011
eZ Publish REST interface	available as a core feature since version 4.5	dedicated front-end controller (index_rest.php as REST endpoint)		based on the Zeta Components: MVCTools component11-06-20Presenter: Łukasz Serwatka36Mobile Channels in eZ PublisheZ Conference 2011
eZ Publish REST interface	available as a core feature since version 4.5	dedicated front-end controller (index_rest.php as REST endpoint)		based on the Zeta Components: MVCTools component	content retrieval only, with possibility to extend11-06-20Presenter: Łukasz Serwatka37Mobile Channels in eZ PublisheZ Conference 2011
eZ Publish REST interface	available as a core feature since version 4.5	dedicated front-end controller (index_rest.php as REST endpoint)		based on the Zeta Components: MVCTools component	content retrieval only, with possibility to extend	extensions mechanism11-06-20Presenter: Łukasz Serwatka38Mobile Channels in eZ PublisheZ Conference 2011
eZ Publish REST interface	available as a core feature since version 4.5	dedicated front-end controller (index_rest.php as REST endpoint)		based on the Zeta Components: MVCTools component	content retrieval only, with possibility to extend	extensions mechanism	versioning11-06-20Presenter: Łukasz Serwatka39Mobile Channels in eZ PublisheZ Conference 2011
eZ Publish REST interface	available as a core feature since version 4.5	dedicated front-controller (index_rest.php as REST endpoint)		based on the Zeta Components: MVCTools component	content retrieval only, with possibility to extend	extensions mechanism	versioning	OAuth 2.0 authentication11-06-20Presenter: Łukasz Serwatka40Mobile Channels in eZ PublisheZ Conference 2011
eZ Publish REST interface: other features	built-in caching	template based output for various resources	returned fields configured per request: responseGroups11-06-20Presenter: Łukasz Serwatka41Mobile Channels in eZ PublisheZ Conference 2011
eZ Publish REST interface: front-controller11-06-20Presenter: Łukasz Serwatka42Mobile Channels in eZ PublisheZ Conference 2011
eZ Publish REST interface: OAuth 2.0	web interface for applications management	support for custom OAuth login pages: override oauthloginpagelayout.tpl	configurable token expiry time in the rest.ini11-06-20Presenter: Łukasz Serwatka43Mobile Channels in eZ PublisheZ Conference 2011
eZ Publish REST interface	content is mapped into the resource		node		object		lists		fields	resources provided by the ezprestapiprovider extension		for better upgradability and easier maintenance			new resources can be provided without eZ Publish upgrade11-06-20Presenter: Łukasz Serwatka44Mobile Channels in eZ PublisheZ Conference 2011
eZ Publish REST interface	content is mapped into the resource		node		object		lists		fields	resources provided by the ezprestapiprovider extension		for better upgradability and easier maintenance			new resources can be provided without eZ Publish upgrade11-06-20Presenter: Łukasz Serwatka45Mobile Channels in eZ PublisheZ Conference 2011
ezpRestProviderInterface	every REST resource provider needs to implement ezpRestProviderInterfaceinterface ezpRestProviderInterface{    /**     * Returns registered versioned routes for provider     *     * @abstract     * @return array     */    public function getRoutes();    /**     * Returns associated with provider view controller     *     * @abstract     * @return ezpRestViewController     */    public function getViewController();}11-06-20Presenter: Łukasz Serwatka46Mobile Channels in eZ PublisheZ Conference 2011
REST URI pattern explained11-06-20Presenter: Łukasz Serwatka47Mobile Channels in eZ PublisheZ Conference 2011
REST URI pattern explained11-06-20Presenter: Łukasz Serwatka48Mobile Channels in eZ PublisheZ Conference 2011globalprefixwhichcan be configured in the rest.iniworks as a token to triggeryour re-writerule;/api/ as defaultprefix;
REST URI pattern explainedezpRestPrefixFilterInterfaceresponsible for handlingprovidersinformationresponsible for handling version tokenezpRestDefaultRegexpPrefixFilter	/ezp/ as defaultprovidertoken	v + integer (e.g v1) as a version token11-06-20Presenter: Łukasz Serwatka49Mobile Channels in eZ PublisheZ Conference 2011
Versioningversioning is supportedversion token is part of the URI resource e.g. /api/ezp/v1/…	use ezpRestVersionedRoute class to register your versioned resources11-06-20Presenter: Łukasz Serwatka50Mobile Channels in eZ PublisheZ Conference 2011
Versioning:  examples new ezpRestVersionedRoute( new ezpMvcRailsRoute( '/content/node/:nodeId/fields', 'ezpRestContentController', 'viewFields' ), 1 )	new ezpRestVersionedRoute( new ezpMvcRailsRoute( '/content/node/:nodeId/field/:fieldIdentifier', 'ezpRestContentController', 'viewField' ), 1 )	new ezpRestVersionedRoute( new ezpMvcRailsRoute( '/content/node/:nodeId/childrenCount', 'ezpRestContentController', 'countChildren' ), 1 )	new ezpRestVersionedRoute( new ezpMvcRailsRoute( '/content/object/:objectId', 'ezpRestContentController', 'viewContent' ), 1 )11-06-20Presenter: Łukasz Serwatka51Mobile Channels in eZ PublisheZ Conference 2011
Extensibilitydone via eZ Publish extension systemcreate new provider by implementing ezpRestProviderInterface	register your new versioned resources	see ezprestapiprovider extension as a source of your inspiration11-06-20Presenter: Łukasz Serwatka52Mobile Channels in eZ PublisheZ Conference 2011
Resourcescontent consumption only	full CRUD in the next versions	needs to be inline with eZ Publish PHP API11-06-20Presenter: Łukasz Serwatka53Mobile Channels in eZ PublisheZ Conference 2011
Resources: exampleGET /[api]/v1/content/object/<objectId>/fields HTTP/1.1	/content/node/:nodeId	/content/node/:nodeId/fields	/content/node/:nodeId/field/:fieldIdentifier	/content/node/:nodeId/childrenCount	/content/object/:objectId	/content/object/:objectId/fields11-06-20Presenter: Łukasz Serwatka54Mobile Channels in eZ PublisheZ Conference 2011
Resources: example11-06-20Presenter: Łukasz Serwatka55Mobile Channels in eZ PublisheZ Conference 2011
DEMOPresenter: Łukasz SerwatkaSLIDE 5611-06-20
Knowledge sharing	guidelines for the developers	mobile web	hybrid applications	native applications	source code for sample apps available on GitHub11-06-20Presenter: Łukasz Serwatka57Mobile Channels in eZ PublisheZ Conference 2011

More Related Content

PPTX
Multiplatform
PDF
Silverlight abhinav - slideshare
PDF
Silverlight - What Is It And How Can We Use It
PDF
Java Edge.2008.Web.Frameworks.Catagorized
PDF
TGI's February 2011 letter to OIP
PPT
eZ Publish REST API v2
PDF
Tn.upi.edu pdf production_and_operations_management
PDF
How can agencies engage volunteers in supporting a more included life in the...
Multiplatform
Silverlight abhinav - slideshare
Silverlight - What Is It And How Can We Use It
Java Edge.2008.Web.Frameworks.Catagorized
TGI's February 2011 letter to OIP
eZ Publish REST API v2
Tn.upi.edu pdf production_and_operations_management
How can agencies engage volunteers in supporting a more included life in the...

Viewers also liked (19)

PDF
eZ Publish Norwegian Public User Group
DOC
Tru club advisor_toolkit_cg_edits_sept101
PPTX
Accenture Spend Trends Report Q2 2014
PDF
Daftar produk halal september 2011
PDF
INFORME: Índice de Confianza Social. ESADE - Obra Social "la Caixa"
PDF
Berlin LSP : Urban Tech Republic
PDF
Loss mechanisms in Polymer-Fullerene Solar Cells
PPTX
How to set up an online community?
TXT
Mac interval tree
PDF
HP Brand Identity
PDF
Freenetlinks
PDF
Republic of Tatarstan: General Overview, State System, Economy
PDF
Mad list of filetypes
PDF
'Reggae On The Internet: Volume 1'
TXT
4000 auto approve wordpress blogs backlink list (pr8-pr1)
PPTX
Born Digital - GSE Research presentation
PDF
SAP BUSINESS BLUE PRINT PRACTICE PROJECT
PPT
online Income Tax Filing in India
PDF
Odf 06.02.2014 ukraine_military_scenario_eng
eZ Publish Norwegian Public User Group
Tru club advisor_toolkit_cg_edits_sept101
Accenture Spend Trends Report Q2 2014
Daftar produk halal september 2011
INFORME: Índice de Confianza Social. ESADE - Obra Social "la Caixa"
Berlin LSP : Urban Tech Republic
Loss mechanisms in Polymer-Fullerene Solar Cells
How to set up an online community?
Mac interval tree
HP Brand Identity
Freenetlinks
Republic of Tatarstan: General Overview, State System, Economy
Mad list of filetypes
'Reggae On The Internet: Volume 1'
4000 auto approve wordpress blogs backlink list (pr8-pr1)
Born Digital - GSE Research presentation
SAP BUSINESS BLUE PRINT PRACTICE PROJECT
online Income Tax Filing in India
Odf 06.02.2014 ukraine_military_scenario_eng
Ad

Similar to Mobile Channels in eZ Publish (20)

PDF
M Pettiti 03 12 2009.Key
PDF
M Pettiti 03 12 2009.Key
PPT
20100831 igelu mobilise_ugent
PPTX
Front Architecting for the Enterprise
PDF
frammenti storici di mobile Ux & mobile services strategies
PDF
Multichannel me - Chasing after the multichannel user
PDF
Workshop 11: Trendy web designs & prototyping
PPT
Sws lecture13
PPT
Web 2.0 and mobile web
PPT
Stanley Chia's presentation at eComm 2008
PPTX
Spectrum 16 pmc 16 - mobile and tech comm
PPT
Designing for Mobile: UX for designers and developers
PPTX
Navigating the Mobile maze
PPTX
Mobile web in eZ Publish
KEY
SparkUp 2010 Mobile UX 101
PPTX
Make a Mobile Web Site
PPS
Designing The Mobile User Experience
PDF
Building Mobile Websites with Joomla
PDF
Whitepaper Mobile Ready Websites With Bemoko Live
M Pettiti 03 12 2009.Key
M Pettiti 03 12 2009.Key
20100831 igelu mobilise_ugent
Front Architecting for the Enterprise
frammenti storici di mobile Ux & mobile services strategies
Multichannel me - Chasing after the multichannel user
Workshop 11: Trendy web designs & prototyping
Sws lecture13
Web 2.0 and mobile web
Stanley Chia's presentation at eComm 2008
Spectrum 16 pmc 16 - mobile and tech comm
Designing for Mobile: UX for designers and developers
Navigating the Mobile maze
Mobile web in eZ Publish
SparkUp 2010 Mobile UX 101
Make a Mobile Web Site
Designing The Mobile User Experience
Building Mobile Websites with Joomla
Whitepaper Mobile Ready Websites With Bemoko Live
Ad

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPT
Teaching material agriculture food technology
PPTX
Cloud computing and distributed systems.
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation theory and applications.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Spectral efficient network and resource selection model in 5G networks
NewMind AI Weekly Chronicles - August'25 Week I
Understanding_Digital_Forensics_Presentation.pptx
Encapsulation_ Review paper, used for researhc scholars
Per capita expenditure prediction using model stacking based on satellite ima...
“AI and Expert System Decision Support & Business Intelligence Systems”
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
The Rise and Fall of 3GPP – Time for a Sabbatical?
20250228 LYD VKU AI Blended-Learning.pptx
Teaching material agriculture food technology
Cloud computing and distributed systems.
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation theory and applications.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Spectral efficient network and resource selection model in 5G networks

Mobile Channels in eZ Publish

  • 1. Mobile Channels in eZ PublisheZ Conference 2011
  • 2. Łukasz SerwatkaMobile Lead Engineer at eZ SystemseZ Systems employee since March 2005 Member of the Engineering Division 8 years experience with eZ Publish 2 years experience with native mobile applications development (iOS, Android) Author of many print and online publications about eZ Publish Creator of many eZ Publish extensionsWeb: www.serwatka.netTwitter: @lserwatka11-06-20Presenter: Łukasz Serwatka2Mobile Channels in eZ PublisheZ Conference 2011
  • 3. Mobile channels available in eZ Publish mobile web channel web technologies HTML5 CSS3 & SASS JavaScript REST interface web service oriented lightweight client-server communication JSON as output format11-06-20Presenter: Łukasz Serwatka3Mobile Channels in eZ PublisheZ Conference 2011
  • 4. Content channels in eZ Publish11-06-20Presenter: Łukasz Serwatka4Mobile Channels in eZ PublisheZ Conference 2011
  • 5. Mobile channels in eZ Publish11-06-20Presenter: Łukasz Serwatka5Mobile Channels in eZ PublisheZ Conference 2011
  • 6. Environments: fragmentation Symbian (Nokia)Andorid (Google)Bada (Samsung) Windows Phone (Microsoft/Nokia)iOS (Apple) BlackBerry (RIM)webOS (Palm/HP)MeeGo (Intel/Nokia/Maemo)11-06-20Presenter: Łukasz Serwatka6Mobile Channels in eZ PublisheZ Conference 2011
  • 7. The Web Cross-platform Familiar skills & tools Easily updated Decentralized Indexed Well-understood … but11-06-20Presenter: Łukasz Serwatka7Mobile Channels in eZ PublisheZ Conference 2011
  • 8. Caveats Performance: slower to execute, limited on CPU/GPU resource Browser support: some needs to be ignored Device access: limited access to hardware, not fully there yet Debug: more difficult on the client side Discoverability: no official app store, yet Monetization: more difficult App ‘experience’11-06-20Presenter: Łukasz Serwatka8Mobile Channels in eZ PublisheZ Conference 2011
  • 9. Mobile web: engines WebKit: ~57% market share iOS Bada BlackBerry 6.0+ Symbian Andorid webOS MeeGo Presto: ~21% market share Opera Mini Opera Mobile Others: ~22% market share Gecko, Trident, Mango, UC, Obigo …11-06-20Presenter: Łukasz Serwatka9Mobile Channels in eZ PublisheZ Conference 2011
  • 10. Mobile HTML5Presenter: Łukasz Serwatka10Mobile Channels in eZ PublisheZ Conference 2011semanticsmultimediaoffline & storage3D, graphics & effectsdevice accessperformance & integrationconnectivityCSS311-06-20
  • 11. Technologies accelerometer -webkit @page CSS Text localStorage @media manifest transform <video> WebSQL GeoLocation type=camera canvas keyframe gradient touch events <audio> Web Workers CSS3 SASS … and more 11-06-20Presenter: Łukasz Serwatka11Mobile Channels in eZ PublisheZ Conference 2011
  • 12. Cross-browser mobile web frameworks JavaScript-based (programmatic approach) Sencha Touch SproutCore Markup-based (progressive enhancement approach) jQTouch jQuery Mobile11-06-20Presenter: Łukasz Serwatka12Mobile Channels in eZ PublisheZ Conference 2011
  • 13. Mobile web frameworks: why? Provide user interface components toolbars, buttons, navigation bars, etc. Smooth browser inconsistencies normalization is done under the hood, abstractions Mimic native or server paradigms UI elements, drop shadows, insets, Create consistent application architecture MVC framework11-06-20Presenter: Łukasz Serwatka13Mobile Channels in eZ PublisheZ Conference 2011
  • 14. jQTouch sponsored by Sencha Labs markup-based UI layer on top of jQuery library progressively enhances MIT license wide browser supporthttp://jqtouch.com11-06-20Presenter: Łukasz Serwatka14Mobile Channels in eZ PublisheZ Conference 2011
  • 15. jQuery Mobile still in alpha version markup-based UI layer on top of jQuery library progressively enhances MIT or GPL2 license wide browser supporthttp://jquerymobile.com11-06-20Presenter: Łukasz Serwatka15Mobile Channels in eZ PublisheZ Conference 2011
  • 16. Sencha Touch self-contained library built on ExtJS JavaScript-based approach standalone MVC applications commercial and open source licenses wide browser supporthttp://www.sencha.com/products/touch/11-06-20Presenter: Łukasz Serwatka16Mobile Channels in eZ PublisheZ Conference 2011
  • 17. Back to eZ Publish …11-06-20Presenter: Łukasz Serwatka17Mobile Channels in eZ PublisheZ Conference 2011
  • 18. Mobile web channel in eZ Publish accessible via eZ Publish “siteaccess” system; supports URI, HOST and PORT based access; permissions handling; can provide mobile optimized content and layout; template engine; content engine;11-06-20Presenter: Łukasz Serwatka18Mobile Channels in eZ PublisheZ Conference 2011
  • 19. Mobile web channel in eZ Publish: configuration Web server configuration Virtual-Host setup eZ Publish configuration Siteaccess settings Permissions setup Design extension11-06-20Presenter: Łukasz Serwatka19Mobile Channels in eZ PublisheZ Conference 2011
  • 20. Mobile web channel in eZ Publish: mobile detection Apache Mobile Filterhttp://www.apachemobilefilter.org/ No built-in solution11-06-20Presenter: Łukasz Serwatka20Mobile Channels in eZ PublisheZ Conference 2011
  • 21. Mobile web channel in eZ Publish: mobile detection Smart detection but let user choice. Place link to the desktop version of your site as well.11-06-20Presenter: Łukasz Serwatka21Mobile Channels in eZ PublisheZ Conference 2011
  • 22. Mobile web channel in eZ Publish: VH setup Possible scenarios Use a separate domain altogether (e.g www.mobile-example.com) Use a subdomain (e.g m.example.com) Probably the most popular option URI approach as alternative (e.g example.com/mobile) Use a .mobi top level domain Combine with smart detection11-06-20Presenter: Łukasz Serwatka22Mobile Channels in eZ PublisheZ Conference 2011
  • 23. Mobile web channel in eZ Publish: siteaccess /settings/override/site.ini.append.php ... [SiteAccessSettings] AvailableSiteAccessList[] AvailableSiteAccessList[]=example AvailableSiteAccessList[]=mobile MatchOrder=host HostMatchMapItems[]=www.example.com;example HostMatchMapItems[]=m.example.com;mobile ...11-06-20Presenter: Łukasz Serwatka23Mobile Channels in eZ PublisheZ Conference 2011
  • 24. Mobile web channel in eZ Publish: viewport Use the viewport meta tag to improve the presentation of your web content <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=yes" /> 11-06-20Presenter: Łukasz Serwatka24Mobile Channels in eZ PublisheZ Conference 2011
  • 26. Mobile web channel in eZ Publish: hybrid appsNative shell for a mobile web Embedded WebView PhoneGap access to device APIs online build tool wide range of supported platforms Distributed via AppStore, Android Market, etc. Access to download statistics Access to the application via native shell (Icon on device screen)11-06-20Presenter: Łukasz Serwatka26Mobile Channels in eZ PublisheZ Conference 2011
  • 28. REST
  • 30. REST REpresentational State TransferREST is a set of principles that how Web standards, such as HTTP and URIs, are supposed to be used. Give every “thing” an ID Link things together Use standard methods Resource with multiple representations Communicate statelessly11-06-20Presenter: Łukasz Serwatka30Mobile Channels in eZ PublisheZ Conference 2011
  • 31. REST REpresentational State TransferKey goals of REST include: Scalability of component interactions Generality of interfaces Independent deployment of components Intermediary components to reduce latency, enforce security and encapsulate legacy systems 11-06-20Presenter: Łukasz Serwatka31Mobile Channels in eZ PublisheZ Conference 2011
  • 32. Life before eZ Publish REST interfacecustom siteaccess s and template based XML output custom web service implementations involving eZ Publish modules/viewezjscore based web service implementations11-06-20Presenter: Łukasz Serwatka32Mobile Channels in eZ PublisheZ Conference 2011
  • 33. eZ Publish REST interface available as a core feature since version 4.511-06-20Presenter: Łukasz Serwatka33Mobile Channels in eZ PublisheZ Conference 2011
  • 34. eZ Publish REST interface available as a core feature since version 4.5 dedicated front-end controller (index_rest.php as REST endpoint)11-06-20Presenter: Łukasz Serwatka34Mobile Channels in eZ PublisheZ Conference 2011
  • 35. eZ Publish REST interface available as a core feature since version 4.5 dedicated front-end controller (index_rest.php as REST endpoint)11-06-20Presenter: Łukasz Serwatka35Mobile Channels in eZ PublisheZ Conference 2011
  • 36. eZ Publish REST interface available as a core feature since version 4.5 dedicated front-end controller (index_rest.php as REST endpoint) based on the Zeta Components: MVCTools component11-06-20Presenter: Łukasz Serwatka36Mobile Channels in eZ PublisheZ Conference 2011
  • 37. eZ Publish REST interface available as a core feature since version 4.5 dedicated front-end controller (index_rest.php as REST endpoint) based on the Zeta Components: MVCTools component content retrieval only, with possibility to extend11-06-20Presenter: Łukasz Serwatka37Mobile Channels in eZ PublisheZ Conference 2011
  • 38. eZ Publish REST interface available as a core feature since version 4.5 dedicated front-end controller (index_rest.php as REST endpoint) based on the Zeta Components: MVCTools component content retrieval only, with possibility to extend extensions mechanism11-06-20Presenter: Łukasz Serwatka38Mobile Channels in eZ PublisheZ Conference 2011
  • 39. eZ Publish REST interface available as a core feature since version 4.5 dedicated front-end controller (index_rest.php as REST endpoint) based on the Zeta Components: MVCTools component content retrieval only, with possibility to extend extensions mechanism versioning11-06-20Presenter: Łukasz Serwatka39Mobile Channels in eZ PublisheZ Conference 2011
  • 40. eZ Publish REST interface available as a core feature since version 4.5 dedicated front-controller (index_rest.php as REST endpoint) based on the Zeta Components: MVCTools component content retrieval only, with possibility to extend extensions mechanism versioning OAuth 2.0 authentication11-06-20Presenter: Łukasz Serwatka40Mobile Channels in eZ PublisheZ Conference 2011
  • 41. eZ Publish REST interface: other features built-in caching template based output for various resources returned fields configured per request: responseGroups11-06-20Presenter: Łukasz Serwatka41Mobile Channels in eZ PublisheZ Conference 2011
  • 42. eZ Publish REST interface: front-controller11-06-20Presenter: Łukasz Serwatka42Mobile Channels in eZ PublisheZ Conference 2011
  • 43. eZ Publish REST interface: OAuth 2.0 web interface for applications management support for custom OAuth login pages: override oauthloginpagelayout.tpl configurable token expiry time in the rest.ini11-06-20Presenter: Łukasz Serwatka43Mobile Channels in eZ PublisheZ Conference 2011
  • 44. eZ Publish REST interface content is mapped into the resource node object lists fields resources provided by the ezprestapiprovider extension for better upgradability and easier maintenance new resources can be provided without eZ Publish upgrade11-06-20Presenter: Łukasz Serwatka44Mobile Channels in eZ PublisheZ Conference 2011
  • 45. eZ Publish REST interface content is mapped into the resource node object lists fields resources provided by the ezprestapiprovider extension for better upgradability and easier maintenance new resources can be provided without eZ Publish upgrade11-06-20Presenter: Łukasz Serwatka45Mobile Channels in eZ PublisheZ Conference 2011
  • 46. ezpRestProviderInterface every REST resource provider needs to implement ezpRestProviderInterfaceinterface ezpRestProviderInterface{ /** * Returns registered versioned routes for provider * * @abstract * @return array */ public function getRoutes(); /** * Returns associated with provider view controller * * @abstract * @return ezpRestViewController */ public function getViewController();}11-06-20Presenter: Łukasz Serwatka46Mobile Channels in eZ PublisheZ Conference 2011
  • 47. REST URI pattern explained11-06-20Presenter: Łukasz Serwatka47Mobile Channels in eZ PublisheZ Conference 2011
  • 48. REST URI pattern explained11-06-20Presenter: Łukasz Serwatka48Mobile Channels in eZ PublisheZ Conference 2011globalprefixwhichcan be configured in the rest.iniworks as a token to triggeryour re-writerule;/api/ as defaultprefix;
  • 49. REST URI pattern explainedezpRestPrefixFilterInterfaceresponsible for handlingprovidersinformationresponsible for handling version tokenezpRestDefaultRegexpPrefixFilter /ezp/ as defaultprovidertoken v + integer (e.g v1) as a version token11-06-20Presenter: Łukasz Serwatka49Mobile Channels in eZ PublisheZ Conference 2011
  • 50. Versioningversioning is supportedversion token is part of the URI resource e.g. /api/ezp/v1/… use ezpRestVersionedRoute class to register your versioned resources11-06-20Presenter: Łukasz Serwatka50Mobile Channels in eZ PublisheZ Conference 2011
  • 51. Versioning: examples new ezpRestVersionedRoute( new ezpMvcRailsRoute( '/content/node/:nodeId/fields', 'ezpRestContentController', 'viewFields' ), 1 ) new ezpRestVersionedRoute( new ezpMvcRailsRoute( '/content/node/:nodeId/field/:fieldIdentifier', 'ezpRestContentController', 'viewField' ), 1 ) new ezpRestVersionedRoute( new ezpMvcRailsRoute( '/content/node/:nodeId/childrenCount', 'ezpRestContentController', 'countChildren' ), 1 ) new ezpRestVersionedRoute( new ezpMvcRailsRoute( '/content/object/:objectId', 'ezpRestContentController', 'viewContent' ), 1 )11-06-20Presenter: Łukasz Serwatka51Mobile Channels in eZ PublisheZ Conference 2011
  • 52. Extensibilitydone via eZ Publish extension systemcreate new provider by implementing ezpRestProviderInterface register your new versioned resources see ezprestapiprovider extension as a source of your inspiration11-06-20Presenter: Łukasz Serwatka52Mobile Channels in eZ PublisheZ Conference 2011
  • 53. Resourcescontent consumption only full CRUD in the next versions needs to be inline with eZ Publish PHP API11-06-20Presenter: Łukasz Serwatka53Mobile Channels in eZ PublisheZ Conference 2011
  • 54. Resources: exampleGET /[api]/v1/content/object/<objectId>/fields HTTP/1.1 /content/node/:nodeId /content/node/:nodeId/fields /content/node/:nodeId/field/:fieldIdentifier /content/node/:nodeId/childrenCount /content/object/:objectId /content/object/:objectId/fields11-06-20Presenter: Łukasz Serwatka54Mobile Channels in eZ PublisheZ Conference 2011
  • 55. Resources: example11-06-20Presenter: Łukasz Serwatka55Mobile Channels in eZ PublisheZ Conference 2011
  • 57. Knowledge sharing guidelines for the developers mobile web hybrid applications native applications source code for sample apps available on GitHub11-06-20Presenter: Łukasz Serwatka57Mobile Channels in eZ PublisheZ Conference 2011
  • 58. Presenter: Łukasz Serwatka58Guidelines for the usageColor schemeOrange eZ color (for Headlines, graphical elements)RGB (243/108/44)HEX (#f36f21)Blue eZ color (for highlighting, graphical elements)RGB (42/132/183)HEX (#2a84b7)Light gray eZ color (for graphical elements)RGB (147/149/152)HEX (#939598)Dark gray eZ color (for text and sublines)RGB (64/64/64)11-06-20