1
maui
4y

Anyone have tips or extra features on asp.net mvc that i need to know in order to survive? I'm just starting to learn it as I have to maintain a neglected system and they only had one programmer working on it. And that only programmer is deceased.

My current emotion is like;

I'm a potato,
Not only physically,
But also mentally..

Comments
  • 1
    - Keep the code out of the views, it's nearly impossible to debug sometimes.
    - Layering out a viewmodel layer has helped me drastically.
    - Keep your controller code concise so you see at a high level what your controllers do. Like keep the heavy processing in a service class or something.
    - As with regular html stuff, try not to mix languages on the same page. Keep your JavaScript and css in separate files and use the render sections to help generate the locations of them.
    - Partials help even with small stuff, remember you can feed them models.
    - I try to keep most of my code base in another library. It helps when you need to upgrade mvc and the mvc libraries kill themselves. Sometimes you need to wipe the whole project and readd all the classes as a last resort.
    - If you are using an up to date VS refactoring tool won't hit the cshtml files

    As an after thought, adding on extra layering has seemed to help me a lot when working with mvc projects.
  • 1
    Rewrite the app using modern standards.
Add Comment