LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   beginner programmer, database and network questions (https://www.linuxquestions.org/questions/programming-9/beginner-programmer-database-and-network-questions-882965/)

pjdell 05-27-2011 12:45 AM

beginner programmer, database and network questions
 
HELLO!

after writing this i realized it was kind of long, if you don't like reading you can just hit up the last paragraph it sort of summarizes things :)

I'm looking for help, or rather some leads as to where I can learn this stuff. I'm creating an android application, with the goal of improving my programming (and hopefully making me some beer money! jk...). I'm through a year of college level programming classes and am fairly new to linux as well. Anyways...


I have a laptop that had the screen ripped off that I would like to use as a server for my application(at least initially and for testing) and i'm wondering how to set it up for my purposes and how to communicate information between a webpage, the server, and my app.

The webpage(stored on the server) will be used to edit XML files I need to store on the server. The app will download and use those XML files as well as change them. I hope to eventually support users on the webpage that can upload their personal stats from the phone back to the webpage so they can view their stats online.

This data being uploaded to the site will be data that in the beginning will only be on the phone and i'm not sure how to implement and save the structure that I need. The way the app will store the information is in several objects. So for each user on their device i need to store a few name value pairs as well as an unknown number of an object, each of those objects contains several name value pairs and a known number of a different object, each on of those containing something similar to the previous one. I can picture it as a folder which contains some info and a bunch of folders each of which contains info and a few folders each of which contains some info. I guess i'm really just looking for a good way to store information in this structure.


Sorry for the wall of text but long story short,
i'm looking for some good guides or information on setting up a server for my needs(I currently have ubuntu server installed on my laptop but don't really know what to install on it)as well as how to store some data on my phone in the way i described in the last paragraph and then transmit the data between the webpage the server and the app. I've searched the web and am really just having difficulty finding where to start and is making me feel sad and overwhelmed :banghead:.

Thanks!

indienick 05-27-2011 11:17 AM

If you want to host web stuffs, of any sort, you will want to install an HTTP server (Apache, Lighttpd, Nginx, etc.).

To be honest, if you are looking to have an Android app that manages data in the same way the web server does, I would suggest writing the web app on the server first, then worrying about the Android app. That way, you can funnel all your data through your web app, by way of API calls that you, yourself, write in; worry about delivering the data before presenting it.

theNbomr 05-29-2011 09:34 AM

If your client data follows some common structure(s), then you can create a CGI that accepts HTML form data. The client application can send the data either by filling in an HTML form, or simply sending the data via HTTP GET or POST requests, as appropriate. You will, of course, need a web server running, and some code that stores the incoming data to a backend database, or to flat files. Presentation of the data for editing would be done by scripts that comprise your server-side application via CGI, AJAX, or similar methods.

It sounds like you need to first gain an understanding of the basic methods used in HTTP. Set up an Apache web server on your server host, and then start creating some simple CGI scripts just to learn the basic operation of a web server and the creation of dynamic web pages. Alternatively, set up a web framework system such as Ruby on Rails, Django, or other framework. These will allow you to focus more on building your application on the server.

--- rod.


All times are GMT -5. The time now is 07:37 PM.