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

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Some basic questionsSome basic questions
Previous
 
Next
New Post
6/18/2017 9:01 PM
 

Just want to make sure my customization of the DAL2 MVC module template isn't avoiding best practices.

Because I'm used to code separation and using my own data layer Razor is being avoided.  Instead, HTML created in an ascx and JS from a separate file is tested, then copied into the CSHTML file.  Razor expressions get the DNN common items such as Module Id, Tab Module Id and so on.  I'm then using binding expressions in script tags to make these available globally to JavaScript and doing all my DOM manipulation with JavaScript.  

All the div tags are copied over from the .ascx, then all the JavaScript is placed in one tag in the .cshtml file.  This is panning out just fine, however, are there any points to keep in mind with this approach?

For settings, a table was created for the module at the time it was installed via Visual Studio and its settings were placed there.  The stock module code is now modified to use the DNN tables Module Settings and Tab Module Settings instead.  Right now the Action Result in the Item Controller has only a HTTP Post attribute.  The action result that exists with the module has several other attributes and on another action result an Anti Forgery Attribute is invoked.

The Update button that comes with the module is hard-coded to use the provided table and throws an error.  Where is the code set up for this so I can disable it and have the Update button drive jQuery to do settings creation via Module / Tab Module, etc. settings?  If there isn't I can hide this button and put another one there.

I'm guessing I can get away with just using an HTTP Post attribute and call it a day.  Are other attributes required for best practice?

Surely 'Why isn't this guy using Razor?' is a valid question.  Just used to ASP.Net MVC using code separation and there isn't time to ramp up on Razor right now is the answer.

If there are any pointers out there, would be glad to hear of them.

Thanks,

Mike Durthaler

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Some basic questionsSome basic questions


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