SlideShare ist ein Scribd-Unternehmen logo
1 von 39
Downloaden Sie, um offline zu lesen
Sencha Touch meets TYPO3


Nils Dehl, Senior Developer / Trainer

Twitter: @nilsdehl
Agenda


 About me
 Introduce Sencha Touch
 TYPO3 meets Sencha Touch
  Demo
  TYPO3 side
  Sencha Touch side
  Demo
Nils Dehl


 Senior Developer
 Trainer
 Sencha Meetup Frankfurt
 Conference Talks
 Sencha Forum: mrsunshine
 @nilsdehl
dkd Internet Service GmbH


 We
   plan
   build
   run
   complex Websites based on TYPO3 CMS
 specialized also in
   Ruby on Rails
   Sencha Touch / ExtJS
Sencha Touch 2
Sencha Touch 2


 HTML5 mobile application framework
 works on iOS, Android, BlackBerry, Kindle Fire, ...
 Features
   Smoother Scrolling and Animations
   Adaptive Layouts
   Native Packaging
   Components: Lists, Dataviews, Toolbars,
   Charts, ...
TYPO3
   meets
Sencha Touch
TYPO3 meets Sencha Touch


 manage content in TYPO3
   menu‘s from pages
   content
     text
     text + image
     news
 display content in mobile Sencha Touch
 web application
Demo
TYPO3
Render JSON Content


 json_content extension
 registers a new cObject type JSON_CONTENT
 configured by TypoScript
 used in custom page types
 renders content as JSON object
 optional JSONP wrap for cross domain api calls
Page type for JSON CE‘s


    jsonCEsPage = PAGE
jsonCEsPage {
  typeNum = 1000
  
   config {
    additionalHeaders = Content-type:application/json
    disableAllHeaderCode = 1
    xhtml_cleaning = 0
    admPanel = 0
    debug = 0
    tx_realurl_enable = 0
    absRefPrefix = http://typo3.local/typo3senchatouch/
  }
  
  10 = JSON_CONTENT
  10 {
    table = tt_content
    select {
      selectFields = uid, pid, CType, header, bodytext, image
    }
    fieldRendering {
Page type for JSON CE‘s


         fieldRendering {
        image {
          
          split{
            token =,
            cObjNum = 1
            1 = COA
            1 {
              5 = IMG_RESOURCE
              5{
                file{
                  import.current = 1
                  import = uploads/pics/

              }
            }
            wrap = |,
          }
        }
      }
    }
  }
Page type for JSON pages


  jsonPages < jsonCEsPage
jsonPages {
  typeNum = 1001

  10 {
    table = pages
    select {
      selectFields = uid, pid, title
    }
  }
}
/index.php?id=51&type=1001


    {
        "success": true,
        "items": [
            {
                "uid": "52",
                "pid": "51",
                "title": "History"
            },
            {
                "uid": "53",
                "pid": "51",
                "title": "Community"
            }
        ],
        "total": 2
}
/index.php?id=53&type=1000
{
    success: true,
    items: [
        {
             uid: "213",
             pid: "53",
             CType: "text",
             header: "TYPO3: Inspiring People to Share",
             bodytext: "The real driving force behind TYPO3’s
                         development is its expanding,...",
             image: null
        },
        {
             uid: "214",
             pid: "53",
             CType: "textpic",
             header: "Community Events",
             bodytext: "There are a number of recurring TYPO3 events
                         and conferences. ...",
             image: "uploads/pics/team-t3board10.jpg,"
        }
    ],
    total: 2
}
Sencha Touch
Sencha Touch App


 MVC
 uses TYPO3 API to load
   Pages
   Content from a page
   by page id and page type
Displaying Pages


 Model
 List View
 Controller
 Store
Model

    Ext.define('T3.model.Page', {
	   extend: 'Ext.data.Model',

	 config: {
	 	 fields: [
	 	 	 {
	 	 	 	 name:     'uid',
	 	 	 	 type:     'int'
	 	 	 }, {
	 	 	 	 name:     'pid',
	 	 	 	 type:     'int'
	 	 	 }, {
	 	 	 	 name:     'title',
	 	 	 	 type:     'string'
	 	 	 }
	 	 ]
	 }
});
Store

   Ext.define('T3.store.Pages', {
	 extend: 'Ext.data.Store',
	 config: {
	 	 model: 'T3.model.Page',
	 	 proxy: {
	 	 	 type: 'jsonp',
	 	 	 extraParams: {
	 	 	 	 id: 51,
	 	 	 	 type: 1001
	 	 	 },
	 	 	 url: 'http://typo3.local/typo3senchatouch/',
	 	 	 reader: {
	 	 	 	 type: 'json',
	 	 	 	 idProperty: 'uid',
	 	 	 	 rootProperty: 'items'
	 	 	 }
	 	 }
	 }
});
View - List

    Ext.define('T3.view.PagesList', {
	   extend: 'Ext.dataview.List',

	 config: {
	 	 store: 'Pages',
	 	 itemTpl: '{title}',
	 	 items: [
	 	 	 {
	 	 	 	 xtype: 'titlebar',
	 	 	 	 title: 'Pages',
	 	 	 	 docked: 'top'
	 	 	 }
	 	 ]
	 }
});
Controller

    Ext.define('T3.controller.Pages', {
	   extend: 'Ext.app.Controller',
	   config: {
	   	 refs: {
	   	 	 contentView: 'contentlist'
	   	 },
	   	 control: {
	   	 	 'pageslist': {
	   	 	 	 itemtap: 'onPageItemTap'
	   	 	 }
	   	 }
	   },
	   onPageItemTap: function(list, index, target, record) {
	   	 var store = Ext.getStore('Content'),
	   	 	 proxy = store.getProxy(),
	   	 	 view = this.getContentView(),
	   	 	 parentView = view.up('container');

	   	   proxy.setExtraParam( 'id', record.get('uid'));
	   	   store.load();
	   	   view.down('titlebar').setTitle(record.get('title'));
	   	   parentView.setActiveItem(view);
	   }
Displaying Content Elements


 Model
 Data View
 Controller
 Store
DataView render CE‘s

    Ext.define('T3.view.ContentList', {
	   extend: 'Ext.dataview.DataView',

	  config: {
	  	 store: 'Content',
	  	 styleHtmlContent: true,
	  	 itemTpl: [
	  	 	 '<div class="ce">',
	  	 	 '	 <h1>{header}</h1>',
	  	 	 '	 <div class="bodytext">{bodytext}</div>',
	  	 	 '	 <div class="images">',
	  	 	 '	 	 <tpl if="ctype == 'textpic'">',
	  	 	 '	 	 	 <tpl for="images">',
	  	 	 '	 	 	 	 <img href="http://src.sencha.io/{.}" alt="" />',
	  	 	 '	 	 	 </tpl>',
	  	 	 ' 		 </tpl>',
	  	 	 '	 </div>',
	  	 	 '</div>'
	  	 ],
    }
});
Sencha.io src cloud service


 src.sencha.io
 resize images
   altering sizes
   percentage sizing
 data URLs
 domain sharding
Template using src.sencha.io




itemTpl: [
'<tpl if="ctype == 'textpic'">',
	 '<tpl for="images">',
    '<img src="http://src.sencha.io/{.}" />',
	 '</tpl>',
'</tpl>'
]
Demo
+
dkd
     development
     kommunikation
     design




thank you.
???
mail@nils-dehl.de




       @nilsdehl


flickr.com/photos/nils-dehl/

Weitere ähnliche Inhalte

Was ist angesagt?

Aggregation in MongoDB
Aggregation in MongoDBAggregation in MongoDB
Aggregation in MongoDB
Kishor Parkhe
 
Ruby Development and MongoMapper (John Nunemaker)
Ruby Development and MongoMapper (John Nunemaker)Ruby Development and MongoMapper (John Nunemaker)
Ruby Development and MongoMapper (John Nunemaker)
MongoSF
 
Hadoop - MongoDB Webinar June 2014
Hadoop - MongoDB Webinar June 2014Hadoop - MongoDB Webinar June 2014
Hadoop - MongoDB Webinar June 2014
MongoDB
 
SH 1 - SES 2 part 2 - Tel Aviv MDBlocal - Eliot Keynote.pptx
SH 1 - SES 2 part 2 - Tel Aviv MDBlocal - Eliot Keynote.pptxSH 1 - SES 2 part 2 - Tel Aviv MDBlocal - Eliot Keynote.pptx
SH 1 - SES 2 part 2 - Tel Aviv MDBlocal - Eliot Keynote.pptx
MongoDB
 
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
MongoDB
 
San Francisco Java User Group
San Francisco Java User GroupSan Francisco Java User Group
San Francisco Java User Group
kchodorow
 

Was ist angesagt? (20)

Back to basics Italian webinar 2 Mia prima applicazione MongoDB
Back to basics Italian webinar 2  Mia prima applicazione MongoDBBack to basics Italian webinar 2  Mia prima applicazione MongoDB
Back to basics Italian webinar 2 Mia prima applicazione MongoDB
 
Inside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source DatabaseInside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source Database
 
Agg framework selectgroup feb2015 v2
Agg framework selectgroup feb2015 v2Agg framework selectgroup feb2015 v2
Agg framework selectgroup feb2015 v2
 
jQuery Datatables With MongDb
jQuery Datatables With MongDbjQuery Datatables With MongDb
jQuery Datatables With MongDb
 
Schema design
Schema designSchema design
Schema design
 
Mongo db dla administratora
Mongo db dla administratoraMongo db dla administratora
Mongo db dla administratora
 
MongoDB
MongoDBMongoDB
MongoDB
 
Aggregation in MongoDB
Aggregation in MongoDBAggregation in MongoDB
Aggregation in MongoDB
 
Ruby Development and MongoMapper (John Nunemaker)
Ruby Development and MongoMapper (John Nunemaker)Ruby Development and MongoMapper (John Nunemaker)
Ruby Development and MongoMapper (John Nunemaker)
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
Hadoop - MongoDB Webinar June 2014
Hadoop - MongoDB Webinar June 2014Hadoop - MongoDB Webinar June 2014
Hadoop - MongoDB Webinar June 2014
 
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
 
SH 1 - SES 2 part 2 - Tel Aviv MDBlocal - Eliot Keynote.pptx
SH 1 - SES 2 part 2 - Tel Aviv MDBlocal - Eliot Keynote.pptxSH 1 - SES 2 part 2 - Tel Aviv MDBlocal - Eliot Keynote.pptx
SH 1 - SES 2 part 2 - Tel Aviv MDBlocal - Eliot Keynote.pptx
 
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
 
San Francisco Java User Group
San Francisco Java User GroupSan Francisco Java User Group
San Francisco Java User Group
 
Webinar: Exploring the Aggregation Framework
Webinar: Exploring the Aggregation FrameworkWebinar: Exploring the Aggregation Framework
Webinar: Exploring the Aggregation Framework
 
Making web stack tasty using Cloudformation
Making web stack tasty using CloudformationMaking web stack tasty using Cloudformation
Making web stack tasty using Cloudformation
 
MongoDB .local Munich 2019: Aggregation Pipeline Power++: How MongoDB 4.2 Pip...
MongoDB .local Munich 2019: Aggregation Pipeline Power++: How MongoDB 4.2 Pip...MongoDB .local Munich 2019: Aggregation Pipeline Power++: How MongoDB 4.2 Pip...
MongoDB .local Munich 2019: Aggregation Pipeline Power++: How MongoDB 4.2 Pip...
 
Mongodb Aggregation Pipeline
Mongodb Aggregation PipelineMongodb Aggregation Pipeline
Mongodb Aggregation Pipeline
 
MongoDB .local Munich 2019: Best Practices for Working with IoT and Time-seri...
MongoDB .local Munich 2019: Best Practices for Working with IoT and Time-seri...MongoDB .local Munich 2019: Best Practices for Working with IoT and Time-seri...
MongoDB .local Munich 2019: Best Practices for Working with IoT and Time-seri...
 

Ähnlich wie Sencha Touch meets TYPO3

Webinar: Build an Application Series - Session 2 - Getting Started
Webinar: Build an Application Series - Session 2 - Getting StartedWebinar: Build an Application Series - Session 2 - Getting Started
Webinar: Build an Application Series - Session 2 - Getting Started
MongoDB
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Jeado Ko
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
FIWARE
 
S01 e01 schema-design
S01 e01 schema-designS01 e01 schema-design
S01 e01 schema-design
MongoDB
 
Mongoid in the real world
Mongoid in the real worldMongoid in the real world
Mongoid in the real world
Kevin Faustino
 

Ähnlich wie Sencha Touch meets TYPO3 (20)

Sencha Touch Meets TYPO3 CMS
Sencha Touch Meets TYPO3 CMSSencha Touch Meets TYPO3 CMS
Sencha Touch Meets TYPO3 CMS
 
The Ring programming language version 1.5.3 book - Part 53 of 184
The Ring programming language version 1.5.3 book - Part 53 of 184The Ring programming language version 1.5.3 book - Part 53 of 184
The Ring programming language version 1.5.3 book - Part 53 of 184
 
The Ring programming language version 1.5.3 book - Part 43 of 184
The Ring programming language version 1.5.3 book - Part 43 of 184The Ring programming language version 1.5.3 book - Part 43 of 184
The Ring programming language version 1.5.3 book - Part 43 of 184
 
Webinar: Build an Application Series - Session 2 - Getting Started
Webinar: Build an Application Series - Session 2 - Getting StartedWebinar: Build an Application Series - Session 2 - Getting Started
Webinar: Build an Application Series - Session 2 - Getting Started
 
The Ring programming language version 1.10 book - Part 53 of 212
The Ring programming language version 1.10 book - Part 53 of 212The Ring programming language version 1.10 book - Part 53 of 212
The Ring programming language version 1.10 book - Part 53 of 212
 
Sencha Touch basic concepts, pros and cons
Sencha Touch basic concepts, pros and consSencha Touch basic concepts, pros and cons
Sencha Touch basic concepts, pros and cons
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점 Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
 
Back to Basics 2017 - Your First MongoDB Application
Back to Basics 2017 - Your First MongoDB ApplicationBack to Basics 2017 - Your First MongoDB Application
Back to Basics 2017 - Your First MongoDB Application
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
 
ELK Stack - Turn boring logfiles into sexy dashboard
ELK Stack - Turn boring logfiles into sexy dashboardELK Stack - Turn boring logfiles into sexy dashboard
ELK Stack - Turn boring logfiles into sexy dashboard
 
RIA - Entwicklung mit Ext JS
RIA - Entwicklung mit Ext JSRIA - Entwicklung mit Ext JS
RIA - Entwicklung mit Ext JS
 
Aprimorando sua Aplicação com Ext JS 4 - BrazilJS
Aprimorando sua Aplicação com Ext JS 4 - BrazilJSAprimorando sua Aplicação com Ext JS 4 - BrazilJS
Aprimorando sua Aplicação com Ext JS 4 - BrazilJS
 
S01 e01 schema-design
S01 e01 schema-designS01 e01 schema-design
S01 e01 schema-design
 
MongoDB - Back to Basics - La tua prima Applicazione
MongoDB - Back to Basics - La tua prima ApplicazioneMongoDB - Back to Basics - La tua prima Applicazione
MongoDB - Back to Basics - La tua prima Applicazione
 
The Ring programming language version 1.2 book - Part 31 of 84
The Ring programming language version 1.2 book - Part 31 of 84The Ring programming language version 1.2 book - Part 31 of 84
The Ring programming language version 1.2 book - Part 31 of 84
 
Mongoid in the real world
Mongoid in the real worldMongoid in the real world
Mongoid in the real world
 
Python Code Camp for Professionals 1/4
Python Code Camp for Professionals 1/4Python Code Camp for Professionals 1/4
Python Code Camp for Professionals 1/4
 
Educate 2017: Customizing Authoring: How our APIs let you create powerful sol...
Educate 2017: Customizing Authoring: How our APIs let you create powerful sol...Educate 2017: Customizing Authoring: How our APIs let you create powerful sol...
Educate 2017: Customizing Authoring: How our APIs let you create powerful sol...
 
SenchaCon 2016: Handle Real-World Data with Confidence - Fredric Berling
SenchaCon 2016: Handle Real-World Data with Confidence - Fredric Berling SenchaCon 2016: Handle Real-World Data with Confidence - Fredric Berling
SenchaCon 2016: Handle Real-World Data with Confidence - Fredric Berling
 

Mehr von Nils Dehl

Mehr von Nils Dehl (6)

Dynamic package loading 
and routing with Ext JS
Dynamic package loading 
and routing with Ext JSDynamic package loading 
and routing with Ext JS
Dynamic package loading 
and routing with Ext JS
 
jsday.it - develop and test custom components for sencha touch by nils dehl
jsday.it - develop and test custom components for sencha touch by nils dehljsday.it - develop and test custom components for sencha touch by nils dehl
jsday.it - develop and test custom components for sencha touch by nils dehl
 
Workshop getting started with sencha touch 2 - nils dehl
Workshop   getting started with sencha touch 2 - nils dehlWorkshop   getting started with sencha touch 2 - nils dehl
Workshop getting started with sencha touch 2 - nils dehl
 
SenchaTouch 2 and Sencha.io
SenchaTouch 2 and Sencha.ioSenchaTouch 2 and Sencha.io
SenchaTouch 2 and Sencha.io
 
SenchaCon 2011 VGF Showcase
SenchaCon 2011 VGF ShowcaseSenchaCon 2011 VGF Showcase
SenchaCon 2011 VGF Showcase
 
Development of the TYPO3 Phoenix User Interface with Ext JS
Development of the TYPO3 Phoenix User Interface with Ext JSDevelopment of the TYPO3 Phoenix User Interface with Ext JS
Development of the TYPO3 Phoenix User Interface with Ext JS
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Sencha Touch meets TYPO3

  • 1. Sencha Touch meets TYPO3 Nils Dehl, Senior Developer / Trainer Twitter: @nilsdehl
  • 2. Agenda About me Introduce Sencha Touch TYPO3 meets Sencha Touch Demo TYPO3 side Sencha Touch side Demo
  • 3. Nils Dehl Senior Developer Trainer Sencha Meetup Frankfurt Conference Talks Sencha Forum: mrsunshine @nilsdehl
  • 4. dkd Internet Service GmbH We plan build run complex Websites based on TYPO3 CMS specialized also in Ruby on Rails Sencha Touch / ExtJS
  • 6. Sencha Touch 2 HTML5 mobile application framework works on iOS, Android, BlackBerry, Kindle Fire, ... Features Smoother Scrolling and Animations Adaptive Layouts Native Packaging Components: Lists, Dataviews, Toolbars, Charts, ...
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. TYPO3 meets Sencha Touch
  • 15. TYPO3 meets Sencha Touch manage content in TYPO3 menu‘s from pages content text text + image news display content in mobile Sencha Touch web application
  • 16. Demo
  • 17. TYPO3
  • 18. Render JSON Content json_content extension registers a new cObject type JSON_CONTENT configured by TypoScript used in custom page types renders content as JSON object optional JSONP wrap for cross domain api calls
  • 19. Page type for JSON CE‘s jsonCEsPage = PAGE jsonCEsPage {   typeNum = 1000       config {     additionalHeaders = Content-type:application/json     disableAllHeaderCode = 1     xhtml_cleaning = 0     admPanel = 0     debug = 0     tx_realurl_enable = 0     absRefPrefix = http://typo3.local/typo3senchatouch/   }      10 = JSON_CONTENT   10 {     table = tt_content     select {       selectFields = uid, pid, CType, header, bodytext, image     }     fieldRendering {
  • 20. Page type for JSON CE‘s     fieldRendering {       image {                  split{           token =,           cObjNum = 1           1 = COA           1 {             5 = IMG_RESOURCE             5{               file{                 import.current = 1                 import = uploads/pics/               }             }             wrap = |,           }         }       }     }   }
  • 21. Page type for JSON pages jsonPages < jsonCEsPage jsonPages {   typeNum = 1001   10 {     table = pages     select {       selectFields = uid, pid, title     }   } }
  • 22. /index.php?id=51&type=1001 { "success": true, "items": [ { "uid": "52", "pid": "51", "title": "History" }, { "uid": "53", "pid": "51", "title": "Community" } ], "total": 2 }
  • 23. /index.php?id=53&type=1000 { success: true, items: [ { uid: "213", pid: "53", CType: "text", header: "TYPO3: Inspiring People to Share", bodytext: "The real driving force behind TYPO3’s development is its expanding,...", image: null }, { uid: "214", pid: "53", CType: "textpic", header: "Community Events", bodytext: "There are a number of recurring TYPO3 events and conferences. ...", image: "uploads/pics/team-t3board10.jpg," } ], total: 2 }
  • 25. Sencha Touch App MVC uses TYPO3 API to load Pages Content from a page by page id and page type
  • 26. Displaying Pages Model List View Controller Store
  • 27. Model Ext.define('T3.model.Page', { extend: 'Ext.data.Model', config: { fields: [ { name: 'uid', type: 'int' }, { name: 'pid', type: 'int' }, { name: 'title', type: 'string' } ] } });
  • 28. Store Ext.define('T3.store.Pages', { extend: 'Ext.data.Store', config: { model: 'T3.model.Page', proxy: { type: 'jsonp', extraParams: { id: 51, type: 1001 }, url: 'http://typo3.local/typo3senchatouch/', reader: { type: 'json', idProperty: 'uid', rootProperty: 'items' } } } });
  • 29. View - List Ext.define('T3.view.PagesList', { extend: 'Ext.dataview.List', config: { store: 'Pages', itemTpl: '{title}', items: [ { xtype: 'titlebar', title: 'Pages', docked: 'top' } ] } });
  • 30. Controller Ext.define('T3.controller.Pages', { extend: 'Ext.app.Controller', config: { refs: { contentView: 'contentlist' }, control: { 'pageslist': { itemtap: 'onPageItemTap' } } }, onPageItemTap: function(list, index, target, record) { var store = Ext.getStore('Content'), proxy = store.getProxy(), view = this.getContentView(), parentView = view.up('container'); proxy.setExtraParam( 'id', record.get('uid')); store.load(); view.down('titlebar').setTitle(record.get('title')); parentView.setActiveItem(view); }
  • 31. Displaying Content Elements Model Data View Controller Store
  • 32. DataView render CE‘s Ext.define('T3.view.ContentList', { extend: 'Ext.dataview.DataView', config: { store: 'Content', styleHtmlContent: true, itemTpl: [ '<div class="ce">', ' <h1>{header}</h1>', ' <div class="bodytext">{bodytext}</div>', ' <div class="images">', ' <tpl if="ctype == 'textpic'">', ' <tpl for="images">', ' <img href="http://src.sencha.io/{.}" alt="" />', ' </tpl>', ' </tpl>', ' </div>', '</div>' ], } });
  • 33. Sencha.io src cloud service src.sencha.io resize images altering sizes percentage sizing data URLs domain sharding
  • 34. Template using src.sencha.io itemTpl: [ '<tpl if="ctype == 'textpic'">', '<tpl for="images">', '<img src="http://src.sencha.io/{.}" />', '</tpl>', '</tpl>' ]
  • 35. Demo
  • 36. +
  • 37. dkd development kommunikation design thank you.
  • 38. ???
  • 39. mail@nils-dehl.de @nilsdehl flickr.com/photos/nils-dehl/