MVC - livecode separation of layers

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
MrWizard.
Posts: 32
Joined: Tue Apr 17, 2012 3:31 am

MVC - livecode separation of layers

Post by MrWizard. » Sun Jul 21, 2013 7:45 pm

Does anyone have any advice on keeping layers separate? I try to use good MVC design and keep as much separated as possible. I am looking to create a clean Design [MVC (Model-View-Controller) MVVM (Model-View-View-Model) and MVP (Model-View-Presenter)].

UI <--> BLL <--> DAL

This 3 layer architecture should allow me to separate presentation for devices (iPhone, iPad, Browser, fat client) from the Business Logic Layer (BLL). The BLL would be able to reside locally or remotely on a internet server.

The Data Access Layer (DAL) which contains only the code needed to read/write from the database
which consumes the DAL, contains business rules, and validation,

This separation should allow for reusable components, flexibility as to placement of the layer, as well as multiple interchangable database types.

Thanks
E

MrWizard.
Posts: 32
Joined: Tue Apr 17, 2012 3:31 am

Re: MVC - livecode separation of layers

Post by MrWizard. » Tue Jul 23, 2013 10:12 pm

I see that LC has the concept of include files (both locally and remote)

How do I use stacks with LiveCode Server?
http://lessons.runrev.com/s/lessons/m/4 ... ode-server

What is a Library and Why Do I Care?
http://livecode.byu.edu/messages/libraries.php

This is good and should encourage the separation of UI and code. I guess we can enforce a good MVC paradigm through proper discipline.

I understand that Apple restricts bypassing the App store and downloading of code from an internet server. If accurate, then that limits the usefulness of stacks with LiveCode Server. Is that accurate?

Can iOS use local library stacks? Is there any instruction on that?

Thanks
E

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

Re: MVC - livecode separation of layers

Post by FourthWorld » Tue Jul 23, 2013 10:41 pm

MrWizard. wrote:Can iOS use local library stacks? Is there any instruction on that?
A library stack is just a stack with code. It can be included as a substack in the main stack file, or within the app bundle as a separate stack file.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

MrWizard.
Posts: 32
Joined: Tue Apr 17, 2012 3:31 am

Re: MVC - livecode separation of layers

Post by MrWizard. » Wed Jul 24, 2013 1:32 am

Thanks.

Is it created through the client IDE or does one just use a text editor

E

Klaus
Posts: 13858
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: MVC - livecode separation of layers

Post by Klaus » Thu Jul 25, 2013 10:19 am

Hi E,

[quote]Is it created through the client IDE or does one just use a text editor[/url]
I guess this is a question, although the question mark is missing...

Since we are talking about library STACKS, what do you think? 8-)


Best

Klaus

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: MVC - livecode separation of layers

Post by shaosean » Thu Jul 25, 2013 10:27 am

Klaus wrote:
Is it created through the client IDE or does one just use a text editor[/url]

Come on Klaus, the lack of a closing quote tag and the lack of a opening url tag.. tsk tsk..

Klaus
Posts: 13858
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: MVC - livecode separation of layers

Post by Klaus » Thu Jul 25, 2013 11:36 am

It is very hot over here in sunny germanski! 8-)

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: MVC - livecode separation of layers

Post by shaosean » Thu Jul 25, 2013 11:49 am

Can't beat the blistering 12C over here

Klaus
Posts: 13858
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: MVC - livecode separation of layers

Post by Klaus » Thu Jul 25, 2013 12:11 pm

12° celsius?
HA, kids stuff! :-D

It is over 35° celsius and raising here...

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: MVC - livecode separation of layers

Post by shaosean » Thu Jul 25, 2013 12:55 pm

I guess I forgot the sarcasm tags ;-) Yeah, I get to hear another German friend complain about the heat over there, so enjoy it ;-)

Klaus
Posts: 13858
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: MVC - livecode separation of layers

Post by Klaus » Thu Jul 25, 2013 1:05 pm

I really do! And that is not sarcastic or something :-)

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”