Studio Developer Manual / Version 2310
Table Of ContentsWhile the CoreMedia Studio server provides artifacts for use with Maven the client part provides packages for use with pnpm.
In the following section, you will find a description of some of the typical use cases that appear during CoreMedia Studio development using the CoreMedia Project workspace.
All following commands assume you have opened a command shell at the CoreMedia Project root directory.
Compiling the Studio Project
To create a clean build of all CoreMedia project modules, including all Studio server modules, run the following:
mvn clean install -DskipTests
To build only Studio server modules, run
mvn install -DskipTests -pl :studio-server-app -am
Studio Client: Base Apps and App Overlays
The Studio client packages are packaged into apps, where the so-called base app and app overlay are distinguished. A base app is a Sencha Ext JS app and includes the Ext JS framework, Studio core packages and generally all packages that participate in theming. Modules of a base app are included in the Sencha Cmd build of the Sencha Ext JS app and are thus statically linked into the app. An app overlay in contrast references a base app and adds further modules to this base app. These modules are not included in the Sencha Cmd build of the Sencha Ext JS app and instead can be loaded at runtime into the app. Consequently, they are dynamically linked into the app.
The CoreMedia Blueprint features one Studio base
app, namely @coremedia-blueprint/studio-client.main.base-app
package with Jangaroo type app
.
In addition, there are two app overlays, the @coremedia-blueprint/studio-client.main.app
packag
and the @coremedia-blueprint/studio-client.workflow.app
package with Jangaroo type app-overlay
.
While the former references @coremedia-blueprint/studio-client.main.base-app
the latter references
@coremedia/studio-client.workflow.app
which is part of the CoreMedia Core.
Both app overlays are aggregated in a so called apps package which bundles all apps as static resources so they can be served via a web server.
To build all Studio client apps including their dependencies (mind the dots), run
pnpm -r --filter @coremedia-blueprint/studio-client.studio... run build
To build only the Studio client modules that are part of the main.base-app, run
pnpm -r --filter @coremedia-blueprint/studio-client.main.base-app... run build
Running Studio
CoreMedia Studio consists of Studio Client, a client-side (browser) application, and Studio Server,
a REST service, implemented in Java.
For client-side-only development, it is recommended to only use workspace apps/studio-client
and only run Studio Client locally, connecting to a Studio Server on some reference system.
For full Studio development, you run Studio Server and Studio Client locally.
Running Studio Client
Unlike most CoreMedia application, Studio Client is not a Spring Boot application, so it is started
differently, using the pnpm script start
(for development purposes only).
Prerequisite for this is that a complete Studio web
application is already running somewhere. The start
script
starts an embedded Web server (express), serves some Studio client packages from your developer workspace
and proxies all other requests to the remote Studio Server web application.
Run complete Studio Client app from your machine, proxy all REST requests to Studio Server:
pnpm -r --filter ./apps/main/app run start --proxyTargetUri=https://<studio-server-host>:<studio-server-port>
Run app overlay from your machine, proxy everything else to the remote Studio:
This a special treat for app overlays. Consequently, it works for the Blueprint's
studio-client.main.app
but also for every other (lightweight) app overlay that you define yourself for development purposes in your workspace. Here you have the option to just serve the app overlay's own Studio modules from your local machine and proxy everything else (REST calls, other client module code) to the remote Studio.pnpm -r --filter ./apps/main/app run start --proxyPathSpec="/*" --proxyTargetUri=https://<studio-server-host>:<studio-server-port>
In this development mode, resources are read from target directories of the individual Studio client packages.
When TypeScript files are recompiled, the start
script automatically serves the updated compiled
JavaScript files. There is no need to stop and restart the process.
Running Studio Server
In the apps/studio-server/blueprint/spring-boot/studio-server-app
directory of
CoreMedia Blueprint, you can start the Studio
Server Spring Boot application via Maven:
mvn spring-boot:run -Dinstallation.host=<FQDN>