Hello C# Corner Community,
The more I read about different .Net technologies, the more confused I get, about the question, what technology to use for an n-Tier Client Server application that will not need to be completely rewritten in a short while, due to changes in the opinion about what the newest and hotest way of writing business software should be.
Don't get me wrong, I think that change is good and necessary. What I envision is a framework of pure logical interfaces that solely describe which tasks can or need to be fulfilled by certain objects and tiers and never how this tasks are fulfilled.
A framework with none implementations whatsoever. A framework that is aware of the .Net Framework itself as the lowest common denominator of all Net technologies but is completely independent and anaware of any specific Net technologies such as Winforms, WPF, WF, Ado.Net, ASP.Net MVC, Entitity Framework .Core.
A framework whose interfaces I as a devoloper have to fill with implementations, that bind it to the desired technology like for instance to Winforms on the UI End, and in the Data Access Layer maybe to a mixture of Entity Framework and pure Ado.Net using datareader for read only data access and datasets for data manipulations in grid-control-like UI elements.
The implementations towards a certain .Net technology need to be as little and as centralised as possible, to make changes towards a new future technology as easy and as save as possible. Ideally I wouldn't have to change any class for that, but just derive a new sub class from a framework's base class and give it a name that hints to the technology it implements. Some Metadata in the framework should than be set up to decide which technology-specific subclass of the frameworks baseclass should be used to create an object of at runtime.
In search of such a framework I stumbled over Rockford Lhotkas book Expert C# Business Objects written in a time that seems, regarding the change rate in technologies, to be the IT middle ages. Anyway I think it is written in such a clear and intelligent way that the book radiates a kind of timeless truth. What I wonder is, if such a framework could successfully be used in a larger software project today, how often is it used, and are there alternatives that became kind of a standard for such purposes. Has Mircrosoft themselves not written such an n-Tier framework that is independent of certain .Net technologies?
I would be very thankful for any thougths or suggestions you have on this topic.
kind regards
Christian

Mounnad MohamedPosted Dec 5, 2019, 7:29 AM
Christian LangenbruchPosted Dec 5, 2019, 8:34 AM
Hello Mounnad,
thank you for your reply. I can see that my desire for an all purpose framework is probably a bit to generic to be practical, because even if it had a generic MVVM framework and a generic MVC framework these would need to be different modules that you can choose from, otherwise you would end up with a sort of swiss knife framework, that I only use and need a tiny fraction of. Still I think it is a very good idea to seperate the idea of a framework from its implementation. Maybe not only the idea but also the purpose of it. A web application essentially has different concepts and needs behind it, than a desktop application has. Still they have things in common. The business rules and the data access should be indepent of the presentation layer, otherwise you had to rewrite them when you shift from a desktop presentation to a web UI. Also the application purpose should be indenpendent of a certain technology. The MVVM Framework should be an independent software framework from it's implementation in WPF as the MVC framework should be independent from ASP.NET. For the later I think that is already true. What kind of implementation code and technology you apply in your model, view and controller directories, is pretty much up to you as for as I understand it. I just think that there could be more support for the concept of a general MVC framework. I think Microsoft has to much emphasis on technologies and to little on concepts, and they just don't seperate one from the other enough.