facebook

Socket Connections

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #346495 Reply

    andapende68
    Member

    Hi i am busy producing an app that will fetch data from a source, i presumed it would be an sql database while making the calls in php.
    my team has been given a task to connect to a secure socket and transfer some data from the. i used netbeans to create a simple client side and server side that have a corresponding Ip and port number. so i would like to know if i can achieve similar results with mobione or is the a way that i can send a stream or some type of data over to the server with a secure socket, do i need to have an external java script that is called upon within my code or can i incorporate it within the actual app.

    please anyone help if you got any sample code or an example of weather this is possible on not and if i should just stick with the original idea i have of the sql database with php running the calls.

    Andrea68

    #346515 Reply

    Hi Andrea,

    I wll ping the dev team for their input but why not use a traditional web service for data transfer and access via https/ssl connection? Another alternative is to use html5 web sockets assuming that your target devices are new enough to support them. Remember that MobiOne apps are hybrid html5 web apps built on the cordova/phonegap sdk.

    #346528 Reply

    andapende68
    Member

    Good day octavio

    thank you for the response and i have taken that information to my team as we now begin work on a traditional method of data exchange. i have further question though as since we decided to use the traditional methods of data exchange my teams argument is that a web server in a way has a socket connection and since that is so where would we put the web socket connection code on the html5 or can we include it in our custom.js document so that a connection is established before the code executes the required parameters.

    #346619 Reply

    support-michael
    Keymaster

    Your initial question was about opening a socket connection. In the mobile web model supported by mobione your options are to use traditional web services or a more advanced HTML5 web socket mechanism. I only mentioned web sockets because you kicked off the thread discussing a direct socket connection. Without any more details you are better off working with traditional web services (e.g., REST) to transfer data from your server to your app, especially since you mentioned use of php to handle db access. There are tons of only examples/tutorials for creating web services in php. From a mobione app you can use simple HTTP Get/Posts to interact with with your web service(s). For secure connections set up your web server to support https.
    I hope this helps.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Socket Connections

You must be logged in to post in the forum log in