Comments (8)
Thank you for the nice complement. I really much appreciated your kind words.
While the original interfaces and abstract was in the NuGet package Wangkanai.Detection.Core
when 2.0 was released and is still the most package i have on NuGet. https://github.com/wangkanai/wangkanai/tree/release/2.0/src/Detection.Core/src, Interesting the library didn't serve much use much benefits within the whole Wangkanai.Detection
itself.
But, nevertheless. I'm very curious about your needs and why you need just the abstraction package in your module project. Because the whole Wangkanai.Detection
is so light weight already 69kb vs 44Kb. There must be something I am missing right?
I had a quick looked at the project you are working https://github.com/CrestApps/OrchardCore that is very promising and following principle of single responsibility.
I'm looking forward to hear back from you.
from wangkanai.
Hi @wangkanai,
First, I'd also like to thank you for putting together this library. It's definitely made tracking browser information much simpler for our analytics.
I'm not the original poster, but I was just looking at something similar from a different angle. I found this issue while doing a supply-chain audit for our internal products. This is to verify what all of our dependencies are so we could know what projects we would need to track for vulnerability alerts and license notifications.
It appears that while Wangkanai.Detection
is indeed lightweight, it references Wangkanai.WebServer
, which in turn references the Microsoft.EntityFrameworkCore.SqlServer
package, which pulls in not only EF, but also the SQL Server clients, and their native dependencies (~5MB of libraries, all together).
This might be the source of the concern from the OP, or it could also be about allowing them to create modules that don't have to reference the ASP.NET Core framework - or any of the other dependencies that the Detection package requires like the DI registration or configuration - at all.
Additional details on the dependency chain:
As far as I have been able to determine, the whole usage of the Wangkanai.WebServer
project in the Wangkanai.Detection
library is here: https://github.com/wangkanai/wangkanai/blob/main/Detection/src/DependencyInjection/DetectionApplicationExtensions.cs#L27
where an extension method used to check that a marker service is registered in the container.
Additionally, it appears that the EF package is only pulled in to support a IApplicationBuilder extension to trigger EF migrations, which is only used (at least in this repository) in a commented out line in the test project for the WebServer
package.
I'd be happy to contribute a PR that cleans up those dependencies (and lifts a copy of the marker check method into the Detection
library) if they're truly unneeded. I wasn't sure if there was another project that wasn't in this repo that depended on the WebServer
project and/or it's migration helpers, and didn't just want to drop an unsolicited PR if there was a reason for it.
Thanks!
from wangkanai.
Hi @wangkanai,
The project https://github.com/CrestApps/OrchardCore provides provides a modular framework. So I created a module that would provide browser detection in my app obviously depending on your project. This module would register any of the required services.
Now if any of my other modules need browser detection, all it needs is an access to the interface like IDetectionService
to be able to detect the browser. No other module care about the implementations or default services. For that reason, I suggest we move out the interfaces into Abstractions package to reduce the dependencies needed and also make maintenance such as upgrade a bit easier.
from wangkanai.
Hi @wangkanai,
First, I'd also like to thank you for putting together this library. It's definitely made tracking browser information much simpler for our analytics.
I'm not the original poster, but I was just looking at something similar from a different angle. I found this issue while doing a supply-chain audit for our internal products. This is to verify what all of our dependencies are so we could know what projects we would need to track for vulnerability alerts and license notifications.
It appears that while
Wangkanai.Detection
is indeed lightweight, it referencesWangkanai.WebServer
, which in turn references theMicrosoft.EntityFrameworkCore.SqlServer
package, which pulls in not only EF, but also the SQL Server clients, and their native dependencies (~5MB of libraries, all together).This might be the source of the concern from the OP, or it could also be about allowing them to create modules that don't have to reference the ASP.NET Core framework - or any of the other dependencies that the Detection package requires like the DI registration or configuration - at all.
Additional details on the dependency chain:
As far as I have been able to determine, the whole usage of the
Wangkanai.WebServer
project in theWangkanai.Detection
library is here: https://github.com/wangkanai/wangkanai/blob/main/Detection/src/DependencyInjection/DetectionApplicationExtensions.cs#L27 where an extension method used to check that a marker service is registered in the container.Additionally, it appears that the EF package is only pulled in to support a IApplicationBuilder extension to trigger EF migrations, which is only used (at least in this repository) in a commented out line in the test project for the
WebServer
package.I'd be happy to contribute a PR that cleans up those dependencies (and lifts a copy of the marker check method into the
Detection
library) if they're truly unneeded. I wasn't sure if there was another project that wasn't in this repo that depended on theWebServer
project and/or it's migration helpers, and didn't just want to drop an unsolicited PR if there was a reason for it.Thanks!
@nkilzer Thank you very much for your breakdown analysis. I'm very much appreciate it. I was trying not to duplicate my code and reuse them as much as possible.
Also it would be an great honor if you could come and help contribute to the project.
from wangkanai.
from wangkanai.
Hi @wangkanai,
The project https://github.com/CrestApps/OrchardCore provides provides a modular framework. So I created a module that would provide browser detection in my app obviously depending on your project. This module would register any of the required services.
Now if any of my other modules need browser detection, all it needs is an access to the interface like
IDetectionService
to be able to detect the browser. No other module care about the implementations or default services. For that reason, I suggest we move out the interfaces into Abstractions package to reduce the dependencies needed and also make maintenance such as upgrade a bit easier.
Okay, I can now understand the issue and its make sense to have no dependency on thing that are not required.
from wangkanai.
Hi @wangkanai,
First, I'd also like to thank you for putting together this library. It's definitely made tracking browser information much simpler for our analytics.
I'm not the original poster, but I was just looking at something similar from a different angle. I found this issue while doing a supply-chain audit for our internal products. This is to verify what all of our dependencies are so we could know what projects we would need to track for vulnerability alerts and license notifications.
It appears that whileWangkanai.Detection
is indeed lightweight, it referencesWangkanai.WebServer
, which in turn references theMicrosoft.EntityFrameworkCore.SqlServer
package, which pulls in not only EF, but also the SQL Server clients, and their native dependencies (~5MB of libraries, all together).
This might be the source of the concern from the OP, or it could also be about allowing them to create modules that don't have to reference the ASP.NET Core framework - or any of the other dependencies that the Detection package requires like the DI registration or configuration - at all.
Additional details on the dependency chain:
As far as I have been able to determine, the whole usage of theWangkanai.WebServer
project in theWangkanai.Detection
library is here: https://github.com/wangkanai/wangkanai/blob/main/Detection/src/DependencyInjection/DetectionApplicationExtensions.cs#L27 where an extension method used to check that a marker service is registered in the container.
Additionally, it appears that the EF package is only pulled in to support a IApplicationBuilder extension to trigger EF migrations, which is only used (at least in this repository) in a commented out line in the test project for theWebServer
package.
I'd be happy to contribute a PR that cleans up those dependencies (and lifts a copy of the marker check method into theDetection
library) if they're truly unneeded. I wasn't sure if there was another project that wasn't in this repo that depended on theWebServer
project and/or it's migration helpers, and didn't just want to drop an unsolicited PR if there was a reason for it.
Thanks!@nkilzer Thank you very much for your breakdown analysis. I'm very much appreciate it. I was trying not to duplicate my code and reuse them as much as possible.
Also it would be an great honor if you could come and help contribute to the project.
I have refactor this dependency from Wangkanai.Webserver
to Wangkanai.Hosting
now with the release of 5.3.0. Therefore, now there are no dependenc to entity framework sqlserver now.
from wangkanai.
@CrestApps Please see if Wangkanai.Detection
release fit your requirements. Because for me adding another package with just the abstractions for such a small contracts doesn't really provide much benefits. I have tried this approach with nuget package Wangkanai.Detection.Core. If I'm making something big like yours, I can see the huge benefits.
But let open this topic to discussion. I would like to hear more about it.
from wangkanai.
Related Issues (20)
- Why you have dependency on Session? I can't use it in .NET 6 Project HOT 9
- Problem getting Browser Info after Publishing HOT 11
- Opera detects as Chrome due to wrong UA expected HOT 1
- Detection
- Does not detect IPad Pro and Air mobile websites. HOT 2
- Add support for user agent detection from within a Blazor WebAssembly HOT 1
- iPadOS - Apple typo causes detection as version zero HOT 7
- Detection will drop support for .net core 3.1 on December 13th, 2022
- viewname.Mobile.cshtml views no longer used after upgrading from .NET Core 3.1 to .NET 7 and latest Detection version HOT 3
- [Federation] shall enforce Proof Key for Code Exchange (PKCE) as default
- [Federation] DbContext for configuration should be separate from persistent
- [Federation] IdentityClient essential configuration information
- [Federation] OAuth 2.X Flows
- [Federation] OpenID Connect authentication flows
- [Federation] Backend for Frontend web proxy
- [Federation] JWT as default
- [Federation] Organization should be the default
- [Federation] YARP - Yet Another Reverse Proxy
- [Federation] Persistent storage for Backend for Frontend
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wangkanai.