SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Generalizing mobile applications
     for multiple libraries

    . . .my summer project & why it was
                   fun

                   Erik Mitchell, PhD
       Assistant Director for Technology Services
               Z. Smith Reynolds Library
                 Wake Forest University
Scope

Review the area of mobile app development - iPhone
centric view :)

Define the scope of our investigation today

Look at some interesting tools

Discuss what I learned think about next steps
Mobile app development

 Platform centric

 Browser centric

 Framework centric

 http://davidbcalhoun.com/tag/jqtouch
Scoping our investigation

iOS - a project and a sigh. . .

Dashcode - a fun beginning

jQTouch, jQuery, HTML5 - platform independence

Django - Making your app a bit more dynamic
iOS application
Collaborative project with CS student

The great idea - JSON




Graduation, functionality, dynamic configuration, hard-coded
logic
Dashcode
The greatest 5 minute tutorial ever:
   – Minglu Wang on Handheld Librarian




         htttp://catalog.zsr.wfu.edu/zsr_new_videos
PastryKit


            http://davidbcalhoun.com/2009/pastrykit-
            digging-into-an-apple-pie




                                        7
Safari based - CSS / JS frameworks




  http://jqtouch.com   http://code.google.com/p/iui/
What makes an app useful?
Library equivalents

Mobile apps           Library equivalents

Focused use           Resources, location,
                      hours, contacts
Connectivity          Updates, search,
                      browsing
Session persistence   Off-line use, favorites

Information need      Discovery, location, help
                                        10
Experiment 1
   How easy is jQTouch?




http://erikmitchell.info/lita_mobile/static_site
jQTouch framework
Adding contacts
Adding RSS feeds (jQuery + jQTouch)
index.html




local.js
Going offline (ok, that was easy)

                                      library.manifest




http://erikmitchell.info/lita_mobile/static_site
Experiment 1 - Observations

                                   Easy to write
                                   Simple to maintain
                                   Focused, connected, persistent




                                  Complexity in RSS/JSON data
                                  Content updates & delegation
                                  Framework flexibility
                                  Catalog search hijacks page


    http://cloud.lib.wfu.edu/blog/tech/2010/09/27/creating-a-mobile-site-using-jqtouch-html-css-and-javascript/
Experiment 2 - Lets make it dynamic

“How can I make the app do more and be flexible enough to
work differently for each library? Can it include embedded
search, updates, and easy maintenance?”


                           Model -- View -- Controller (MVC)
                           Automatic administration interface
                           Simple template system
                           URL management

                           Relational database



                           High-level programming language
A (simple) look at the Django model




      http://cloud.lib.wfu.edu/blog/tech/2010/09/28/using-django-to-create-complex-sites-simply/
Something
a bit more
accurate:
An admin interface in 3 lines of code?




urls.py:
    admin.autodiscover()
    (r'^admin/', include(admin.site.urls)),
settings.py
    'django.contrib.admin',
A look at the Django model
 Django project filesystem   models.py     Contains your data
                                           model, used to
                                           create your
                                           database
                             views.py      Contains your
                                           view definitions
                                           and logic

                             urls.py       Maps request urls
                                           to views


                             mytemplates   customized
                                           templates called by
                                           views
Changes to site code

Four main Views
 index - A listing of multiple libraries
 details - The main application
 feed - a simple rss feed api
 search - a simple JSON search api (Thanks Vufind!)

Two main JavaScript processes (Thanks Kevin!)
 Search ajax
 Feed ajax
Bringing feed data to the front screen


dom = minidom.parse(urllib2.urlopen(library.defaultFeed))
title = dom.getElementsByTagName("title")[1].firstChild.data
link = dom.getElementsByTagName("link")[1].firstChild.data
news = { 'title': title, 'link': link }
Enabling search

def search(request):
   Search_terms = request.GET['lookfor']
   searchURL = 'http://cloud.lib.wfu.edu/vufind/Search/Results?
                    type=AllFields&submit=Find&api=json&lookfor=' +
                    search_terms
   searchContents = urllib2.urlopen(searchURL)
   return HttpResponse(searchContents) #, 'application/javascript')
Enhancing ‘What’s New’
 def feed(request, feed_id):
      feed = get_object_or_404(Feed, pk=feed_id)
      feedContents = urllib2.urlopen(feed.feedURI)
      return HttpResponse(feedContents, 'application/xml')


$.ajax({
     type: "GET",
     url: feedurl,
     dataType: "xml",
     success: function(xml)
          {
          $('#' + myFeed + ' ul').empty();
          $(xml).find("item").each(function()
               {
               var title = $(this).find('title').text();
               var pubDate = $(this).find('published').text();
               var link = $(this).find('link').text();
               var listItem = $('<li class="rounded">.....</li>');
               $('#' + myFeed + ' ul').append(listItem);
               });
          },
          error: errorMsg
     });
Multi-library site happens ‘automatically’
Library list template file - called from index view
<!DOCTYPE html>
<html><head>
   <css and stylesheet links. . . .>
   <title>List of Libraries</title>
  </head><body>
    <div id="home" class="current">
       <div class="toolbar"><h1>Mobile Library Sites</h1></div>
          <ul class="rounded">

          {% for mylibrary in libraryList %}
             <li class="forward" >
             <a target="_blank" href="/librware/site/
             {{ mylibrary.id }}">{{ mylibrary.libraryName }}</a></li>
          {% endfor %}

          </ul>
    <div class="info"> </div>
    </div>
</body>
</html>
Let’s reflect - what did Django give us?

Dynamic site with automatically generated admin interfaces

A simple-to-configure data model and easily written view/
template architecture

No database connection code, lots of pre-built libraries, MVC
architecture, simple data proxy & api calls

Integrated debugging environment

Pluggable application architecture - drop this app into your
django site & go.
Quick tour
What’s Next?

Real HTML5 - Video, geo-location, chat

Better abstraction of data model and application code

A change in default css

Better integration with standard full website

Integration with digital collections

?
Development & debugging

iPhone & Android simulators

Safari > Preferences >Advanced > Developer > client settings

Common HTML tools - firebug, data validation (jsonlint)

Bluefish, Dashcode . . .
Ok - how do you get started?

 1.    Learn html
 2.    Learn html5
 3.    Learn a bit of javascript
 4.    Learn the jQuery syntax
 5.    Learn the jQTouch framework
 6.    Learn a bit of python
 7.    Learn just a bit of data modeling
 8.    Learn Django
 9.    Figure out how to run Django on your site/server
 10.   Publish!
Ok, some easy tutorials

Stark, Johnathan Building iPhone Apps with HTML, CSS, and
JavaScript. 
 http://building-iphone-apps.labs.oreilly.com


Django Project. Django development tutorial series. http://
docs.djangoproject.com/en/dev/intro/


Calhoun, David. Developer blog. http://davidbcalhoun.com/tag/jqtouch


Mitchell, Erik. Web development tutorials. http://cloud.lib.wfu.edu/blog/
tech/category/web-development/


Get the code - http://github.com/mitcheet/
Approaches to mobile site development

Weitere ähnliche Inhalte

Was ist angesagt?

Rapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and FirebaseRapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and FirebasePeter Friese
 
Things Made Easy: One Click CMS Integration with Solr & Drupal
Things Made Easy: One Click CMS Integration with Solr & DrupalThings Made Easy: One Click CMS Integration with Solr & Drupal
Things Made Easy: One Click CMS Integration with Solr & Drupallucenerevolution
 
6 Things You Didn't Know About Firebase Auth
6 Things You Didn't Know About Firebase Auth6 Things You Didn't Know About Firebase Auth
6 Things You Didn't Know About Firebase AuthPeter Friese
 
Avtar's ppt
Avtar's pptAvtar's ppt
Avtar's pptmak57
 
Changhao jiang facebook
Changhao jiang facebookChanghao jiang facebook
Changhao jiang facebookzipeng zhang
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointRene Modery
 
SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014Mark Rackley
 
SoftLeader Jackson Training
SoftLeader Jackson TrainingSoftLeader Jackson Training
SoftLeader Jackson TrainingJini Lee
 
MongoDB & NoSQL 101
 MongoDB & NoSQL 101 MongoDB & NoSQL 101
MongoDB & NoSQL 101Jollen Chen
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14Mark Rackley
 
Building Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOSBuilding Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOSFITC
 
08 session-tracking
08 session-tracking08 session-tracking
08 session-trackingsnopteck
 
Soa development using javascript
Soa development using javascriptSoa development using javascript
Soa development using javascriptDsixE Inc
 
Jaime Velez: SharePoint 2010 Social Computing
Jaime Velez: SharePoint 2010 Social ComputingJaime Velez: SharePoint 2010 Social Computing
Jaime Velez: SharePoint 2010 Social ComputingSharePoint Saturday NY
 
What is struts_en
What is struts_enWhat is struts_en
What is struts_entechbed
 
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology Ayes Chinmay
 
SEF2013 - A jQuery Primer for SharePoint
SEF2013 - A jQuery Primer for SharePointSEF2013 - A jQuery Primer for SharePoint
SEF2013 - A jQuery Primer for SharePointMarc D Anderson
 
Rest Security with JAX-RS
Rest Security with JAX-RSRest Security with JAX-RS
Rest Security with JAX-RSFrank Kim
 

Was ist angesagt? (20)

Rapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and FirebaseRapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and Firebase
 
Things Made Easy: One Click CMS Integration with Solr & Drupal
Things Made Easy: One Click CMS Integration with Solr & DrupalThings Made Easy: One Click CMS Integration with Solr & Drupal
Things Made Easy: One Click CMS Integration with Solr & Drupal
 
6 Things You Didn't Know About Firebase Auth
6 Things You Didn't Know About Firebase Auth6 Things You Didn't Know About Firebase Auth
6 Things You Didn't Know About Firebase Auth
 
Avtar's ppt
Avtar's pptAvtar's ppt
Avtar's ppt
 
SEA Open Hack - YQL
SEA Open Hack - YQLSEA Open Hack - YQL
SEA Open Hack - YQL
 
Changhao jiang facebook
Changhao jiang facebookChanghao jiang facebook
Changhao jiang facebook
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePoint
 
SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014
 
SoftLeader Jackson Training
SoftLeader Jackson TrainingSoftLeader Jackson Training
SoftLeader Jackson Training
 
MongoDB & NoSQL 101
 MongoDB & NoSQL 101 MongoDB & NoSQL 101
MongoDB & NoSQL 101
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14
 
Building Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOSBuilding Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOS
 
08 session-tracking
08 session-tracking08 session-tracking
08 session-tracking
 
Web Mining
Web Mining Web Mining
Web Mining
 
Soa development using javascript
Soa development using javascriptSoa development using javascript
Soa development using javascript
 
Jaime Velez: SharePoint 2010 Social Computing
Jaime Velez: SharePoint 2010 Social ComputingJaime Velez: SharePoint 2010 Social Computing
Jaime Velez: SharePoint 2010 Social Computing
 
What is struts_en
What is struts_enWhat is struts_en
What is struts_en
 
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
 
SEF2013 - A jQuery Primer for SharePoint
SEF2013 - A jQuery Primer for SharePointSEF2013 - A jQuery Primer for SharePoint
SEF2013 - A jQuery Primer for SharePoint
 
Rest Security with JAX-RS
Rest Security with JAX-RSRest Security with JAX-RS
Rest Security with JAX-RS
 

Andere mochten auch

Read the silver lining: The potential of cloud computing for libraries
Read the silver lining:  The potential of cloud computing for librariesRead the silver lining:  The potential of cloud computing for libraries
Read the silver lining: The potential of cloud computing for librariesErik Mitchell
 
Federated library services
Federated library servicesFederated library services
Federated library servicesErik Mitchell
 
RISK: When What Can Never Happen — Does
RISK: When What Can Never Happen — DoesRISK: When What Can Never Happen — Does
RISK: When What Can Never Happen — DoesTechPoint
 
2013 mitchell ical_021213
2013 mitchell ical_0212132013 mitchell ical_021213
2013 mitchell ical_021213Erik Mitchell
 
Digital forsyth oa_week
Digital forsyth oa_weekDigital forsyth oa_week
Digital forsyth oa_weekErik Mitchell
 
Databases, the Cloud and its Discontents
Databases, the Cloud and its DiscontentsDatabases, the Cloud and its Discontents
Databases, the Cloud and its DiscontentsDstroyAllModels
 
Why Libraries Virtualize
Why Libraries VirtualizeWhy Libraries Virtualize
Why Libraries VirtualizeErik Mitchell
 
Making your it skills virtual
Making your it skills virtualMaking your it skills virtual
Making your it skills virtualErik Mitchell
 
Alternative Workouts: Circus Arts
Alternative Workouts: Circus ArtsAlternative Workouts: Circus Arts
Alternative Workouts: Circus ArtsSarah Sutin
 
Market study
Market studyMarket study
Market studymaeusavi
 
Cloud computing in libraries, a case study
Cloud computing in libraries, a case studyCloud computing in libraries, a case study
Cloud computing in libraries, a case studyErik Mitchell
 
Cloud computing and library services
Cloud computing and library servicesCloud computing and library services
Cloud computing and library servicesErik Mitchell
 

Andere mochten auch (20)

Read the silver lining: The potential of cloud computing for libraries
Read the silver lining:  The potential of cloud computing for librariesRead the silver lining:  The potential of cloud computing for libraries
Read the silver lining: The potential of cloud computing for libraries
 
Federated library services
Federated library servicesFederated library services
Federated library services
 
RISK: When What Can Never Happen — Does
RISK: When What Can Never Happen — DoesRISK: When What Can Never Happen — Does
RISK: When What Can Never Happen — Does
 
2013 mitchell ical_021213
2013 mitchell ical_0212132013 mitchell ical_021213
2013 mitchell ical_021213
 
Resource
Resource Resource
Resource
 
Digital forsyth
Digital forsythDigital forsyth
Digital forsyth
 
Digital forsyth oa_week
Digital forsyth oa_weekDigital forsyth oa_week
Digital forsyth oa_week
 
Databases, the Cloud and its Discontents
Databases, the Cloud and its DiscontentsDatabases, the Cloud and its Discontents
Databases, the Cloud and its Discontents
 
Why Libraries Virtualize
Why Libraries VirtualizeWhy Libraries Virtualize
Why Libraries Virtualize
 
Making your it skills virtual
Making your it skills virtualMaking your it skills virtual
Making your it skills virtual
 
Nceactpresentation
NceactpresentationNceactpresentation
Nceactpresentation
 
NYCA
NYCANYCA
NYCA
 
PoleMoves Anatomy
PoleMoves AnatomyPoleMoves Anatomy
PoleMoves Anatomy
 
Alternative Workouts: Circus Arts
Alternative Workouts: Circus ArtsAlternative Workouts: Circus Arts
Alternative Workouts: Circus Arts
 
Aerial Aerobics
Aerial AerobicsAerial Aerobics
Aerial Aerobics
 
Market study
Market studyMarket study
Market study
 
Circus
CircusCircus
Circus
 
Cloud computing in libraries, a case study
Cloud computing in libraries, a case studyCloud computing in libraries, a case study
Cloud computing in libraries, a case study
 
Cloud computing and library services
Cloud computing and library servicesCloud computing and library services
Cloud computing and library services
 
Gymnastics
GymnasticsGymnastics
Gymnastics
 

Ähnlich wie Approaches to mobile site development

Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web DevelopmentRobert J. Stein
 
BackboneJS Training - Giving Backbone to your applications
BackboneJS Training - Giving Backbone to your applicationsBackboneJS Training - Giving Backbone to your applications
BackboneJS Training - Giving Backbone to your applicationsJoseph Khan
 
Java Technology
Java TechnologyJava Technology
Java Technologyifnu bima
 
Nasdanika Foundation Server
Nasdanika Foundation ServerNasdanika Foundation Server
Nasdanika Foundation ServerPavel Vlasov
 
iPhone Web Development and Ruby On Rails
iPhone Web Development and Ruby On RailsiPhone Web Development and Ruby On Rails
iPhone Web Development and Ruby On RailsJose de Leon
 
12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocratlinoj
 
jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesMark Roden
 
one|content : joomla on steroids
one|content : joomla on steroidsone|content : joomla on steroids
one|content : joomla on steroidsPaul Delbar
 
Dojo - from web page to web apps
Dojo - from web page to web appsDojo - from web page to web apps
Dojo - from web page to web appsyoavrubin
 
uMobile Preconference Seminar
uMobile Preconference SeminaruMobile Preconference Seminar
uMobile Preconference SeminarJennifer Bourey
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks TriviaCognizant
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSAngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSmurtazahaveliwala
 
Rapid web application development using django - Part (1)
Rapid web application development using django - Part (1)Rapid web application development using django - Part (1)
Rapid web application development using django - Part (1)Nishant Soni
 
Wei ding(resume)
Wei ding(resume)Wei ding(resume)
Wei ding(resume)WEI DING
 
AEM Sightly Deep Dive
AEM Sightly Deep DiveAEM Sightly Deep Dive
AEM Sightly Deep DiveGabriel Walt
 
Ruby On Rails Basics
Ruby On Rails BasicsRuby On Rails Basics
Ruby On Rails BasicsAmit Solanki
 

Ähnlich wie Approaches to mobile site development (20)

Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
 
BackboneJS Training - Giving Backbone to your applications
BackboneJS Training - Giving Backbone to your applicationsBackboneJS Training - Giving Backbone to your applications
BackboneJS Training - Giving Backbone to your applications
 
Angular js workshop
Angular js workshopAngular js workshop
Angular js workshop
 
Java Technology
Java TechnologyJava Technology
Java Technology
 
Nasdanika Foundation Server
Nasdanika Foundation ServerNasdanika Foundation Server
Nasdanika Foundation Server
 
iPhone Web Development and Ruby On Rails
iPhone Web Development and Ruby On RailsiPhone Web Development and Ruby On Rails
iPhone Web Development and Ruby On Rails
 
12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat
 
jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPages
 
one|content : joomla on steroids
one|content : joomla on steroidsone|content : joomla on steroids
one|content : joomla on steroids
 
Dojo - from web page to web apps
Dojo - from web page to web appsDojo - from web page to web apps
Dojo - from web page to web apps
 
uMobile Preconference Seminar
uMobile Preconference SeminaruMobile Preconference Seminar
uMobile Preconference Seminar
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Django
DjangoDjango
Django
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks Trivia
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSAngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
 
Rapid web application development using django - Part (1)
Rapid web application development using django - Part (1)Rapid web application development using django - Part (1)
Rapid web application development using django - Part (1)
 
Knolx session
Knolx sessionKnolx session
Knolx session
 
Wei ding(resume)
Wei ding(resume)Wei ding(resume)
Wei ding(resume)
 
AEM Sightly Deep Dive
AEM Sightly Deep DiveAEM Sightly Deep Dive
AEM Sightly Deep Dive
 
Ruby On Rails Basics
Ruby On Rails BasicsRuby On Rails Basics
Ruby On Rails Basics
 

Approaches to mobile site development

  • 1. Generalizing mobile applications for multiple libraries . . .my summer project & why it was fun Erik Mitchell, PhD Assistant Director for Technology Services Z. Smith Reynolds Library Wake Forest University
  • 2. Scope Review the area of mobile app development - iPhone centric view :) Define the scope of our investigation today Look at some interesting tools Discuss what I learned think about next steps
  • 3. Mobile app development Platform centric Browser centric Framework centric http://davidbcalhoun.com/tag/jqtouch
  • 4. Scoping our investigation iOS - a project and a sigh. . . Dashcode - a fun beginning jQTouch, jQuery, HTML5 - platform independence Django - Making your app a bit more dynamic
  • 5. iOS application Collaborative project with CS student The great idea - JSON Graduation, functionality, dynamic configuration, hard-coded logic
  • 6. Dashcode The greatest 5 minute tutorial ever: – Minglu Wang on Handheld Librarian htttp://catalog.zsr.wfu.edu/zsr_new_videos
  • 7. PastryKit http://davidbcalhoun.com/2009/pastrykit- digging-into-an-apple-pie 7
  • 8. Safari based - CSS / JS frameworks http://jqtouch.com http://code.google.com/p/iui/
  • 9. What makes an app useful?
  • 10. Library equivalents Mobile apps Library equivalents Focused use Resources, location, hours, contacts Connectivity Updates, search, browsing Session persistence Off-line use, favorites Information need Discovery, location, help 10
  • 11. Experiment 1 How easy is jQTouch? http://erikmitchell.info/lita_mobile/static_site
  • 14. Adding RSS feeds (jQuery + jQTouch) index.html local.js
  • 15. Going offline (ok, that was easy) library.manifest http://erikmitchell.info/lita_mobile/static_site
  • 16. Experiment 1 - Observations Easy to write Simple to maintain Focused, connected, persistent Complexity in RSS/JSON data Content updates & delegation Framework flexibility Catalog search hijacks page http://cloud.lib.wfu.edu/blog/tech/2010/09/27/creating-a-mobile-site-using-jqtouch-html-css-and-javascript/
  • 17. Experiment 2 - Lets make it dynamic “How can I make the app do more and be flexible enough to work differently for each library? Can it include embedded search, updates, and easy maintenance?” Model -- View -- Controller (MVC) Automatic administration interface Simple template system URL management Relational database High-level programming language
  • 18. A (simple) look at the Django model http://cloud.lib.wfu.edu/blog/tech/2010/09/28/using-django-to-create-complex-sites-simply/
  • 20. An admin interface in 3 lines of code? urls.py: admin.autodiscover() (r'^admin/', include(admin.site.urls)), settings.py 'django.contrib.admin',
  • 21. A look at the Django model Django project filesystem models.py Contains your data model, used to create your database views.py Contains your view definitions and logic urls.py Maps request urls to views mytemplates customized templates called by views
  • 22. Changes to site code Four main Views index - A listing of multiple libraries details - The main application feed - a simple rss feed api search - a simple JSON search api (Thanks Vufind!) Two main JavaScript processes (Thanks Kevin!) Search ajax Feed ajax
  • 23. Bringing feed data to the front screen dom = minidom.parse(urllib2.urlopen(library.defaultFeed)) title = dom.getElementsByTagName("title")[1].firstChild.data link = dom.getElementsByTagName("link")[1].firstChild.data news = { 'title': title, 'link': link }
  • 24. Enabling search def search(request): Search_terms = request.GET['lookfor'] searchURL = 'http://cloud.lib.wfu.edu/vufind/Search/Results? type=AllFields&submit=Find&api=json&lookfor=' + search_terms searchContents = urllib2.urlopen(searchURL) return HttpResponse(searchContents) #, 'application/javascript')
  • 25. Enhancing ‘What’s New’ def feed(request, feed_id): feed = get_object_or_404(Feed, pk=feed_id) feedContents = urllib2.urlopen(feed.feedURI) return HttpResponse(feedContents, 'application/xml') $.ajax({ type: "GET", url: feedurl, dataType: "xml", success: function(xml) { $('#' + myFeed + ' ul').empty(); $(xml).find("item").each(function() { var title = $(this).find('title').text(); var pubDate = $(this).find('published').text(); var link = $(this).find('link').text(); var listItem = $('<li class="rounded">.....</li>'); $('#' + myFeed + ' ul').append(listItem); }); }, error: errorMsg });
  • 26. Multi-library site happens ‘automatically’ Library list template file - called from index view <!DOCTYPE html> <html><head> <css and stylesheet links. . . .> <title>List of Libraries</title> </head><body> <div id="home" class="current"> <div class="toolbar"><h1>Mobile Library Sites</h1></div> <ul class="rounded"> {% for mylibrary in libraryList %} <li class="forward" > <a target="_blank" href="/librware/site/ {{ mylibrary.id }}">{{ mylibrary.libraryName }}</a></li> {% endfor %} </ul> <div class="info"> </div> </div> </body> </html>
  • 27. Let’s reflect - what did Django give us? Dynamic site with automatically generated admin interfaces A simple-to-configure data model and easily written view/ template architecture No database connection code, lots of pre-built libraries, MVC architecture, simple data proxy & api calls Integrated debugging environment Pluggable application architecture - drop this app into your django site & go.
  • 29. What’s Next? Real HTML5 - Video, geo-location, chat Better abstraction of data model and application code A change in default css Better integration with standard full website Integration with digital collections ?
  • 30. Development & debugging iPhone & Android simulators Safari > Preferences >Advanced > Developer > client settings Common HTML tools - firebug, data validation (jsonlint) Bluefish, Dashcode . . .
  • 31. Ok - how do you get started? 1. Learn html 2. Learn html5 3. Learn a bit of javascript 4. Learn the jQuery syntax 5. Learn the jQTouch framework 6. Learn a bit of python 7. Learn just a bit of data modeling 8. Learn Django 9. Figure out how to run Django on your site/server 10. Publish!
  • 32. Ok, some easy tutorials Stark, Johnathan Building iPhone Apps with HTML, CSS, and JavaScript. http://building-iphone-apps.labs.oreilly.com Django Project. Django development tutorial series. http:// docs.djangoproject.com/en/dev/intro/ Calhoun, David. Developer blog. http://davidbcalhoun.com/tag/jqtouch Mitchell, Erik. Web development tutorials. http://cloud.lib.wfu.edu/blog/ tech/category/web-development/ Get the code - http://github.com/mitcheet/

Hinweis der Redaktion

  1. 1. Download the jQTouch framework 2. Download the jQuery framework 3. Create an HTML page that replicates the structure at the JQTouch website
  2. http://cloud.lib.wfu.edu/blog/tech/2010/09/28/migrating-your-mobile-site-to-django/
  3. http://cloud.lib.wfu.edu/blog/tech/2010/09/28/migrating-your-mobile-site-to-django/
  4. http://cloud.lib.wfu.edu/blog/tech/2010/09/28/migrating-your-mobile-site-to-django/