Discussion Forums  >  Suggestions, Ideas, Wish List

Replies: 7    Views: 91

fredd648
Apple Fan
Profile
Posts: 14
Reg: May 11, 2013
waterloo
3,940
11/10/13 06:53 PM (12 years ago)

App connection to an oracle DB

I have created a few simple apps using buzztouch and I would like to get a little more advanced and start trying new things. My next plan is to create an app that has a connection to an orable database in order to retrieve data and show it in the app. In a nutshell, I want my app to have different search options ( name, date, coordinates) where the user can input information so satellite imagery (jpeg format) and information about the images can be retrieved! The images and information about them are already stored in the database. I am quite new to the app developing and I am not really familiar with object-c or the creation of plug-ins, so I have used mostly the html plugin in buzztouch to create my apps. I contacted GoNorthWest for further information, and he directed me to this tutorial- https://www.buzztouch.com/files/howtos/Posting_Current_Location_to_a_Database_v1.0.pdf I was recommended to use PHP and html to connect to the database, but I just wanted to know if anyone else has any experienced in doing this and is willing to share some ideas/information with me? Is this the easiest way to connect to a DB or are there other methods that developers currently use? Also, I have seen people mostly use SQLlite for mobile apps...so would Oracle work fine? or is it recommended to have the DB in SQLlite Any information, links, tutorials would be greatly appreciated! Fred
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/10/13 07:18 PM (12 years ago)
You can use any database you feel will work for you. I tend to think Oracle is a bit of overkill; like using a tractor trailer to drive to the corner market. But it will work just fine. Most of us with less stringent requirements get by just fine with MySQL, although I'm also looking into PostgreSQL because of the GIS (Map stuff) modeling extenstion capabilities. SQLite is a good database, it's 'typically' used internally on the device. If your information won't change often, it's a viable choice, and can be used offline if the user has no network connection. But if you're going to tie your database to your app 'live', then MySQL is more common than Oracle, but again, whatever works best for you will work. PHP is the 'defacto standard' interface between the web (and mobile) and a server database. I'm willing to bet regardless of your database choice, you'll probably end up using PHP to 'talk' to it (queries, inserts, etcetera). Did you have a specific path you wanted to follow, or are you just gathering information before you start? If you have any other questions, I'm no guru, but if I know, I share. Cheers! -- Smug
 
fredd648
Apple Fan
Profile
Posts: 14
Reg: May 11, 2013
waterloo
3,940
like
11/10/13 08:20 PM (12 years ago)
Thanks for the reply Smug! Yes, the app will be linked live to an online DB (As of now it is an oracle DB, but I will investigate further to see the possibilities of migrating it into a MySQL DB). So my plan is to use the HTML plug in from buzztouch, where all the data results will be shown, and upload the PHP files to talk to the DB. I was wondering if you perhaps knew of any tutorials or if you had any information about the procedure that needs to be followed in order to accomplish this? Thanks!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/10/13 10:12 PM (12 years ago)
Hmm… Well, GoNorthWest already showed you one tutorial, and that's a pretty good start. Most of the stuff folks do here with Buzztouch is to retrieve information out of a database, and use that data to provide screen data, or to provide the configuration information needed to create a completely new screen on the fly. Usually it's in 'JSON' format, which is used extensively in BT projects. Once the JSON gets into the BT App, then we use xcode (for iOS, or if doing Android, Java/Eclipse) to manipulate the data however needed. Although it's not documented real well, I keep a little 'test kit' here: https://dl.dropboxusercontent.com/u/115208762/loadScreenObject.zip It provides the basics needed for database access and custom output to a mobile app. It doesn't do anything in Xcode or Eclipse, it only spits out JSON results that you will use in your app. Usually when researching a new direction, I do a lot of Google and a LOT of stack overflow browsing. Also, you can find pearls over at 'github.com', adapting them to BT sometimes is a bit of a chore, but I haven't found one I really liked that I couldn't wrestle into place. If I think of something else, I'll let you know. But that will give you something to chew on for a bit. Oh, one more thing. Fred@MySkylla taught me something long ago that has probably been my best resource for finding information within the BT website. Go to google, and in the search bar type: site:buzztouch.com/forum <your search terms here> so if you wanted to see if anyone else has done any oracle work with buzztouch (spoiler alert: not much) you would type: site:buzztouch.com/forum oracle database It works really well, and if there is anything about anything that matches those terms, a result will pop up. Let me know how it goes! Cheers! -- Smug
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
11/11/13 09:48 AM (12 years ago)
If the data is already in Oracle and if there is already a web front-end to that database, then have that web developer spit out the desired content in JSON format. In particular, in the format as Smug's zip file describes for loadScreenObject. Alternatively, have that web developer format his HTML appropriately for mobile screens. Then you can simply use the URL plugin to get at your data. If you really want the data loaded on the device for offline use, then deliver the data as JSON files and then use NSDictionary as a cheap way of sorting and organizing all that data. That avoids the complexity of on-device SQLite or CoreData. http://www.cimgf.com/2013/02/05/querying-objective-c-data-collections/?utm_source=iOS+Dev+Weekly&utm_campaign=e4494e37ec-iOS_Dev_Weekly_Issue_80&utm_medium=email Watch Smug chomp at that technique ... Go Smug, go! :-) -- Niraj
 
Macker
Aspiring developer
Profile
Posts: 11
Reg: May 25, 2013
Clarecastle
7,610
like
11/11/13 09:51 AM (12 years ago)
@smug (and orignally fred@myskylla) - tks for the "site:...." search query tip. never knew that
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/11/13 01:24 PM (12 years ago)
@smug I remember hearing about that jewel... havent stopped using it since either! This thread is for smart people, can't understand a thing. Best of luck @Macker, looking forward to seeing your final project done. It's awesome that you're trying to do new things and go "advanced", you'll always be amazed at how much you can do with buzztouch. Cheers, David https://buzztouchmods.com/market
 
fredd648
Apple Fan
Profile
Posts: 14
Reg: May 11, 2013
waterloo
3,940
like
11/12/13 09:46 AM (12 years ago)
Thanks everyone for the information! I will try to follow the example by @GoNorthWest and use HTML and PHP for retrieving the data from the database. @smug the "test kit" looks pretty cool... I wish you had a documentation file to see how everything works! Thanks anyways Fred
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.