+ Post New Thread
Results 1 to 6 of 6
Web Development Thread, Need some pointers in Coding and Web Development; I am starting a new project which is going to be a website based on PHP. I'm quite handy with ...
  1. #1

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    241

    Need some pointers

    I am starting a new project which is going to be a website based on PHP. I'm quite handy with PHP/MySQL/HTML etc, but need some advice on something completely new to me.

    The website will grab information from the database and display it in a browser - simples. But once the website is completed I will continue the project by developing an Android app. What is the best way to produce this website so that the same queries etc can easily be ported to Android?

    I've heard that XML is the way to do this, but I really don't know how/where to start. Can anybody point me in the direction of creating a website that can be easily ported to Android afterwards?

  2. #2

    ZeroHour's Avatar
    Join Date
    Dec 2005
    Location
    Edinburgh, Scotland
    Posts
    5,645
    Thank Post
    895
    Thanked 1,314 Times in 798 Posts
    Blog Entries
    1
    Rep Power
    444
    Erm are you talking about making a mobile friendly web page or an actual app?
    Android uses java as its base language which means you have to learn that first (which is not too bad tbh)

  3. #3

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,403
    Thank Post
    637
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    319
    I would probably look at implementing a REST-based service for the Android/remote part. Code your internal/database interaction as classes and functions, and then have the website and the REST interface use these as needed.

    Use something like Flourish or CodeIgniter to help you; why re-invent the wheel?

    I saw a great presentation by PHP guru Loran Jane Mitchell a few months ago - PHP And Web Services: Perfect Partners

  4. #4

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    241
    It's a case of making an actual app, rather than a web page designed for mobile devices. I've looked at SOAP and REST and it looks like I'm to do some extra reading to understand fully....

  5. #5

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,809
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168
    I've seen other suggestions that for small number of queries is to just to http get/post calls to "dark" php pages on your server and then scrape the resulting output.

    But not tried it yet

    regards

    Simon

  6. #6

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,623
    Thank Post
    1,240
    Thanked 777 Times in 674 Posts
    Rep Power
    235
    Quote Originally Posted by Hightower View Post
    What is the best way to produce this website so that the same queries etc can easily be ported to Android?
    Is the problem that you don't know how to produce a "web service", or that you don't know how to go about writing an Android app, or a mixture of the two? Do the queries to the database need to be secure? If not , the simplest thing possible is to simply write a PHP page that outputs the result of a query as XML instead of HTML. It can still take parameters like a normal PHP page, so all you have to do is visit a URL such as "http://app.com/doQuery?name=fred&colour=blue" and get a bunch of XML in return. According to this post:

    How to call web service with Android - Stack Overflow

    JSON might be a more suitible format to return your results in, though.

    --
    David Hicks

SHARE:
+ Post New Thread

Similar Threads

  1. Laser pointers
    By theeldergeek in forum Hardware
    Replies: 4
    Last Post: 12th March 2010, 01:22 PM
  2. Multiple Mouse Pointers
    By plexer in forum Educational Software
    Replies: 16
    Last Post: 1st March 2010, 11:22 PM
  3. Some pointers for setup
    By cromertech in forum Windows Server 2008
    Replies: 4
    Last Post: 16th October 2008, 09:43 AM
  4. Replies: 4
    Last Post: 13th October 2008, 11:36 AM
  5. DNS Pointers pleeze
    By mark in forum Windows
    Replies: 6
    Last Post: 20th January 2007, 09:34 PM

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
  •