Results 1 to 5 of 5

Thread: Structuring php For HTML5 and Mobile Devices

Hybrid View

  1. #1
    Join Date
    Aug 2003
    Sydney, Australia

    Structuring php For HTML5 and Mobile Devices

    Hi All,

    I'm taking my first tentative steps into mobile apps and want to create one that accesses data on my apache/php/mysql server.

    That means I need to step back and think carefully first about how to build the core code so that all of the functions work cross platform... that is, I need to redesign my website so that it's mobile device ready.

    The site is a membership activity site that records member attendance at meetings, and also allows members to link to each other as friends. After I started writing it in the old way, I realised that when the mobile apps get built, I will need a different back end to service them. I'm therefore wondering how I structure things so that I have a single back end that services both the website and the mobile apps.

    Do I use XML, AJAX or something else?

    I know this is a vague, open ended question for which there are probably many answers, and if this is the wrong spot for the question, I apologise.

    Also, if anyone can recomment an RAD environment that can help with all this, I'd be grateful.

    Oh Lord, please help me be the person my dog thinks I am.

  2. #2
    Join Date
    Oct 2010
    Well what I do in an MVC pattern is to have multiple views and my dispatching controller will determine whether to load a view for a full page (header, nav, etc) or to load a view for a json response (to be used in AJAX) that way my models, core controllers, helpers, etc all function the same as they take and return the same data structure no matter what the response. It is the view being called that determines how to send it to the user.

    I'd be glad to explain more if you're in an environment using MVC and have some more specific questions to how it works. Otherwise a generalized overview is the best I can do oft the top of my head.
    www.rdennispallas.com <-- Personal Site, changing regularly cuz its ugly.

  3. #3
    Join Date
    Aug 2012
    A large part of supporting multiple devices is a matter of sending the right stylesheet. You can determine what kind of client you have from the request, and simply send back the requested page with an optimized stylesheet, and perhaps alternate version of graphics included.

    Unless you are doing a lot of scripting on the client side, there is no reason it takes a lot of extra coding to support multiple browsers, multiple versions of browsers, multiple resolutions, and multiple devices.
    one of my toys And my repository and my old self ranting plus a bonus Getting the most out of Q/A sites
    Code that is 100% standards compliant is 100% correct 100% of the time... anything else is just a hack

  4. #4
    Join Date
    Aug 2003
    Sydney, Australia

    So let me get this right...
    I use the back end to serve up content according to the detected user agent. That makes sense to me, but to cut down on work, it seems to me that the most efficient solution is simply to have an app that runs in a browser shell (that is, a browser without any of the navigation).

    The user would download an app that's just a browser shell with an embedded line of code directing that browser to a web address, and an icon/logo to make it unique. That way, it's the CSS that does the heavy lifting rather than a whole bunch of javascript data exchange functions on the device. Am I right or am I missing something?

    And if I go that way, first, is there such a browser shell, and don't I then have a problem getting the various app stores to recognise that my site is a real app?
    Oh Lord, please help me be the person my dog thinks I am.

  5. #5
    Join Date
    Aug 2012
    Going back and forth with a shell getting something from a web site actually how some apps work. However it is not a browser shell, it is a widget that you develop and it launches the browser native to the device. You would basically have to develop an version of that piece for each device/os you want to support.
    one of my toys And my repository and my old self ranting plus a bonus Getting the most out of Q/A sites
    Code that is 100% standards compliant is 100% correct 100% of the time... anything else is just a hack

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.12346 seconds
  • Memory Usage 3,021KB
  • Queries Executed 13 (?)
More Information
Template Usage (29):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (5)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (27):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./includes/functions_threadedmode.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (71):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • bbcode_parse_start
  • postbit_imicons
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates