mbdavid / LiteDB-vNext

Other
53 stars 6 forks source link

Is it targeted netstandard2.1? #1

Open nightroman opened 2 years ago

nightroman commented 2 years ago

Hi @mbdavid It's great to see this new development, I'm looking forward to it.

Is it too early for issues/questions?

I notice the projects are targeted netstandard2.1. This worries me a little. As far as I know netstandard2.1 is not supported by .NET Framework. netstandard2.0 is supported (starting from 4.6.1 or even better 4.7.2).

mbdavid commented 2 years ago

Hi @nightroman,

I'm using 2.1 only to use new features of language and .NET Core. I don't know if a good idea keep old NET Framework compatible and keeps problem with different frameworks.

Do you use it in .NET Framework enviorment?

nightroman commented 2 years ago

I understand the rationale (by the way in that case why not net6.0 right away?).

.NET Framework is not going anywhere. I use it. Yes, I would move to net6.0. But some apps and dev environment I deal with are .NET Framework and this is not going to change any time soon, if at all. Microsoft is not going to discontinue .NET Framework development. And many apps will stay .NET Framework. Using LiteDB netstandard2.1 will not be possible.

A few words about my engagement with LiteDB. I develop and use the PowerShell module Ldbc for scripting LiteDB in PowerShell. The power and simplicity of this combo is awesome. On Windows, Windows PowerShell is provided out of the box. Ldbc is installed in a few seconds on top of that and one is good to go with their awesome data.

Windows PowerShell is .NET Framework. PowerShell Core shell may be used, too. But it requires installing. And more importantly, Core it is not for embedding into and scripting .NET Framework apps.

All in all, so far LiteDB is universal in the whole .NET world, attractive even with caveats. netstandard2.0 LiteDB would be almost the same, dropping some old .NET Frameworks with support discontinued by Microsoft anyway.

netstandard2.1 LiteDB is not universal and some alternative universal solutions will be used instead by developers, it's inevitable.

nightroman commented 2 years ago

As far as mentioned my module Ldbc, the PowerShell module for LiteDB, for comparison I should probably mention my somewhat similar project Mdbc, the PowerShell module for MongoDB.

Mdbc is based on their official C# driver. They support the following frameworks: net472, netstandard2.0, netstandard2.1. This works in all my possible scenarios I can think of.

MongoDB and Mdbc way is much heavier comparing to Ldbc and LiteDB, overkill for many tasks. But this does the job and even pays off for some other tasks.

Thus, alternatives exist and I will have to focus on them if LiteDB drops .NET Framework. This is not a threat or tantrum, please do not get me wrong, it's the reality, developers should estimate risks and choose/invest wisely.

nightroman commented 2 years ago

Finally, a genuine question, I'd really like to learn - what makes netstandard2.1 so attractive?

mbdavid commented 2 years ago

Hi @nightroman, It's fantastic your contribute in LiteDB. Thank you so much!! 👍

About my choose about netstandatd2.1 - In this re-write I'm changing to new Span<byte> that are not supported in older versions. If I select netstandard2.0, I need add package dependecies and still has no avaiable many methods to works with Span.

I read this blog post:

https://devblogs.microsoft.com/dotnet/announcing-net-standard-2-1/

And than, microsoft will discontinue netstandard.

https://devblogs.microsoft.com/dotnet/the-future-of-net-standard/

So, I expect using netstandard2.1 keep Xamarin users (has a large adoption), IoT, Web/Desktop apps, MAUI.

nightroman commented 2 years ago

@mbdavid Thank you, I am familiar with both blog posts. I do not read them as "Microsoft will discontinue netstandard2.0" though. I read them as it is not used/need in netX.0 but it is used/needed for .NET Framework.

Span<byte> is nice for improving memory consumptions and performance, indeed. But I have to say, these two factors did not worry me at all in LiteDB, personally. I would not trade them for the excellent ability to run anywhere in any .NET app, including .NET Framework.

I hope the decision to discontinue supporting .NET Framework in LiteDB is well thought through. The embeddable product is going to be much less embeddable. .NET Framework apps will be here and there for some very long time.

nightroman commented 2 years ago

I've got the answer, thank you. Please feel free to close or keep open for more discussion.

saint4eva commented 2 years ago

Kindly target .NET 6, as the platforms you mentioned above support dotnet 6

Cricle commented 1 year ago

I think Since EFCore 5.0.0 only target .NET Standard2.1 Since EFCore 6.0.0 only target .NET 6

This may be a trend