Can you have an MVC without an ORM?
Yes. MVC and ORM are answers to different, marginally related common problems - interaction with GUI and database access. Also, MVC is way older.
Sure. In my day job we use Spring-MVC and handle all persistence manually through templates. We feel it gives us more control.
Most (all?) MVC frameworks should allow you to either plug in your own DB access coded against an interface (if this concept exists in whatever implementation language you are using) or just hand code it right in there.
MVC itself means clear separation of the presentation, controller and model layers. So what way you select to implement each individual layer is completely upto you. You can implement the model layer without ORM's as well. You can just open a normal sql connection and use normal ADO.Net classes (remember dataview and dataadapter classes??) to get the data. If you think you have good database skills and need more control on sql queries go with the old methods. ORM's are for making the life of web developers better since they are not expected to have excellent database skills. The added bonus ofcourse is the ability to deal with database in an object oriented way and some layer of persistence.
Of course you can. Those are two completely different things that can be used together as well.
The data access is all underlying the Model in MVC - whether you use an ORM or any other technology for the data layer.
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