Use Rexsee, Jquery, PHP to develop data interactions in mobile apps

Source: Internet
Author: User
Use Rexsee, Jquery, PHP to develop data interaction issues in mobile applications

?

Rexsee community of an experience paste, turn around, mainly to introduce the realization of data interaction this piece, learn together:

?

When developing a mobile sales product, users require data interaction through webservice calls. Using Rexsee,jquery-mobile,php,webservice Several development tools can do the device call to complete the photos, positioning and other functions, using the Juqery-mobile development interface, using php+ SOAP completes the data interaction function of database and webservice, using PHP to encapsulate the return data and return to the front end through JSON, so that the data can be asynchronously interacted with, and the return result standard is uniform and usability is strong. Here are a few examples:

Login page:

?

?

  
 
   
 
    Mobile Sales  
 
   
 
       
?

?

The above page through Jquery-mobile display a login page, click Submit after the asynchronous call Func_sap function complete Webserivce call and return, return data in JSON form, through JavaScript JSON function extracts and processing data.

func_soap.php file
 
   $phone); $objectresult = $soap _client->agetshop ($param); $simpleresult = $objectresult- >AgetShopResult; $obj = simplexml_load_string ($simpleresult); $obj->shop[0]->addchild ("Oper", "Getshop"); $json = Json_encode ($ obj); $array = Json_decode ($json, TRUE); $_session[' shopno ']= $array ["Shop"] [' shopno '];$_session[' phone ']= $phone; return $json;} Call function Header ("Content-type:text/html;charset=utf-8"); $moper =$_post[' Oper ']; if ($moper = = "Getshop") {$mresult =getshop ($muname); echo $mresult;}? >

? original link: http://www.rexsee.com/CN/bbs/thread/2012-04-29/556.html

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.