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 23 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 class
- 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 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 html
- 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 Code
- @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 code
- @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 project
- @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 apps
- @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 project
- @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 code
- 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 generator
- 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 app
- 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 projects
- 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 projects
- 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 application
- 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 npm
- 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 Components
- 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 library
- 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 applications
- 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 OData
- 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 application
- 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 library
- 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 app
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