Can livecode do this?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Can livecode do this?
Hi everyone,
I'm a complete newbie to programming but I have an idea for an app that could work. I want to know if I can use live code to make this app. I have read a lot about live code but I'd love to hear some expert opinions.
The app I want to create is a customer database app. Basically the user would enter their customers details into the app including all sorts of information like name, phone number address, products interested in, interests etc. The app would save the data to a database that is in the app. I also want the users database to be available on multiple devices/computers so I need to be able to have the database save to the cloud.
Is this possible with live code? I have seen a lot about making a database but not much on storing the database in the cloud. Does anyone know about some off the shelf components I could use as I'm guessing I'm not the first one to think of a database app in the cloud!!
Thanks for your help in advance.
I'm a complete newbie to programming but I have an idea for an app that could work. I want to know if I can use live code to make this app. I have read a lot about live code but I'd love to hear some expert opinions.
The app I want to create is a customer database app. Basically the user would enter their customers details into the app including all sorts of information like name, phone number address, products interested in, interests etc. The app would save the data to a database that is in the app. I also want the users database to be available on multiple devices/computers so I need to be able to have the database save to the cloud.
Is this possible with live code? I have seen a lot about making a database but not much on storing the database in the cloud. Does anyone know about some off the shelf components I could use as I'm guessing I'm not the first one to think of a database app in the cloud!!
Thanks for your help in advance.
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
Re: Can livecode do this?
Hi TheFreak and welcome to the forum 
To answer your question, yes indeed you can use LiveCode to make an app as you describe. LiveCode will be a great choice for you as it has so much functionality built-in (like easy connections to databases)
However it's documentation for beginners is not as great as it could be and you'll find lots of stuff (which can sometimes be hard to find) and apart from this forum and LiveCode's own tutorials, lessons and dictionary there is a lot of great stuff scattered around the internet - but the situation is improving, there are now at least a couple of great LiveCode books - this site from http://livecodesupersite.com/tutorials.html from Scott McDonald is a great example of something put together by a user for the benefit of others.
So, give yourself time to travel up your own learning curve, spend time on this forum, go through as many lessons and tutorials as you can, perhaps buy a book or two, and explore the internet for stuff put together by other users of LiveCode - and keep asking questions!
Kind regards
Dave

To answer your question, yes indeed you can use LiveCode to make an app as you describe. LiveCode will be a great choice for you as it has so much functionality built-in (like easy connections to databases)
However it's documentation for beginners is not as great as it could be and you'll find lots of stuff (which can sometimes be hard to find) and apart from this forum and LiveCode's own tutorials, lessons and dictionary there is a lot of great stuff scattered around the internet - but the situation is improving, there are now at least a couple of great LiveCode books - this site from http://livecodesupersite.com/tutorials.html from Scott McDonald is a great example of something put together by a user for the benefit of others.
So, give yourself time to travel up your own learning curve, spend time on this forum, go through as many lessons and tutorials as you can, perhaps buy a book or two, and explore the internet for stuff put together by other users of LiveCode - and keep asking questions!
Kind regards
Dave
"...this is not the code you are looking for..."
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
Re: Can livecode do this?
Oh, and in response to your specific question: it is easy to set up a SQLite database to manage customers' data locally on a mobile device or desktop - you can then synch this data with something like a MySQL database on a remote server or make use of something like Dropbox to save data to the user's Dropbox account.
Anyway, there are lots of different ways to achieve synching, and lots of factors to bear in mind (security & encryption for example) - so the more information you give us about what you want to build the better people on the forum will be able to advise you.
Dave
Anyway, there are lots of different ways to achieve synching, and lots of factors to bear in mind (security & encryption for example) - so the more information you give us about what you want to build the better people on the forum will be able to advise you.
Dave
"...this is not the code you are looking for..."
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Can livecode do this?
Definitely doable, but as Dave notes it'll require some learning to get going.
The biggest challenge with LiveCode's documentation is that many don't find the User Guide, thinking the links in the Help menu to the web-based summary guides are all there is. The User Guide will be reinstated in the Help menu soon, but it's still included in the package and can be found by clicking the Resources button in the toolbar, and then selecting User Guide from the list on the left-hand side.
The User Guide is 378 pages - while it's due for an update (which they're working on right now) it's very complete, almost too complete for anyone to read all the way through. Start with Chapter 2 for a general introduction to how LiveCode works, and then for database work see Chapter 8. The rest can be reviewed whenever you need help in those topic areas.
Also, in the Resources window you'll find more than 70 example stacks. There's one for SQLite, useful to get a handle on general aspects of working with SQL databases in LC.
While SQLite is a great choice and can even be used on servers in some contexts, many server applications use MySQL to take advantage of its more robust record locking for multiple users. For a cloud-based data store, MySQL is often a better fit.
Most of what you learn with SQLite will directly apply to MySQL, but the bigger task is setting up your web API to coordinate between the client requests and the database itself. There are numerous examples of that using PHP as that middleware, and you can even use LiveCode Server to do that as well.
One thing to keep in mind with a system like yours is that in addition to the user data you'll also need a registration and login system. There's a lot to that (with email password reset and more), and I don't know of a comprehensive example ready to use in the LiveCode community, but there are several available on the Web for PHP. Personally I would prefer LiveCode, and if you're not already familiar with PHP it may actually be less effort to write something custom in LC than to learn PHP.
Tutorials on using LiveCode Server are here:
http://lessons.runrev.com/m/4070
Once your API is set up on your server, you'll find that LiveCode can get data from Web servers easily with the GET and POST commands - see the Dictionary included with LC for details on those.
Getting the data is easy enough - then you'll want to display it. Assuming your app will have at least one list view, you may want to check out the DataGrid, a very nifty custom control included with LC that offers tremendous flexibility for making list views - you can learn about the DataGrid with these Lessons at the LiveCode site:
http://lessons.runrev.com/m/datagrid
While seemingly simple, there are a lot of aspects to a system like this, but don't let that hold you back. Like Dave said, take it slow, learn one thing at a time, and you can definitely do this.
Consider starting with a simple version that works locally with SQLite, then make a simple LiveCode Server script to learn how that works, and after both of those are done then tying the two together will be much simpler than attempting to do everything at once.
The links here along with Dave's guidance should get you off to a good start, and you always have this community here in the forums to help at any time during your learning process.
The biggest challenge with LiveCode's documentation is that many don't find the User Guide, thinking the links in the Help menu to the web-based summary guides are all there is. The User Guide will be reinstated in the Help menu soon, but it's still included in the package and can be found by clicking the Resources button in the toolbar, and then selecting User Guide from the list on the left-hand side.
The User Guide is 378 pages - while it's due for an update (which they're working on right now) it's very complete, almost too complete for anyone to read all the way through. Start with Chapter 2 for a general introduction to how LiveCode works, and then for database work see Chapter 8. The rest can be reviewed whenever you need help in those topic areas.
Also, in the Resources window you'll find more than 70 example stacks. There's one for SQLite, useful to get a handle on general aspects of working with SQL databases in LC.
While SQLite is a great choice and can even be used on servers in some contexts, many server applications use MySQL to take advantage of its more robust record locking for multiple users. For a cloud-based data store, MySQL is often a better fit.
Most of what you learn with SQLite will directly apply to MySQL, but the bigger task is setting up your web API to coordinate between the client requests and the database itself. There are numerous examples of that using PHP as that middleware, and you can even use LiveCode Server to do that as well.
One thing to keep in mind with a system like yours is that in addition to the user data you'll also need a registration and login system. There's a lot to that (with email password reset and more), and I don't know of a comprehensive example ready to use in the LiveCode community, but there are several available on the Web for PHP. Personally I would prefer LiveCode, and if you're not already familiar with PHP it may actually be less effort to write something custom in LC than to learn PHP.
Tutorials on using LiveCode Server are here:
http://lessons.runrev.com/m/4070
Once your API is set up on your server, you'll find that LiveCode can get data from Web servers easily with the GET and POST commands - see the Dictionary included with LC for details on those.
Getting the data is easy enough - then you'll want to display it. Assuming your app will have at least one list view, you may want to check out the DataGrid, a very nifty custom control included with LC that offers tremendous flexibility for making list views - you can learn about the DataGrid with these Lessons at the LiveCode site:
http://lessons.runrev.com/m/datagrid
While seemingly simple, there are a lot of aspects to a system like this, but don't let that hold you back. Like Dave said, take it slow, learn one thing at a time, and you can definitely do this.
Consider starting with a simple version that works locally with SQLite, then make a simple LiveCode Server script to learn how that works, and after both of those are done then tying the two together will be much simpler than attempting to do everything at once.
The links here along with Dave's guidance should get you off to a good start, and you always have this community here in the forums to help at any time during your learning process.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Can livecode do this?
Hi Dave and Richard,
Thank you so much for replying. It's really comforting to know that a potential program you are thinking of using has a high quality community that is really helpful.
Your advice is really good. I especially like the idea of making the app work locally first and then trying to connect it to an external database. I'll definitely do that.
Thanks also for the links. Looks like a lot of really good information.
I have a couple of questions I was hoping you could help me with:
1. When I come to looking at storing things in the cloud my first thought was to store the database in each users own Dropbox account (for example). That would be low cost and low risk (for me). The other alternative is to set up my own servers and have people store their database on my servers. The advantage of this I'm guessing is that I can get more control etc but I'm not sure where I would host this server or how much it would cost. Any thoughts on pros and cons or server hosting ideas.
2. Do you have any recommendations for books to read (remembering I'm a beginner)??
Thanks again. I really really appreciate it!
Thank you so much for replying. It's really comforting to know that a potential program you are thinking of using has a high quality community that is really helpful.
Your advice is really good. I especially like the idea of making the app work locally first and then trying to connect it to an external database. I'll definitely do that.
Thanks also for the links. Looks like a lot of really good information.
I have a couple of questions I was hoping you could help me with:
1. When I come to looking at storing things in the cloud my first thought was to store the database in each users own Dropbox account (for example). That would be low cost and low risk (for me). The other alternative is to set up my own servers and have people store their database on my servers. The advantage of this I'm guessing is that I can get more control etc but I'm not sure where I would host this server or how much it would cost. Any thoughts on pros and cons or server hosting ideas.
2. Do you have any recommendations for books to read (remembering I'm a beginner)??
Thanks again. I really really appreciate it!
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
Re: Can livecode do this?
Hi TheFreak
You can also use the wonderful phxDropBoxLib from Guglielmo Braguglia - I'm using it in a couple of apps to connect local copies of apps to a single Dropbox account (different to each users' own Dropbox accounts) so that they can all access updated assets and write back to the same location
You'll need to create a Dropbox app first, and using Guglielmo's library will mean extra learning for you, but it will give you a free equivalent to (some aspects of) running a remote server. This thread on the forum gives some more information http://forums.runrev.com/viewtopic.php? ... Lib#p79170
There is also MergDropbox from Monte Goulding's http://mergext.com/ - I've never used it but it looks like it might be easier to use than phxDropBoxLib and with more functionality too (but you'll have to buy access to it and it only works on iOS)
You can also use the wonderful phxDropBoxLib from Guglielmo Braguglia - I'm using it in a couple of apps to connect local copies of apps to a single Dropbox account (different to each users' own Dropbox accounts) so that they can all access updated assets and write back to the same location
You'll need to create a Dropbox app first, and using Guglielmo's library will mean extra learning for you, but it will give you a free equivalent to (some aspects of) running a remote server. This thread on the forum gives some more information http://forums.runrev.com/viewtopic.php? ... Lib#p79170
There is also MergDropbox from Monte Goulding's http://mergext.com/ - I've never used it but it looks like it might be easier to use than phxDropBoxLib and with more functionality too (but you'll have to buy access to it and it only works on iOS)
"...this is not the code you are looking for..."