Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 9    Views: 112

Mak
Aspiring developer
Profile
Posts: 37
Reg: Nov 25, 2013
London
5,270
11/25/13 04:02 PM (11 years ago)

Data/Databases

Hello All, I am new. My question is about handling data. Primarily my application needs to be able to search (either by category or by a word search) my database where I store a number of products which are tagged by about 7 categories. My question is, what do you guys think is the best way to go about doing this? I do not need to upload data, just need to be able to search where my data is stored (its flexible I can move to where every it is best eg to SQLite) but the data is dynamic and will change over time. Thanks for the aid; I heard you guys are the best! Mak ps I already have a website which is used to search, they need to be linked together.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
11/25/13 04:26 PM (11 years ago)
How are you with php? One approach is to use a menu screen in your Buzztouch app, and point the "dataURL" property to a php script on your server that queries the products and outputs them in JSON format.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/25/13 05:43 PM (11 years ago)
I'm nodding my head in agreement with Chris1… If you can do PHP then the world is your oyster. Cheers! -- Smug
 
Mak
Aspiring developer
Profile
Posts: 37
Reg: Nov 25, 2013
London
5,270
like
11/25/13 11:58 PM (11 years ago)
Interesting. Thank you! I think that could be done. My friend handles the website so it will take some collaboration between the two of us to get this done. So, essentially I would be taking the info off the site? Do the scripts there do the work?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/26/13 12:03 AM (11 years ago)
Pretty much. It's sort of like using a BT Plugin as your 'browser'. Set the dataURL of the plugin (htmlDoc, customURL) to the URL of your PHP Script… and providing you don't need a 'real' keyboard, there isn't much in the way of limitations… Cheers! -- Smug If you really want to get crazy, although it's intended for 'location' based stuff, I keep a sample script in my dropbox to show the use of 'LoadScreenObject' which is here: https://dl.dropboxusercontent.com/u/115208762/loadScreenObject.zip If you have questions, the forum is your first stop! :)
 
Mak
Aspiring developer
Profile
Posts: 37
Reg: Nov 25, 2013
London
5,270
like
11/26/13 02:12 AM (11 years ago)
Fantastic. Thanks mate. Will do!
 
EdReyes
Lost but trying
Profile
Posts: 574
Reg: Oct 21, 2013
location unknow...
17,640
like
11/26/13 04:56 AM (11 years ago)
very useful thanks for the share
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
11/26/13 09:13 AM (11 years ago)
Just to say it out loud ... Any server-based scripting language will suffice. Such as PHP, JSP, ASP, Python, RubyonRails, etc. The important part is for that server to respond with a JSON stream of information in the format that BuzzTouch can consume, understand and display that data within the app. To start simple, copy the JSON structure within the Plugin's Readme file, change it to your own data and save it as a file on the Server. Then point your plugin to that file with the Data URL field. Did your data show up within the app on the correct screen? Did taps on the data take you to the correct next screen? Only after you have worked out the kinks in the JSON and in the data, should you then make it be dynamically served to the mobile app. You may already know all of this, the explanation is for those who come driving by in a few weeks or months. By the way, definitely download Smug's loadScreenObject zip file and take the time to understand it. If you don't have access to a PHP Server, then install MAMP on Mac or XAMMP on Windows and run Smug's software inside of those Servers on your own Computer. Having your own Laptop-based Server is very helpful to try things when on the Airplane or on the road. -- Niraj
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
11/26/13 10:55 AM (11 years ago)
Great advice Niraj!
 
Mak
Aspiring developer
Profile
Posts: 37
Reg: Nov 25, 2013
London
5,270
like
11/26/13 01:08 PM (11 years ago)
Thanks Niraj, your advice is very much appreciated!
 

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.