hana-opensap-cloud-2020
hana-opensap-cloud-2020 copied to clipboard
Best practice CAP - UI and Services as separate projects
Hi Tom/Rich
Love the Repo - thanks for making this available early.
I've been trying to work out the best way to break up a CAP project into a services project srv/db, and then have the UI (or multiple) as independent UI projects. What I think I want is the UI Annotations in the UI Project and not with the services - keeping the concerns separated - maybe this isn't right or not possible? . I'm just not entirely clear on how to set up the dependencies so the annotations can see the services at design time. I've seen the mono repo that the CAP examples are in and can see how that works - is this best practice or are there other ways??
I kind of see this as a natural separation between the CAP tooling and the UI5 Tooling so the UI5 team are doing "ui5 serve" etc rather than cds watch/serve etc..? Thoughts?
Thanks guys Al
Interesting suggestion. I don't know if its one we can/want to directly adapt in to the source code sample itself. We always walk a fine line with code sample of trying to provide best practice project structuring but also trying to be realistic about consumption from an educational standpoint. Those two things don't always align well.
But its a topic worth of research and some discussion. Maybe a future panel discussion to talk about very viewpoints and pros/cons of approaches. I know my personal viewpoint is often colored by internal SAP team setups where everything is often done within a single team. But I've also worked on a project with outsourced UI and we still followed a mono repo approach to great success. But I'm sure others in the community would have different ideas as well.
I'll slot this into the backlog and we will focus on some of the fundamentals of the code sample first but there is still some great ideas here for further discussions on the live streams or community calls a few weeks or so down the road.
Thanks,