Hello all,
I've a few comments regarding the experience of adding a RavenDB nuget package to a project. Currently, the following dependencies are added to a standard class library project:
1. AsyncCtpLibrary
2. Newtonsoft.Json
3. NLog
4. Raven.Abstractions
5. Raven.Client.Debug
6. Raven.Client.Lightweight
7. Raven.Client.MvcIntegration
8. System.ComponentModel.Composition
My initial impression is the this is a bit heavy especially if one just wants to use IDocumentStore in a few projects in a solution. I consider the RavenDB package to a 'low' level type of library, sort of similar to System.Data(.SqlClient), in that I'd expect and be as self contained as possible.
1) AsyncCtpLibrary could potentially be ilmerged and internalized into Raven.Client.Lightweight (as a post build step / psake build task). Or can use nuspec
<files> to exclude it from referenced?
2) Newtonsoft.Json has types exposed on public api such as JsonContractResolver property on DocumentConvention so not much we can do here. Would prefer my project not to see it to be honest.
3) NLog is what I would consider to be a application level dependency i.e. referenced at the composite root. I'd prefer my projects not reference it directly. Also perhaps may cause problems with different versions or a dev wants to use a different logger. I suggest an ILog interface in Raven.Abstractions and a static LogProvider instead of referencing Nog.LogManager directly in code. Can provide an NLog \ Log4Net adapter seperated or just as documentation for other users to plug in.
5) Debugger visualizer is useful, but would consider putting this in a seperate nuget package for reference by test projects, if so desired.
6) This is dependent on System.Transactions which is not declared in the package's <frameworkAssemblies>. (Will there be a Raven.Client.Heavyweight?)
7) Raven.Client.MvcIntegration - that is only of interest to Mvc projects? Seperate NuGet package perhaps? It is dependent on System.Web and System.Web.MVC which are not declared in the NuGet package <frameworkAssemblies>. Not saying they should be, just saying because...
8) Exposed by attribute on AbstractIndexCreationTask and *is* declared via <frameworkAssemblies>. So, some inconsitencies between 6 / 7 & 8.
In short what I'd like to see, or as close as possible, is just these references added:
1. Raven.Abstractions
2. Raven.Client.Lightweight
You thoughts please?
Btw, I reserve the right to be wrong and of course willing to do any work as a result of this discussion :)
Cheers,
- Damian