Giter Club home page Giter Club logo

zkweb's Introduction

ZKWeb

Codacy Badge Build Status Build status NuGet MyGet Pre Release

ZKWeb is a flexible web framework for .NET Framework and .NET Core.

Why created this framework?

  • I want a better plugin system, one folder one plugin just like django
  • I want an independent mvc framework, because MS change their architecture too often
  • I want a powerful template system enough to implemente a visual page editor

Features

  • .NET Core Support
    • Support both .NET Framework and .NET Core
  • Plugin System
    • One folder one plugin, each contains everything it needs
    • Automatic compile and reload after source code has changed
    • Based on Roslyn compiler
  • Template System
    • Django style overlapping template file system
      • One plugin can just override other plugin's template
    • Template specialization for mobile or pc
    • Area-Widget style dynamic contents system
      • Able to implement a visual page editor based on this feature
    • Per-widget render cache
      • Most times it's better than cache the whole page
    • Based on DotLiquid
  • IoC Container
    • Fast
    • Provide IServiceProvider integration
    • ZKWeb own implementation
  • Multiple Host Environment
    • Support Asp.NET
    • Support Asp.NET Core
    • Support Owin
    • Use the common abstraction layer can make a plugin support all of this without different code
  • Multiple ORM
    • Support Dapper
    • Support EntityFramework Core (with full automatic database migration)
    • Support InMemory
    • Support MongoDB
    • Support NHibernate (with full automatic database migration)
    • Use the common abstraction layer can make a plugin support all of this with less different code
  • Localization
    • Multi-language support, with gettext style translation
    • Multi-timezone support
  • Caching
    • Policy based isolated cache
      • Isolated by device, request url, and more...
    • Abstraction layer for key-value cache
  • File Storage
    • Abstraction layer for file storage
  • Testing
    • Console and web test runner
    • Support IoC container overridden
    • Support Http context overridden
    • Support temporary database
  • Project Toolkits
    • Project Creator
    • Website Publisher
  • Linux support
    • Ubuntu 16.04 LTS 64bit
    • CentOS 7.2 64bit
    • Fedora 24 64bit

Features from the default plugin collection

  • Form generation and validation
  • Ajax table generation
  • CRUD page scaffolding
  • Scheduled Tasks
  • Captcha
  • Admin Panel
  • Automatic pesudo static
  • Multi-Currency and Region
  • And More...

Getting Started

In Short:
Open 'Tools\ProjectCreator.Gui.Windows\ZKWeb.Toolkits.ProjectCreator.Gui.exe' and create the project.

project creator

You can read README.md under Tools first, for more information please see the documents.
For now there only chinese documents, if you can't read chinese please ask the questions in 'Issues'.
For those chinese software engineers, is recommended to join QQ group 522083886 for further discuss.

Packages

  • ZKWeb: NuGet
  • ZKWeb.Hosting.AspNet: NuGet
  • ZKWeb.Hosting.AspNetCore: NuGet
  • ZKWeb.Hosting.Owin: NuGet
  • ZKWeb.ORM.Dapper: NuGet
  • ZKWeb.ORM.EFCore: NuGet
  • ZKWeb.ORM.InMemory: NuGet
  • ZKWeb.ORM.MongoDB: NuGet
  • ZKWeb.ORM.NHibernate: NuGet

Links and License

Plugins: https://github.com/zkweb-framework/ZKWeb.Plugins
Documents: https://zkweb-framework.github.io (Chinese)
References: https://zkweb-framework.github.io/cn_v2.0/references/zkweb/ZKWebReferences.chm

MIT License
Copyright © 2016~2019 303248153@github
If you have any license issue please contact [email protected].

zkweb's People

Contributors

303248153 avatar codacy-badger avatar dudes-come avatar hunjixin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zkweb's Issues

IOC resolve abstract class throw exception

	public abstract class ClassService {
		public abstract string GetName();
	}

        [ExportMany(ContractKey = "d")]
        public class TestResolveFromAbstract : ClassService
        {
            public override string GetName()
            {
                return "sunny";
            }
        }

        Assert.Equals(container.Resolve<ClassService>(IfUnresolved.Throw, "d").GetName(), "sunny");

The exception message:
no factory registered to type ZKWebStandard.Tests.IocContainer.ContainerTest+ClassService and service key d

How to using RESTful API in ZKWeb?

The ActionAttribute's path format is '/something',
But I want to use 'GET /something' and 'GET /something/{id}' to create RESTful API.
What should I do?
Thank you very muuuuuuuuch!

add ZKMod project

This is a very early idea that may not eventually be realized.
To resolve early design mistakes in zkweb project, I want to create a new project called ZKWebZero, it should contain the following features:

  • Supports automatic resolution of dependencies between plugins
  • Supports automatic discover plugins in specified directories
  • Support real hot reload of plugins (without restarting process)
    • This can be very tricky, for example:
      • A provides IService, B provides ServiceImpl, C uses IService, then
      • When A changed, all of A, B, C should recompile and reload
      • When B changed, service entries in the container should be replaced, and proxy instances of IService should invalidate the real target and resolve it again from the container, we can track proxy instances by weak references
    • basically we need:
      • module aware container
      • proxy class of service types (require interface or all public members are virtual)
      • support custom logic on plugin load and unload
    • and yeah, memory leak will happen because .net doesn't really support assembly unload, we still need restart the process under certain conditions
  • Separate functions to plugins such as template, orm and mvc, the core should only contains plugin system and http request entry point
  • No global veriables at all, that means we need to eliminate the class Application
  • Use xunit for unit testing
  • Provide legacy layer in Framework.ZKWebLegacy plugin for compatibility with legacy plugins
  • Provide asp.net core and razor template engine support in Framework.AspnetCore plugin
  • Provide nancy support in Framework.Nancy plugin

addition ideas

  • mvcc reference counted container maybe a better solution
  • rename the term plugin to module
  • test app domain unloading on netcore 2.0 with linux, if pass then test object serializing
  • if plugins need to be managed in single app domain, decide how to load multi version assemblies
  • rewrite old plugins of legacy zkweb is unacceptable

This is a long term job, you can add your opinion if you saw this issue, but don't expect it to be available soon.

2.1 release tasks

  • make ZKWeb.ORM.NHibernate supports netstandard 2.0
  • update other packages
  • add nhibernate logging support
  • add mongodb logging support
  • update toolkit
  • release beta
    • update project templates
    • test dapper
    • test efcore
    • test nhibernate (on linux)
    • test mongodb
  • update document
  • bump version
  • update zkweb.demo
  • update zkweb.home
  • update zkweb.mvvmdemo

update to .net core 2.1

includes ef core 2.1 and other packages.
the libraries itself should still target to netstandard 2.0.

update project creator

aspnet and owin template with ${} variable is hard to update,
next version should use templates that are actually runnable.

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.