Suggestions for technology for web service with both web and mobile clients

General Tech Technology & Software 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Technology & Software related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

I have set up a LAMP server on aws. I am planning to create a web service with both a web client and an android client. I am not exactly sure where to start. I would like to create a RESTful service but have no experience with it and don't know where to start. I have hit restful services for the android app that I have created but have not designed one myself. I have worked with Java and RoR. I would like to learn Python as well if required. Any suggestions would be great.

question in short: What technology to use for a web service with both a mobile client and a web based client?

profilepic.png
manpreet 2 years ago

Make the user interface using HTML and then get the data asynchronous (eg: AJAX) using JavaScript from the server.

This has the advantage that both the desktop and the mobile client can eventually be the same, while the server can completely ignore the user-interface mechanics and focus on the services you are providing.

If you want to make the mobile client "Native" (eg: android app), then you merely make it "talk" with the server using HTML asynchronous requests.

Edit: On the server side you can do something like this:

// extract uri from request
$request = explode("?", $_SERVER["REQUEST_URI"]);
$uri = explode("/", $request[0]);

// sanitize user input
foreach($_POST as $k => &$v) $v = addslashes($v);

// prepare file input
foreach($_FILES as $k => $v)
{
  if (empty($k) or empty($v)) unset($_FILES[$k]);
}

This give you the request details, then client-side you do requests like:

site.com?php_service/param1/param2/...

0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.