Skip to content

Releases: zkweb-framework/ZKWeb

3.0.0 Final

16 Oct 07:22
Compare
Choose a tag to compare

Changes

  • Update framework
    • update netcoreapp2.2 to netcoreapp3.0
    • supported framework: net461, netcoreapp2.0, netcoreapp3.0
    • notice: efcore 3.0 only works on netcoreapp3.0, net461 will use efcore 2.2 instead
      it's recommended to use nhibernate because it's much stable and have backward compatibility
    • notice: if you upgrade from an exists Asp.NET Core project and set the framework to netcoreapp3.0,
      please replace .UseKestrel() to .UseKestrel(options => options.AllowSynchronousIO = true)
      in Program.cs under {ProjectName}.AspNetCore project.
  • Add plugin hot reloading support for .NET Core 3.0
    • notice: it will disable lazy loading support for efcore (see #18272 in efcore repo)
      as a workaround, you can disable plugin reloading by setting
      "Extra"."ZKWeb.DisableAutomaticPluginReloading" to true in App_Data/config.json
    • there no hot reloading support for .NET Framework because microsoft will drop it in the future
  • Update packages
    • Microsoft.Extensions.DependencyInjection.Abstractions 3.0.0
    • Newtonsoft.Json 12.0.2
    • System.Drawing.Common 4.6.0
    • Microsoft.CodeAnalysis.CSharp 3.3.1
    • Microsoft.CSharp 4.6.0
    • Microsoft.Extensions.DependencyModel 3.0.0
    • Microsoft.Owin 4.0.1
    • Dapper 2.0.30
    • Dommel 1.11.0
    • Dapper.FluentMap 1.8.0
    • Dapper.FluentMap.Dommel 1.7.0
    • Microsoft.Data.Sqlite 3.0.0
    • Npgsql 4.1.0
    • MySqlConnector 0.59.1
    • Microsoft.EntityFrameworkCore 3.0.0
    • Microsoft.EntityFrameworkCore.Design 3.0.0
    • Microsoft.EntityFrameworkCore.InMemory 3.0.0
    • Microsoft.EntityFrameworkCore.Sqlite 3.0.0
    • Microsoft.EntityFrameworkCore.SqlServer 3.0.0
    • Microsoft.EntityFrameworkCore.Proxies 3.0.0
    • Npgsql.EntityFrameworkCore.PostgreSQL 3.0.0
    • Pomelo.EntityFrameworkCore.MySql 2.2.0
    • MongoDB.Driver 2.9.2
    • NHibernate 5.2.6
    • MySql.Data 6.10.9
    • System.Data.SQLite 1.0.111

2.2.1 Final

24 May 04:53
Compare
Choose a tag to compare

Changes

  • Improve EFCore Support
    • Enable WithSerialization option for entity mapping builder
    • Enable lazy loading

2.2.0 Final

24 Dec 00:39
Compare
Choose a tag to compare

Changes

  • Refactory Container
    • Make it lock free
    • (Break Change) Use ContainerFactoryData to create instance
    • (Break Change) Remove static ContainerFactoryCache to simplify code
    • (Break Change) Update interface IMultiConstructorResolver
    • (Break Change) Update interface IRegistrator
  • Update Web Server
    • (Break Change) Avoid use exception to indicates response end
      • There no guarantee that HttpManager.CurrentContext.Response.End will throw an exception
      • To check response is ended, read property HttpManager.CurrentContext.Response.IsEnded
  • Update Tests
    • Add more assertion type to Assert class
    • Move test cases under ZKWeb and ZKWebStandard project to standalone assembly
    • Improve error message for test failure
    • Add Scenario class for BDD
    • Rewrite some tests in BDD style for readability
  • Update Utilities
    • Use thread local random generator in RandomUtils class
    • Use concurrent dictionary and remove rwlock form MemoryCache class
    • Use memory barrier in LazyCache class
    • Remove finalizer from SimpleDisposable class to make it really simple
  • Update Project Templates
    • Make project templates support inplace upgrade
    • Make ASP.NET Core startup projects require .NET Core 2.2
  • Update ORM
    • Use offical System.Data.SQLite again for NHibernate because the new version supports netstandard
  • Update Packages
    • Microsoft.CodeAnalysis.CSharp 2.10.0
    • Newtonsoft.Json 12.0.1
    • System.Drawing.Common 4.5.1
    • Microsoft.DiaSymReader.PortablePdb 1.5.0
    • Microsoft.AspNetCore.Hosting.Abstractions 2.2.0
    • Microsoft.AspNetCore.Http.Abstractions 2.2.0
    • Microsoft.Extensions.DependencyInjection 2.2.0
    • Microsoft.Extensions.DependencyInjection.Abstractions 2.2.0
    • System.Net.Http 4.3.4
    • Dapper.FluentMap 1.7.0
    • Dapper.FluentMap.Dommel 1.6.0
    • Microsoft.Data.Sqlite 2.2.0
    • Npgsql 4.0.3
    • MySqlConnector 0.47.1
    • Microsoft.EntityFrameworkCore 2.2.0
    • Microsoft.EntityFrameworkCore.Design 2.2.0
    • Microsoft.EntityFrameworkCore.InMemory 2.2.0
    • Microsoft.EntityFrameworkCore.Sqlite 2.2.0
    • Microsoft.EntityFrameworkCore.SqlServer 2.2.0
    • Npgsql.EntityFrameworkCore.PostgreSQL 2.1.2
    • Pomelo.EntityFrameworkCore.MySql 2.1.4
    • MongoDB.Driver 2.7.2
    • NHibernate 5.2.0
    • MySql.Data 6.10.8
    • System.Data.SQLite 1.0.109.2

2.1.1 Final

24 Jun 01:46
Compare
Choose a tag to compare

Changes

  • Update packages
    • Npgsql 4.0.0
    • MySqlConnector 0.42.0
    • Microsoft.Data.Sqlite 2.1.0
    • Dapper 1.50.5
    • MongoDB.Driver 2.6.1
    • MySql.Data 6.10.7
    • NHibernate 5.1.3
    • Microsoft.EntityFrameworkCore 2.1.0
    • Npgsql.EntityFrameworkCore.PostgreSQL 2.1.0
    • Microsoft.EntityFrameworkCore.Sqlite 2.1.0
    • Microsoft.EntityFrameworkCore.Design 2.1.0
    • Microsoft.EntityFrameworkCore.SqlServer 2.1.0
    • Microsoft.EntityFrameworkCore.InMemory 2.1.0
    • Microsoft.Extensions.DependencyModel 2.1.0
    • Microsoft.Extensions.DependencyInjection 2.1.0
    • Microsoft.Extensions.DependencyInjection.Abstractions 2.1.0
    • Microsoft.AspNetCore.Http.Abstractions 2.1.0
    • Microsoft.AspNetCore.Hosting.Abstractions 2.1.0
    • Newtonsoft.Json 11.0.2
    • Microsoft.CodeAnalysis.CSharp 2.8.2
  • Recompile all plugins when zkweb version changed

Break Changes

  • Switch to official FluentnHibernate since they added .Net Core support
    • No code level change required
  • Switch to official System.Drawing.Common
    • Please replace "using System.DrawingCore" to "using System.Drawing"

2.1.0 Final

22 Mar 09:09
Compare
Choose a tag to compare

Changes

  • Update packages
    • NHibernate 5.1.0
    • Npgsql 3.2.7
    • MySqlConnector 0.37.0
    • Dapper 1.50.4
    • Dommel 1.10.1
    • ZKWeb.System.Drawing 4.0.1
    • ZKWeb.Fork.FluentNHibernate 2.1.1
    • MongoDB.Driver 2.5.0
    • Microsoft.EntityFrameworkCore 2.0.2
    • Microsoft.EntityFrameworkCore.Design 2.0.2
    • Microsoft.EntityFrameworkCore.InMemory 2.0.2
    • Microsoft.EntityFrameworkCore.Sqlite 2.0.2
    • Microsoft.EntityFrameworkCore.SqlServer 2.0.2
    • Npgsql.EntityFrameworkCore.PostgreSQL 2.0.1
    • Pomelo.EntityFrameworkCore.MySql 2.0.1
    • System.Security.Cryptography.Algorithms 4.3.1
    • Microsoft.CodeAnalysis.CSharp 2.7.0
    • Microsoft.DiaSymReader.Native 1.7.0
    • Microsoft.DiaSymReader.PortablePdb 1.4.0
    • Microsoft.CSharp 4.4.1
    • Microsoft.Extensions.DependencyModel 2.0.4
    • Microsoft.CodeAnalysis.CSharp 2.6.1
    • Microsoft.AspNetCore.Hosting.Abstractions 2.0.2
    • Microsoft.AspNetCore.Http.Abstractions 2.0.2
    • MySql.Data 6.10.6
    • Microsoft.Data.Sqlite 2.0.1
    • Microsoft.Owin 4.0.0
    • Newtonsoft.Json 11.0.1
  • Bug fixes
    • Fix state didn't reset during EFCore dbcontext reusing
  • Improve plugin system
    • Support disable automatic plugin relodaing
    • Provide a method to decide which plugin to load
  • Improve ORM
    • Change dapper's mysql provider to MySqlConnector (previous is Pomelo.Data.MySql)
    • ZKWeb.ORM.NHibernate now supports .net standard 2.0 (except with sqlite)
    • Support command logger (see IDatabaseContext.CommandLogger)
      • Dapper: Log insert, update, delete and select
      • EFCore: Log insert, update, delete and select
      • InMemory: No logging
      • MongoDB: Log commands in json format
      • NHibernate: Log insert, update, delete and select
  • Improve routing system
    • Support register action by method and class name
    • Rules:
      • Class without [ActionBase], method with [Action("abc")] => /abc (for backward compatibility)
      • Class without [ActionBase], method without [Action] => /$controller/$action
      • Class without [ActionBase], method Index without [Action] => /$controller, /$controller/Index
      • Class with [ActionBase("abc")], method with [Action("index")] => /abc/index
      • Class with [ActionBase("abc")], method without [Action] => /abc/$action
      • Class with [ActionBase("abc")], method Index without [Action] => /abc, /abc/Index
  • Add electron based project creator (thanks to @hunjixin)

How to use electron based project creator

Linux:

Extract 'ProjectCreator.Gui-linux-x64.zip' under 'ZKWeb/Tools' and open 'ProjectCreator.Gui'.

Windows:

Extract 'ProjectCreator.Gui-win32-x64.rar' under 'ZKWeb/Tools' and open 'ProjectCreator.Gui.exe'.

2.0.0 Final

19 Sep 03:59
Compare
Choose a tag to compare

Changes

  • Update framework
    • update netstandard 1.6 to netstandard 2.0
    • update netcoreapp1.1 to netcoreapp2.0
  • Update packages
    • Microsoft.AspNetCore.Hosting.Abstractions 2.0.0
    • Microsoft.AspNetCore.Http.Abstractions 2.0.0
    • Microsoft.Extensions.DependencyInjection 2.0.0
    • Microsoft.Extensions.DependencyInjection.Abstractions 2.0.0
    • Microsoft.Extensions.DependencyModel 2.0.0
    • Microsoft.Data.Sqlite 2.0.0
    • Npgsql 3.2.5
    • Microsoft.EntityFrameworkCore 2.0.0
    • Microsoft.EntityFrameworkCore.Design 2.0.0
    • Microsoft.EntityFrameworkCore.InMemory 2.0.0
    • Microsoft.EntityFrameworkCore.Sqlite 2.0.0
    • Microsoft.EntityFrameworkCore.SqlServer 2.0.0
    • Npgsql.EntityFrameworkCore.PostgreSQL 2.0.0
    • Pomelo.EntityFrameworkCore.MySql 2.0.0
    • MongoDB.Driver 2.4.4
    • ZKWeb.Repack.SQLite 1.0.104
    • Microsoft.CSharp 4.4.0
    • Microsoft.CodeAnalysis.CSharp 2.3.0
    • Newtonsoft.Json 10.0.3
    • ZKWeb.Fork.DotLiquid 2.3.0
    • ZKWeb.Fork.FastReflection 2.3.0
    • Dommel 1.9.0
    • Dapper.FluentMap 1.6.0
    • Dapper.FluentMap.Dommel 1.5.0
    • Remove NSubstitute dependency
  • Improve IoC container
    • Support scoped reuse
    • Support register Implement<> to Service<>
    • Support register services from IServiceCollection
    • Provider IServiceProvider adapter
    • Change constructor determine rule
      • First, use constructor marked with InjectAttribute
      • Second, use the only public constructor
      • Third, use runtime resolver IMultiConstructorResolver, if not exist then throw exception
    • Change constructor injection rule
      • Support Func
      • Support Lazy
      • Support List, ICollection, IEnumerable
      • Support Lazy<List>, Func<List> and so on
      • If parameter has default value, use IfUnresolved.ReturnDefault, otherwise use IfUnresolved.Throw
  • Use IServiceProvider adapted from zkweb on Asp.Net Core by default
    • Asp.Net Core and ZKWeb can use services from each other now
  • Improve controller and router
    • Respect controller reuse type in container, prior to this version controllers are treat as singleton
    • Allow override request parameters by setting IHttpRequest.CustomParameters
    • Support url parameter such as "get/{id}"
  • Improve ORM
    • Support construct context factory with custom entity types for secondary database
    • Add EFCoreDatabaseContextPool
    • Evict entities when flush failed for NHibernate

1.9.1 Final

14 Aug 04:11
Compare
Choose a tag to compare

Changes

  • Improve ORM layer
    • Allow disable database auto migration for NHibernate or EFCore
      • Add "ZKWeb.DisableEFCoreDatabaseAutoMigration": true under Extra in App_Data\config.json
      • Add "ZKWeb.DisableNHibernateDatabaseAutoMigration": true under Extra in App_Data\config.json
  • Bug fixes
    • Fix auto increment primary key support for dapper
    • Make project creator write files with utf-8 bom

1.9.0 Final

16 Jun 06:10
Compare
Choose a tag to compare

Changes

  • Update toolkit
    • Improve linux support
  • Add utility functions
    • Exception.ToDetailedString
    • Exception.ToSummaryString
    • Expression.ReplaceNode
  • Improve application initialization
    • Log emergency log when initialize failed
    • Change protect level of Initialize methods, from "internal static" to "internal protected virtual"
  • Improve template engine
    • Keep widget before and after html when render failed
  • Improve IoC container
    • Add ExportAttributeBase
  • Improve ORM layer
    • Support specify table name in mapping builder, eg: builder.TableName("MyTable")
    • Change protect level of classes, from "internal" to "public"
  • Improve visual studio support
    • Mark Response.End as DebuggerNonUserCode to make visual studio ignore the exception
  • Update project template
    • Allow Asp.Net Core hosting take configuration from command line and json
  • Bug fixes
    • Fix IFileEntry.WriteAllBytes

1.8.0 Final

05 May 09:21
Compare
Choose a tag to compare

Breaking changes

  • Upgrade ZKWeb.System.Drawing to 3.0.0
    • Please renamed System.Drawing to System.DrawingCore in your code
    • We can throw DisableImplicitFrameworkReferences option away and no longer need to face errors given by vs2017

Changes

  • Add IActionParameterProvider
    • Can be used to customize the method of getting action parameters
  • Add UseZKWeb for Asp.Net Core and Owin
  • Allow provide custom Application class
    • The initialize process can be customized now
    • Please see IApplication and DefaultApplication
  • Improve assembly dependency resolving by preload referenced assemblies
  • Improve publish tool
    • Support publish project with netcoreapp1.1
  • Bug fixes
    • Fix deserialize string to ZKWeb.Localize.T failed
    • Support dynamic keyword in plugin compilation
  • Upgrade packages
    • NSubstitute 2.0.3
    • Newtonsoft.Json 10.0.2
    • Microsoft.CodeAnalysis.CSharp 2.1.0
    • Microsoft.Owin 3.1.0
    • Pomole.EntityFrameworkCore.MySql 1.1.1

1.7.0 Final

05 May 09:20
Compare
Choose a tag to compare

Changes

  • Update project format to new csproj, you will need vs2017 to open newly created Asp.Net Core project
  • Update project templates
    • Add [SingletonReuse] to project template's Plugin class
  • Add utility classes
    • Add NetworkUtils for getting ip address
  • IoC container improvement
    • Add Container.UnregisterImplementation
    • Add InjectAttribute for manually choose constructor to inject
  • Entity framework core improvement
    • Support save detached entity that key is not empty and not exists in database
  • Wesite stopper improvement
    • Wait for requests finished before stop website up to 3 seconds
  • Support publish to other platform
    • publish tool support framework option, default is net461
  • Update packages
    Dapper.FluentMap 1.5.3
    Dapper.FluentMap.Dommel 1.4.5
    Dommel 1.8.1
    Npgsql 3.2.2
    MongoDB.Driver 2.4.3
    NSubstitute 2.0.2
    Newtonsoft.Json 10.0.1
    Microsoft.CodeAnalysis.CSharp 2.0.0
    Microsoft.Extensions.DependencyModel 1.1.1
    Microsoft.DiaSymReader.Native 1.5.0