I recently downloaded Rob Conery's excellent ASP.NET Storefront reference application and am finding it incredibly instructive. One question that comes to mind is where one should place the Model classes (and the Data classes upon which they depend). The MVC project template creates a Model folder. But it seems to me that I would be better served breaking the model out into a separate project assembly so that it can be re-used by other potential applications (e.g. management tools related to the website's application domain)?
I'm curious to get people's opinions.
After a strong legacy of over two decades now, the net development services still remain relevant. As per a report by w3techs, ASP.NET is still used by 7.9% of all the websites whose server-side programming languages are known.
It's more sensible to use ASP.NET if you are already relying on 3rd party UI controls. The main advantage of using MVC is its separation of concerns. This allows for parallel development – different developers can work on Controller, View, and Model separately. This makes MVC ideal for team development.
You can create an external trigger that calls into your MVC action method every 24 hours. So you are executing your code every 24 hours. There are multiple ways and services to do that, i have used different services. Or you can create your own if you do not want to use third party.
MVC actually defined in two life cycles, the application life cycle, and the request life cycle. The Starting point for every MVC application begins with routing. After that, the received request figures out and finds how it should be handled with the help of the URL Routing Module.
It really depends on the size of the project. There's no inherent value in having a separate "models" assembly, as you can unit test a Web Application project (including MVC projects).
I would agree. Unless the application is only ever going to be the single web application, I would break it out into a separate project. Typically I will have a web application front end that uses one or more windows services to perform recurring, automated tasks (submitting charges, sending notifications, etc) and one or more console application tools to provision the application user base from our enterprise directory -- my apps are typically intranet apps that may apply only to subsets of our entire user population. Having the models (data layer) in a separate project allows me to easily share it with all other applications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With