just found this project, looks great- but mvc?

Topics: General, MVC
Dec 6, 2010 at 11:47 PM

I see mention of MVC supported but doesnt seem to be the case? Can someone explain?

Dec 7, 2010 at 12:03 AM

Check http://docs.composite.net/C1/ASP-NET/HelloWorldMVC2.aspx - you can embed MVC apps on pages or templates. Currently MVC2 is supported and we are working on MVC3 support. In addition to MVC you can also use classic ASP.NET controls.

Dec 7, 2010 at 12:13 AM

Thanks mawtex. So the actual pages on the site are still aspx then, and would require rewriting to hide the .aspx extension correct?

Dec 7, 2010 at 12:19 AM

Correct. This is a highly requested feature that we hope to address in Q1.

Dec 7, 2010 at 11:51 PM
Edited Dec 7, 2010 at 11:51 PM

Just to to make sure we're all clear about this one thing, that extensionless urls has nothing to do with MVC and MVC has nothing to do with extensionless urls. Yes, you typically see MVC applications implemtented without extensions but nothing keeps you from adding .aspx to all your urls, like nothings keeps you from removing them in a WebForms application.

In the case with C1, it just so happens that the developers at some point in the early stage decided to have the urls ending in .aspx - while their previous product (Composite 3.8, also WebForms based) perfectly handled extensionsless urls.

Personally i have written a Filter that removes the .aspx extension from the generated html before its emitted to the client, and a Module that intercepts requests and adds the .aspx again so C1 can understand the url.

And last, please go and vote for this issue http://compositec1.codeplex.com/workitem/425 if you want to have more freedom of the url generation :)

Dec 9, 2010 at 8:26 PM

@burningice, yes I certainly understand that traditional webforms can be made extensionless (and I've done so myself), but my bigger point is that the system currently uses "traditional" asp.net webform tech, and not mvc under the hood with the associated benefits (or lack thereof, depending on your POV ;)

Dec 9, 2010 at 9:45 PM

Its true that C1 uses WebForms under the hood, but the dependency to it is very weak. Most of the logic is centered around their XSLT engine, wherein you can embed Controls and UserControls via special xml tags. The MVC player is implemented through a Control in this way. The reason i responded here was because of your second comment about the extensions, which made it sound like the only reason you were interested in MVC was to get rid of .aspx from the urls.

Personally i have little or no interest whether a CMS is using WebForms or MVC. Its a CMS for god sakes, it handles little or no logic at all... its all about finding the correct document and rendering it to the client :) At the bottom of the stack we have asp.net anyway, and C1 handles things from both world beautifully. Its both easy to insert normal WebForms controls and embed MVC applications.

Dec 10, 2010 at 6:19 PM

read this thread for a easy fix to remove those extensions :)