= Other Changes

:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
:page-partial:




[__migration-notes_1.16.0-to-2.0.0-M1_other-changes_view-model-urls]
== View model URLs

The default implementation of `UrlEncodingService` provided by the framework has changed:

* in 1.16.x the implementation is `o.a.i.applib.services.urlencoding.UrlEncodingServiceUsingBaseEncoding`
* in 2.0.0-M1 this is changed to `o.a.i.applib.services.urlencoding.UrlEncodingServiceWithCompression`

This new implementation increases the state that can be encoded within the URL (approx 8000 characters) by first gzipping the state prior to base64 encoding the characters.

However, this does mean that any persisted URLs for view models will be invalid.



[__migration-notes_1.16.0-to-2.0.0-M1_other-changes_applib-types-fully-generic]
== Applib types fully generic

All types in the applib have now been made fully generic




[__migration-notes_1.16.0-to-2.0.0-M1_other-changes_updated-dependencies]
== Updated dependencies

Wicket has been upgraded from Wicket 7.9 to Wicket 8.0.


[__migration-notes_1.16.0-to-2.0.0-M1_other-changes_removed-dependencies]
== Removed dependencies

The Apache Isis applib (`o.a.i.core:isis-core-applib`) no longer depends on the google guava library.

Likewise the Apache Isis Unit Test Support module (`o.a.i.core:isis-core-unittestsupport`) no longer depends on guava either.

Do note however that the core framework _does_ still depend on guava (though the intention is to remove this over time).




[__migration-notes_1.16.0-to-2.0.0-M1_other-changes_new-isis-core-commons-module]
== New isis-core-commons module

The new `org.apache.isis.core:isis-core-commons` module provides a set of utility classes that are _not_ API but that are depended upon by the applib.

Because these are not API, they should not be used by application code, _even though_ they will be on the applications classpath.

To help prevent accidental usage:

* the package is `org.apache.isis.core.commons.internal`
* all of the types in this module are prefixed "_".

For example, `o.a.i.commons.internal.resources._Resource` provides utilities for loading static resources from the classpath.

[NOTE]
====
This module performs many of the responsibilities that were previously provided by the dependency on guava.
====

This module also defines a number of plugin interface types, discussed in the link:https://isis.apache.org/versions/2.0.0-M1/migration-notes/migration-notes.html#__migration-notes_1.16.0-to-2.0.0-M1_other-changes_plugins[section below].


[__migration-notes_1.16.0-to-2.0.0-M1_other-changes_plugins]
== Plugins

The framework introduces a plugin architecture whereby variations on the configuration are automatically enabled just by the presence of the Maven module on the classpath.

For example, the framework can be run using either DataNucleus 4 or DataNucleus 5.
Including the relevant module will configure the rest of the framework accordingly.

The plugin architecture uses the JDK `ServiceLoader` API, whereby a Maven module can optionally provide an implementation of a well-known plugin interface type.

The plugin interface types themselves are defined in various of the Maven modules, broadly depending on what consumes them.

.Plugin types
[cols="2a,4a,4a,3a", options="header"]
|===

| Defined in
| Plugin type
| Used for
| Implementations

.3+|`isis-core-commons`
|`o.a.i.core.plugins. +
classdiscovery. +
ClassDiscoveryPlugin`

|Obtain a plugin to finding types on the classpath with certain characteristics, eg annotated with certain annotations

Include only one implementation on classpath.

|`ClassDiscoveryPluginUsingReflections` uses the `org.reflections` open source library (which depends in turn on guava).

|`o.a.i.core.plugins. +
codegen. +
ProxyFactoryPlugin`
|Obtain a plugin acting as a factory to proxy types (as used by the `WrapperFactory` domain service).

Include only one implementation on classpath,

|`o.a.i.core.plugins.codegen.
ProxyFactoryPluginUsingByteBuddy` (using ByteBuddy)

`o.a.i.core.plugins.codegen.
ProxyFactoryPluginUsingJavassist` (using Javassist).




|`o.a.i.core.plugins. +
eventbus. +
EventBusPlugin`

|Obtain a plugin for finding event bus implementations.

This removes the need to explicitly specify the implementation using the `isis.services.eventbus.implementation` config property; it can be left as simply "auto".

|`o.a.i.core.plugins.eventbus.
EventBusPluginForAxon` (using Axon Framework)

`org.apache.isis.core.plugins.eventbus.
EventBusPluginForGuava` (using Guava)


.3+|`isis-core-metamodel`
|`org.apache.isis.core. +
metamodel.progmodel. +
ProgrammingModelPlugin`
|Obtain plugins that can provide implementations of Isis' own `FacetFactory` SPI (which is used to build up the metamodel).

There can be multiple implementations on the classpath.

|`org.apache.isis.progmodels.
plugins.ProgrammingModelIsisTimePlugin` (in `metamodel-legacy`) contributes facet factories for the applib value types that have been moved to applib-legacy.

|`org.apache.isis.core. +
metamodel.services. +
swagger.internal. +
ValuePropertyPlugin`
|Obtain plugins that can provide implementations of Isis' own `ValuePropertyFactory` SPI (which is used to build up Swagger representations).

There can be multiple implementations on the classpath.

|`o.a.i.core.metamodel.
services.swagger.plugins.
IsisTimeValuePropertyPlugin` (in `metamodel-legacy`)
contributes factories for the applib value types that have been moved to applib-legacy.


|`o.a.i.core. +
metamodel. +
IsisJdoMetamodelPlugin`
|Decouples the metamodel module from a particular implementation of DataNucleus.

Include only one implementation on classpath,

|`o.a.i.plugins.jdo.dn4.IsisJdoSupportPlugin4`

`o.a.i.plugins.jdo.dn5.IsisJdoSupportPlugin5`


|`isis-core-runtime`
|`o.a.i.core. +
metamodel. +
IsisJdoRuntimePlugin`
|Decouples the runtime module from a particular implementation of DataNucleus.

Include only one implementation on classpath,

|`o.a.i.plugins.jdo.dn4.IsisJdoSupportPlugin4`

`o.a.i.plugins.jdo.dn5.IsisJdoSupportPlugin5`


|`isis-core-viewer-restfulobjects-applib`
|`o.a.i.viewer. +
restfulobjects. +
applib.client. +
UriBuilderPlugin`
|Plugin to obtain a `UriBuilder` to create uri templates.

Include only one implementation on classpath,

|`o.a.i.plugins. +
jaxrs.resteasy.IsisResteasy3Plugin`

or

`o.a.i.plugins. +
jaxrs.resteasy.IsisResteasy4Plugin`



|`isis-core-viewer-restfulobjects-server`
|`o.a.i.viewer. +
restfulobjects. +
server. +
IsisJaxrsServerPlugin`
|Plugin to configure the JAX-RS runtime.

Include only one implementation on classpath.

|`o.a.i.plugins. +
jaxrs.resteasy.IsisResteasy3Plugin`

or

`o.a.i.plugins. +
jaxrs.resteasy.IsisResteasy4Plugin`


|===


The two JDO/DataNucleus plugins are _not_ independent of each other, because (as the table above shows) the same class implements both plugin interface types.
These plugins allow the framework to run either using DataNucleus 4 (JDO 3.1 API) or using DataNucleus 5 (JDO 3.2 API).

Similarly, the two RestfulObjects plugins are also _not_ independent of each other; again the pattern is for a single class implements both plugin interface types.
These plugins support alternate implementations of JAX-RS API.
JAX-RS 2.0 (one of the JavaEE 7.0 specifications) is implemented by RestEasy 3 whereas JAX-RS 2.1 is implemented by RestEasy 4 (part of JavaEE 8).



== IsisJdoSupport domain service

In 1.16.x the link:https://isis.apache.org/versions/2.0.0-M1/guides/rgsvc/rgsvc.html#_rgsvc_persistence-layer-api_IsisJdoSupport[IsisJdoSupport] domain service exposed the DataNucleus 4 `org.datanucleus.query.typesafe.TypesafeQuery` type in one of its signatures.
However, in DataNucleus 5 this type was removed and replaced by `javax.jdo.JDOQLTypedQuery`, reflecting the fact that type-safe queries are now part of JDO 3.2.

Consequently in 2.0.0-M1 this API has been split into three:

* `IsisJdoSupport` (defined in `isis-core-applib`) is independent of JDO APIs
* `IsisJdoSupport_v3_1` (defined in `isis-core-plugins-jdo-datanucleus-4`) extends `IsisJdoSupport` with DataNucleus 4/JDO 3.1-specific APIs
* `IsisJdoSupport_v3_2` (defined in `isis-core-plugins-jdo-datanucleus-5`) extends `IsisJdoSupport` with JDO 3.2-specific APIs



== Swagger UI

Swagger UI is now reinstated as a webjar, so there is no need to have any swagger UI files in the webapp (ISIS-1908).
