Is LC a good choice to write a web based accounting package?

Want to move your code and projects to LiveCode but don't know where to start?

Moderators: FourthWorld, heatherlaine, Klaus, robinmiller

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

Re: Is LC a good choice to write a web based accounting pack

Post by FourthWorld » Thu Apr 28, 2016 11:11 pm

I use a libraries on servers often, but what happens on the server is separate.

To run a stack delivered from a server is easy in LiveCode - run this in the Message Box:

Code: Select all

go url "http://fourthworld.net/revnet/devolution/4W_gzipper.livecode"
In fact, that particular stack is useful for this sort of thing, as it lets you drop any file onto it and it'll make a gzip-compressed copy.

If you compress your stacks with that before uploading them to your server, you can download them even faster:

Code: Select all

put url "http://somecompressedstack.livecode.gz" into tData
try
  put decompress(tData) into tStackData
catch tErr
  throw "Invalid stack file data"
end try
go stack tData
Whether you load a stack from your local disk or from the Web, LiveCode doesn't care, it'll run it just the same. The only difference is that the filename property of a download stack is empty, since it exists on the local machine only in memory.

Because it has no filename, it can't be saved back to the server, at least not with the "save stack" command. You can POST data to the server, and if you need to send a stack you can write a CGI to receive files and send stack files to it with POST. But for my projects I use the stacks only for UI and have data handled separately from a data store. When the stack loads its openStack command requests the data it displays from the server, and then calls the server's API to POST data back to it.

With most of the app coming from the server, all I need the standalone for is to provide the LC engine. The standalone's stack script contains just a few lines of code to download the main stack, or report an error to the user if the network is unavailable. That downloaded stack file takes care of everything else, downloading data and even other stacks files as needed in response to things the user does throughout the session.

In most respects, it's very much like working with local stacks, except that rather than loading them from disk I load them the web.

If this sort of thing is interesting (and frankly it's so useful for net-connected apps it's almost a shame not to use downloaded stacks for the UI), you can make a plugin to easily post new versions of your stack to your server. I prefer scp or rsync over FTP because they're secure. Your plugin can have a button named something like "Publish to Server", and it saves your stack file, makes a gzipped copy, and uploads that to your server with SCP. This way any time you want to deploy a bug fix or new feature, making it available for all your users is just one click away. I had the pleasure of using that in a meeting not long ago, where they were describing a bug in a conference call and I fixed it and uploaded it before our meeting was done - all they had to do was run the app again and they were using the latest version.


PS: to see a simple example of a downloaded stack in action, in your LC IDE see Development->Plugins->GoLiveNet (it'll be "GoRevNet" if using a version prior to 8.0). That plugin uses the "load" command to provide async download so it can display a progress bar, but the download is so short I don't really need it.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Re: Is LC a good choice to write a web based accounting pack

Post by ghettocottage » Fri Apr 29, 2016 1:31 am

FourthWorld wrote:I use a libraries on servers often, but what happens on the server is separate.

To run a stack delivered from a server is easy in LiveCode - run this in the Message Box:

Code: Select all

go url "http://fourthworld.net/revnet/devolution/4W_gzipper.livecode"

Do you use any sort of security with that? Or does it matter since you are using it for UI?

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

Re: Is LC a good choice to write a web based accounting pack

Post by FourthWorld » Fri Apr 29, 2016 1:49 am

ghettocottage wrote:
FourthWorld wrote:I use a libraries on servers often, but what happens on the server is separate.
To run a stack delivered from a server is easy in LiveCode - run this in the Message Box:

Code: Select all

go url "http://fourthworld.net/revnet/devolution/4W_gzipper.livecode"
Do you use any sort of security with that? Or does it matter since you are using it for UI?
It can be helpful to think of downloaded stacks like any other web resource, using authentication when needed. And since it's coming over HTTP/HTTPS you can use the same authentication methods you'd use for any other web resource.

For public consumption (like the URL above) no auth needed. Workgroup solutions run over HTTPS or VPN and require authentication (the first stack that gets downloaded is a login screen).
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

golive
Posts: 98
Joined: Wed Jul 01, 2015 5:16 am

Re: Is LC a good choice to write a web based accounting pack

Post by golive » Fri Apr 29, 2016 8:19 am

:idea: Thanks all for your detailed responses.

I am undecided on how to proceed but will investigate the suggestions made so far.

rblackmore245
Posts: 67
Joined: Fri Jun 12, 2015 9:42 am

Re: Is LC a good choice to write a web based accounting pack

Post by rblackmore245 » Tue May 03, 2016 10:23 am

I am in the process of writing a CRM package in LiveCode , and finding all the features I need including using jquery menus and graphs for the dashboards and reports.

golive
Posts: 98
Joined: Wed Jul 01, 2015 5:16 am

Re: Is LC a good choice to write a web based accounting pack

Post by golive » Wed May 04, 2016 2:48 am

rblackmore245 wrote:I am in the process of writing a CRM package in LiveCode , and finding all the features I need including using jquery menus and graphs for the dashboards and reports.
Are you using LiveCode Server?

newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Re: Is LC a good choice to write a web based accounting pack

Post by newpie » Thu Jan 12, 2017 10:26 pm

Hello, I had two questions:

1. I like option #2 but wanted to know if these options were possible?
Scenario A = Shortcut link on users desktop pointing to URL file that could automatically install a livecode starter application (exe file) locally and then this starter application would use the "go url "http://fourthworld.net/revnet/devolutio ... r.livecode" to start main stack.

Scenario B = Shortcut link on users desktop pointing to URL and when activated starts main stack on server

2. Is there a way to keep my code confidential in livecode stack on the server with password. I have option to do passwords, but that is only for standalone applications I thought.

Thank you for the help

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

Re: Is LC a good choice to write a web based accounting pack

Post by FourthWorld » Fri Jan 13, 2017 12:05 am

newpie wrote:..when activated starts main stack on server
What does that mean specifically?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Re: Is LC a good choice to write a web based accounting pack

Post by newpie » Fri Jan 13, 2017 12:35 am

Hello, thanks for quick reply,

I was just referring to the user doubleclicking the shortcut URL on their desktop and the main stack starts up from Server.


Thanks

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

Re: Is LC a good choice to write a web based accounting pack

Post by FourthWorld » Fri Jan 13, 2017 1:05 am

I see. Thanks. Just clarifying that the stack will be downloaded from the server, run locally in your standalone, yes?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Re: Is LC a good choice to write a web based accounting pack

Post by newpie » Fri Jan 13, 2017 1:29 am

Hello, as long as I can provide a URL shortcut link on desktop for end user, they doubleclick, then the main stack starts is my goal. Not sure if that was possible.

The medical program I saw has you login via web thru URL shortcut link on desktop, then after you log in multiple icons for certain apps are shown, when you doubleclick the application you desire it starts some type of citrix setup and the program is starts up momentarily. Just trying to simulate that logic.

newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Re: Is LC a good choice to write a web based accounting pack

Post by newpie » Thu Jan 19, 2017 7:42 pm

Hello, I wanted to ask if anyone knew of a way to protect my stack coding via the start livecode activation stack method if I store my main stack on a server.

Thanks

YogiYang
Posts: 27
Joined: Thu Oct 09, 2008 6:09 am

Re: Is LC a good choice to write a web based accounting pack

Post by YogiYang » Wed Aug 30, 2017 4:06 pm

golive wrote:I have an accounting package that I created in another language. It is based on dbase tables and runs on a Windows desktop.
I am looking to write a new similar application that runs over the internet. It will have several simultaneous users.

Is LC a good choice for the platform to develop this kind of application?
Also is the web capability of LC up to a task like this?

I would appreciate your opinions, for and against.

All suggestions welcome.
If you are a dBase developer or have ever programmed in FoxPro then I would advise you to check out Lianja (https://www.lianja.com/index.php?option ... cle&id=499). It supports 3 programming languages and is easy to master. It is not suitable for creating non DB oriented app though.

HTH
--
Yogi Yang

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

Re: Is LC a good choice to write a web based accounting pack

Post by FourthWorld » Wed Aug 30, 2017 4:18 pm

newpie wrote:Hello, I wanted to ask if anyone knew of a way to protect my stack coding via the start livecode activation stack method if I store my main stack on a server.
If by "stack coding" you mean scripts it's far simpler to set a password on the delivered stacks; a UI for this is in the Standalone Builder.

There may be other benefits to downloading stacks within your application, but it's probably not worth the trouble if all you want is to protect your code.

Besides, whether read from local disk or read from a remote disk and transferred over the 'Net, you'll still want to password-protect the stack regardless of where it's stored.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

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

Re: Is LC a good choice to write a web based accounting pack

Post by dave.kilroy » Wed Aug 30, 2017 4:24 pm

@Richard do you (or anyone?) have any information on the encryption used in password protecting a stack? Yesterday I had to write a 'security statement' on how a LiveCode project I'm working on saved data to mobile devices, I was able to talk about the built-in encrypt() command and AES-256 (which I'm using to encrypt and decrypt locally saved data), but I couldn't find anything describing the protection used when password protecting a stack. I'm sure LiveCode don't want to have details of how they password protect stacks common knowledge, but is there an official company statement describing the process even in a vague way that I could reference?

Kind regards

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

Post Reply

Return to “Converting to LiveCode”