Skyve 2.0 released

To pave the way for the ability to integrate add-ins with Skyve projects, this release of Skyve switches from date based versioning to traditional semantic versioning. The main new features are the ability to generate charts from any list grid, a new startup screen to make first-time setup of major system options more prominent, improved unit test performance and an updated user dashboard.

List Grid Charts

Following on from adding the chart widget to edit views, a chart button has been added when in desktop mode to any list grid which allows a chart to be generated from the data in the list.

The List Grid Chart function

The List Grid Chart function

Startup Page

A new setup page has been added to launch automatically when users start a new Skyve application for the first time. This allows system administrators to configure major functions of the application such as email and map options at runtime.

The first time startup page

The first time startup page

Improved Unit Test Performance

The base unit test running has been updated to perform a rollback instead of a truncate after each test. For large applications, the truncate operation was taking a long time to rebuild the schema in-between tests. For one application with over 800 generated unit tests, run time went from 14 minutes to 35 seconds.

Updated User Dashboard

The admin module user dashboard has been updated to provide a list of “tiles” to help pre-empt common actions the user might perform based on popular content within the application.

The updated PrimeFaces user dashboard

The updated PrimeFaces user dashboard

The updated SmartClient user dashboard

The updated SmartClient user dashboard

Easier Public Pages

Creating a public page in a Skyve application previously required creating a custom xhtml page and modifying the web.xml file. This was done for security reasons to make sure that no pages were ever exposed unsecured by a developer by accident. We’ve updated the security and routing to cater for specific routing to a public page, which can now be defined as unsecured in the global router, or within a module router.

<unsecured>/external/public.xhtml</unsecured>

Admin

  • Update admin documents to remove local icon references to prefer vector based font-awesome icons

  • Add favourites to admin.UserDashboard and minor enhancements

  • Added clarification to Truncate action in admin.DataMaintenance regarding customer scope

  • Add new Startup document to admin module for first time setup

Framework

  • Only call constant domain bizlet methods for enumerations if the constant domain is defined in the enumeration metadata

  • Remove requiredness of uxuiSelectorClassName in the Router

  • Increased length of new passwords allowed from 30 to 255 since they are hashed

  • Make drop area for file uploads 200 pixels high

  • Populate a bean fully before deleting it otherwise the auditing of the delete could fail

  • Generate a Radio Group if there is <= 3 items to display in an enum or a constant domain restricted field

  • Add filterable attribute to lookupDescription drop down columns

  • Allow Persistence.upsert to update bizCustomer and bizUserId

  • Fix DataBuilder index out of bounds for short strings

  • Add helpRelativeFileName and helpURL to views

  • Remove admin faces from Skyve

  • Allow label "for" attribute to bind to any document attribute

  • Add AbstractSkyveJob.persistJobExecutionOnSuccess() defaulting to true

  • Rename parameter, filter parameter & view parameter attributes to be more descriptive

  • Remove Persistence.refresh() as it can call setRollbackOnly() on exceptional flows. NB It is still available on AbstractHibernatePersistence.

  • Change AbstractH2Test to perform a rollback instead of a dispose at the end of each test to massively improve the performance of generated unit tests

  • Update AbstractH2Test to create an admin user at the start of each test

  • Validate document names in the metadata to not contain unicode to work around a hibernate 5 bug

  • Block NPEs in malformed/bad requests to customer resources.

  • Add public user to admin.Configuration, unsecured URLs to router definition and re-implement unsubscribe.xhtml to use the PublicFacesView.

  • Enable public views to pass through home.jsp by checking the outcome URL of a route against unsecured URLs in the merged router.

  • Swallow DDL migration exceptions so deployment can continue.

  • Add password aging, password history and account lockout.

SmartClient

  • Introduce List Grid Charts

  • Favour font icons over file icons in SC rendering

  • Fix formatting for capitalization without a mask defined

  • Fix blur event used in conjunction with changed events in dates in SC.

PrimeFaces

  • Fix formatting for capitalization without a mask defined

  • Rearrange xhtmls to enable add-ins to be able to drop new ones in

  • Enable hiding of the menu, the mode switch and logout items in xhtml templates

NOTES FOR UPGRADING

To upgrade your Skyve project to this version, change the Skyve version in your pom.xml to 2.0.2 and change your skyve-maven-plugin version to 1.23.

You will need to update your all of your declared UxUi in the DefaultUxUiSelector.java to use the new constructor, as per below:

public static final UxUi PHONE = UxUi.newPrimeFaces("phone", "editorial", "nova-light");
public static final UxUi TABLET = UxUi.newPrimeFaces("tablet", "editorial", "nova-light");
public static final UxUi DESKTOP = UxUi.newSmartClient("desktop", "Tahoe", "casablanca");
public static final UxUi EXTERNAL = UxUi.newPrimeFaces("external", "editorial", "nova-light");

Note: to enable the new startup page in an existing project, you will need to make much larger changes to your DefaultUxUiSelector.java and add a new route to your router.xml. You can see all these changes in the skyve-ee project in GitHub, or contact us for assistance upgrading.

A new unsecured route was added to the router.xml at the bottom to enable public pages:

<unsecured>/external/public.xhtml</unsecured>

A new section was added to the project json configuration file to configure password security. The new account section should be added above environment:

    // Account settings
    account: {
        // Password hashing algorithm - usually bcrypt, pbkdf2, scrypt. MD5 and SHA1 are unsalted and obsolete.
        passwordHashingAlgorithm: "bcrypt",
        // Number of days until a password change is required - Use null to indicate no password aging
        passwordExpiryInDays: null,
        // Number of previous passwords to check for duplicates - Use null to indicate no password history
        passwordHistoryRetention: null,
        // Number of sign in attempts until the user account is locked - Use null to indicate no account lockout
        accountLockoutThreshold: 3,
        // Number of seconds per failed sign in attempt to lock the account for - Only relevant if account lockout is in use.
        accountLockoutDurationMultipleInSeconds: 10
    },
 

In addition, passwordHashingAlgorithm can be removed from the environment section.

Your project pom.xml will need to update the template paths for the maven-war-plugin:

<webResources>
    <webResource>
        <directory>src/main/webapp/WEB-INF/pages/templates/editorial</directory>
        <targetPath>WEB-INF/pages/templates/editorial</targetPath>
        <filtering>true</filtering>
        <includes>
            <include>template.xhtml</include>
        </includes>
    </webResource>
    <webResource>
        <directory>src/main/webapp/WEB-INF/pages/templates/ecuador</directory>
        <targetPath>WEB-INF/pages/templates/ecuador</targetPath>
        <filtering>true</filtering>
        <includes>
            <include>template.xhtml</include>
            <include>topbar.xhtml</include>
        </includes>
    </webResource>
    <webResource>
        <directory>src/main/webapp/WEB-INF/pages/templates/ultima</directory>
        <targetPath>WEB-INF/pages/templates/ultima</targetPath>
        <filtering>true</filtering>
        <includes>
            <include>template.xhtml</include>
        </includes>
    </webResource>
</webResources>

Breaking API changes:

Some parameter names were renamed to be less generic and ambiguous and these changes are not backwards compatible and will need to be corrected to comply with the new domain model. These changes affect ListGrid filter parameters, report parameters and view new parameters.

ListGrid before

<listGrid continueConversation="true" query="qSubscriptions">
    <filterParameter operator="equal" name="communication" binding="bizId" />
</listGrid>
Report before
<report reportName="CustomerContacts" moduleName="businesscentre" documentName="Customer" displayName="Print">
    <parameter name="ID" binding="bizId" />
</report>

New Parameters before

<newParameters>
    <parameter name="customer" />
</newParameters>

ListGrid now

<listGrid continueConversation="true" query="qSubscriptions">
    <filterParameter filterBinding="communication" operator="equal" valueBinding="bizId" />
</listGrid>

Report after

<report reportName="CustomerContacts" moduleName="businesscentre" documentName="Customer" displayName="Print">
    <parameter name="ID" valueBinding="bizId" />
</report>

New Parameters after

<newParameters>
    <parameter fromBinding="customer" boundTo="customer" />
</newParameters>

See the complete upgrade instructions on GitHub.

releasesBen PetitoComment