Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

Episerver Layout Model inside the Model or outside ?

$
0
0

With my team we are starting a new project and we are discussing architecture regarding the components like header or footer navigation. I noticed that the Allow template uses IPageViewModel<T> interface which has a property Layout of type LayoutModel. It is solving a real problem and I think it could be a good fit for our solution.

Because this approach requests to implement a ViewModel for every model that we want to return, I started to look at other potential trade-offs with this approach and I found this article: https://marisks.net/2015/05/18/episerver-strongly-typed-layout-model-without-ipageview/.

And now I am considering a custom WebViewPage to keep a "clean" model but I feel like I might be missing some trade-offs with approach. What are your thoughts on 'Layout' components ? Do you put them inside your model or outside ?


Viewing all articles
Browse latest Browse all 8020

Trending Articles