DEV Community

Pawel Wolanski
Pawel Wolanski

Posted on

2

SAP Fiori Generator gimmicks

Working with SAP CAP framework sometimes leaves bitter-sweet taste.

Cannot Generate SAP Fiori Application in VS Code

SAP Fiori CAP applications do not have clear or documented application configuration file, which is used for cds or SAP's Yeoman (dead?) Fiori app generator @sap/generator-fiori.
Recently, I have spent significant time to figure out why I am unable to add another application using that generator. Apparently there is an if condition based on package.json dependency check. When I added @sap/cds to package.json, it started to detect it as valid Node.js project.

...
    "@sap/cds": ">=7"
...
Enter fullscreen mode Exit fullscreen mode

From the other side, cds CLI does not check it at all, BUT... it checks if in project root folder is able to find pom.xml it detects it as a Java CAP project. Otherwise, it treats that as Node.js.

The critical issue with figuring it out is:

  • application behavior it is not documented,
  • both of these utility apps are NOT open-source
  • @sap/generator-fiori it transpiled from TypeScript and not possible to review,
    • (cds CLI fortunately is pure JS tho)

Note

I get it. If I generated new project from the scratch using cds and copy-paste all CAP model/service configuration, I would avoid that situation. I did at the end, but we are not living in perfect greenfield world and even when CAP is pretty new, you still have to have someone to take care of brownfield.

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (0)

Cloudinary image

Optimize, customize, deliver, manage and analyze your images.

Remove background in all your web images at the same time, use outpainting to expand images with matching content, remove objects via open-set object detection and fill, recolor, crop, resize... Discover these and hundreds more ways to manage your web images and videos on a scale.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay