Kentico 9 MVC limitations?

Daniel Johnston asked on December 8, 2015 21:47

Hi all,

I'm thinking about building an MVC application in Kentico 9.

From the Webinar I heard them say that E-commerce wasn't currently supported in MVC. Is there a list of what is and isn't supported if building in MVC?

Is there anyway to combine a portal/ascx site with an MVC application under a single licence or would using MVC restrict some CMS features from being leveraged?

Thanks for your insights

Dan

Correct Answer

Cheryl MacDonald answered on January 4, 2016 18:55

I've completed upgrading an MVC site to version 9, and everything is working fine using the 8.2 recommended approach - Kentico 9 is fully backwards compatible with this.

This approach entails using a single solution containing a CMS project and an MVC project, where pages or page types are tied to an MVC controller and action. This works great, and IMHO provides benefits you wouldn't get if you split your solution into separate MVC and CMS solutions as per the 'new' recommended approach (benefits include page aliasing, SEO optimisation/redirects).

When you upgrade an 8.2 site to 9.0 you can follow the instructions here to make sure your solution continues to work in the 'old' way.

The 'old' approach means that all Kentico functionality works in MVC as the CMSContext is available. You also have the added benefit of being able to mix portal pages in the same solution.

The problems with functonality not working and the suggestion you can only run a brochure site come in when using the recommended 'new' approach. Going down this road means you have no CMSContext available in the 'pure' MVC website solution, and because Ecommerce and EMS rely heavily on the CMSContext, these features won't work until Kentico make changes to the API to decouple them from the CMSContext.

My suggestion would be to use the old approach with MVC for anything other than a brochure site.

It goes without saying that nothing portal based will work in the new approach either.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on December 8, 2015 23:10

Take a look in the documentation for the limitation list. I believe you can take advantage of Portal and MVC but not all 3. And yes you will be limiting the portal functionality by using MVC.

0 votesVote for this answer Mark as a Correct answer

Daniel Johnston answered on December 9, 2015 12:32

Thanks Brenden,

I looked through the documentation and I'm still not entirely clear on what you can/can't do. I could do with a list that specifically says that e-commerce isn't supported and how. I know that forms are supported because there is an API example. I'll take a look at the Dancing Goat example to try to figure out more.

I know that it's still early days for Kentico/MVC but I'd like to build some bespoke stuff using MVC but still retain the advantage of Kentico controls for the rest of the business site forums/payment gateways/logon so I'm wondering if there would be a way to split the MVC application without having to serve it on a separate domain or at least obtain 2 licences.

0 votesVote for this answer Mark as a Correct answer

Michael Eustace answered on December 10, 2015 17:28 (last edited on December 10, 2015 17:30)

Hi Dan,

If you are looking to combine portal/ascx route with the new Kentico9/MVC features into one site just to forgo the need for your client to pay for a second license, then there is no need as Kentico will give you a free license for the external MVC site.

This question was asked, and answered, towards the end of the recent Kentico 9 - ASP NET MVC Support Webinar

With regards to using the MVC route going forward, we have come to the conclusion (for now) that the MVC route would be a feasible solution for a client requiring a brochure-ware website.

We will continue to develop using a combination of portal and ascx for more complex solutions, but that is not to say this might change as we learn more about the MVC route, and as the product matures.

Best regards, Michael

0 votesVote for this answer Mark as a Correct answer

Daniel Johnston answered on December 10, 2015 17:57 (last edited on December 10, 2015 18:01)

Hi Michael,

Thanks for this. I'm starting to get my head around it.

I'm building a bespoke service application that I'd like to use MVC for. However, I'd really like to use Kentico for the surrounding site. So I'm thinking that the logon page, blog, sign up, membership levels etc. will be straight up Kentico ASCX/Portal pages and when clicking a link to the MVC application part it'll just serve it up on a separate port/URL.

My understanding from what I've read etc. is that this is all perfectly fine and I should be able to keep, for example, user context between Kentico and my MVC application (that will still use the Kentico API etc.). Does that sound realistic?

Thanks for your input

Dan

1 votesVote for this answer Mark as a Correct answer

Marcel Guldemond answered on December 17, 2015 21:19

What Michael is describing is basically what we're trying to do too. Our client's old site is built in an earlier version of MVC, but they now want some of the Kentico features like Smart Search. We were working on it in Kentico 8, but upgraded to 9 because we thought it would make the MVC part easier, such as bringing in a lot of our existing code, so that it would be a portal/mvc hybrid. The client can work on their content pages, and we can quickly hook up some MVC pages to our existing infrastructure.

However, nothing's working very well right now, we're having a lot of trouble with it. There was a ton of config wrestling to get the MVC site to work as a virtual directory under the CMSApp. Now this error keeps coming back when trying to hit an MVC route: http://stackoverflow.com/questions/1120329/could-not-load-type-mvcapplication

and if that doesn't happen, most of the time when I try to call Smart Search using the API from an MVC controller, the IIS Express worker process crashes, so I have no idea where the problem is.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.