generator-ui5-react-nest
A Yeoman generator that scaffolds a pnpm monorepo with a UI5 app and a Vite React app, which the UI5 app embeds through a custom control, UI5Nest, rather than an iframe.
Putting a React app inside a UI5 application usually means an iframe. This generator scaffolds the alternative its README names: UI5Nest, a custom UI5 control that loads and embeds the React application in the UI5 page. It also scaffolds the files and configuration for the managed router and a local test launchpad, launchpad.html, and the React app runs standalone or in UI5 mode through the start:ui5 and build:ui5 scripts. The README says it deploys to the HTML5 Repository like a UI5 application and integrates with Workzone or an on-premise Fiori Launchpad. It is run as yo ui5-react-nest.
Facts
Where it sits
Who is behind it
In the atlas: maintains 1, contributes to 1@aydin-ozcanmaintainerGregor WolfContributes to this
In the atlas: maintains 17, contributes to 59, wrote 2@gregorwolf1 contributor
Before choosing this
Signals
ActivityQuietRelease and repository quiet for 38 months
Both observable publication channels have been quiet for at least 24 full months. This may be normal for stable software; check whether its current state still fits your use.
Conditions
PracticalFunctional boundary
The scaffold is JavaScript and not TypeScript, and react-router-dom and UI5 Web Components are not included; its README leaves both for the project to add.
What it declares
Every artifact
- Type
- Generator
- Origin
- Independently maintained
As a generator
- Generates
- A new project
- Run with
- Yeoman
- Distributed through
- npm
Connections
Starting a project, and adding pieces to one that runs
Download
Install
npm add generator-ui5-react-nestDerived from the package name. No recipe recorded; the README has the configuration.
README
quoted from aydin-ozcan/generator-ui5-react-nest under Apache-2.0, readYeoman Generator for UI5 Nest React
In the dynamic world of business, we never know what requirements may come our way. While UI5 is already a powerful framework, there are times you need to integrate it with other UI technologies when business demands.
In this blog post, we'll explore the blending of React application with UI5 by leveraging a custom UI5 control (UI5Nest) which effortlessly handles loading and embedding React applications. Unlike traditional solutions that rely on iframes, this integration takes advantage of native loading to HTML div elements, ensuring that your React app seamlessly blends with other UI5 controls, acting like any other UI5 control.
Above Image taken from CF Workzone . Below is the code for this,
<mvc:View
controllerName="nest.controller.Main"
displayBlock="true"
xmlns:custom="nest.ExtApp"
xmlns="sap.m"
xmlns:mvc="sap.ui.core.mvc">
<VBox
justifyContent="Center"
alignItems="Center"
height="100%" >
<VBox>
<Title text="UI5" titleStyle="H1" />
<Button
text="count is {/count}" press=".onIncrement" />
</VBox>
<custom:UI5Nest id="react" />
</VBox>
</mvc:View>
Managed Router, HTML5 Repository and Build Workzone
You can deploy to HTML5 Repository like you do it with your UI5 application. UI5Nest control integration with Workzone or Fiori Launchpad (on-prem) is seamless. This means that your React application receives real-time updates for localization and theme changes when events occur. You will receive initial values of the theme and locale in your React app. You will receive these updates again if they change , ensuring you don't miss any updates.
function onThemeChanged (sTheme) {
//Call central theme change function on App.jsx so it will serve standalone app and nested app
}
function onLocalizationChanged (sLocal) {
//Call central local change function on App.jsx so it will serve standalone app and nested app
}
It ensures that your application maintains consistency and synchronicity and delivering a cohesive user experience.
generator-ui5-react-nest scaffolds the necessary files and configurations for managed router. So it is ready to deploying the Workzone service on Cloud Foundry.
UI5 Generator: generator-ui5-react-nest
To further simplify the process, I have created an UI5 generator for this purpose. This generator is based on pnpm monorepo, which allows for scaffolding UI5 and React applications and local test launchpad such as launchpad.html and other necessary files.
The scaffolded React application uses Vite, It is modern , easy and fast . React team no longer recommends CRA also . While react-router-dom is not included in UI5 generator project, I use it in my projects ( with some modifications for launchpad integration ) and it works fine.
You should also use UI5 Web Components in your React app, but I chose not to include them in the generator to avoid making it overly opinionated.
As you will notice, the React application has 2 modes. The first one is standalone. It will act like any other React app. The second mode is UI5 mode. When you use pnpm script start:ui5 or build:ui5, it will make the adjustments in the React app to be available to work in a UI5 app.
Although I usually prefer using TypeScript, I have opted for JavaScript in this case for the sake of simplicity and clarity. However, TypeScript is the way I used this method in my projects for both UI5 and React. So it can be easily integrated if desired.
You can install the ui5 react nest generator and yeoman (if you haven"t already)
npm i -g yo generator-ui5-react-nest
yo ui5-react-nest
By using the generator-ui5-react-nest and following the steps outlined in the blog post Nest React applications natively alongside UI5, you can achieve a smooth integration of React applications with SAP UI5, enabling a consistent and powerful user experience across your projects.
History
Others providing
Compare all 32 on the Generators page →- abap2UI5 Layout Editorabap2UI5 Layout EditorA browser editor that lays out a UI5 view by drag and drop and writes it out as one abap2UI5 app class, pulled into the system with abapGit.community org, abapDrag-and-drop UI5 view editor that writes an abap2UI5 app classfrom ABAP
- SAP Build CodeSAP Build CodeSAP's development environment on BTP for SAPUI5, SAP Fiori, mobile and CAP applications that run on the SAP BTP, Cloud Foundry Runtime, in which Joule generates models, services, logic, tests and apps.sap official, btpDevelopment environment on BTP for UI5, Fiori, mobile and CAPfrom BTP/BAIP
- @cap-handler/generator@cap-handler/generatorInteractive generator for CAP event handlers: reads the model through the reflection API, asks which service, target and phase, then writes the handler file and wires the import and registration into the service implementation.independent, capInteractive generator for CAP event handler filesfrom CAP
- com.sap.cds:cds-maven-plugincom.sap.cds:cds-maven-pluginThe Maven plugin that runs CDS build steps in a CAP Java project: compiling the model, generating typed Java accessor interfaces and adding facets to an existing project.sap official, capMaven plugin running CDS build steps in a CAP Java projectfrom CAP
- com.sap.cds:cds-services-archetypecom.sap.cds:cds-services-archetypeA Maven archetype that generates a new CAP Java project: a Spring Boot service with a starter CDS model, wired to the CDS Maven plugin for its build.sap official, capMaven archetype generating a new CAP Java projectfrom CAP
- @khalidmh/capx@khalidmh/capxAn opinionated installer for CAP Node.js projects — asks a short set of questions, runs cds init, adds the chosen facets, then writes the configuration and starter files that make those choices work together.independent, capInteractive project installer for CAP Node.jsfrom CAP
- ui5-control-generatorui5-control-generatorA command-line generator that writes UI5 custom controls, in JavaScript or TypeScript, from the html files in a project, with control logic and renderer split into two files by default.independent, ui5Command line generator of UI5 custom controls from htmlfrom UI5
- AbapGeneratorAbapGeneratorAn ABAP transaction, ZABAP_GENERATOR, that generates a Model-View-Controller-style project by copying a template package's objects into a new one under the project's name.independent, abapABAP transaction generating an MVC-style project from a templatefrom ABAP
- Joule in SAP Build CodeJoule in SAP Build CodeJoule's generative AI inside SAP Build Code, pitched as "optimized for Java and JavaScript application development": opened from SAP Business Application Studio's activity bar, slash commands generate a CAP data model, services, sample data, business logic and a Fiori elements UI.sap official, capJoule's generative AI inside SAP Build Codefrom CAP
- @sap/cds-dk@sap/cds-dkThe command line client and development toolkit for CAP projects, with the commands cds build, cds deploy, cds watch and cds add among them.sap official, capCommand line client and development toolkit for CAPfrom CAP
- @sap/generator-cap-project@sap/generator-cap-projectThe CAP project generator behind SAP Business Application Studio's wizard; its readme says it is meant to be used only there.sap official, capCAP project generator behind SAP Business Application Studio's wizardfrom CAP
- @sap/generator-cds@sap/generator-cdsA CDS project generator, deprecated by its own readme in favour of installing @sap/cds-dk globally.sap official, capCDS project generator, deprecated in favour of @sap/cds-dkfrom CAP
- @sap-ux/cap-config-writer@sap-ux/cap-config-writerSAP's writer module for changing a CAP project's configuration from code, so a tool can add a UI5 app to a project that already exists, returning a mem-fs editor whose commit writes the changes.sap official, capWriter module for changing a CAP project's configuration from codefrom CAP
- @sap-ux/create@sap-ux/createSAP Fiori tools as a command: npx @sap-ux/create changes the features of a Fiori project that already exists, through its add, generate, convert, remove, update and change subcommands.sap official, ui5Command line for changing features of an existing Fiori projectfrom UI5
- @sap-ux/fe-fpm-writer@sap-ux/fe-fpm-writerA library that writes flexible programming model elements, such as a custom page wired into the app's routing, into a Fiori elements application for OData v4 from Node code.sap official, ui5Writer of flexible programming model elements into Fiori elements appsfrom UI5
- @sap-ux/fiori-generator-shared@sap-ux/fiori-generator-sharedThe shared functions and types the Fiori generators are built from; a dependency of theirs rather than a generator itself.sap official, capShared functions and types of the Fiori generatorsfrom CAP
- @sap-ux/odata-service-writer@sap-ux/odata-service-writerA library that adds an OData service to a UI5 project that already exists, writing the file updates from a config object naming the service url, its OData version and a destination.sap official, ui5Writer that adds an OData service to an existing UI5 projectfrom UI5
- @sap-ux/ui5-application-writer@sap-ux/ui5-application-writerA library that writes the base structure of a UI5 project from Node code, out of an app id, title and description, returning a mem-fs editor so a generator needs no template engine of its own.sap official, ui5Writer of the base structure of a UI5 project from Node codefrom UI5
- create-easy-ui5create-easy-ui5An npm-init and npx wrapper that runs the Easy-UI5 Yeoman generator without a global Yeoman install, handing control to generator-easy-ui5 and forwarding any arguments.community org, ui5npm-init wrapper for the Easy-UI5 Yeoman generatorfrom UI5
- create-wdi5create-wdi5An npm initializer that adds wdi5 end-to-end testing to an existing UI5 application, installing WebdriverIO's peer dependencies, writing a wdio.conf file and setting an npm script.community org, ui5npm initializer adding wdi5 testing to an existing UI5 appfrom UI5
- generator-easy-ui5generator-easy-ui5A Yeoman meta-generator that scaffolds UI5 projects, prompting for a target platform, and loads further sub-generators from the UI5 Community for TypeScript apps, launchpad plugins and libraries.community org, ui5Yeoman meta-generator for scaffolding UI5 projectsfrom UI5
- generator-ui5-addgenerator-ui5-addA Yeoman generator that creates UI5 tooling-extension projects and manages the tooling extensions of an existing project, from the bestOfUI5 catalogue.community org, ui5Yeoman generator for UI5 tooling-extension projectsfrom UI5
- generator-ui5-appgenerator-ui5-appA Yeoman generator, built on the official UI5 tooling, that scaffolds a new UI5 application in one pass, run as a plug-in for Easy-UI5 or standalone, ready for npm start.community org, ui5Easy-UI5 generator scaffolding a new UI5 applicationfrom UI5
- generator-ui5-controlgenerator-ui5-controlA Yeoman generator that scaffolds a UI5 custom control structured for npm distribution, with a manual test app with live reload and a Jest test suite already wired in.community org, ui5Yeoman generator for UI5 custom controls distributed via npmfrom UI5
- generator-ui5-library-webcgenerator-ui5-library-webcA Yeoman generator that scaffolds a UI5 library wrapping UI5 Web Components on the official UI5 tooling, run through Easy-UI5 or standalone, and served afterwards with npm start.community org, ui5Yeoman generator for UI5 libraries wrapping UI5 Web Componentsfrom UI5
- generator-ui5-librarygenerator-ui5-libraryA Yeoman generator, built on the official UI5 tooling, that scaffolds a new UI5 library as a plug-in for Easy-UI5.community org, ui5Easy-UI5 generator scaffolding a new UI5 libraryfrom UI5
- generator-ui5-projectgenerator-ui5-projectA Yeoman generator for a UI5 project holding several applications in npm workspaces, with eight subgenerators for recurring tasks and a choice of six deployment targets.community org, ui5Yeoman generator for UI5 projects holding several applicationsfrom UI5
- generator-ui5-ts-app-fclgenerator-ui5-ts-app-fclA generator that scaffolds a UI5 TypeScript application built around the FlexibleColumnLayout and bound to an OData service, asking for the endpoint, entity set, key and fields to show.community org, ui5Generator for a TypeScript UI5 FlexibleColumnLayout app on ODatafrom UI5
- generator-ui5-ts-appgenerator-ui5-ts-appA Yeoman generator, built on the official UI5 CLI, that scaffolds a new UI5 application in TypeScript with its tsconfig and UI5 CLI configuration, as a plug-in for Easy-UI5.community org, ui5Easy-UI5 generator scaffolding a TypeScript UI5 applicationfrom UI5
- generator-ui5-ts-librarygenerator-ui5-ts-libraryA Yeoman generator, built on the official UI5 tooling, that scaffolds a new UI5 library in TypeScript as a plug-in for Easy-UI5.community org, ui5Easy-UI5 generator scaffolding a TypeScript UI5 libraryfrom UI5
- generator-ui5-wdi5generator-ui5-wdi5A Yeoman generator that scaffolds wdi5 end-to-end test configuration and sample tests into a UI5 app, wrapping npm init wdi5 in prompts and run through Easy-UI5.community org, ui5Yeoman generator scaffolding wdi5 test configuration into a UI5 appfrom UI5
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
Contributors
History in the atlas
- Listed on bestofui5.org and not yet in the atlas. Read from the repository README (main branch) and the npm record for 1.0.14 (Apache-2.0, author Aydin Ozcan, depends on yeoman-generator ^5.7.0). README sentences used: "Unlike traditional solutions that rely on iframes"; "UI5Nest control integration with Workzone or Fiori Launchpad (on-prem) is seamless."; "You can deploy to HTML5 Repository like you do it with your UI5 application."; "The scaffolded React application uses Vite,"; "generator-ui5-react-nest scaffolds the necessary files and configurations for managed router." The when_not_to_use sentence rests on the README's statements that it opts for JavaScript, that `react-router-dom` is not included in the generated project and that UI5 Web Components are left out.
- First seen.
For your agent
- Ref
artifact:aydin-ozcan-generator-ui5-react-nest- JSON
- /artifacts/aydin-ozcan-generator-ui5-react-nest.json
- MCP
- Connecting an agent