English|Português|Español
UserPasswordLogin

HOME
SESSIONS
INFO
blog 1 12

Data Providers and Business Components to initialize data

More examples of GeneXus X Evolultion 1’s Release Candidate: Data Providers, Business Components and Initial Value in Easy Invoicing. By Armin Bachmann, GeneXus Support, Artech.
The Easy Invoicing example mentioned in http://samples.genexus.com now uses Data Providers, Business Components and the new Initial Value functionality to load data. At first I kept on using news. Why? Because inertia makes people continue doing what they’ve always done. You get used to doing things in a certain way. It's relatively fast, and it works, so why change it?

The reason is obvious once you know how powerful Data Providers are.
In the following image you can see its advantages.

 


As you can see in the image,

- the new solution is much easier to read because it is clear which second-level register corresponds to which first-level register.

- I don’t need to use auxiliary variables to obtain the autonumber result.

- I don’t need to serialize or autonumber.

- I need to perform a lower number of assignments because things are solved in the Business Component. InvoiceDate is an example: At an attribute level, I specified the InitialValue property in Today(). Another example is the “last of the serial.”

- I don’t reprogram business rules in the procedure, avoiding programming errors or inconsistencies and lowering maintenance costs.


More Notes:

• The Initialvalue property, to be specified in a Domain or Attribute is like a defaults’ default in GeneXus X Evolution 1.

• In the example, &Invoice is of Invoice type, with Invoice being the transaction with the same name.

• &InvoiceCollection is a Collection of Invoices.

• As to the variables, I didn’t even need to define them… GeneXus does it by itself because I used the appropriate nomenclature.


The application can be tested online in runtime at http://samples.genexus.com/easy

The knowledge base is online on the public and free GeneXus Server which is available to the entire GeneXus Community (that is, you can view it via browser or download and try it locally with your GeneXus X Evolution 1).

What we recommend is that you download GeneXus X Evolution RC.

This is meant to reprogram our inertia so that instead of making us stand still it will push us to change.

Posted by Armin Bachmann in his blog De GeneXus y de la vida.
Related
GeneXus X increases development productivity with Data Providers and Data Selectors
How To: Examples of Data Providers with Conditions
It was just like Karina told me 20 years ago
GeneXus X Evolution 1 has been released!
Special Edition #GeneXusTheBestOf2014 :: Cloud Computing, the Internet of Things, GeneXus X Evolution 3, Success Stories, Smart Devices and ... Much More!
Release of U2 of GeneXus Evolution 3
Chopo Mobile introduces successful app in Mexico, developed with GeneXus and used for medical studies
GeneXus™ ERP Explorer and Connector for SAP® ERP Now Live on SAP Store
We have a new Download Center! The GeneXus download center has an enhanced appearance at its new location
Demand for Apple TV apps expected to double in 2016
What we've learned about GeneXus by working with Gartner (by Gabriel Simonet)
Agile or Waterfall development? (by Breogán Gonda)
We are pleased to share an interesting white paper about GeneXus, written by Kapil Ambwani from India!
Mickey, Toy Story & GeneXus: Why robots will transform developers?
GeneXus™ Named a NEW Challenger by Gartner In Its 2017 Magic Quadrant for App Development Platforms Report