Making Single-Page App Work in Sitecore MVC

When you're developing a single-page app in Sitecore you'll most likely have to partially render a page and inject the rendered markup into your SPA. When you find yourself in this situation you might resort to using Devices, or you might use regular expressions. Either way will require you to request the page first, but the … Continue reading Making Single-Page App Work in Sitecore MVC

Get Rid of NULL Sitecore Field Checks

Null-check is a preventive measure to avoid exceptions during run-time, yet having a bunch of it all over your solution makes for a readability horror. Take the code below for example: It doesn't look like a lot of lines but imagine having to parse a bunch of fields throughout your development. Sure you can just … Continue reading Get Rid of NULL Sitecore Field Checks

Track Client-side Events in Sitecore MVC

Tracking events triggered on your site is obviously of vital importance to measure your visitors' behaviour and level of engagement. Sitecore does a good job of tracking events associated to a page that are triggered upon page visit - but in reality, we are more concerned about tracking client-side events especially since almost everything happens … Continue reading Track Client-side Events in Sitecore MVC

Rendering Sublayouts in Sitecore MVC

I have recently been tasked to plan for a Sitecore MVC transition in one of our projects, and to be honest it's a lot more work than I had imagined since our default ASPX layout file has a bunch of statically added Sitecore sublayouts in it which unfortunately will never run on a View file. Then it dawned … Continue reading Rendering Sublayouts in Sitecore MVC

Update local ASP.Net website without publish

With Visual Studio’s publish functionality you can conveniently preview how your web project behaves and looks like on your local IIS web server. With that said, I believe publishing makes sense only if you’ve done significant changes since, depending on how big your project is, it may take some time to sync your deployable project … Continue reading Update local ASP.Net website without publish