Is L.C. a database tool?

Creating desktop or client-server database solutions?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
AlphaBase
Posts: 9
Joined: Wed Aug 31, 2016 7:45 pm

Is L.C. a database tool?

Post by AlphaBase » Wed Aug 31, 2016 7:57 pm

Doesn't seem like it. Obviously you can connect to a db like MySQL but LC doesn't seem to have much interest in db's. Looks like it is kind of a generic programming tool. There is almost no documentation on db related stuff. Can someone who has database experience using other platforms please advise?

Thanks

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5610
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Is L.C. a database tool?

Post by FourthWorld » Wed Aug 31, 2016 9:09 pm

LiveCode is a general-purpose GUI app development toolkit that deploys to a nearly unprecedented scope of platforms, covering Windows, macOS, Linux, iOS, and Android. The same language is also available for use on servers with LiveCode Server, and there's even a community-supported build for Raspberry Pi.

As a general-purpose language and toolkit, its focus is indeed not restricted to making database front-ends. For an overview of the breadth of how developers use LiveCode, see the Case Studies page here:
https://livecode.com/customers/

Unlike AlphaBase, LiveCode does not build its own database engine, instead staying true to its mission of focusing on GUI support by providing access to world-class database engines like SQLite, MySQL, postgreSQL, and Oracle. Within our community we also have connectors available for ValentinaDB, CouchDB, and other more specialized data stores like LiveCloud.io.

To get started using DBs with LiveCode see the section on Working with Databases in the User Guide included in the install. These LiveCode Lessons may also help:
http://lessons.livecode.com/searches?ut ... mit=Search
http://livecode.byu.edu/database/dbmanagementinrev.php

Given the popularity of the database engines LiveCode supports, rather than attempt to replicate the documentation for each of them you'll find DB-related tutorials in our community tend to focus only on the LiveCode-specific aspects.

If you work with AlphaBase perhaps there are ways LiveCode could be used to provide additional GUI capabilities for your toolkit.

I see AlphaBase is in Los Angeles, and we have our next local LiveCode User Group meeting coming up tomorrow night in Pasadena:
http://forums.livecode.com/viewforum.php?f=50

If you can make it it would be nice to meet you in person and see how LiveCode may be helpful for the work you do.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

AlphaBase
Posts: 9
Joined: Wed Aug 31, 2016 7:45 pm

Re: Is L.C. a database tool?

Post by AlphaBase » Thu Sep 01, 2016 4:38 am

Thank you for your response. I did see the "lesson" web page. As I said, scant documentation on database integration.

BTW: You are confusing me with a west coast entity. I'm on the east coast and have no relationship to that company or its product.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5610
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Is L.C. a database tool?

Post by FourthWorld » Thu Sep 01, 2016 1:09 pm

AlphaBase wrote:Thank you for your response. I did see the "lesson" web page. As I said, scant documentation on database integration.
Most DB engines LC uses are enormously well documented, so usually the only things needed relate to connections and passing SQL in. Is there a specific question we might be able to help you with?
BTW: You are confusing me with a west coast entity. I'm on the east coast and have no relationship to that company or its product.
I did write "If you work with AlphaBase", but either way, if you're ever in the neighborhood you're welcome to attend our monthly meetings. And if you're interested in attending one closer to home, check out the User Groups section to see if there's one near you:
http://forums.livecode.com/viewforum.php?f=30
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

AlphaBase
Posts: 9
Joined: Wed Aug 31, 2016 7:45 pm

Re: Is L.C. a database tool?

Post by AlphaBase » Thu Sep 01, 2016 2:22 pm

Most DB engines LC uses are enormously well documented, so usually the only things needed relate to connections and passing SQL in. Is there a specific question we might be able to help you with?
Yes, thank you. I'm quite familiar with SQL, that wasn't my question. My question was regarding "integration".
if you're ever in the neighborhood you're welcome to attend our monthly meetings
Thank you for your invitation.

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 565
Joined: Fri Jun 27, 2008 9:00 pm

Re: Is L.C. a database tool?

Post by Mikey » Thu Sep 01, 2016 3:03 pm

Are you asking for query binding to objects? That functionality is built in, but it has become neglected, ignored, and dare I say unsupported, because most of us don't bother to use it. There are substitutes, e.g. SQLYoga that attempt to fill the void, if you want that functionality.

AlphaBase
Posts: 9
Joined: Wed Aug 31, 2016 7:45 pm

Re: Is L.C. a database tool?

Post by AlphaBase » Thu Sep 01, 2016 3:18 pm

Mikey wrote:Are you asking for query binding to objects? That functionality is built in, but it has become neglected, ignored, and dare I say unsupported, because most of us don't bother to use it. There are substitutes, e.g. SQLYoga that attempt to fill the void, if you want that functionality.
Yes, data binding to objects is a good way to put it. When you say "most of us don't bother to use it" - is that because you all are not using LC to connect to back end db's? Could you elaborate?

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 565
Joined: Fri Jun 27, 2008 9:00 pm

Re: Is L.C. a database tool?

Post by Mikey » Thu Sep 01, 2016 3:47 pm

No, it's definitely not that we aren't using it. I would say that many of us are using DB's with most projects that we work on. For starters, building a DB right into an LC app (specifically mySQL or SQLite) is just a matter of ticking a checkbox in the Standalone Application Settings. Connecting to an external DB is also simple. ODBC data sources, for instance, are connected with one call. I don't build apps that don't both embed DB's and connect to external DB's. Every app I write connects to at least one, and sometimes three external DB's. I typically embed an SQLite db directly in the app, as well, but I have embedded mySQL into a couple of them.

I used to use an IDE that was built into a DB, but it was nowhere near as powerful as LC is. Those DB-embedded IDE's think about forms differently than LC does, so naturally, the binding is nearly automatic, but when you want to create an object that is NOT tied to a column/field, you have some work to do. After the first time I typed

Code: Select all

get query("SELECT * FROM someTable") # where query is a function I created that does all the work and error handling involved in a query for me
set the dgText of group "someTableDG" to it
I was done thinking about the other way.

If you really want that tighter integration, then look at some of the tools that you can get for LC. SQLYoga is just one example.

AlphaBase
Posts: 9
Joined: Wed Aug 31, 2016 7:45 pm

Re: Is L.C. a database tool?

Post by AlphaBase » Thu Sep 01, 2016 4:24 pm

Thank you for your explanation. That's very helpful.

Now I'll ask another question. Can you build/publish a complex and comprehensive LC app to the web?

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 565
Joined: Fri Jun 27, 2008 9:00 pm

Re: Is L.C. a database tool?

Post by Mikey » Thu Sep 01, 2016 4:38 pm

I will have to leave that question to others. There is HTML5 capability, but I have not tried to use it. I'm building mobile/desktop/server apps.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5610
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Is L.C. a database tool?

Post by FourthWorld » Thu Sep 01, 2016 4:48 pm

AlphaBase wrote:Can you build/publish a complex and comprehensive LC app to the web?
Not quite yet, but an HTML5 export option is in development.

In my own work, though, I've found that a hybrid approach I call "streaming apps" lets me deliver a better user experience in less development time using LiveCode as it is today, using a slender app that needs to be installed only once which then gets everything it needs over HTTP.

In this setup I deliver a native app for the target OS that only contains enough code to download one stack file from a server. That stack file can then download anything else, UI, code, and data, as needed. This gives my clients the real-time updates of web delivery, but without the confines of limiting an app to the inside of a browser window. I can support fully functional offline modes, integrate with the file system, registry, shell, etc., so we can deliver capabilities fully-native apps enjoy, but with the extra advantage of the user always having the most recent version whenever they open the app.

In LiveCode this sort of thing can be as easy as:

Code: Select all

go url "http://domain.com/path/to/livecodestack.livecode"
For faster transmission you can even use the built-in gzip compression:

Code: Select all

put url "http://domain.com/path/to/llivecodestack.livecode.gz" into tStackData
try
   put decompress(tStackData) into tStackData
catch tErr
   throw "Couldn't decompress stack data"
end try
go stack tStackData
There's an example of this sort of thing included in the LiveCode install - in the IDE menus see Development -> Plugins -> GoLiveNet

As we've seen with the explosion of native apps on mobile, this applies to the desktop as well: people are not at all put off by downloading and installing an app if it delivers value and keeps itself up to date.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

AlphaBase
Posts: 9
Joined: Wed Aug 31, 2016 7:45 pm

Re: Is L.C. a database tool?

Post by AlphaBase » Thu Sep 01, 2016 8:11 pm

That's a very nice scenario you laid out and something I will keep in mind. However, it doesn't negate the need for web apps - particularly if it is a public site or a subscription based site where user come to you one way or the other,

SparkOut
Posts: 1679
Joined: Sun Sep 23, 2007 4:58 pm

Re: Is L.C. a database tool?

Post by SparkOut » Thu Sep 01, 2016 8:58 pm

You can follow the development of html5 deployment and progress made by checking out the exploits and snazzy work of -hh (Hermann, a great fellow in the community). There are some threads started in this forum you can look up.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5610
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Is L.C. a database tool?

Post by FourthWorld » Thu Sep 01, 2016 11:38 pm

AlphaBase wrote:That's a very nice scenario you laid out and something I will keep in mind. However, it doesn't negate the need for web apps - particularly if it is a public site or a subscription based site where user come to you one way or the other,
True, there will be a role for both web pages and native apps for the foreseeable future.

On the desktop we're seeing a growing role for web-borne apps like Evernote, Adobe CS, and others. And on mobile the preference for native apps is so strong most folks don't even think about opening sites like FB or Twitter in their browser.

For making web pages, at the moment you'll be looking for web authoring tools. But for native apps on both desktop and mobile, LC can be a good choice.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

MaxV
Posts: 1444
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Is L.C. a database tool?

Post by MaxV » Fri Sep 02, 2016 5:18 pm

I know a lot of programming languages, but livecode remains the simpler and best to use with database.
With just this you can do all: http://livecode.wikia.com/wiki/SQLite
You can do the same with quite all database and livecode.
Moreover ValentinaDB noSQL db perfect integrated in livecode.
Livecode Wiki: http://livecode.wikia.com
My blog: http://livecodeitalia.blogspot.it
To post code use this: http://tinyurl.com/ogp6d5w

Post Reply

Return to “Databases”