Tip:
Highlight text to annotate it
X
0:00:01.000,0:00:07.033
In this video I'll guide you step by step to generating
a fully functional Genero application using the
0:00:07.033,0:00:10.066
Business Application Modeling tool in Genero
Studio.
0:00:10.066,0:00:16.000
The first step is to create a special project used for
BAM projects. It's called a managed project.
0:00:16.000,0:00:23.000
Managed projects automatically contain the
additional build rules for creating the generated
programs.
0:00:23.000,0:00:32.000
Use the studio main menu option File > New from
the Design category choose Managed Project to
create a project for your application.
0:00:32.000,0:00:37.066
You'll notice that the project structure has three
predefined nodes to contain the files for your
project.
0:00:37.066,0:00:42.066
Application for the program and form files and any
additional source code files,
0:00:42.066,0:00:45.066
Databases for the Genero database schema files,
0:00:45.066,0:00:49.000
and Library for any additional resource files.
0:00:49.066,0:00:55.033
If I right click on the Application node and select
Advanced Properties from the menu, I'll see that
the
0:00:55.033,0:00:58.066
dependencies for the database and library nodes
have been set
0:00:58.066,0:01:03.033
ensuring that any files they contain will be included
in the application.
0:01:03.033,0:01:14.000
Next I'm going to add an additional fglprofile file to
my FGLPROFILE environment variable list
because this fglprofile file contains the
0:01:14.000,0:01:19.033
configuration information to access the sample
databases and I'm planning to use office store,
0:01:19.033,0:01:23.066
one of the sample databases that comes installed
with the product.
0:01:23.066,0:01:29.066
I'm selecting environment variables in the pages list
and add a user variable FGLPROFILE
0:01:29.066,0:01:32.033
by clicking on the green cross.
0:01:32.033,0:01:36.033
This file is located in the document and settings
0:01:36.033,0:01:41.066
area in the My Genero Files / Samples / DSConfig
directory.
0:01:41.066,0:01:45.033
Now I'll save the project to a folder in my file
system.
0:02:01.033,0:02:05.033
Now that I have my project ready, I'm going to
design the global flow of my application with the
0:02:05.033,0:02:09.033
Business Application diagram by creating a new
4ba file.
0:02:10.066,0:02:16.066
You can use the Studio main menu option File >
New, from the Design category Application
Modeling and choose
0:02:16.066,0:02:20.066
Business Application Diagram to create a blank
diagram.
0:02:21.000,0:02:30.000
I want to create a simple application that is going to
have a main form that calls a zoom form and also
calls a report.
0:02:31.000,0:02:37.000
So I'm going to lay out my design with a Program, a
Form, a Zoom Form, and a Report since I know
that we are going to
0:02:37.000,0:02:41.000
have these components at least in this application.
0:02:42.033,0:02:46.033
I can come back and change or add to this
diagram at any time.
0:02:46.000,0:02:52.066
Now I'll set the relationship between the
components by right-clicking and drawing out the
arrows to show the relationships.
0:02:52.066,0:02:59.033
My program will be calling the form, and the form
will call both the zoom form and the report.
0:03:03.066,0:03:08.066
And you can organize the components on your
diagram how you wish
0:03:20.066,0:03:26.033
The next step is to add the database schema from
which this application will be based.
0:03:26.033,0:03:30.000
The schema is extracted from your database.
0:03:30.000,0:03:35.066
Here I'm pulling one that's already been extracted
since I'm using the sample database
0:03:35.066,0:03:39.033
and I'm looking for the officestore
0:03:39.033,0:03:41.000
schema.
0:03:41.000,0:03:42.066
Or you could extract the database using the wizard
in Genero Studio under the database menu.
0:03:42.066,0:03:48.033
Or you could extract the schema using the wizard in
Genero Studio under the database menu
0:03:49.066,0:03:54.066
and this would allow you to fill in the information to
extract the schema from your
0:03:54.066,0:04:00.066
data source.
0:04:00.066,0:04:02.066
If I double click on the database schema
0:04:02.066,0:04:04.066
I'm brought into the Meta schema manager
0:04:04.066,0:04:10.066
and the Meta schema manager shows me the
database tables and columns and some properties
and relationships
0:04:10.066,0:04:17.000
I can add additional Meta data to this diagram such
as the default widget it to be used when a field is
use on a form
0:04:17.000,0:04:22.033
I also can make sure that there's a unique key
marked for each table if that information was not
0:04:22.033,0:04:26.033
gleaned from the database when the schema was
created.
0:04:39.000,0:04:44.000
Now I'm ready to implement the objects on my BA
diagram.
0:04:44.000,0:05:01.066
When I return to my BA diagram I'm going to go
ahead and save it and give it a name and save it to
my application node.
0:05:01.066,0:05:05.033
Now I'll right-click on the program icon and select
implement program.
0:05:05.033,0:05:11.066
When the save as dialog appears assign a name
for the program file and save it to the application
node.
0:05:11.066,0:05:17.033
This file be used to generate the source code for
the main function of the program.
0:05:17.033,0:05:22.033
Now I'll right-click on the form icon and select
implement form from database to generate a form
0:05:22.033,0:05:25.000
for the database table that I want this form to
access.
0:05:25.000,0:05:34.000
I'm going to select the officestore database and
account table and the first 10 or so fields of a table
from the
0:05:34.000,0:05:44.066
table list. I'll finish and save the form to the project
structure under the application node.
0:05:48.066,0:05:56.066
Now you have to documents in your central work
area: the application diagram or 4ba and the form
definition or 4fdm.
0:05:56.066,0:06:01.066
I can go ahead and build and execute the program
now as nothing else is required.
0:06:01.066,0:06:11.066
I don't have to implement the other objects on my
diagram yet; I can come back and do that a little
later.
0:06:16.000,0:06:39.033
Now as you can see I have a fully functional
application based on the account table in the
officestore database.