spring framework & asp.net mvc - asp.net

I heard there is a port of spring framework to .Net framework which is called spring.net.
Anyone can compare those two frameworks? If design the system, which one is prefered or both can be used.

Spring is for Java, Spring.NET is a .NET port of the Java framework.
See the overview page for a summary of the modules it implements.
You can't use both since they are written for different platforms. If you're designing the system and have the freedom to choose which platform you're implementing in, you can choose either Spring for a Java implementation or Spring.NET for a .NET implementation.
They are slowly getting a bit different, especially with the support for .NET specific things, such as WCF.
If you're going to decide to implement in .NET/Java I would take more into account than simple Spring/Spring.NET.

Spring is the original Java version and Spring.NET is a .NET version. Spring is better, as the .NET port is not as good as the original. For .NET, you are better of with Castle Windsor. The best thing is to use none of the dependency injection containers because dependency injection is not a good design pattern to follow. Neither is MVC. Java has many differences from .NET. .NET has advantage of Web Forms over Java. If you are using .NET, use the best UI platform which is Web Forms. If you are using Java use JSF.

Related

When Web Forms won't be supported from Microsoft

We are going to create new application using Web Forms and we want to know when Web Forms (ASPX pages) Technology going to be obsolete or not be supported from Microsoft.
https://dotnet.microsoft.com/platform/support/policy/aspnet
So WebForms is part of .Net Framework.
https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies
“.NET Framework 4.8 is the last version of .NET Framework. .NET Framework is serviced monthly with security and reliability bug fixes. .NET Framework will continue to be included with Windows, with no plans to remove it. You don't need to migrate your .NET Framework apps, but for new development, use .NET 5 or later.”
So it's baked into Windows at this point if you want to use it. Everyone will discourage you from using it, as you are essentially mastering out-of-vogue and increasingly obsolete technology, and maybe not doing your career any favors. But if, like me, you have some huge WebForms app for which there is no time nor money to rewrite, then you can at least rest assured that it will continue to run on Windows.
Microsoft will be continuing to support ASP.Net WebForms for some time to come since much of it's functionality is based into the core .Net Framework. There are several locations to get information on which ASP.Net features/technologies such as ASP.Net MVC 4 will be going out of support soon. https://www.asp.net/support lists many of the technologies. For ASP.Net Webforms, it's tied to the Framework versions as best as I understand. https://support.microsoft.com/en-us/lifecycle/search?alpha=.net%20framework
Support policy for ASP.NET is documented here: https://dotnet.microsoft.com/platform/support/policy/aspnet

What does lightweight mean in .net Core

I am reading an ebook about Docker and Microservices. It referred the .net core was lightweight compared with traditional .net standard.
I don't quite get the story behind it. Can someone give some explanation about this?
This is because .Net Core is optimized for microservices and dockers.
In short, .Net Core doesn't offer as many things as another classic implementation of .Net Standard, reducing its size which even allows for an app to be packaged with all dependencies (and so not needing any installation of .Net on the running machine). This is why I think it could be called lightweight.
See :
https://msdn.microsoft.com/en-us/magazine/mt842506.aspx
https://learn.microsoft.com/en-us/dotnet/standard/choosing-core-framework-server
About light weight of .net core app
I am reading an ebook about Docker and Microservices. It referred the
.net core was lightweight compared with traditional .net standard.
I think here you are referring to .net core is lightweight than .net frameworks as .net standard are just API specifications for implementing base class libraries by different frameworks.
Please refer to below link for more information:
https://www.infoq.com/news/2017/10/dotnet-core-standard-difference/
https://medium.com/wolox-driving-innovation/net-core-vs-net-framework-a694f1fbdb26
Now coming back to why .net core framework is lightweight .net 4.5 or other frameworks as it's modular. When you create or run an application you don't need to install all dependencies which you do not need unlike .net 4.5 or other frameworks where everything is installed.
Basically, .Net framework has been split into individual pieces implemented using CoreFX for .net core framework which makes .Net core lightweight.
Link for details - https://www.tutorialspoint.com/dotnet_core/dotnet_core_managed_extensibility_framework.htm

Is the Managed Extensibility Framework (MEF) what ASP.NET Core 2 uses internally for IoC?

I am trying to gauge if Managed Extensibility Framework (MEF) is something I can use for extending an ASP.NET Core 2.x MVC website. I saw ExtCore also. My desire is to use it to build infrastructure for plugins in my application.
What I cannot figure out is if MEF is legacy from Silverlight or if MEF is what Core actually uses for it's IoC. I know MEF is in CoreFX, but that's all I know for sure.
I'd like to use MS's IoC DI here if it is viable and not legacy. Is MEF legacy or is it used by Core itself?
Some questions I looked at, most were very old,
Is there a replacement for MEF in .NET Core (or ASP.NET 5)
In ASP.NET Core, does the IoC ASP Startup Class solve what the Managed Extensibility Framework solved with a catalog and container?
(The last one is a question I asked at the end of 2016.)

ASP.net vnext Dependency Injection

I have heard that in the next version of ASP.NET (ASP.NET vnext) there will be dependency injection built into the framework.
Does anyone know more about this?
Will it be unity or a new framework?
Where can I find more information about this?
ASP.NET vNext will have built-in support for dependency injection. It is very basic support that currently supports only constructor injection.
The source repo for ASP.NET vNext's dependency injection logic contains sample implementations of how to wire up several community-built dependency injection systems, including Autofac, Ninject, StructureMap, Unity, and Castle Windsor. However, those are just samples and are not all complete or fully functional.
The idea is that for basic scenarios a developer can use the built-in DI, whereas people with more advanced requirements or if they already have a "favorite" DI system can plug that in instead and get richer features.
It will contain common abstractions for Autofac, Ninject, StructureMap, Unity, Windsor as seen here Dependency Injection github If you see in the Project.Json it has dependencies on these specific frameworks.
Here is instruction how to use Autofac with ASP.NET 5
This blog explains the details on hov to wire up your own container: http://blogs.msdn.com/b/webdev/archive/2014/06/17/dependency-injection-in-asp-net-vnext.aspx

Are there any articles/examples of using System.AddIn with ASP.NET?

Does anyone know about any articles/examples of using System.AddIn with ASP.NET and/or ASP.NET MVC applications?
I'm looking to use System.AddIn to make an ASP.NET MVC application extensible.
The examples I have seen all use the Managed Extensibility Framework.
The Managed Extensibility Framework
(MEF) is a new library in .NET that
enables greater reuse of applications
and components. Using MEF, .NET
applications can make the shift from
being statically compiled to
dynamically composed.
See also Choosing between MEF and MAF (System.AddIn)

Resources