The LC way for code libraries?

Richard Gaskin ambassador at fourthworld.com
Sun Apr 3 09:57:49 EDT 2011


Maarten Koopmans wrote:

> What's a good way to create and store a non-UI code library in a LC
> project (a.k.a. "business logic")? Say I'd want to implement a WebDAV
> client, which is a back-and-forth kind of flow. Or anu other protocol
> will do as a mental model....
>
>  Where would you store all the support functions for the protocol?
> Right now I can only see this happening on the stack level, but there
> I'm still fairly clueless.

If you think you'll be using such a library in other projects you'll 
definitely have an easier time reusing it as a library.

You could embed the library as a substack, but then keeping it updated 
every time you enhance it is a drag, so I tend to prefer to keep 
libraries in their own stack files, loaded at startup from a folder 
named "Components" I keep at the same level as the executable.

This article may help you get started if you haven't read it already:
<http://www.fourthworld.com/embassy/articles/revolution_message_path.html>

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: http://LiveCodejournal.com/blog.irv




More information about the use-livecode mailing list