Open djay opened 8 years ago
would likely superseded https://github.com/plomino/Plomino/issues/386 which deals with a single python file per form as an import/export format. If the above is implemented, the import/export format should be made as close as possible.
@ebrehault I think "single .py per form + imports" is the way to go here. I'm guessing since the code already exists for rapido this would not be too hard?
@ebrehault We'd like to work on improving the import format since json is pretty much unworkable for filesystem development. @displacedaussie
What I propose is this
@ebrehault I guess my questions are, do you agree this is the right way to go, and if so, how does this work in with the timeline for the IDE?
I agree it is the way to go. I am about to merge IDE in master (as an experimental feature), the IDE hasn't impacted the way formulas are stored, but it can be adapted easily to the changes you described.
User problem
Sometimes you want share methods, values and other things between formulas inside a form, or between fields and a form, or between forms. The include system is very clumsy with having create the methods, and how its not obvious that you have to resave any formula to include changes to the include file. You can't use mechanisms like classes to structure your code, or wrap documents to make them easier to use for a particular app. When an app gets bigger the code gets spread around.
Options
single .py per form + imports
hook into import so we can import other forms like
similar to the python via in https://github.com/plomino/Plomino/issues/618. This would also allow arbitrary classes or functions to exist in that file as the developer wishes.
so if you wanted to create a convenience wrapper class you could do it like
single .py per DB. Forms as classes.