TRENDING NEWS

POPULAR NEWS

If You Write A Framework In .net With Dependency Injection Throughout Is This Appropriate This

What is the best approach to take when writing a dependency injection?

This seems like a very broad question.  Can you please explain further what you are trying to accomplish, so perhaps I can whittle down the answer to help suit your needs.I generalities (depending on what you are trying to achieve) the best approach is the most de-coupled approach.I also am not sure which language you are using, I am assuming Java or C#, don't ask me why I make assumptions, haha.In C# you can achieve DI without a framework, but I highly suggest learning the concept of DI and what it used for on the surface before becoming "married" to a framework.  Just a "for instance" I use ninject, as well as unity.The most important thing to understand at the beginning is that the end goal is de-coupled, and more maintainable code.

Dependency Injection (DI): In what scenarios do we need to use the unity framework, in which not?

Unity is light-weight DI container with good performance. This is helpful component-based software designing. TI follows OO principles. You can create It provides simplicity, flexibility with run time configuration capabilities, can leverage, constructor, method, property call injection features. You can implement hierarichal dependencies, manage complex hierarchies. You can read more at  Implementing the Microsoft Unity (Dependency Injection) Design Pattern

Which is better ado.net or entity framework?

Actually Entity Framework is build at the top of ADO.NET so it can't be faster. But it makes development much faster. And improves maintainability of your code. I mean the power of LinQ queries with EF requires you to write less code.

What is the best book to learn .net as a beginner? Is .net and c# the same thing?

.net is Microsoft's "framework" which is much more than just a framework.C# is a programming language.Book: C# 6.0 and the .NET 4.6 Framework (Apress) I recommend this book for C# and .NET much like I recommend "Learning Python" for python, because it is a tome and has as much solid information in one place as you will find.  When you pick up a book like on of these - it is unnecessary to read it cover to cover, like Lord of the Rings or Harry Potter, haha.  What I usually do is briefly scan through every chapter reading at least the first 5 or so paragraphs and the last 3-5 paragraphs for each chapter.  This usually gives me knowledge of the language and what implementations can be done to solve a particular problem.  Plus, if you know "Inheritance" from language (x) all you are looking for is the syntax, implementation and idiosyncrasies of the language at this point.  I really, really like C# and think if you immerse yourself in the language you will find out how truly powerful it is.  I will say this - learn proper design patterns, they make a world of difference and will lend themselves to all other languages.  The truth is, once you learn a C language, (C++ is not managed so requires more management of memory than C#(which basically requires none)) extremely well, picking up other languages is not really hard at all.  Proper computer programming is not language dependent, if Dependency Injection is proper for project (x) then it does not matter if you are using language i or g or f, if the language supports DI then it should be used. This was just a for instance, to give you an idea.Hope this helps.

TRENDING NEWS