Umbraco Future / SSR & CSR
p
Hey everyone. Today i was wondering what the future of umbraco could look like. I've read posts about using nextjs and other frameworks, but am i right, that then cshtml would be obsolete? Is the future more and more heading towards headless cms and moving away from cshtml and all that comes with it? OR is it still future proof and will it someday maybe go to blazor? What would be a good way to implement client side rendering together with cshtml? As you can see there is a lot of things that i'm unsure about. Maybe someone could help me out what a future proof stack could look like and what umbraco itself is targeting for the future. I've found this post regarding .net Core / MVC https://stackoverflow.com/questions/51390971/im-lost-what-happened-to-asp-net-mvc-5
a
The overall point is that Umbraco doesn't dictate the way that you should go. I think it's true that more and more sites will be headless, but using MVC is still a viable way to build your websites. I'd imagine MVC will still be around for a long time. What's the best option depends on many different things, so hard to tell in your case. We're pretty much only building headless sites these days, but I'd say that moves more work from a backend department to a frontend department (if you're organized like that). There are multiple ways to handle SSR. In our case, the frontend setup is also responsible for handling the SSR for the initial request (and subsequent requests if JS isn't enabled), so it uses the same APIs as when browsing the site with a JS supporting browser.
p
Thanks alot @Anders Bjerner for your clear answer. For me i would say sometimes i feel a little stuck with MVC when i need something really client side rendered. We've worked in the past with Vue.js integration where we just render some components which needed to be client side rendered but this as itself didnt feel compolete and a really "clean" approach. So i was wondering with which tech stack other people are working or with which combination when still working with MVC. We are a small company with 4 Web Developers working on different websites like Newspapers, Landingpages and so on. Still we recently had more and more need for client side interactivity and this was sometimes where we felt stuck. The whole block list and block grid component story was like a little heads up for us because we were able to reuse our components better. But also there we still want to make our blocks / components really "reusable". We've recently did some blocks with ViewComponents and felt like there are a lot of files u need to write compared to using something like react where "a lot" can be handled in one file. If somebody could give us some tipps how we could optimize our workflow and what would be a good technology fit, please let me know! 🙂
r
so there a bit of a movement around the idea of reusable content @Sven Geusens is helping pitch it , and also the idea of making all content things like repositories.. he can explain it better .. that may be the angles you are looking for
s
Reusable content has more to do with composing your content and being able to reuse pieces of sub data around your whole content structure. While the availability of this feature will (soon ™️ ) enable you to structure your content differently that might benefit the scenarios Pascal is describing, it seems like the question is more about rendering the actual content. Headless vs Page based or a hybrid approach, Personally I used to (before i joined HQ and actually created websites) like the hybrid approach as the speed of development with MVC is unparalleled, but the flexibility of having an in page Vue instance communicating with api endpoints is needed sometimes. I understand the feeling of incompleteness as when you want to componentize things, you need to create an output bundle for every single feature (Vue instance) you make that contains every js/html/css component you used. On the other hand, if you set this up right, it is just 1 extra line for every Vue instance, as your Top component (feature) file becomes the entry point for the bundling. I currently do not have any oppinions on ViewComponents, but I know there are some people in the community who have had great success with them, just can't remember who exactly. Maybe post the question on https://our.umbraco.com/ and see if the non Discord people can help you make an informed decision 😉
137 Views