Copied to clipboard

Flag this post as spam?

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


  • lukasz choros 5 posts 95 karma points
    Apr 19, 2017 @ 19:43
    lukasz choros
    0

    Umbraco - planning new project

    Hi

    I am new on the forum. I got some experience with Umbraco but it was about two years and I do not remember much. So I am about to start new project using Umbraco and got few questions. Let me describe project quickly: So I need home page(site title, seo must be manageable in backoffice) that got search form(search form will return data from external API).

    Then I need few pages using same document type. In the same time when I land on each of these page I need to call API to return data for that Page e.g page name Movies, when I click on that in nav menu I want call API and get movies.

    Then I need members management in backoffice(I will be fine here).

    Then I need kind of basket to store user files(I will think about it later)

    Okay, now my questions. How I would like to implement it, so I want to use MVC with Surface Controller for each page I create(including homepage). My question here: why to use hybrid framework if it is not complicate to create own surface controllers or am I missing here something?

    So far I did not watch tutorials about umbraco ApiController but to achieve above, surfacecontroller should be fine. So how I think I will implement that is: having service layer that calls API and return data. then in my surface controller I will inject my service.

    Before I ended I did some research about UmbracoApiController, why to really use it? Can this be used instead of surfacecontroller?

    Okay. Thanks for any help and I am sorry if I put to many question in thread.

  • Alex Skrypnyk 6131 posts 23950 karma points MVP 7x admin c-trib
    Apr 25, 2017 @ 16:51
    Alex Skrypnyk
    100

    Hi Lukasz

    Welcome to our community! I will try to answer all your questions :)

    1) why to use hybrid framework if it is not complicate to create own surface controllers or am I missing here something?

    • do not use "hybrid framework", it's great starter kit, but the best way to do Umbraco web-sites - do it from empty project

    2) UmbracoApiController, why to really use it?

    • UmbracoApiController - wrapped with Umbraco helpers ApiController, surfacecontroller - wrapped with Umbraco properties usual MVC Controller, so it's little bit different Controllers and it's great to have both in Umbraco

    SurfaceController is great for handling form requests, working with partials and stuff like that

    UmbracoApiController is great for serving data to site or external

    3) Can this be used instead of surfacecontroller?

    Also, if you need to inject to page load event for some docType, use "RenderMvcController" - https://our.umbraco.org/documentation/reference/routing/custom-controllers

    Hope this message will help you, ask if you have more questions!

    Thanks,

    Alex

  • lukasz choros 5 posts 95 karma points
    Apr 25, 2017 @ 19:50
    lukasz choros
    0

    Thank you :) I will try to use your tips in the next few days, I will let you know if I will have more questions. That is a good start for me for sure.

    Thanks, Lukasz

  • Alex Skrypnyk 6131 posts 23950 karma points MVP 7x admin c-trib
    Apr 25, 2017 @ 20:46
    Alex Skrypnyk
    0

    You are welcome, ask if something.

    Alex

Please Sign in or register to post replies

Write your reply to:

Draft