macMikey / vc-forms-v14

A 4D component that exports all forms as json text files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VC_Forms v14

READ THIS FIRST!

This component has been retired. The features have been integrated into VC_Framework v14. I am leaving it published because at some point VC_Framework will most likely require the R-version path of 4D. This way users of normal v14 can still get form export if they want.

Introduction

This component is not ready for primetime. Only use it if you are willing to deal with bugs and possibly the need to start the export over from scratch. It has the bare minimum functionality (the ability to export the forms, the ability to export only the changed forms). It does not delete exported forms, for example.

Also, 4D v14 is REQUIRED. VC_Forms relies on new commands in v14.

Finally VC_Framework v14 v53353 or lower is required. Newer releases will not be compatible.

Description

The VC_Forms component facilitates automatic export of all forms in a 4D host database to text files on disk. The forms are exported as JSON. If the host database is under revision control, these text files are suitable for committing to the repository, thus giving the developer to ability to track changes to forms over time. Most importantly, the VC_Forms component is designed to have minimal impact on the host database.

The VC_Forms component can be extended to support revision control (RC) integration. If the host database (or another component) contains the following shared methods

  • VC_DEVHOOK_Create
  • VC_DEVHOOK_Update
  • VC_DEVHOOK_Delete

The VC_Forms component will call these methods prior to saving/deleting the method. The callee can choose whether or not to allow the save as well as take any action necessary to notify the RC software of the change.

Contents

  • The Components folder contains the "VC_Forms.4dbase" component suitable for installation in any 4D v14 database.
  • The matrix folder contains the component source code.

Usage

It is HIGHLY recommended that you already have VC_Framework v14 v53353 installed and activated prior to installing VC_Forms. VC_Forms can technically be used on its own but this ability isn't fully implemented yet.

Install the component (do NOT install an alias, you must install the component), launch the host database in 4D, and open a method if none are open. This will launch the stored procedure to manage form export.

Alternatively there is a macro included to install startup code so that the process can be automatically launched (e.g. via "On Startup").

Note: the first export may take some time in larger databases.

If you modify the matrix database, you should build a new component. To build a new component, execute the BLD_Build method from the matrix database (the matrix database uses the "BLD.4dbase" component).

About

A 4D component that exports all forms as json text files.


Languages

Language:Shell 39.2%Language:Batchfile 37.6%Language:HTML 23.2%