Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • awm 185 posts 374 karma points
    Jul 22, 2024 @ 11:49
    awm
    0

    Ideal project structure and dependencies

    I've been re-thinking how I structure my Umbraco projects and I came across this article: https://adolfi.dev/blog/umbraco-project-structure/

    In terms of dependencies, I'm slightly confused: I can understand wanting to separate out the Umbraco front-end from the Umbraco back-end logic but I don't understand how to set up refences in these scenarios.

    In the article above, if Web.UI holds the Umbraco installation and Web holds the Umbraco back-end logic, shouldn't Web reference Web.UI? How do I access the Umbraco assemblies from the Web project unless I basically do two full Umbraco installations in both projects?

    Thanks

  • Huw Reddick 1920 posts 6648 karma points MVP 2x c-trib
    Jul 23, 2024 @ 16:36
    Huw Reddick
    0

    if Web.UI holds the Umbraco installation and Web holds the Umbraco back-end logic,

    No, Web.UI is your website, it references Web which contains your business logic

  • awm 185 posts 374 karma points
    Jul 23, 2024 @ 17:17
    awm
    0

    Thanks, Huw. I understand that, but as an example: If I'm writing custom controller logic in the Web project, how do I reference Umbraco if it's not added as a reference within the project?

    Wouldn't I need to reference the Umbraco assemblies within this project too, since Web.UI references Web and not the other way around?

    Sorry if this sounds like a daft question, but it's not making sense to me.

  • Huw Reddick 1920 posts 6648 karma points MVP 2x c-trib
    Jul 23, 2024 @ 17:41
    Huw Reddick
    1

    you would use one of the other umbraco assembly packages like Umbraco.Cms.Web.Common etc. where as your UI project will reference the main Umbraco.Cms package

  • awm 185 posts 374 karma points
    Jul 23, 2024 @ 17:46
    awm
    0

    ahhh, that's what I'd thought. So the full Umbraco installation will be in Web.UI and only the required assemblies in Web?

Please Sign in or register to post replies

Write your reply to:

Draft