Any in-house corporate developers?

Bob Sneidar bobs at twft.com
Wed Feb 8 19:40:21 EST 2012


I am currently developing an app for our corporation (non-profit) but designing it to be a marketable product as well. I haven't gotten to the reporting side of things yet. I am using mySQL, and an LC plugin called sqlYoga for ease of development. You should be aware that currently only a few SQL databases are supported: sqLite, mySQL, Valentina, and one other I cannot remember. Microsoft SQL is NOT supported to my knowledge, and some corporations require MS SQL compliance. 

Once your data is in an SQL database, it seems to me you could call any reporting application at least through Applescript or a terminal shell, if they support it. One of the devs on this list has a reporting plugin called Quartam Reports (from the same company that makes Valentina I believe). LC also supports creating PDF's as well. 

As for my project, (uninterested parties hit delete here) I am writing it in such a way that it can be used as a framework for future projects. For instance, I have a behavior script for a form card with all the code necessary for building and using a form based upon an SQL table. By populating basic property values in each card, like the table name and the starting sort order, you can begin to build a form right away. By right-clicking on the background and picking from a menu of columns from the master table, then answering a series of questions about how you want to display the column on the form (button, field, menu, whether you want it to be a column in the master datagrid table etc.) you build your data entry form. 

The form has 3 sections: The main datagrid, the form fields area, and what I call a Detail Pane which is a tab menu. If you drop an object in the Detail Pane with a given tab selected, that object will only show up when that tab is selected. You can edit the list of tabs by option clicking on any of the tabs. 

If you add the altData datagrid object to the list of items that show up in the Detail Pane, then a second datagrid is displayed. By editing another set of properties, you can define a relational table "join" so that you can see related data in another table based upon the selection in the master datagrid. Very cool! 

Another feature I built in is a validation system. By right clicking on a field, you can select from pre, mid, and post validations. The pre validations trigger before populating the form (so you can do data conversions and the like). The mid validations trigger when exiting the field. The post validations trigger when the user clicks the Save button but before actually writing to the database. The list of validations is built on openStack by finding handlers in the validation section of the stack script, and reading the first two comment lines in each handler. These two lines define pre,mid,post (can be one or more) and what kind of field they will be available for (number, text, date so far). So to create more validations, just add them into the validations section of the stack script, and run openStack again. Return true on a validation and the behavior handlers proceed. Return false and they exit to top. The validation handler should alert the user appropriately. 

Another great feature is, in the card behavior, it checks for the existence of certain custom handlers in the card script itself and triggers them at the appropriate times. Some of the scripts it checks for are things like preNew (before going into new record mode), preInsert (before inserting a record in the database), preUpdate (before updating a record), preDelete (before deleting a record), preConditions (before setting up the where clause of a query), prePopulate (before populating the form) etc. There are more, but this gives you an ide of how customizable the behavior can be. All these are optional, but if included in the card script of any particular form card, they will trigger, allowing the developer to do anything he wants. 

While it works for my current project, it is still very beta. It needs a good bit of polishing. I would want to start a brand new project with a clean copy of the framework, and then make sure a developer could connect to a database (it has a database connection form too) and begin building the app without futzing around with things too much. 

I can send you some screen shots and even a demo vid if you like off list. 

Bob


On Feb 8, 2012, at 3:38 PM, Michael Chean wrote:

> I'm considering LiveCode for some internal projects where I work.  They
> would require db access, though I haven't settled on which one yet.  Also,
> I'm
> used to working a report writer (using VFP), so I would be interested in
> your experience with that.  What size
> application stack have you used it for.  Have you set up a business
> framework in it, or used a LiveCode DAL?
> 
> Thanks
> 
> Mike
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list