Skyve - The Low Code Open Source Enterprise Platform

View Original

Skyve 3.0 released

This release adds built in caching to metadata to improve performance of applications, generate domain performance improvements, support for basic authentication instead of form based login and a built in responsive application test page.

Caching

Skyve 3.0.0 introduces support for in-memory caching via the metadata and for developers in code. This adds a write-through cache you can turn on in the metadata per document. This uses an in-memory cache which sits between Hibernate and Skyve’s persistence layer, so you always read and write to/from the cache when it is enabled. Skyve handles keeping Hibernate and the persistent datastore in sync.

This has the effect of increasing the memory load on the server but decreasing the load on the database, so in servers where there is a H2 database co-located it will have next to no noticeable performance impact, but if you are accessing a database across a network and you have an expensive document to read from/write to, this could have quite a noticeable impact on application performance.

Caching can be enabled per-document using a new cache element. Specific cache settings can be defined in the project json and referred to by name in the metadata.

<persistent name="ADM_Contact">
    <cache name="reference" type="readWrite"/>
</persistent>
<singularAlias>Contact</singularAlias>

A new CacheUtil utility class can be invoked by developers and Skyve will handle the management of the cache. A getJCache() and getEHCache() method can be used depending on the type of cache required.

Responsive device testing preview

Responsive Device Testing

Skyve now comes bundled with a page for testing how your application responds to different device screen widths which can aid in testing during development. This can be accessed from navigating to /device.xhtml at the end of your application URL while it is running.

Admin

  • Update ConfigurationBizlet newInstance to handle when there is no logged in user (e.g. during a password reset)
  • Added a quadratic residue function to ModulesUtil
  • Add comment to keep admin.User and admin.UserProxy documents in sync
  • Implemented rudimentary admin module domain model caching

Framework

  • Fix binding replacement in BindUtil.formatMessage() when the replacement value contains either { or }
  • Added SpringSingleCustomerBasicAuthenticationFilter
  • Add device.xhtml
  • Handle inverses with cascade turned on during persistence and dirty checking
  • Add check that customer is defined for marshalling a Skyve bean
  • Change Button metadata property actionName to action
  • Refine the performance of ODG
  • Change domain generation to occur in memory before changing the file system at the very end once successful
  • Refine DataBuilder to allow tracing and short-circuit DataBuilder to Factory infinite recursion
  • Add CacheUtil.isUninitialised method
  • Visit and validate view components with more cowbell
  • Ensure hibernate caches are created automatically for tests but fail if not defined in the JSON at deploy time
  • Init and dispose caching in AbstractH2Test.beforeClass() and AbstractH2Test.afterClass() and evictAllSharedCache in AbstractH2Test.afterBase()
  • Allow injection of AddInManager
  • Implement grid title attribute as a group and group label (field set)
  • Ensure that shared caching still occurs after a hibernate native query
  • Ensure that map menu item geometry binding is either in the query (or default document query) or it is a polymorphic query
  • Fixed issue with RouterMerger that was causing duplicate routes to be added
  • Check binding of Components and implement recursive validation of component views
  • Introduce EHCache 3 and JCache 1 through CacheUtil
  • Add cache element to document persistent element and collection element
  • Add cache config to json
  • Enable hibernate second level caching with minimal control over the caching options
  • Move reserved words to DomainGenerator
  • Fixed potential NPE in ODG that was triggered when the generated directory did not exist
  • Ensure that left joins generated from MetaDataQueries are unique within the statement
  • Handle dynamic domain values that are not references in ViewGenerator
  • Ensure user can be sent system communication irrespective of scope
  • Added additional convenience constructor to ValidationException

SmartClient

  • Add visibility condition to blurb/label outside of a form
  • Fix to handle named actions correctly as a server side action
  • Add lookup description data source field for list grid query columns with a binding directly to an association
  • Temporarily null out selectUpdated() before calling ListGrid.setData() in edit view scatter to work around the fact that ListGrid.setData() calls selectionUpdated() callback now in SC 12

PrimeFaces

  • Hide and show tabs that have no selectedTabIndexBinding defined so the rendering is not so jarring
  • Allow data grids to bind to inverses
  • Fix parameters bound to associations to use its bizId as the parameter value in new parameters
  • Respect clientValidation attribute in Save action
  • Ensure Cancel button does not show when zoomed into a data grid
  • Use browser session storage to keep track of UI history client-side
  • Refine menu generation
  • Handle filtering of associations in ListGrids appropriately
  • Coerce ListGrid String parameters to the required type to fix filtering

Notes for Upgrading

To upgrade your Skyve project to this version, change the Skyve version in your pom.xml to 3.0.0.

Your project .json config file will need to be updated. The conversations stanza should be replaced with:

conversations: {
    // Max conversations allowed in heap memory before being moved off-heap or to disk
    heapSizeEntries: 1000,
    // Max off-heap memory size - 0 indicates no usage
    offHeapSizeMB: 128,
    // Max disk size - 0 indicates no usage
    diskSizeGB: 10,
    // Number of seconds to wait until expiring a conversation from the cache
    expiryTimeMinutes: 60
}

The hibernate stanza needs a new cache section to define the default Skyve caches, and is where any per-project custom cache settings are to be defined:

prettySql: false,
    caches: {
        "eternal": {
            // Max conversations allowed in heap memory before being moved off-heap or to disk
            heapSizeEntries: 10,
            // Max off-heap memory size - 0 indicates no usage
            offHeapSizeMB: 0,
            expiryPolicy: "eternal" // "timeToLive" or "timeToIdle"
        },
        "reference": {
            // Max conversations allowed in heap memory before being moved off-heap or to disk
            heapSizeEntries: 1000,
            // Max off-heap memory size - 0 indicates no usage
            offHeapSizeMB: 0,
            expiryPolicy: "timeToIdle", // "timeToLive" or "eternal"
            // Number of minutes to wait until expiring a hibernate object from the cache
            expiryTimeMinutes: 10
        }
    }

Breaking API changes:

Action names were renamed to be more consistent with other naming conventions throughout the metadata.

Button after

<button action="SendMail" pixelWidth="90" />

Button before

<button actionName="SendMail" pixelWidth="90" />

See the complete upgrade instructions on GitHub.