- Simply Try…Catch approach in the ActionMethod.
Problem with the above approach is we cannot reuse the exception handling logic across multiple action methods. Continue reading
We build a single page app instead of a standard MVC app to avoid re-rendering pages and performance issues. Also SPAs can provide a rich, desktop-like environment. But what to choose ..?
SPA needs heavy jQuery Ajax to build frontend and mixed frontend tools like Angular JS, duplicate js models, Knockout JS to do the binding and etc… SPA looks pretty, fancy and responsive. but, it’s hard to unit test since its complicated and mixed technologies all over the place. I would suggest to use Regular MVC structure while build medium to large app, utilize area to grouping the feature of your app. you can implement good security measurement, apply strong validations to your app. your app will close to HTML easy for maintenance, light jQuery that enhances the UI is already good when you want to focus on the functions and features instead of fancy UI. Continue reading
MVC Tempdata. Peek and Keep.
“TempData CAN ALSO preserve values for the next request depending on 4 conditions”.
“TempData” will be persisted depending on 4 CONDITIONS:-
- Not Read.
- Normal Read.
- Read and Keep.
- Peek and Read.
There are technical differences between Abstract Classes and Interfaces, that being an Abstract Class can contain implementation of methods, fields, constructors, etc, while an Interface only contains method and property prototypes.
Two quick thoughts on differences between interfaces and abstract classes:
- Abstract classes desired if future expansion is likely, as an abstract class can be expanded, but an interface would have to be enhanced by addition of another interface, I2.
2. A class can inherit multiple interfaces but only one abstract class.
An Interface defines what something can do (how it behaves), and an Abstract Class defines what something is. Continue reading