This tutorial describes the necessary steps to setup a new application on an OpenWGA CMS Server. The procedure described in this tutorial is mainly targeted for OpenWGA live CMS servers. While it is also usable for the server embedded to OpenWGA Developer Studio there may be more comfortable ways of doing this in the IDE that are not covered here.
If you are using a OpenWGA server installation we assume that you already have setup authentication for it. This may be done by calling the admin client (URL "/admin") or start page (root URL or "/start") after installation and following the server setup assistant that is shown. Alternatively you can follow the tutorial Setup simple authentication. At the end you should have defined at least a single user by which you will be able to login to your app. Note: This is not you administration login!
If you are using a runtime project in OpenWGA Developer Studio then authentication is already setup. A default user named "designer" with password "wga" is already created in file "wga/auth.xml".
1. Choose and obtain the design
First you need to choose which design your OpenWGA application should have. The design effectively determines "what your website/application is", by defining all layouts and functionalities that your application will have to offer. Mainly you have the choice between two ways:
- Take a predefined application design that is available as OpenWGA plugin. These may be customizable so you can adapt them to your needs. Web applications like blogs, forums, wikis etc. are already available out of the box when using OpenWGA.
Finding and installing application plugins is easy. Just open the OpenWGA admin client of your server (Path "/admin") and choose menu "Plugins > Plugin Store". There you can find and install the available application plugins with a few clicks.
Installing those plugins will however not create these applications directly. Instead these plugins are something called Design Providers. To actually use them you need to create a new OpenWGA web application and specify the installed plugin as design source. Just follow the coming steps of this tutorial to do this.
- Completely write a design from scratch. You surely need to understand many of the concepts and features that OpenWGA consists of for effectively doing this. So yes, this is not a newbies choice. If you want to learn the things you need to learn then a good idea would be to grab a copy of OpenWGA developer studio and start with examining the Website sample.
However if you wish to do this, then creating a new app is easy at first because there is nothing to obtain in this step. :-)
2. Create a new web application
Open the OpenWGA admin client of your server (Path "/admin") and login with your OpenWGA admin account if you need to (You should have set that up in the server setup assistant too. If not then the setup assistant will now be shown when opening the admin client).
- Click the item "Web Applications" in the main menu to the left. On the following page link labeled "New Web Application" should be available on the top right:
- Clicking this link will bring up the editor for a new app configuration.
- Under "key" specify a custom key, consisting only of alphanumeric characters, which will identify your new application on this OpenWGA server
- Give a descriptive title
3. Setup of the applications content store
Each OpenWGA application needs its own "OpenWGA content store" which is a database that holds the apps content. Configure this in section "Contentstore configuration":
- Under "Database Server" choose a database server that is registered with your system. If you have not yet registered any "production ready" database server you may use the "HSQL default database directory" which is a reasonable choice for testing and developing purposes or small sites.
- Database servers like MySQL or HSQL now offer to "Create a new database on this server" via an equally named button. Click it and specify a name for the new database to create. Then click "Create now". The created database will be automatically selected for your new app.
- If you use a different database server you need to manually create a database on your server and apply the DDL for an OpenWGA content store on it. Then you can either select it from the admin client or specify its name there directly.
4. Choose the design of the application
In section "Design Configuration" we finally choose the design that the application should use.
a) If using a predefined design from an OpenWGA Plugin:
- On "Source of Design" choose "Plugins"
- On "Plugin" choose the plugin that your uploaded before:
Some application designs may be customizable. After choosing these designs a new configuration entry appears labeled Design directory for customization. On most designs you can specify "none" here if you do not wish to customize the design. Otherwise you may do the following:
- Create a new empty folder in the "designs" directory of your OpenWGA installation/runtime which is to receive the resources that can be customized. In OpenWGA developer studio you can do this by right-clicking the "designs folder" and choose "New > Folder" in the menu.
- Refresh the display of the design configuration section in admin client, for example by choosing the design plugin again. Now pick your just created folder in Design directory for customization.
b) If creating a design from scratch
In that case on "Source of Design" you should choose Folder "designs". There you can click Create new subdirectory to create a directory where you can develop your design. This will be initialized to be a proper OpenWGA design directory once the configuration is saved.
5. Save the app configuration
After this you can leave all other settings on defaults and click the
"Save"-Button on the bottom. The OpenWGA admin client will now store the
applications configuration and it will be instantly available.
If you created a new design directory or if you
chose a design directory for customization then OpenWGA will now copy
all customizable resources of the design to this folder. In
OpenWGA Developer Studio you may need to refresh the folder view by
right-clicking your new design folder and choosing "Refresh" from the
menu to see those resources.
6. Edit access control settings
Your new application is now online. However you may first need to edit the access control list (ACL) of it to be able to access it. This is the case if you didn't setup simple authentication in server setup assistant. However, it is good precausion to review the ACL settings of you new application now. Do this by clicking the tab "ACL" on the app configuration.
Ensure here that:
- Either the "Access level for not specified users" on section "Default entries" is set to access level MANAGER
- Or under "Custom Entries" there is an entry with a user name or group that includes your user name. If there is already an entry for a group named "managers" at level "MANAGER" changes are that this was created by the server setup assistant and is already including you.
If you ever have problems access you app you should return here and add an entry with your very user name at level "MANAGER" for sure.
7. Open the application (if it has a design)
If you chose a predefined design then everything should be ready to go. You can simply open your new application by clicking the action "Open in..." to the top right of your app config and choose "New browser window". This will open the homepage of the applications design, which will assist you in setting up the special application type itself.
If not, then opening your application will most likely tell you that it does not have a homepage. Well, it really doesn't, as well as it does not have any design or content that it could show. So now is your time to get your hands dirty in OpenWGA design development.