- Smart Personal Cloud

Using Application Builder

1

MyEzApp.com makes it simple and easy to develop your own applications. This is enabled through the Star Script programming language and application templates. MyEzApp.com has two primary application templates available: "Hello World" and "Database".

2

To create an application based on the "Hello World" template, - Click on the Build Apps Icon in the System Tab. This will open the Application Templates Window. - To build an application based on the Hello World template, click the Create Button for the Hello World Application. - The first thing to do when building an application is to provide some basic information: - Application ID : a unique ID for the application. This should be only alpha-numeric or "_" - Display Name : a friendly name for the application. Limited to 20 characters. This is the name that will display below the application icon on your dashboard. - Source Folder : your application needs to be in a folder on the MyEZApp.com system. Simply type in a name for the folder. This name should be unique (i.e., not the folder name of another application) - Icon : if you have an icon for your application, click on the Choose File Button to upload it. - Description : a general description of the application. - When you are finished entering the information, click on the Create Button to create the application. It's that simple!

Once you create the hello world application, the application icon will show up on the dashboard. Click the icon will run the hello world application.

3

The "hello world" application consists of three files in total.

<user root>    +----------- appinfo_{appid}.ws    +----------- {app folder}                      +------------ show.ws                      +------------ guest                                      +------------- guest_show.ws

The file appinfo_{appid}.ws is the file that tells the myezapp.com the existence of the application with the id {appid}. Everytime a user login into myezapp.com, myezapp service will load all the appinfo files from the user's root directory. Based on this information, icons representing the applications will be displayed on the user�s dashboard. If you delete the appinfo file, the corresponding application icon will not be shown on the dashboard.

use /sys/appinfo  <init:appinfo>  <appid>"myapp"</appid>  <name>"My App"</name>  <folder>"apps/myapp"</folder>  <icon>""</icon>  <run>"show.ws"</run>  <guestpage>guest_show.ws</guestpage>  <apptype>user</apptype>  <creation_date>0</creation_date> </init:appinfo>

The show.ws displays a greeting text for the host user.

The appinfo_{appid}.ws file contains information about the entry program for both the host user and guest user. The element "run" refers to the script that will be run when user clicks on the application icon on their dashboard.

use /comp/ezpage use /web/http var loginId = http.request().get("loginId")  <ezpage>   Hello loginId! </ezpage>

The appinfo_{appid}.ws file also contains an element called "guestpage". The guestpage is a page that will be displayed when the guest clicks on the application icon.

The "hello world" application guest page is shown below:

use /comp/ezpage use /web/http var loginId = http.request().get("loginId") var hostId = http.request().get("hostId") <ezpage>   Welcome loginId to the site of user hostId. </ezpage>

The guest page displays a greeting text for the guest user.

4

To create an application based on the "Database" template, - Click on the Build Apps Icon in the System Tab. This will open the Application Templates Window. - To build an application based on the Database template, click the Create Button for the Database Application. - The first thing to do when building an application is to provide some basic information: - Application ID : a unique ID for the application. This should be only alpha-numeric or "_" - Display Name : a friendly name for the application. Limited to 20 characters. This is the name that will display below the application icon on your dashboard. - Source Folder : your application needs to be in a folder on the MyEZApp.com system. Simply type in a name for the folder. This name should be unique (i.e., not the folder name of another application) - Icon : if you have an icon for your application, click on the Choose File Button to upload it. - Description : a general description of the application. - When you are finished entering the information, click on the Next Button to specify information about the database tables. - To add entities to the database, click on the Add Entity Button. This will display the Entity Window. - An entity is composed of description (what is the entity) as well as any fields that might capture data. There are three types of entities in a MyEZApp database application: - Data : this is an entity representing data that a user would enter - Setup : this is an entity representing elements that are used to populate data entities. For example, if you have a Data entity called Homes. One of the fields in that Data entity might be "Realtor". Instead of having to type realtor names in every time, the user should be able to select one. - Related Data : this is a sub entity that is related to a data entity. - To create a new entity: - Name : the name for the entity - Type : use the drop-down to select the entity type - Display Name : a display name for the entity - Display Value : a Star Script expression that will be evaluated to generate the object display - Once you have created the entity, you can add one or more fields to it by clicking on the Add Field Button. This will populate the Field table so that you can specify information about the field: - Name : a unique name for the field - Label : how the field will appear to the user as they enter data - Type : the type of field. Use the drop-down to select. - Format : this is additional information that defines the format of the field. For example, if you set the field as date/time, by default the field will contain both a date and time. Bit if you just wanted the date , you can type in the text "date" to indicate such. - Value : this is a value for the specific format, if needed. For example, if you create a reference field, the value would be the entity ID to which the field is referring. - Extended : a checkbox to indicate if the field is extended. Note: the extended field will not show up on the data list view. This field will only display on the data details view. - Required : a checkbox to indicate that the field is required - Unique : a checkbox to indicate that this field is unique (i.e., no duplicates allowed) - When you are finished adding fields, click the Save Button to return to the application details - Finally, click the Generate Button to generate the database application. It's that simple!

5

Like the "hello world" application, the source code for a "Database" application is generated and placed within the folder you specified during the application-definition step.

<user root>    +----------- appinfo_{appid}.ws    +----------- {app folder}                      +-------- uninstall.ws                      +-------- types                      |           +-------- {generated entity classes}                      +-------- views                      |           +-------- {generated components}                      +-------- pages                      |           +-------- custom.ws                      |           +-------- <generated pages for the host user>                       +-------- guest                                  +-------- <generated pages for the guest user>                                  +-------- <application icon image>                                  +-------- <application css file>

Directly under the {app folder}, you will find the script uninstall.ws. As the name implies, running this script will remove the database application from your account. You can open the script within the editor to get a better understanding of what it does.

Under the {app folder}, you can also find four sub folders: - types : this folder contains the generated entity classes. the database application generator will generate one class per entity. if any entity contains any data, you will be able to browse the data under this folder. - views : this folder contains the generated component. You can open the pages in the editor to understand how each component works. - pages : this folder contains pages used by the host user and a special file called custom.ws - guest : this folder contains pages used by the guest user

The most important file for customizing the application is the pages/custom.ws file. Most of the customization can be done in this single file.

6

Although the instructions and information we've provided in these help tutorials will provide a good understanding of how applications are generated by myezapp, there is no better way to understand how to build an application using the system and the Star Script programming language than to build one yourself. Please refer to the "My Notes" application tutorial for a detailed, step by step guide on how to create a real "Database" application.

7

MyEzApp.com is a general purpose web application platform. It is not limited to the "Hello World" application and "Database" application as shown above. You can create many other types of applications. We are working on adding new types of applications to the application builder constantly. Please let us know what you would like to see and help us improve. Thanks in advance!