Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7705657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:55:06+00:00 2026-05-31T23:55:06+00:00

I have made a full application in JQM using cakePHP as the server side

  • 0

I have made a full application in JQM using cakePHP as the server side language. Application at this stage is only available via the browser.

I have used standard SQL in PHP to pull all data and I am not using JSON at all. My question is do I have to pretty much ditch cakePHP to get my application working on iPHONE and adopt a more JSON approach?

I am quite new to JSON and have issues in regards to how i’ll handle access control and controlling what data is visible to certain users.

My thoughts so far would be to build a template for Phonegap so the app works offline and offers relevent error messages and my other app could be loaded into it once the user choose to login?

Any ideas or nudge in the right direction would be tops.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:55:07+00:00Added an answer on May 31, 2026 at 11:55 pm

    PHP can use json via the built-in functions json_encode and json_decode. So you can continue using CakePHP as the backend if you want, the client should neither know nor care.

    For PHP JSON documentation, see: http://us.php.net/manual/en/function.json-encode.php

    The use of JSON is a choice of what format you send data in between the client and server. JSON happens to be convenient on the client side which is written in Javascript. You don’t need to use JSON to make an iPhone-friendly web site / web app.

    My general approach is to have a toJSON function on my PHP data objects. I have a function that I use to send JSON to the client, and it first looks for the toJSON method before sending the object. If it finds that, it calls it and sends the result of that. This gives the object a chance to present a minimal set of data members as opposed to sending everything. This is the same basic approach used in Ruby on Rails too.

    Here’s an example. Perhaps CakePHP has their own equivalent of this:

    function sendJSON($data) {
        header('Content-Type: application/json');
        header('Cache-Control: no-cache, must-revalidate');
        header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
    
        echo json_encode_custom($data);
        //echo '(' . json_encode($data) . ')';
    }
    
    function json_encode_custom($data) {
        if( is_object($data) && method_exists($data, 'toJSON') )
                $data = $data->toJSON();
        return json_encode($data);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made an application (for my self) for feeds reading, using SyndicationFeed ,
I made an application and a dll, which are working this way: I have
I have made a SVG image, or more like mini application, for viewing graphs
I have made a custom UserControl i Vb.net (windows application). How can I add
I have made a new windows service which works fine using barebone code (just
I have made a multiplayer game using the GameKit Framework where 2 iPhones/iPods can
i got this WPF application, and here i made a Splashscreen (wfp window) with
I am writing a .NET Remoting application. I have my dll, server, and client
I have made a java application and wants to generate log files so whenever
we've been using a custom made ERP application for more than 4 years, actually

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.