Copied to clipboard

Flag this post as spam?

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


  • Robert 21 posts 122 karma points
    Aug 27, 2016 @ 13:24
    Robert
    1

    Some comments on SurfaceController/RenderMvcController

    I am a traditional MVC developer for a couple of years. Just started to learn Umbraco.

    After spending a bit time to go through whole framework, I would like to share some of my thoughts: 1. Back office concept is great and makes editor/creator life a lot easier. Whole idea is "Data first", "Data driven". Leave data formatting to the UI expert which I consider this is not a "programmer/developer" job.

    1. Regarding controller, I cannot see big advantage over traditional MVC. Maybe I just started Umbraco... Why need to separate "SurfaceController/RenderMvcController" , why need to inherit RenderModel to bind customer model to the view? In traditional MVC binding model to the view and sending data from view to the controller is so easy and straightforward. The introducing of SurfaceController/RenderMvcController looks like "drawing snakes with legs". Maybe the idea behind these controllers are to communicate with Umbraco objects. If this is the case, maybe it could be called "UmbracoController", and leave "standard" MVC job to the traditional controller.

    Thanks.

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Aug 31, 2016 @ 10:33
    Alex Skrypnyk
    2

    Hi Robert,

    Umbraco has UmbracoApiController also, and yes this is for communicating with Umbraco context. It's really nice to work with it.

    From docs:

    A SurfaceController is an MVC controller that interacts with the front-end rendering of an UmbracoPage. They can be used for rendering Child Action content, for handling form data submissions and for rendering Child Action macros. SurfaceControllers are auto-routed meaning that you don't have to add/create your own routes for these controllers to work.

    By default all of the front end routing is executed via the RenderMvcController Index Action which should work fine for most people. However, in some cases people may want complete control over this execution and may want their own Action to execute. Some reasons for this may be: to control exactly how views are rendered, custom/granular security for certain pages/templates or to be able to execute any custom code in the controller that renders the front end. The good news is that this is completely possible. This process is all about convention and it's really simple! -

    https://our.umbraco.org/documentation/reference/routing/custom-controllers

    Thanks,

    Alex

  • Robert 21 posts 122 karma points
    Oct 06, 2016 @ 10:03
    Robert
    0

    Thanks Alex.

    Sorry for the late response.

    I have been spending a lot of effort trying to understand how Umbraco works. I also started my own project using Umbraco. It is quite a bit learning curve, to be honest.

    Yes, I noticed that link you sent and I am using it in my project.

    Thank you for your help!!!

    I am also having some other issues might need your help. Keep in touch.

    Robert

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Oct 06, 2016 @ 10:29
    Alex Skrypnyk
    0

    Hi Robert,

    Yes, Umbraco isn't trivial CMS, it's easy to use but not web constructor.

    Is this topic solved for you?

    Glad to help, will try to help you in other issues.

    Have a nice day !!!!

    Thanks,

    Alex

  • Robert 21 posts 122 karma points
    Oct 07, 2016 @ 10:37
    Robert
    0

    Thanks Alex.

    Now I have a very basic question regarding CMS:

    When/what kind of project can I use CMS as the framework to help me?

    I am doing a project that allows the registered user (not Umbraco user created in the Umbraco) to submit a function room(web form data and pictures) for anyone who are nearby and submit comments. There are not many web content for the "web owner/creator/writer" to manage. 90% of the data comes from the internet users.

    So the question here is:

    Is this case the CMS is a good candidate to be as development tool?

    My answer seems to be "Not really".

    My understanding of when to use CMS is a system to help the "Web Site Owner/writer" who can go to the Umbraco "backend office" to publish/update the page content.

    Probably I have this answer is because I still don't know enough about CMS.

    It would be very appreciate if you can share your thoughts and experience.

    Cheers Robert.

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Oct 07, 2016 @ 12:31
    Alex Skrypnyk
    0

    Hi Robert,

    Regarding these lines:

    Is this case the CMS is a good candidate to be as development tool?

    My answer seems to be "Not really".

    My understanding of when to use CMS is a system to help the "Web Site Owner/writer" who can go to the Umbraco "backend office" to publish/update the page content.

    I think CMS is for managing web sites without using database and code directly, so there are no matter what content or who using it.

    CMS is for people, you can dustomize and use it as you want.

    Another very important issue when you choose framework - do you know well this framework??

    If yes - you will implement it's faster.

    Hope it make sense for you.

    Thanks,

    Alex

  • Robert 21 posts 122 karma points
    Oct 08, 2016 @ 03:59
    Robert
    100

    HI, Alex; Thanks for your sharing. This is my conclusion too: CMS is good "managing web sites". Not a good framework for implementing a work flow or web app.(I believe it can.) Regarding: Another very important issue when you choose framework - do you know well this framework?? No really in this case. I have very limited CMS knowledge when starting this project. I didn't know what CMS can do, what benefit you can get from CMS...I just use this project as a chance to learn a new framework. Thanks Alex anyway. I learned a lot about CMS by this conversation and I think my project can still benefit from CMS.

    Cheers Robert.

Please Sign in or register to post replies

Write your reply to:

Draft