This document is a step-by-step explanation of how to create a simple Windows Phone application using GeneXus. For demonstration purposes, the CSharp Generator and Cloud prototyping were used. Check Smart Devices online applications architecture for more information about SD application architecture.
Before starting with the following steps, please check that the Windows Phone Requirements are correctly installed.
In the following example, we will write a simple application which lets you register companies and its customers. At the end of the sample, you will have an application to navigate, list, insert, update or delete companies and customers.
Note: It is not necessary to use CSharp as web generator, Java and Ruby are also available.
Create a Customer and Company Transactions with the following structure:
Please note that predefined domains were used for certain attributes and, in both cases, be sure to set as True the Autonumber property of each identifier attribute (i.e.: positioned on the CustomerId field, press F4 to see its properties, and change the Autonumber property. Do the same for the CountryId attribute).
Apply the Work With for Smart Devices object pattern on both Transactions.
Create a Menu for Smart Devices object called Menu.
This object is like a menu; you can use it to call the Work With objects created in the previous Steps. To do it: right click on the Items option to add actions to the Dashboard. You must select the WorkWithDevices<TransactionName> objects in the Select Object dialog:
When you select a WorkWithDevices<TransactionName> object, the Event associated with this action will be generated automatically:
For this sample, we are going to use Cloud prototyping. By just setting the “Deploy to cloud” property to “Yes”, all the necessary preferences are set:
By default Android and iOS are generated, so to generate Windows Phone you must select “Smart Devices” node, set “Generate Android” and "Generate iOS" to “false” and “Generate Windows Phone” to “true”.
After that, set the startup object:
After configuring the environment, press F5 to create the DB and generate the application.
Since the cloud is being used, a Gxtechnical user is needed. If you don’t have a user account, create one here.
By pressing “Create”, the tables are created:
and the application is generated.