facebook

Extracting data from a external database

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

    Hi! I have searching for the last few days in this forum and there is no how to do the database connection in great details. Maybe a bit here and there. There is not full complete picture.
    The questions in the forum on database connection or searching function are not answered.

    Is it MB1 can only be used for static pages.

    #325447 Reply

    support-michael
    Keymaster

    @coloursatwork, et al.

    <long>
    Can you describe a scenario for what you mean by database connection?

    Here are my thoughts when I see this ambiguous question (no disrepect intended):

    1) do you have a database (not db server but a database w/ schema and data) and a web server?
    – if yes, please describe

    2) are you wanting to create a webapp, a native app or both?

    3) do you have access and authority to the data or update the webserver or serverside infrastructure?

    4) There are 2 architectural patterns based on the type of solution you are planning
    4a) if you are planning a mobile webapp (only) then you can use the simple web page model where the webapp running on your device queries a webserver by posting a form or making a simple Get request. The webserver returns back an html doc that the device renders. When the webserver receives the request it delegates the handling to a script engine running and configured on your webserver such as PHP or JSP (e.g., Tomcat). You can use mobione to layout a UI and generate a webpage that will be used as a page template by the script engine. In the template you manually edit it with scriptlet code that when executed will connect to your db, query the db and then dynamically insert the results. When the script engine processes the template page it will execute your scriptlet additions and produce an html page that is streamed back to the device and rendered in the device’s browser.

    4b) If you are building an app then you need to take a different approach where the app runs on the device and calls webservers hosted on your webserver. Think of a webservice as the functional layer (tier) between the UI on the device and the database running on your server. Similiar to the script engine described above the webservice directly connects to the database and performs queries, inserts, updates, deletes. Unlike a script engine, the webservice does not return a user interface, but rather it returns data, e.g., xml or json, to the app running on the device. The app is responsible for parsing the data and then generating a UI screen with the data. MobiOne can assist you in creating the static portions of user interface and interacting with the webservice (depends on the web service protocol). When the webservice returns results, using javascript you can map the result data into the UI such as populate a list or ui fields.

    Summary:
    In both 4a and 4b I use the MobiOne designer to layout and generate the static portions of my dynamic UI screens in html. This becomes the initial version of my UI template which I then customize. I also use MobiOne’s actions to submit forms to my web server or web service.

    For 4a, I customize the template UI file with PHP or JSP scriptlets.

    For 4b, I load the template UI into the browser DOM and then directly modify the DOM to merge the web service results into the UI.

    In all of this development process MobiOne does not provide webservice or database dev tool and automation. For this I use our MyEclipse Java IDE also from Genuitec, makers of MobiOne. MyEclipse a Java IDE for everything task from database development to webservice automation, hosting and debugging. I typically run MyEclipse in parallel with MobiOne.

    Thoughts? Is this helpful…?
    </long>

    #326260 Reply

    @ support-wayne

    Hi! Thanks for the reply.

    I am creating an directory app that need to extract data from an external server. I do have a existing server provided by a web hosting server.
    I am really a dummy with zero programming knowledge. I could create a sql database in the server. I do not know how to use M1 to connect
    to the data. I know that I have to use the form widget to do the query form with the ‘get’ instead of ‘post’. Other than that I have not have any idea what is the next step.
    Do you have any ready demo that I could use.

    THANKS!!

    #338574 Reply

    brunojonas
    Participant

    Dear coloursatwork, I have the same question….

    Please help me!

    Tks in advance.

    #338622 Reply

    @brunojonas,

    Are you developing a native app or a web app? Do you already know how to connect to your database? Please share more details about your app’s infrastructure to give you the better advice.

    #338663 Reply

    brunojonas
    Participant

    Tks support-octavio for reply.

    I want to develop both app. Native and Web.

    But I think the first will be web app. I think it will be easier for me. Because I’m an 3D designer , not programmer.

    What do you think is easier?

    I need to develop a app like that http://play.google.com/store/apps/details?id=com.handynorth.moneywise_free

    But the difference is that my app the user needs to login first. Then the next screen only show his data…

    I’m using Wampserver5. But I read yesterday that MyEclipse Java enterprise will help me. Am I right?

    Tks so much. Sorry, I didn’t buy yet your software. But I wanna buy it in this month.

    #338664 Reply

    brunojonas
    Participant

    Hi, support-octavio,

    I have another question.

    How Mobione communicate with My Eclipse Java Entreprise? I mean the database, how I can manipulate the data in Mobione.

    I have no knowledge like I’ve told you before. I was a dreamveaver user. With Wampserver5.

    Tks so much.

    #338752 Reply

    brunojonas
    Participant

    Dear Octavio,
    my webapp is here
    http://appbh.com.br/jobs/equi/

    Anything is working (I mean about the database).

    My tables are already done, but I can’t connect the database to Mobione, that I can manipulate the data.

    I will translate everything for you, in english. Today. ok

    Tks a lot

    It’s hard man. Please help me

    #338803 Reply

    brunojonas
    Participant

    anybody

    #338807 Reply

    Brandon
    Member

    My suggestion would be to use a PHP backend to connect to the database.

    http://www.w3schools.com/php/php_mysql_intro.asp

    #338815 Reply

    brunojonas
    Participant

    Tks CincyPlanet, and congratulations for your website….it’s very helpful…and tks Octavio as well

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Extracting data from a external database

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