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