
Welcome to projects
When we first load Studio into our browser, we are greeted by the welcome dialog. The welcome dialog contains a number of links to key resources to help us get started, such as the developer community site and product documentation. At the bottom of the dialog is the version of WaveMaker Studio. On the Projects tab is a searchable list of possible projects found in the WaveMaker home projects folder. Changing the location of the WaveMaker home folder under File | Preferences… updates the listing in projects accordingly. However, it is via the File menu item that the bulk of the in-Studio project management takes place. In addition to setting the WaveMaker home folder, it is here we find New Project…, Save, Close Project, Revert Project, Delete Current Project, and Copy Current Project…, all operating on the current project. Revert Project is a handy version of bulk undo; it reverts the project to the last saved state. The File menu is also how we deploy our project. Deployment will be discussed in Chapter 13, Deploying Applications.
Note that we were specific to say "possible projects" and not "projects." As we've seen in our exploration of the file system, projects are organized by folders within the projects
folder. It is not practical for Studio to verify every folder prior to listing. Any folder with at least one child folder is listed. This means it is possible to open a folder that is neither a project nor the root folder of a project.
As Studio opens a project, the first file it looks for is the .wmproject.properties
file. The project properties file is how WaveMaker determines what version of Studio last edited the project. Project versions change whenever there is an upgrade task from the previous version and not every release increments the project version. Therefore, the version, in .wmproject.properties
is not the same string as the product release, but instead is a numeric sequence incremented by each upgrade task. The project version for WaveMaker 6.5.3 is 0.54. The project version for other releases is listed on the release history page, http://dev.wavemaker.com/wiki/bin/wmdoc/Releases. If the version of the project we are attempting to open is lower, and therefore older than the version for the Studio we are running, Studio will attempt to automatically upgrade the project by performing the appropriate upgrade tasks needed to bring the project to the current level. If no project version was found, Studio alerts you to the issue by indicating 'Found project version "0"'
, and aborts opening the project. Projects with versions newer than the currently running Studio will not be opened either, as the project is likely to contain constructs that the older version of Studio cannot process.
Tip
A common cause of the no version property found condition for project folders is not having the project root folder in the projects
folder. If you get this error for what should be a valid project, ensure the folder containing the .wmproject.properties
file is in the immediate child folder of the projects
folder of the WaveMaker home folder specified in preferences.
The easiest way to move individual projects across systems or users is to use project export. Generated from the file menu, when a project is open, a project export is a ZIP file of the non-replaceable files of the project, including any files or folders you may have added to the project such as resources or JAR files. Without the many class files, WaveMaker provided the JAR and JavaScript files, a project export is much smaller than zipping up the project. Project exports are often less than 1 megabyte in size, and can easily be e-mailed or shared via the community forums. When imported into Studio via the File menu, exports are expanded into the WaveMaker home projects folder with the rest of your projects. Imported projects will be compiled and have the runtime JAR files copied in upon test run deployment.
The WaveMaker home location preference is not the only Studio-wide setting in the File menu. Modify Studio contains two submenu items: Upload Studio Patches and Import Partner Services. Partner services are Studio extension packages. They are one way that organizations can customize Studio without having to maintain a custom fork of the Studio code base. Uploading Studio patches is an easy way to apply any recommended JavaScript patches to Studio and the runtime. It leverages dojo.extend()
to redefine corrected functions with their fixes. The WaveMaker team posts key patches to the product wiki to be loaded automatically by the Load Patches button. Custom fixes can also be applied via this option. Unfortunately, this mechanism only works for JavaScript functions. Server side Java code can only be corrected via a more traditional patch of an update JAR file.