Explain MEF. How does it benefit Programmers and app developers? Where can you find MEF? What is its composition? Define Imports and Exports in MEF.
Method Overloading Meaning: Method Overloading, a benefit permitting a class to have more than one method having the same name with different parameters, is similar to Constructor Overloading in Java if their argument lists are different. It allows a class to have more than one constructor having diRead more
Method Overloading Meaning:
Method Overloading, a benefit permitting a class to have more than one method having the same name with different parameters, is similar to Constructor Overloading in Java if their argument lists are different.
It allows a class to have more than one constructor having different argument lists which means the parameters that a method has.
Thus it denotes if a class has many or several methods having the same name but different in parameters, it is Method Overloading.
Functions of Method Overloading:
It has several functions primary among them being:
Being similar to Constructor Overloading in Java, it allows a class to have more than one constructor having different argument lists (also known as parameter lists).
Its functionality can be utilized by declaring the same method with varied parameters which must be different in number, sequence or types of parameters (or arguments).
One of the functions of it relates to Static Binding which happens at compile time. Under Method overloading, binding of method calls to its definition happens at Compile time.
Types of Method Overloading:
Following are the main types of Method Overloading:
- Function overloading.
- Operator overloading.
Note:
In the light of the above types, it is necessary to mention that there are two possible ways to overload which are:
- Changing Number of arguments.
- Changing the data types.
Features of Method Overloading:
Following are the main features of Method Overloading:
It is a static polymorphism system (methods are binded during the compilation process).
Overloading relates to runtime (binding) and the binding of methods is done at compile-time. As a result, multiple processes are not required during run time.
The numbers of arguments are part of the actual method overloading.
Benefits of Method Overloading:
This has several benefits primary among them being:
- It is time-saving as it reduces execution time because the binding is done during compilation time.
- An overloading mechanism achieves flexibility.
- Code reusability is achieved; hence it saves memory.
- Code complexity is reduced. Hence provides consistency of code.
Conclusion:
Method Overloading has revolutionized the working methods as it eliminates multiple methods with the same name. This has tremendous overloading functionality benefits in code readability and reusability of the program.
See less
MEF Meaning: MEF or the Managed Extensibility Framework refers to a digital library for the formation of extensible technical applications. Using it, software developers and programmers can utilize the available extensions without any coding or configuration. You can even use MEF across applicationsRead more
MEF Meaning:
MEF or the Managed Extensibility Framework refers to a digital library for the formation of extensible technical applications. Using it, software developers and programmers can utilize the available extensions without any coding or configuration. You can even use MEF across applications during their development stage. You can reuse it for multiple times.
Benefits of MEF:
Location of MEF
MEF is a constituent part of the .NET framework. Everytime you use .NET, you have to use MEF as well. MEF works in sync with .NET client as well as ASP.NET and in other technology as well.
MEF Composition
MEF composition basically includes a composition container having all available parts assembled together. It is responsible for performing various computing operations. A part represents any object through which any value can be exported or imported.
Imports and Exports of MEF:
Imports and exports are just a behavioral pattern of how MEF parts operate within the .NET framework. When the component delineates the necessity of assigning a value to a particular object, it is called Imports. While export determines whether the same is available or not. Each import has to be matched with their corresponding export in the MEF.
See less