App Creation Difficulty -- Where to Start?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
livecodemedical
Posts: 3
Joined: Tue Dec 08, 2015 8:25 pm

App Creation Difficulty -- Where to Start?

Post by livecodemedical » Tue Dec 08, 2015 8:50 pm

Hello all,

I am new to Livecode with quite a bit of coding experience in VBA using Access/Excel. My goal is to create (what I feel) to be a fairly straightforward Android app that organizes information in a "Wiki Style" app. What I mean by this is that the content is primarily text based, but I want the ability to search within all of the pages. I have watched several introductory tutorials and read several resources but haven't found anyone making similar apps.

Some more details:
- There are 4 major subject areas for my project. Each major subject area has several topics within. I plan on creating a homepage with a button for each of the major subject areas, clicking would then automatically jump to a list of the topics under that category. Clicking on the topic from the list will open up a detailed page for that topic.
- The contents of each page are similar but will vary topic to topic (For example, all pages will have a 'Definition' subheading, but maybe not all pages will need an 'Example' subheading).
- Most of the content is text, but occasionally, I would like to include a picture.
- I would also like to have a list of "Favorite" pages
- Searching my topics is also very important to me, so somehow I need to be able to easily search the contents of the pages and the topic names.

Some of my problems include: (1) How to add all of this information to each page (should I type it directly onto buttons? would it be better on some other sort of container?) (2) How can I then search the information of these pages? (3) Is it possible to keep a dynamic list of 'Favorite' cards?

Livecode seems to be well adapted for my needs, but I am having a hard time getting this project started. I can include screenshots of what I have so far, if needed.

Does anyone know of sample livecode apps with similar functionality? Any input or resources would be greatly appreciated.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: App Creation Difficulty -- Where to Start?

Post by Simon » Wed Dec 09, 2015 1:46 am

Hello livecodemedical,

Welcome to the forums!

First off yes, you can build all that you've asked (as I've understood it) in LiveCode and it wouldn't be too difficult for an experienced user. As a beginner you might find it painful at first but the results are really worth it.
Off hand I do not know of an example that is very close to what you'd like to do, they used to have a very cool inventory stock management lesson that would have helped you get started but sadly it's no longer available.
This one may help;
http://livecodeshare.runrev.com/stack/773/Book-Library
It uses a database so may be of further assistance to you.
The start is here in the lessons;
http://lessons.livecode.com/m/4071
Text is the section you'd be interested in.

Also look up HTMLText in the dictionary, might make things easier for you if you are used to writing in HTML.

Once you get started and ask specific coding questions we will be able to help you better.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

livecodemedical
Posts: 3
Joined: Tue Dec 08, 2015 8:25 pm

Re: App Creation Difficulty -- Where to Start?

Post by livecodemedical » Wed Dec 09, 2015 3:46 am

Thanks a lot, Simon!

Looking at the book library makes me think this is certainly possible. And using SQL actually makes me a little more comfortable, as I heavily used SQL with VBA.

I will also try and find that inventory management video (hopefully there is a copy somewhere).

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: App Creation Difficulty -- Where to Start?

Post by dave.kilroy » Wed Dec 09, 2015 10:45 am

Hi livecodemedical

It sounds like your project should make use of a database rather than store everything in stacks - this has several benefits but it is more work - but as you've used Access you will be used to connecting to databases.

Assuming for the moment you'll want local (local to the Android device) storage I recommend a SQLite database, compared to Access you'll find it a revelation! Here is an easy first lesson on using SQLite with LiveCode http://lessons.livecode.com/m/4069/l/30 ... e-database.

However what SQLite doesn't have natively in the same way that Access does are tools to help in constructing a database - this is where you can make use of the free SQLite Manager add on for Firefox https://addons.mozilla.org/en-GB/firefo ... e-manager/ or the free version of Valentina Studio https://www.valentina-db.com/en/ or SQLiteAdmin http://www.lcsql.com/sqliteadmin.html (this last one is actually made with LiveCode). Or, you can just use LiveCode to create and populate your SQLite database.

If you want to store your data centrally on a server then I suggest you create a web service (in LiveCode or PHP) to connect to your database via localhost (this is the most secure and robust way to interact with a remote db). Most people would choose between MySQL or PostGres (although there is a paid-for version of Valentina you could use as well as SQLServer, MongoDB etc). Then you have two choices - a) turn your Android apps into 'clients' that do nothing but request specific data from the remote server, or b) set up a syncing arrangement where you have a local SQLite db syncing with the remote db via your web service - both approaches have their advantages and disadvantages.

So, I should think what is most likely is that at this stage you only want to use local storage on the Android device - in which case I suggest you use SQLite and that gives you the most options for future developments.

One other thing, when creating the code that connects to your local database, try and modularise it as much as you can to minimise the amount of code changes needed when and if you decide to expand to remote storage.

If some (all?) of what I've written doesn't make sense then come back at us with your questions - and welcome to the forum.

Dave
"...this is not the code you are looking for..."

okk
Posts: 178
Joined: Wed Feb 04, 2015 11:37 am

Re: App Creation Difficulty -- Where to Start?

Post by okk » Wed Dec 09, 2015 6:37 pm

Hi, if the emphasize of the project is on "wiki-style" - meaning that anyone can edit the content of the wiki pages from their local browser / client, than I would think a dedicated wiki software would be better suited than building this from scratch in livecode. I have used the PmWiki and it was really easy to set up and work with https://en.wikipedia.org/wiki/PmWiki

But if the application is rather just a structured and searchable presentation of data, livecode is well suited. The most simple solution that comes to my mind would be to make a stack with a directory card and a card for each topic. The directory card contains links to each of the topic cards, for example in a clickable textfield. You probably would want to have a template card with a couple of empty pre-formatted textfields, so when you add a new topic you just make a copy of that template card. With livecode it is also easy to create your own customized search functions. With this approach you don't have to deal with databases, which in my opinion is not the best starting point for new livecoders.

I attach a "quick and dirty" demo stack to clarify what I mean. If I have misunderstood completely what you want to achieve, please give a bit more detail, than it is easier to figure out the best approach.
demo.livecode.zip
(1.36 KiB) Downloaded 219 times
Best
Oliver

livecodemedical
Posts: 3
Joined: Tue Dec 08, 2015 8:25 pm

Re: App Creation Difficulty -- Where to Start?

Post by livecodemedical » Wed Dec 09, 2015 11:34 pm

Okk, you understand what I'm trying to do perfectly. This is a personal app (at least for now), but the goal is not for multiple users to edit the content. Instead, I was just interested in how the information is displayed in the Wiki Format.

Dave.kilroy, I think I understood everything from your post and it was very appreciated. After watching the videos, I think using Sqlite will be a perfect fit (at least for now). As for the app itself, I'm planning on using a linking table to have a many-many relationship between each topic and the fields. I think this is a little more complicated, but it will be very robust in regards to adding the fields.

I'm planning on making essentially, 1 stack that displays the information dynamically, 1 stack that allows information to be edited/deleted/added, and then 1 stack that allows the information to be viewed (almost like a table. really this is more for database development, no real need for this on the phone).

I will keep you updated as I continue with the development.

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: App Creation Difficulty -- Where to Start?

Post by MaxV » Tue Dec 29, 2015 5:57 pm

For sqlite you can use also this free tool:
http://livecodeshare.runrev.com/stack/7 ... administer
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

Post Reply