Alpha DevCon 2018
Results 1 to 17 of 17

Thread: CompileDB - An A5 Application Compiler for Cautious Developers

  1. #1
    Member
    Real Name
    brett sinclair
    Join Date
    Aug 2002
    Location
    Wellington, New Zealand
    Posts
    858

    Default CompileDB - An A5 Application Compiler for Cautious Developers

    I use the above title because I have to admit when it comes time to compile and then *delete* all my global scripts and functions I do so with some trepidation bearing in mind the time and effort that has gone into developing and testing them. Now I have no fear when I do this - I use CompileDB.

    So, here it is is. An application compiler for Alpha Five with the following features:

    1. Quickly and automatically compiles your application's global scripts and UDFs to an aex file.

    2. Works automatically with any A5 application - no customization or changes required.

    3. Backs up your global scripts and UDFs to a zip file. You can restore them easily when required.

    4. Deletes the source statements of your global scripts and UDFs after they are compiled so their Xbasic source is not included with your customer installation build.

    5. Installs as an A5 addin so that you can run it automatically. No separate installation is required in each of your A5 applications.

    6. Easy to remove - just delete it from the A5 addins folder if you decide you don't want it any longer.

    7. Tested comprehensively on A5 version 7. Also tested on A5 version 8.

    8. Source included so you can scrutinize it and make improvements. (But please share them with me so I can include them here).

    9. Automatically checks and detects improper use. For example:

    • Can only be run from the developer's edition of A5.
    • Will not run if the necessary support files are absent.


    10. It's free. No strings attached.

    There is everything here you need to get started with CompileDB. The attached zip file includes the following files:

    • 'CompileDB.aex' The compiled application. Just copy this to your A5 "addins_installed" folder.
    • 'CompileDB.txt' The Xbasic source for CompileDB.aex in case you want to scrutinize the code (its not otherwise required).
    • 'ReadMe for CompileDB.txt' The documentation - how to install and use CompileDB.

    I hope you find CompileDB as useful as I do.

  2. #2
    Member
    Real Name
    brett sinclair
    Join Date
    Aug 2002
    Location
    Wellington, New Zealand
    Posts
    858

    Default Re: CompileDB - An A5 Application Compiler for Cautious Developers

    Here is a new version 2 of CompileDB, now with a partner add-in for Alpha Five that restores the scripts compiled and removed by CompileDB.

    Here is a link to the zip file you can download that contains the .aex add-in executable and documentation pdf file.

    The partner add-in is named 'RestoreGlobalScripts' and is contained within the .aex file supplied. It will put back the scripts removed by CompileDB so that version information, existing scripts and other information added to your application's dictionary since CompileDB was run will not be overwritten when restoring a CompilDB backup, as may happen with version 1.

    CompileDB and RestoreGlobalScripts can be run using the following Xbasic syntax:

    addin.run("CompileDB")
    addin.run("RestoreGlobalScripts")

    Both will handle all global scripts and UDFs whether or not they are password protected. They are quick enough too that the restore time should not be an issue at all. For example, my testing of RestoreGlobalScripts on an application with 160 scripts containing 20 thousand Xbasic lines of code completed in one second.

    CompileDB and RestoreGlobalScripts have been designed for, and tested with, both Alpha Five version 7 and 8. They will *not* work with A5v5 or earlier and should work OK with A5v6, although I have not tested them with the latter. If this is a problem for anyone, let me know. If there's enough interest, I can possibly make and test the changes required for A5v5 in just a few days.

  3. #3
    Member
    Real Name
    brett sinclair
    Join Date
    Aug 2002
    Location
    Wellington, New Zealand
    Posts
    858

    Default Re: CompileDB - An A5 Application Compiler for Cautious Developers

    Due to popular demand here is a new version of CompileDB compatible with all versions of Alpha Five from 5 through 8 inclusive.

    The download link is still the same, and is repeated here.

    To determine what version you have, look at the top of the first page of the documentation. Version 2.1 says so, earlier versions do not.

  4. #4
    Member
    Real Name
    Gordon MacCarthy
    Join Date
    Jun 2007
    Posts
    50

    Default Re: CompileDB - An A5 Application Compiler for Cautious Developers

    Quote Originally Posted by brett s View Post
    Due to popular demand here is a new version of CompileDB compatible with all versions of Alpha Five from 5 through 8 inclusive.

    The download link is still the same, and is repeated here.

    To determine what version you have, look at the top of the first page of the documentation. Version 2.1 says so, earlier versions do not.
    Brett,

    I feel a little stupid asking this question but what is the difference between your CompileDB and the runtime version of an Alpha 5 V8 application? Or does the CompileDB compile the runtime version for faster execution with greater security? If this is the case, what does the speed and performance benefit look and feel like in comparison to the non-CompileDB implimentation?

    Thanks,
    Gordon

  5. #5
    VAR csda1's Avatar
    Real Name
    Ira J Perlow
    Join Date
    Apr 2000
    Location
    Boston, Massachusetts, USA
    Posts
    3,530

    Default Re: CompileDB - An A5 Application Compiler for Cautious Developers

    Gordon,

    These kind of routines are only compiling Global Scripts and UDF's into an AEX file (library file) that can then be used without including source code. The code in the AEX can be referenced from a Runtime, developer or Alpha web server, but does not create an exe or something that runs itself. You still need an Alpha 5 product to use the AEX code.
    Regards,

    Ira J. Perlow
    Computer Systems Design


    CSDA A5 Products
    New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
    CSDA Barcode Functions

    CSDA Code Utility
    CSDA Screen Capture



  6. #6
    Member
    Real Name
    Gordon MacCarthy
    Join Date
    Jun 2007
    Posts
    50

    Default Re: CompileDB - An A5 Application Compiler for Cautious Developers

    Thanks Ira,

    That answers my question. And, yes, I do have the Alpha 5 Pro version and am about to upgrade to the runtime license with some add on features. So your comments were most useful. Do the compiled Global scripts and UDF's execute any faster compiled or is this just a security function?

    Also, is the new version 8, which I presently have, running faster over the version 7 because it internally compiles on the fly or did they optimize the internal code to get it to execute faster? Does their version 8 runtime execute faster than the standard application under version 8? One of the things I am running into is that when I open a tabbed object I can use each tab almost as a separate form in itself based upon the design of my table set.

    This is very handy but the overhead with many tabs and tables in the set starts to slow down execution speed. Unfortunately, the telephone dialer function only works when the phone numbers are in the parent table and will not work if the numbers are in a child table. You can set it up to link to the child table but the pointers to the data for the telephone numbers are write only and will not read back to the dialer.

    In order to use the dialer from within a tabbed object linked to a child table with the phone numbers, means that each table in the set must have duplicate telephone number fields in order to dial the numbers when they are at the parent level. This really defeats the whole purpose of having a relational database system. The only way around this is to make the table with the phone numbers the parent table and then use several tabs to work with all the child tables in the set. However, by doing this results in the overhead getting too heavy and the application slows.

    The whole reason for having relational table sets is to be able to create several small table sets that can call upon each others data within the confines of small, fast, tight table modules... not sprawling table sets. All it takes is one primary function like a dialer routine that will only call data from within the parent set to screw up the whole principle of relational sets and tight running modules.

    Do you have any comment to make concerning this dilemma.

    Sincerely,
    Gordon

  7. #7
    VAR csda1's Avatar
    Real Name
    Ira J Perlow
    Join Date
    Apr 2000
    Location
    Boston, Massachusetts, USA
    Posts
    3,530

    Default Re: CompileDB - An A5 Application Compiler for Cautious Developers

    Quote Originally Posted by GordonMac View Post
    Do the compiled Global scripts and UDF's execute any faster compiled or is this just a security function?
    They do execute faster the 1st time, but not by much and is hard to measure the on the fly compile time

    Quote Originally Posted by GordonMac View Post
    Also, is the new version 8, which I presently have, running faster over the version 7 because it internally compiles on the fly or did they optimize the internal code to get it to execute faster?
    Many parts were optimized internally or done in the background in a different thread. The compilation method probably hasn't changed in any significant way, so the execution speed of user code has not changed (unless they user code uses Alpha built-in functions that have been improved)

    Quote Originally Posted by GordonMac View Post
    Does their version 8 runtime execute faster than the standard application under version 8?
    Edited: Forgot to answer above - runtime and regular are exactly the same, just different parts are enabled.

    As for the problems with code you are having, it is best covered in the A5V8 message area, not the code archive here. Post the questions there, and include an example code if you can.

    Basically, I'd say it's your code or methods that are wrong most likely, and not Alpha 5. Don't use Action scripts or convert it to XBasic to be sure what code is really running. And learn how to address the objects in XBasic properly and your problems will probably go away.
    Last edited by csda1; 06-27-2007 at 09:11 PM. Reason: Forgot to answer last part
    Regards,

    Ira J. Perlow
    Computer Systems Design


    CSDA A5 Products
    New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
    CSDA Barcode Functions

    CSDA Code Utility
    CSDA Screen Capture



  8. #8
    Member
    Real Name
    Gordon MacCarthy
    Join Date
    Jun 2007
    Posts
    50

    Default Re: CompileDB - An A5 Application Compiler for Cautious Developers

    Thanks again Ira. That was great help. Much appreciated.

    Regards,
    Gordon

  9. #9
    "Certified" Alphaholic DaveM's Avatar
    Real Name
    Dave Mason
    Join Date
    Jul 2000
    Location
    Hudson, FL
    Posts
    5,894

    Default Re: CompileDB - An A5 Application Compiler for Cautious Developers

    Brett,

    That works great.

    Thanks.
    Dave Mason

  10. #10
    Member
    Real Name
    Gordon MacCarthy
    Join Date
    Jun 2007
    Posts
    50

    Default Re: CompileDB - An A5 Application Compiler for Cautious Developers

    Hi Ira,

    Thanks for confirming that the runtime and regular A5V8 run at the same speed with just different parts enabled. I thought that might be the case. Just wanted to know for sure. Thanks.

    Gordon

  11. #11
    Member
    Real Name
    brett sinclair
    Join Date
    Aug 2002
    Location
    Wellington, New Zealand
    Posts
    858

    Default Re: CompileDB - An A5 Application Compiler for Cautious Developers

    CompileDB version 3 is now available and can be downloaded in Zip format from here.

    There is a documentation PDF file included in the Zip file. Also a CompileDB.aex that must be copied to your Alpha5 '.addins_installed' folder and two '.new_code' files that must be copied to your Alpha5 'Control_Panel_Addins' folder. Please refer to the installation instructions for further details.

    The main change in version 3 is that you do not now create your own scripts or syntax to run CompileDB. All you need to do is run it from your Alpha5 control panel Code Tab by right clicking anywhere on the white background - see attached JPEG screen shot.

    This release has been tested on Alpha5 versions 8 and 9 on both Windows Vista and XP. If you discover any problems, let me know. Thanks to Dave J with his invaluable help with testing.

  12. #12
    "Certified" Alphaholic DaveM's Avatar
    Real Name
    Dave Mason
    Join Date
    Jul 2000
    Location
    Hudson, FL
    Posts
    5,894

    Default Re: CompileDB - An A5 Application Compiler for Cautious Developers

    I have used Brett's process with GREAT success.
    At least you can bring it all back to the cp if you need to.
    Dave Mason
    dave@aldaweb.com

    Skype is dave.mason46

  13. #13
    Member awj's Avatar
    Real Name
    Andrew W. Janert
    Join Date
    Jan 2001
    Location
    Calgary, Alberta, Canada
    Posts
    230

    Default Re: CompileDB - An A5 Application Compiler for Cautious Developers

    Hello Brett;

    Not sure if you're still on the Message Board anymore, but I was intrigued by this CompileDB you created. Do you still have the CompileDB.txt file? I'd really like to see how it was all done!



    Quote Originally Posted by brett s View Post
    I use the above title because I have to admit when it comes time to compile and then *delete* all my global scripts and functions I do so with some trepidation bearing in mind the time and effort that has gone into developing and testing them. Now I have no fear when I do this - I use CompileDB.

    So, here it is is. An application compiler for Alpha Five with the following features:

    1. Quickly and automatically compiles your application's global scripts and UDFs to an aex file.

    2. Works automatically with any A5 application - no customization or changes required.

    3. Backs up your global scripts and UDFs to a zip file. You can restore them easily when required.

    4. Deletes the source statements of your global scripts and UDFs after they are compiled so their Xbasic source is not included with your customer installation build.

    5. Installs as an A5 addin so that you can run it automatically. No separate installation is required in each of your A5 applications.

    6. Easy to remove - just delete it from the A5 addins folder if you decide you don't want it any longer.

    7. Tested comprehensively on A5 version 7. Also tested on A5 version 8.

    8. Source included so you can scrutinize it and make improvements. (But please share them with me so I can include them here).

    9. Automatically checks and detects improper use. For example:

    • Can only be run from the developer's edition of A5.
    • Will not run if the necessary support files are absent.


    10. It's free. No strings attached.

    There is everything here you need to get started with CompileDB. The attached zip file includes the following files:

    • 'CompileDB.aex' The compiled application. Just copy this to your A5 "addins_installed" folder.
    • 'CompileDB.txt' The Xbasic source for CompileDB.aex in case you want to scrutinize the code (its not otherwise required).
    • 'ReadMe for CompileDB.txt' The documentation - how to install and use CompileDB.

    I hope you find CompileDB as useful as I do.

  14. #14
    Member
    Real Name
    brett sinclair
    Join Date
    Aug 2002
    Location
    Wellington, New Zealand
    Posts
    858

    Default Re: CompileDB - An A5 Application Compiler for Cautious Developers

    Quote Originally Posted by awj View Post
    Hello Brett;

    Not sure if you're still on the Message Board anymore, but I was intrigued by this CompileDB you created. Do you still have the CompileDB.txt file? I'd really like to see how it was all done!
    Hi Andrew,
    Yes, I still visit the message board from time to time. All the original links to CompileDB appear to have been removed, not sure why. So here is the original download link: http://www.pgsd.co.nz/downloads/CompileDB3.zip

    The CompileDB.txt file you are looking for is in the zip file as 'CompileDB.axb' which is just a plain text file with a '.axb' extension because that is what my main application 'PGPreCompiler' uses as its convention for Alpha5 Xbasic source code.

  15. #15
    Member awj's Avatar
    Real Name
    Andrew W. Janert
    Join Date
    Jan 2001
    Location
    Calgary, Alberta, Canada
    Posts
    230

    Default Re: CompileDB - An A5 Application Compiler for Cautious Developers

    Thanks Brett, got the download but I couldn't locate an AXB file in the zip file at all. :)

  16. #16
    Member
    Real Name
    brett sinclair
    Join Date
    Aug 2002
    Location
    Wellington, New Zealand
    Posts
    858

    Default Re: CompileDB - An A5 Application Compiler for Cautious Developers

    Oh, yes. You are right. Try this link for downloading:

    http://www.pgsd.co.nz/downloads/CompileDB.axb

  17. #17
    Member awj's Avatar
    Real Name
    Andrew W. Janert
    Join Date
    Jan 2001
    Location
    Calgary, Alberta, Canada
    Posts
    230

    Default Re: CompileDB - An A5 Application Compiler for Cautious Developers

    Thanks a bunch! Got it!

    BTW, very impressive utility! Works perfectly and it's a real time saver when deploying new versions to users! :)

Similar Threads

  1. Replies: 0
    Last Post: 02-07-2007, 11:32 AM
  2. Program Compiler
    By WarrenG in forum Archived Wishlist
    Replies: 2
    Last Post: 01-31-2007, 11:32 AM
  3. compiler
    By rudy birchler in forum Alpha Five Version 6
    Replies: 1
    Last Post: 12-11-2004, 02:39 PM
  4. Runtime Compiler
    By George BVI in forum Announcements
    Replies: 7
    Last Post: 10-09-2001, 02:26 AM
  5. Runtime Compiler
    By George BVI in forum Alpha Five Version 4
    Replies: 1
    Last Post: 09-26-2001, 07:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •