ARGen

 ActiveRecord Generator for Xojo ARGen64

ARGen 2.0 from BKeeney Software is the perfect utility to save you time and money creating your Xojo database application.  ARGen lets you generate hundreds of database classes for Xojo as well as their related user interface in seconds. ARGen is available for Mac OS X and for Windows.

What Is ActiveRecord?

Look at http://www.bkeeney.com/rbinto/activerecord/ for the our description as well as the initial classes to get going with ActiveRecord for Xojo and Real Studio.

How it Works

Many times the design of the database (the data) begins early in the development process.  ARGen scans CubeSQL, SQLite, MySQL, ODBC, Oracle, PostgreSQL, and Microsoft SQL Server (Windows only) and generates a namespace set of ActiveRecord classes and objects that you can copy and paste into your Xojo application.  Version 2 now generates a mostly complete project that you can use as a basis for your project or you can copy and paste into your own project file.

Step One:  Connect to the Database

Step1

 

Connect to the database of your choice:  Connect to CubeSQL, SQLite, MySQL, ODBC, Oracle, PostgreSQL, or Microsoft SQL Server (Windows only).

Encrypted SQLite files are supported.

We do not store a copy of your database password: we ask you to enter it every time you open the project and do not generated it in source code.

Fill in an application name, company name, and application identifier.  You can always change these later on.

Choose if you want a desktop or web project created.

Set if you want standard database error checking or if you want the BKeeney Software version.  The BKS version is a method call that generates an exception if an error is encountered.

Set if you want all dates stored in GMTOffset of zero.  This is handy if you have dates that span multiple time zones.

 

Step Two:  Select Tables and Views

Step2

Select the tables and views you wish to work with.  It’s really as simple as checking the box next to the table and view name.

 

 

 

 

 

 

 

 

 

 

 

Step Three:  Create Properties

Step3Sometimes Xojo doesn’t always bring back the proper column type.  Use this panel to change the Xojo data type.  A good reason to use this is Boolean column types: sometimes they get reported back as integers and this gives you a way to modify it before we generate any ActiveRecord code.

This also where you can say if a field is unique.  If it is, we’ll add a method on the ActiveRecord data class for that table checking for duplicates (some modification on your part may be required).  Currently, only one unique field per table is supported.

 

 

 

 

 

 

 

 

Step Four:  Auto Create Objects

Step4

ARGen can now generate related objects automatically for you.  In step four, you get to choose which objects it tries to automatically add.  We automatically add any foreign keys that we detect in the database but you can add your own too using the Add Manual Relationship

In the example on the left, the table t_address has a foreign key into tr_addresstype.  This is a single object (meaning a one-to-one relationship).  Using the popup in the Type column you can set it to be an array of related objects if it’s really a one-to-many relationship.

Use the checkbox to tell ARGen which objects you want it to add code for.

 

 

 

 

 

 

 

Step Five:  Auto Create UI

Step5

Most database applications have generic List and Edit forms.  In step five, you tell ARGen which tables you wish to generate User Interface elements for.  For List and Edit forms you can choose between a Window/WebPage, Container or Both.

The listbox on the right lets you see what the field is and lets you set the control type.  You can choose between label, text field, text area, popup menu, checkbox, listbox, and password field.

The “Include in Listbox” column lets you select if the field is included in the List form (if setup).

 

 

 

 

 

 

 

 

Step Six:  Review and Generate!

Step6

Step six generates your project file.  Review prefix/suffix preferences and change them as necessary.  Then click the Generate Project File button.

ARGen generates an XML project file that you can then open in Xojo.

It really is that simple!

If you want to see it in action, take a look at our video at http://www.bkeeney.com/allproducts/argen/argen-2-0/

 Purchase

ARGen is $99.95 (USD) .

Purchase ARGen for Windows  Purchase ARGen for Mac OS X

 

 

Download

ARGen for Mac OS X

ARGen 2.0.8 for Mac OS X (11.4 MiB, 1638 downloads)
ARGen for Windows 
ARGen 2.0.8 Setup For Windows (14.0 MiB, 185755 downloads)

Version History

Version 2.0.8 Released March 10, 2017

  • [Bug Fix] Removed reference to Window.IsMinimized for windows desktop preferences. It is no longer suported.
  • [Bug Fix] Missing #If statements for database plugins
  • [Bug Fix] ARGen projects will now compile 64bit
  • [New] Add “Initial Sort” into Step 5 of Wizard
  • [Change] Make Desktop Add/Edit Windows Modal Windows
  • [Change] HandleAdd should create a ‘new’ record, and then send it to the Add/Edit Window
  • [Change] Lazy load objects now use table name for property name instead of field name

Version 2.0.7 Released December 16, 2016

  • [Change] Moved settings button on ccReview to be more visually appealing
  • [Change] Renamed settings button on ccReview to more obviously assist in determining it’s action
  • [Change] Make Web Add/Edit pages into WebDialogs
  • [Bug Fix] Fixed bug with duplicating AR Object property names (single and array)
  • [Bug Fix] Fixed FileTypes issue with known workaround (winProject > HandleGenerate > Lines 26-30)
  • [Bug Fix] MenubarVisible True for progress modal to remove dock-blink on Mac
  • [Bug Fix] Menu None for splash screen and progress modal so they don’t have menus on Windows
  • [Bug Fix] Fixed bug with missing field type ‘blob’ in FieldDef module, private Function MapFieldInfo.
  • [Bug Fix] Fixed Oracle bug where fields and PKs were not being returned

Version 2.0.6 Released September 21, 2016

  • [Bug Fix] Fixed bug with invalid ‘Save’ code in Add/Edit objects
  • [Bug Fix] Fixed bug with controls not being added in Windows (EndOfLine Issue)
  • [Bug Fix] ccAddEditDelete buttons mapped to wrong event

Version 2.0.5 Released September 12, 2016

  • [New] Added Group UI by Table/View feature
  • [Bug Fix] Fixed Project List button alignment on windows (add/edit/delete)
  • [Bug Fix] Fixed bug with not saving sqlite db location properly

Version 2.0.4 Released September 06, 2016

  • [Bug Fix] Fixed bug with parsing SQLServer
  • [Bug Fix] If control is set to ‘None’ ARGen no longer creates code for it in Init and Save methods
  • [Bug Fix] Fixed Icon transparency issue

Version 2.0.3 Released September 01, 2016

  • [Bug Fix] Fixed CubeSQL issue

Version 2.0.2 Released August 30, 2016

  • [Bug Fix] Fixed bug that caused nil object when trying to get template for generating Project
  • [Bug Fix] Windows only.  Fixed a resource path issue.
  • [Bug Fix] Fixed CubeSQL Login

Version 2.0.1 Released August 28, 2016

  • Completely redesigned application!
  • Can now create User Interface elements for Web and Desktop projects.
  • Choose between standard database error reporting versus a more robust version that BKeeney Software provides.
  • Can now create foreign key elements automatically.
  • Ability to create relationships without having to put them into foreign keys in the database.
  • Works with more databases.
  • Added ability to use database views.
  • Create entire projects for Desktop and Web projects with the proper database connections for each type.

Version 1.6.4 Released October 09, 2014

  • [Bug Fix] The code generated for no field Prefix/Suffix now works properly

Version 1.6.3 Released September 03, 2014

  • [Windows] Fixed Auto Updater code

Version 1.6.2 Released September 02, 2014

  • [Bug Fix] The initial compare table to classes routine now checks the prefix/suffix/plain for field names as setup in preferences
  • [Bug Fix] Load now works for CubeSQL databases

Version 1.6.1 Released August 4, 2014

  • [CHANGE] Change record ID’s to 64bit integers
  • [NEW] Added support for time fields (Thanks to Kem)

Version 1.6.0 Released May 30, 2014

  • [NEW] Now includes the entire ActiveRecord library in the outputted project file
  • [NEW] Output no longer depends upon Database plugins to be installed

Version 1.5.4 Released May 15, 2014

  • [ALL] Added an error message if there was an issue retrieving field schema.  Usually a SQL keyword being used for a database.
  • [ALL] Reverted 1.5.4 changes

Version 1.5.4 Released May 8, 2014

  • [ALL] Fixed a bug that kept SQLite databases from generating the proper XML file to import into Xojo and Real Studio.

Version 1.5.3 Released January 29, 2014

  • [ALL] Fixed a bug that was generating both the prefix and suffix.  You may be prompted to run save preferences again.

Version 1.5.2 Released January 15, 2014

  • [ALL] Fixed limit in demo that was causing classes to not generate properly.

Version 1.5.1 Released December 06, 2013

  • [Windows] Can now select individual tables
  • [ALL] Canceling the File Save no longer generates an error

Version 1.5.0 Released November 29, 2013

  • [New] Added CubeSQL Server Support
  • [New] Added SQLiteDatabase Support (for Xojo) but also kept REALSQLDatabase
  • [New] Added Oracle Server Support (Unsupported)
  • [New] Added preference to create suffixes for field names

Version 1.0.5 Released May 02, 2013

  • [ALL] Changed code generation to use str rather than cstr for non-US users.
  • [Mac OS X] Fixed a Cocoa UI Exception when generating classes.

Version 1.0.4 Released April 20, 2013

  • [Windows] Fixed additional preferences bug
  • [Mac] Fixed Help Menu bug

Version 1.0.3 Released April 18, 2013

  • Fixed a preferences issue that kept some preferences from getting save properly.

Version 1.0.2 Released April 16, 2013

  • Added propert ActiveRecord connection in the OpenDB method.

Version 1.0.1 Released April 15, 2013

  • Minor documentation fixes.

Version 1.0.0 Released April 3, 2013

  • Initial public release for Mac OS X and Windows