Copied to clipboard

Flag this post as spam?

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


  • The Fuel Agency 4 posts 73 karma points
    Jul 03, 2019 @ 00:53
    The Fuel Agency
    0

    Using SurfaceController to link data outside Umbraco

    Hello

    We have a client with a large amount of business logic outside the realm of the Umbraco schema/namespace that is far more complex than can be handled with the Umbraco CMS approach. They want to both display this data (Using Umbraco CMS templates and logic) as well as manage the Data (from the same web server, with permissions stemming from Umbraco Membership rules).


    As an example, we will build a Product object that has many components. The business logic will be a black box API that is not needed to understand. The objective is to see whether or not the Umbraco/External API linking logic is sane.

    What we have done is utilized the MVC capabilities of Umbraco through the SurfaceController. Each step passes through the ProductSurfaceController and builds up the xxxViewModel

    From an Umbraco page listing the currently available Product for a Customer, a button to create a new Product is selected.

    This opens a new Umbraco page (Template is fairly generic) that contains the Customer via an ID passed through the link. The first step is to select the ProductType, so a drop-down list of ProductType is presented.

    The user will select the ProductType and move to the next step, which presents a form based on that ProductType linked to the Customer. The user fills in the new Product information and submits.

    The SurfaceController validates the information, saves it using the business logic API and returns back to the Product list for that Customer with the new Product appearing in the list.


    Is this an approach that others who develop Umbraco applications would consider sensible? If not, what should be changed?

    We appreciate your feedback in this matter to move towards Umbraco Best Practice.

Please Sign in or register to post replies

Write your reply to:

Draft