Joomla as a mobile App backend.
Presented at J & Beyond, 2015 in Prague.
This talk described ideas, principles and methods related to building mobile App backends in Joomla. The Joomla front end is an ideal tool to provide app content administrators the ability to control their app. We'll look at several examples of this process for Apps developed for the UK education sector. The Apps typically use RESTful JSON interfaces to pull and push data to and from the Joomla backend.
Within Joomla the FieldsAttatch a jBackend are used and extended upon. We'll look at the Joomla solution, what we used and what we added. We'll also touch on App development, including cross platform native app development with Ti Appcelerator, continuous integration of multiple rolling releases, team skill-sets, privacy issues and business cases.
It'll be a narrative of the project's journey, ideas, paths and reflections.
Although there will be some technical detail, it should appeal more generally too.
The talk was recorded and is on YouTube at...
https://www.youtube.com/watch?v=OGw-bjM4kt8
J & Beyond page...
http://jandbeyond.org/programme.html?view=session&id=45&return=L3Byb2dyYW1tZS5odG1s
6. Hi, I’m Andy
• Twitter: @AndyGasman
• LinkedIn: agaskell
• Facebook: andy.gaskell.uk
• Work: ssofb.co.uk
• Home: Aberdeen, Scotland
• I work from a home office
7. I live in Aberdeen
Scotland / UK
it’s...
• Dry
• Cold
• Windy
8.
9.
10.
11. I’m a web developer
• PHP
• CSS
• HTML
• JavaScript / jQuery
• MySQL
• Joomla
Self employed, 20+ years writing code
19. In the beginning...a Guy
called Jim
• Knows about schools
• Likes Apps
• Wants to build a business
• Keen to invest
• 95% of UK state schools don’t have
an App = opportunity
• 24k State Schools in UK
• Plus, nurseries, clubs, churches...
23. People & Skills
• Product manager: App
• App Dev: General + UI + Web
• App Dev: General + CI/CD
• Web Dev: PHP, JavaScipt, CSS etc
+
• MD: Sales & Strategy
• Sales Manager: Sales
24. Team Anatomy
• All experienced
• All remote
• Assembla + Skype, no email
• Weekly conf call
• Monthly meetings
• 2 week development cycles, mostly
• Front end and back-end working
closely
• agile but not Agile
32. Ways to make an App
• Native
– Java / Objective C / Swift
• Web Apps
– HTML5 & JavaScript
• Hybrid
– Using a platform or framework for multi
platform Apps
33. Hybrid / Multi Platform Apps
• Write once
• Often write in higher level languages
• Leverage APIs through a wrapper
• Write in one language
• Compile to Android, iOS, WinPhone,
BB and Tizen.
35. Appcelerator Titanium
• Logic in JavaScipt
• Layout in Alloy (a bit like HTML)
• Style in TSS (like CSS)
• Compiles to native components
• Lots of modules available
• Lots of APIs
• Quite good community & traction
• Open Source with corporate overlord
• Services in cloud API
36.
37. App Building Tools
• NodeJS: All build scripting done in JS
• GruntJS: JavaScript task runner
• Calabash: Automated Testing
• Go.cd Server: build-test-release
• KrauseFX Fastlane tools
– Deliver: publishes to App stores
– Snapshot: does screen grabs for
submission
41. What does the back-end
do?
• Enter content
– News
– Info
– Events
• Import calendars from ICS feeds
• Send push messages
• Set-up forms & surveys
• View & download form & survey data
• Access control
43. Why Joomla?...
• Stable & Secure
• Mobile Friendly
• Great to develop on
• All the good stuff there...
– OO & MVC
– jQuery
– Bootstrap
• Huge time-saver compared to writing
from scratch, provides many required
features out-of-the-box
44. How?
• Uses Joomla! Front-end
• Each App back-end has a separate
Joomla! install
• One custom template, branded per
App
• Visually customised to match look &
feel
• Extension for structured data -
FieldsAttatch
45. Joomla Approach
• Use as much of the core functionality
as possible
• Keep the number of extensions low
• Make the template adaptable and
responsive
47. Push Notifications
• Any item can be a push notification
• Push goes via Appcelerator cloud API
endpoint, mapped to Apple and
Android push API
• Custom code
• Runs every 2 mins as a
cron job
• And, yes, it does work on
an Apple Watch
48. Extension - Fields Attach
• Means you can add structured data
to articles as required.
• Enables all “things” to be an article,
with fields added as required.
• Used for events, notifications,
surveys, forms
• UI driven
• Code in Spanish, a little
hard to read for me
49. Extension - jBackend
• API Backend for Joomla
• Great for JSON
• Comes with boilerplate code to get
started
• Manages API keys
• API endpoint code transmits and
receives data
• Basically exposes many common
CMS functions as API endpoints
52. App Continuous Integration
• All Apps have same code-base
• New features are built into all Apps
• Key for the project, got to keep per-App costs
low
• Very Automated building system
• Structured UI themes
• Streamlined yet flexible back-ends
• Lots of “pretending to be a person” done using
PhatomJS
• Maintaining backend compatibility over versions
53. DevOps – Running Backends
• Initially running on Rochen shared
hosting, ok for 30 back-ends.
• Moved to a Rochen Managed Cloud
Server
• New backends created from a
Akeeba backup seed file.
• Scripted using UNiTE
• All scripting done in JavaScript
node.js
56. Lessons learnt - Apps
• A reliable and automated CI build
system is very complex to create
• Many App submission related tasks
are not easily automated
• iTunes submissions still get rejected
for random reasons
• Android fragmentation is not really
an issue
• App stores don’t really want you to
automate stuff
57. Lessons learnt - Back-end
• Develop with the future in mind
• Try not to accumulate technical debt
• Work closely with the App developers
• Users are typically quite non-technical,
so simple UI best
• Things need to “just work” for users
• Write a good base API and evolve it
• APIs are just awesome
• “Shell” scripting in JavaScript / Node.js
is quite nice actually
58. Lessons learnt - Commercial
• Some schools are slow at decision
making
• Huge scope for growth, have to keep
it steady
• Quite a good idea actually
• Different value propositions for
different types of schools
59. { Questions? }
Try out the Apps
Try out the Back-end
Links and references on Twitter