App Within Minutes Application
|Create collaborative web applications within minutes, based on XWiki's powerful structured data management system|
|License||GNU Lesser General Public License 2.1|
Table of contents
This application aims to allow end users use XWiki's powerful structured data management system to make collaborative web applications with as little steps as possible. The focus is on solving most common use cases when creating applications. We are not trying to include all types of features (like notifications, complex fields or workflows). These can be added by programmers.
Start by going to the App Within Minutes home page. Since XWiki Enterprise 4.2 it's available from the "Applications" panel.
There you can see listed the existing applications. Click on the "Create Application" button to start the wizard.
In the first step you have to provide the application name and location, which will determine the application home page URL. The application code and data will be generated as nested pages inside the specified location.
In the second step you define the application structure, i.e. the type of data the application will handle. At the end of this step the wizard will create for you the template and the sheet that will be used to create new application entries.
In the last step you customize the way the home page of your application will look like.
You can choose:
- Which columns to display in the entries live table.
- What icon your application should appear with in the Applications panel (since XE 4.2)
At the end the wizard takes you to the home page of your application, which is the place from where you can manage the application data: edit the application structure, add new entries, edit or delete existing ones.
Since XWiki Enterprise 4.2 your application will also appear in the Applications panel, with the icon you've chosen:
The second step of the App Within Minutes wizard helps you define the type of data your application will handle. The field palette lists the available field types. Most of these field types are mapped directly to XClass property types:
|Field Type||XClass Property Type|
|Static List||Static List|
|User||List of Users|
|Group||List of Groups|
|Database List||Database List|
See theto understand what an XClass is and what are all the available property types. The consequence of this mapping is that most of your application structured data will be stored in objects (XClass instances) attached to your application entries (documents). In fact, in this step the App Within Minutes wizard creates an XClass for your application.
Some field types, such as Title and Content are not mapped to an XClass property type but to a document field instead. Visually there's no difference between a Short Text field and the Title field. The difference comes from how the value is stored. In the case of the Title field the value will be stored in the title of an application entry (document). Same with the Content field: the value will be store in the content of the application entry (what you can edit in Wiki edit mode). This has a limitation though: you can use at most one Title/Content field per application.
Before you start customizing your application you should understand:
- what an means
- how can be defined in XWiki
- how structured data is displayed in XWiki using
- how structured data is processed in XWiki using
All the application pages are generated inside the location specified in the first step of the application creation wizard. The code pages are grouped under the Code page and are marked as hidden (so your users don't see them by default). The application entries are created under the Data page: each time you add a new application entry, a new page is created as a child of the Data page, to hold the entry data.
The AppWithinMinutes wizard creates the following wiki pages initially:
- The application home page (Holiday Request)
- The Code parent page, where the application code is located
- The class, defining the structured data managed by your application (e.g. Holiday RequestClass)
- The sheet, which is used to display and edit application entries (e.g. Holiday RequestSheet)
- The template, which keeps the default values to fill when creating new application entries (e.g. Holiday RequestTemplate)
- The translation bundle, which can be used to internationalize the application (e.g. Holiday RequestTranslations).
- The Data parent page, where the application entries are located
- The Preferences page (WebPreferences) which gives administration rights over the application's home page and its children to the application creator (so that he can delete all the application's pages)
- The Code parent page, where the application code is located
Among the advantages of having this separation between code and data, there is:
- Ability to hide the Edit application options to your users by denying the Edit right on the application's Code page and all its children. This way you can precisely control which users on your wiki are allowed to edit your application and your regular users won't be able to edit/break your application by mistake.
- Ability to control which users can add new entries or edit/delete existing entries by allowing or denying the Edit right on the application's Data page and all its children.
- Ability to easily backup your application's data
- Better overall organization
The application wizard was creating a custom live table results page (e.g. Holiday RequestLiveTableResults) in order to load the live table translations on demand. Starting with 7.4M1 the translations are loaded on wiki or user scope (based on user rights) and thus we don't need this page any more.
Each application is split into 2 XWiki spaces. If your application is named 'Meeting Manager' then your application's data pages will be stored in the space named 'Meeting Manager' (i.e. the space with the same name as the application) and your application's code pages will be stored in the space named 'MeetingManagerCode' (i.e. the name of the application, minus some special characters such as whitespace, plus the 'Code' suffix).
Each application corresponds to an XWiki space. Both the application's code documents (class, template, sheet, translations, etc.) and the application's data documents (the entries created by the users) are stored in the same space (the space with the same name as the application).
Starting with version 4.5 the AppWithinMinutes wizard generates a document translation bundle for the application which allows you to translate class field pretty names, list values (for static list fields) and live table columns names. If you have an application that was created with an older version of AppWithinMinutes you just have to edit and save it to get the new translation bundle.
If your wiki is setup forthen on the application home page, in the application menu, you have an entry to translate the application. The link takes you to the document translation bundle which is a wiki page so it can be in other languages like any other wiki page.
When editing an application you have the option to update the translation bundle. Note that for the moment the translation bundle (its default language) is regenerated so you may lose translation keys you added yourself. In the future we plan to update the translation bundle preserving the custom keys you add.
See theand the on how to use translation keys in scripts within your application.
Theoffers many configuration options that are not available when editing your application. You have to edit the application home page in wiki edit mode to be able to use all the available configuration options.
You can execute code after an application entry is created/edited by using the. Here's an where the title of a page is adjusted after the page is created/edited.
Theof your application can be changed from the administration section of your application's data space. Use the 'Space' > 'Administer Space' top menu, then follow 'Look & Feel' > 'Presentation' section.
The field palette from the class editor (second step of App Within Minutes wizard) can be customized easily. You can control both the list of field categories and the list of field types from each category. Field categories are determined by AppWithinMinutes.FormFieldCategoryClass. It's enough to add an object of this class to a wiki page to make it a field category. As you'll see this class has only one property, the priority, which specifies the position in the list of categories on the field palette. The category title is actualy the title of the wiki page.
Field types are determined by AppWithinMinutes.FormFieldClass. Before you add a new field type you need to because normally a field type is mapped to a property type as we've shown . Supposing you have created the "External Image" property type (as explained in the linked tutorial) let's see how we can add a field type based on it.
First of all you need to create a new wiki page. The title of this wiki page will be the title of the new field type and thus will appear on the field palette. We'll use "External Image". Next you need to add an object of type AppWithinMinutes.FormFieldClass to the page we've just created to let App Within Minutes know that this page describes a field type.
You need to specify:
- the field category
- the icon that will appear on the field palette before the field title; you can choose an icon from the Silk icon set, as you can see in the image above, or you can attach an icon to this wiki page and put the file name in the icon input
- the priority, which is the index inside the specified category on the field palette
- the list of editable meta properties of the corresponding property type; these are the configuration options that you will get for this field type
Save and edit this page using the class editor. We now have to define a template for the "External Image" field type. To do so you just have to add a property of type "External Image" and set the meta properties to the default values you'd like to have when you drag an "External Image" field from the palette to the field canvas in the class editor. Basically, this property template will be copied whenever you add a new "External Image" field to your application.
Save and you're done. Now let's create a new application, or you can edit an existing one. In anycase, you should see the "External Image" field added to the field palette under the right category.
Add an "External Image" field to your application and look at the field configuration. You'll see the configuration options that you have listed previously in the AppWithinMinutes.FormFieldClass object.
On the page you can find a tutorial about how to create a simple FAQ Application using App Within Minutes
Prerequisites & Installation Instructions
We recommend using theto install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).
You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- org.xwiki.platform:xwiki-platform-sheet-ui 8.0
- org.xwiki.platform:xwiki-platform-uiextension-ui 8.0
- org.xwiki.platform:xwiki-platform-localization-source-wiki 8.0
- org.xwiki.platform:xwiki-platform-rendering-macro-groovy 8.0