Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Open Core Testi...Open Core Testi..."No Routing Control" in MVC modules. What does that mean exactly?"No Routing Control" in MVC modules. What does that mean exactly?
Previous
 
Next
New Post
5/19/2015 2:44 AM
 
"No Routing Control" in MVC modules in DNN 8. This was mentioned in the latest webinar but there was no clarification or description to what that meant.

An example would be helpful. What kind of routing which can be done in a regular MVC app and which can't be done in DNN 8?

 
New Post
5/19/2015 6:53 AM
 

Tony,

  In MVC, routing is used to determine which controller and action method to call given a specific URL.  If you called http://mysite.com/home/edit it might call the Edit method of the homecontroller.  This is all defined by routes which your application defines in the routemap (this is the same concept used in web services).  In the DNN MVC approach, routes are defined in the module manifest for each modulecontrol.  You can see an example of this for the sample MVC HTML module: <controlSrc>HtmlText/Index.mvc</controlSrc> or <controlSrc>HtmlText/Edit.mvc</controlSrc>. In these examples, the framework will call the Index or Edit action methods on the HtmlTextController depending on which "control" is being rendered.

So, when I say that DNN doesn't give you routing control, I mean that you do not have the same level of control over how routes are defined.  In ASP.Net MVC you have full programmatic control over routes just like you do with the Web Service Framework.  In the DNN MVC Module framework, you have some limited control which largely relies on convention with little ability to override the convention.


Joe Brinkman
DNN Corp.
 
New Post
1/16/2016 8:38 AM
 
Joe Brinkman wrote:

Tony,

  In MVC, routing is used to determine which controller and action method to call given a specific URL.  If you called http://mysite.com/home/edit it might call the Edit method of the homecontroller.  This is all defined by routes which your application defines in the routemap (this is the same concept used in web services).  In the DNN MVC approach, routes are defined in the module manifest for each modulecontrol.  You can see an example of this for the sample MVC HTML module: HtmlText/Index.mvc or HtmlText/Edit.mvc. In these examples, the framework will call the Index or Edit action methods on the HtmlTextController depending on which "control" is being rendered.

So, when I say that DNN doesn't give you routing control, I mean that you do not have the same level of control over how routes are defined.  In ASP.Net MVC you have full programmatic control over routes just like you do with the Web Service Framework.  In the DNN MVC Module framework, you have some limited control which largely relies on convention with little ability to override the convention.

Hi Joe,

that means that we have to create a module control for each Controller/Action combination, isn't it?

How would the url look like if I want to render different module control (aka Controller/Action)?

Thanks,

Luca

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Open Core Testi...Open Core Testi..."No Routing Control" in MVC modules. What does that mean exactly?"No Routing Control" in MVC modules. What does that mean exactly?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out