Wish it was easier to write complex software?
Want an easier way to write applications?
The Business Application Framework (BAF) is a toolkit that assists writing complex software in LiveCode. It does this by making it easier to write applications using the Model-View-Controller (MVC) design pattern. But what does this actually mean?
Traditional LiveCode programming combines the user-interface of an application with the code that drives it and the data that it operates on. While this can be incredibly convenient, it can also be difficult to manage in complex applications. As an illustration how complicated this can be, we’ll talk about a hypothetical application called “NoteWriter.”
NoteWriter is an application for storing little notes for yourself (think shopping lists, reminders, to-dos, etc). This is a simple thing to write in LiveCode. It’s a couple of fields (one for the list of notes and another for the note contents) and then it’s just a little code used to save the data.
A feature that would make writing this app really great would be the ability to open two windows (or multiple windows) at once, each with a list of notes. However, a LiveCode stack can only be opened once. This isn’t a huge problem. You can always write your stack as a template and clone it for each window that is open.
But what would happen if we could open two windows (aka the “view”) that share the list of notes? Editing a note in one should immediately update the note in the other window. This idea is a bit trickier and you’ll have to write some code that stores the notes data (the “model”). The code you write will also be in charge of synchronizing the data between the various windows (the “controller”).
If you’ve gotten to this stage, you’ve written a large amount of fairly complex code – and almost none of the code relates to the core functionality of NoteWriter, which is meant to edit and store notes. What should have been a simple project has turned into a large ball of code and has taken up a lot of your time.
That’s where the BAF comes into play. The BAF will take care of all this added coding for you. You can design your app as a set of templates, using all the usual LiveCode tools combined with an additional visual editor for managing the templates as a project. The BAF provides the mechanisms that turn these templates into the synchronized windows of your application.
Because most of these templates are stored as plain text, the BAF makes it easy for you and your team to work together, creating reusable objects and using popular version management systems (such as GIT). The BAF also makes it easy to write robust reusable object-oriented (OO) code that cuts your development costs. By separating views from your data (with the MVC), you can instantiate multiple views of the same or different data quickly and easily.
We hope you’re just as excited about the BAF as we are.
You can find out more about the BAF and the new Business License here.
And, of course, if you have specific questions, feel free to email business@livecode.com.
Thoughts, ideas, questions, and comments? Please share them in the comments!
2 comments
Join the conversationjayanthi venkataramani - September 21, 2015
This is very exciting! Here’s my question: How easy is it to convert traditional MS Access based desktop applications with tables, reports, extensive VBA, and SQL queries to a liveCode environment? Does it support a robust simultaneous multi user reporting environment? If I had to find some resources regarding migrating an older application to liveCode with a database back-end, where would I go? thanks!
Torsten - September 30, 2015
The idea of a business framework and a cloud framework is really great. Is there a way to test the BAF before signing up for a license? Is there a way to receive more information or sample code?