Git Product home page Git Product logo

sn-tools's Introduction

Welcome to sensenet

sensenet is a content repository with API first approach packed with a full featured permission system, preview and collaboration tools.

Join the chat at https://gitter.im/SenseNet/sensenet

A basic setup of sensenet has three top-level parts:

  • A content repository that is the storage and service layer
  • An application that uses the content of the connected content repository through API calls
  • A sensenet admin surface (only in SNaaS) that helps you carry out common content management tasks

SNaaS architecture

Everything is content

Content is the basic block for storing information in sensenet. A content can be any kind of data, user, document, workspace, memo, task, and more. Using content items everywhere unlocks a great deal of exceptional features, making your experience as a user more seamless, and your job as a developer a lot easier.

Licensing

SNaaS (sensenet as a service)

In this model, sensenet content repositories live in our cloud infrastructure.

Advantages

  • no installation required (easy onboarding)
  • patches and upgrades are taken care of by us
  • no hosting related tasks
  • central admin surface
  • flexible pricing plans (based on # of contents, requests, and users)

on-prem

For the terms of on-prem licensing please contact our sales team.

Resources

Check out the links below to get further information:

Contributing

All kinds of contributions are welcome! We are happy if you have an idea, bugfix or feature request to share with others. Please check out our Contribution guide for details.

sn-tools's People

Contributors

gitter-badger avatar herflis avatar huszerlbence avatar kavics avatar pcodex avatar tusmester avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sn-tools's Issues

More readable eventlog file

There are two missing newline chars in the event log files. For example the current:

...
SpecialUserName - SYSTEM
WorkingMode - SnAdmin
SnTrace - #e9ada2d3-287c-466e-9c2f-e0c4ad4b850cTimestamp: 2020. 06. 13. 1:00:45
Message: NodeTypeManager.Restart called.
Category: General
...

Expected:

...
SpecialUserName - SYSTEM
WorkingMode - SnAdmin
SnTrace - #e9ada2d3-287c-466e-9c2f-e0c4ad4b850c

Timestamp: 2020. 06. 13. 1:00:45
Message: NodeTypeManager.Restart called.
Category: General
...

SnTrace providers

Currently we write trace messages to the file system. In a cloud environment this is not the best solution. We should keep the file system writer as the default, but let 3rd party developers create custom providers.

  • refactor the current solution to an independent package: SnFileSystemTraceProvider
  • create a new built-in trace provider that writes to the console: SnConsoleTraceProvider
  • documentation

A new cloud-friendly provider that sends messages to a remote service is a separate issue.

Feature availability API

We need a generic api that lets "features" register themselves so that sensenet can check their status. This new api will support two scenarios:

  • feature flags on the UI: whether a UI element should be displayed, is the feature already available in that repository?
  • health check api: provide up-to-date information about feature availability (is a feature available, and if not, why).

Cleanup missing XML doc warnings in Tools

When building the Tools project there are many warnings about missing docs from public apis. Real warnings may get lost in the noise.

Clean up those warnings either by suppressing messages or providing real docs.

Configuration API: SectionName attribute should be optional

Currently it is mandatory to use the SectionName attribute when you create a custom config class that inherits the SnConfig base class. It would be nice if we used the class name as the section name as a fallback.

  • the section prefix (the main section that contains subsections) is still needed, but that could be provided through the IConfigProvider interface
  • classname to section name automatic conversion: class name is Pascal case (WebApplication), default section name is Camel case (webApplication).

Diagnostics async API

Extend the current event + trace API with async operations to let callers write more resource-friendly apps.

More info if TypeResolver throws a ReflectionTypeLoadException

When TypeResolver throws a ReflectionTypeLoadException because of one of the libraries, we get only this much information:

ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

It would be helpful if we converted this well-known exception internally into a more descriptive exception, so that the caller knows what is wrong. Ideally the message of the new wrapper exception would contain the list of specific dlls extracted from the LoaderExceptions property.

Configuration dependency update

Remove the project's dependency on the old ConfigurationManager reference and use the new mutation available in .Net Standard.

No need to change anything, just reference the System.Configuration.ConfigurationManager nuget package and both GetSection and AppSettings are available.

Add a generic ILogger implementation

We need SnEventLogger and SnTracer implementations that will route the current SnLog and SnTrace messages to the currently registered ILogger instance.

Port email sender from sensenet to the Tools package

As a developer I want to access the Email sender feature from outside of the main sensenet application - so we have to move the EmailSender and related classes to the Tools package.

  • interface and default implementation based on the current API
  • async API
  • dev implementation that only logs the email, without connecting to a mail server
  • multiple To email addresses when sending a single mail
  • attachments

System.IO.DirectoryNotFoundException

Symptom

A DirectoryNotFoundException was thrown during the very first running of a brand new web application when the system trying to write the eventlog.

Reason

Platform-dependent path concatenation. The string literal contains a path separator character that used only in the windows platforms but the environment uses a different separation. So the result path will be invalid:
/app/bin/Debug/netcoreapp3.0/App_Data\EventLog (see the last separator char).

Resolution

Fix the path concatenation in the SenseNet.Tools: SenseNet.Diagnostics.SnFileSystemEventLogger.cs ln:46
Use this instruction:
Path.Combine(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data"),"EventLog")
instead of the original:
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data\\EventLog");

Port exceptions from Services

Move the base exception class (RepositoryException) from Services here with a more generic name. Its main feature is to hold an error number (eventid) that can be different for each derived exception class.

  • ExceptionBase abstract class
  • move general-purpose child classes from Services (SnNotSupported, Configuration, etc.)
  • handle ReflectionTypeLoad exception in a smarter way when logging exceptions
  • use error number (eventid) from ExceptionBase when logging exceptions (SnLog.WriteException)

Use the new IConfiguration api in SnConfig

Open the SnConfig api to let developers set a standard IConfiguration instance as the config provider. This is necessary if we want to let .Net Core developers use the platform.

Acceptance

A standard IConfiguration config provider can be configured in one line in the startup process of an Asp.Net web app that reads all config values from a custom source instead of web.config.

EventLog dependency update

Remove the project's dependency on the old EventLog reference and use the new api available in .Net Standard (EventSource?).

Update

Try this package, it adds the eventlog api to .Net Standard: System.Diagnostics.EventLog

Convert the Tools project to a .Net Standard library

Convert the current project to a .Net Standard library.

  • tests should work
  • the library can be referenced from a .Net Framework and a .Net Core project
  • a new package build should create a new nuget package, containing a single library that targets netstandard2.0

IRepositoryBuilder interface

To support 3rd party components' registration during app start, we need a common interface that is implemented by the RepositoryBuilder class in sensenet. The purpose of this interface is to let 3rd party developers create extension methods for the app start process.

It has to be here because not all components need a reference to the main Services component - for example the ones created for the security component.

The interface should let developers set providers and access providers set previously by the fluent api. This will be useful in cases when a provider cannot be initialized using its constructor or the developers wants to change a setting on a previously set provider.

public interface IRepositoryBuilder
{
   T GetProvider<T>() where T : class;
   T GetProvider<T>(string name) where T : class;
   void SetProvider(string providerName, object provider);
   void SetProvider(object provider);
}

Acceptance

  • documentation with an example extension method

Example

public class RepoExtensions
{
   public IRepositoryBuilder UseMongoDbProvider(this IRepositoryBuilder repoBuilder)
   {
      var mdb = new MongoDbProvider();
      mdb.Initialize();

      repoBuilder.SetProvider(mdb);
      return repoBuilder;
   }

   public IRepositoryBuilder ModifyMongoDbProvider(this IRepositoryBuilder repoBuilder)
   {
      var mdb = repoBuilder.GetProvider<MongoDbProvider>();
      mdb.SetValue();
      mdb.Initialize();

      return repoBuilder;
   }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.