samedi 27 février 2016

ASP.NET MVC is from "Make it Very Complicated"?

I am too stupid for such complex architecture...

ASP.NET MVC, Model, View, Controller, ViewModel, Entity Framework, Bootstrap, JavaScript, Razor, Repository pattern, Unit of Work, Unit test…and many more – the list of “things” that I have read and learn about in the last few months.

First, I am not considering myself a well experimented programmer, started with VBA, after Visual Basic, then C# on Windows and Web (ASP.NET web forms). Small/medium apps for my work that are ok and some used even today after years…

Now because I want to use that new technologies I have started to learn about them:

And the “nightmare begins”….i just want to learn one concept/pattern whatever (MVC), not to get crazy and try to complicate things and feel that my brain will explode soon. The guru’s speak about “KISS”, “DRY” ,“Patterns” and “Good practices” etc., if I don’t use this … I am a nobody, without that I am a bad programmer. They tell me about “Unit tests”, and UML and Entity Framework …. Really!!!!???

In real life 80% of the applications are not so big, so complex! In general, ASP.NET apps are just CRUD apps in a way or another. Why we like to complicate things in this manner? I don’t understand, maybe I am too stupid for “MVC” concept.

99% of the courses/videos out there start simple, with the promise that you will learn this MVC concept quick and easy. They start to explain the basic concepts and you are very happy because you finally, finally …finally understand!!! Noooo don’t be a dreamer is not so simple: the instructor/author change his mind and start complicate things allot… and begin to tell you that is not good to pass Model directly to View (via Controller) no..no.. is a bad thing and explain how you need to add another “thing” … View Model.. and you start to feel pain in your head. You start to learn, to find the need and use of this View Model and … they tell that you need another “thing” AutoMaper in order to map your ViewModel objects with your Model Objects. Then… Entity Framework and Code First with migrations and….finally you think that you managed all and you are with your head ready to explode, but happy…you feel that have learned something…

You think this is over?!! NO! The guru’s/the men that know all/the best of the best … look at you with arrogance and ask you: “what? you don’t use Repository pattern or other many "...patterns", with Unit of Work…you are a loser/a beginner”. And you look in the mirror and you are ashamed that your small web app (that works fine, do what she need to do) is not good, she needs some “patterns” and Unit of Test…and ..and..and…

And i start and add many of what guru’s tell me to add…and after some time my app is so complex and use so many “pattrerns” and “frameworks” and “good practices” and other “guru stuff”, that is so hard to manage and I am LOST!!!

I just wanted to make a CRUD app in MVC, to learn this new concept, that allow me to collect some data via web, app that in ASP.NET webform “time” and ADO.NET, was so easy to do… But NOOO that webform is not good anymore…is bad, very bad…violate the golden rule of “stateless” http protocol and don’t have that “separation of concern”. I have web form apps from 2004 that work so fine even now, no problem!

I don’t know what to say, maybe my brain has a limit and I can’t manage such complex architectures, but I don’t see that “KISS” here, that “DRY”… I just see Make it Very Complicated or write much more code, I see only more work and too much complexity! This is my point after months of reading/videos/courses…

Sorry for my bad English, hope you understand me

All the best to you!

Aucun commentaire:

Enregistrer un commentaire