All Projects → i4004 → Simplify.Web

i4004 / Simplify.Web

Licence: LGPL-3.0 license
Moved to https://github.com/SimplifyNet. Simplify.Web is a lightweight and fast server-side .NET web-framework based on MVC and OWIN for building HTTP based web-applications, RESTful APIs etc.

Programming Languages

C#
18002 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
typescript
32286 projects
Smarty
1635 projects
CSS
56736 projects
Vue
7211 projects

Projects that are alternatives of or similar to Simplify.Web

Jkmvc
Jkmvc is an elegant, powerful and lightweight MVC & ORM framework built using kotlin. It aims to be swift, secure, and small. It will turn java's heavy development into kotlin's simple pleasure. No spring.
Stars: ✭ 86 (+273.91%)
Mutual labels:  mvc, web-framework
Mojo
✨ Mojolicious - Perl real-time web framework
Stars: ✭ 2,298 (+9891.3%)
Mutual labels:  mvc, web-framework
Denovel
A Deno Framework For Web Artisan - Inspired by Laravel
Stars: ✭ 128 (+456.52%)
Mutual labels:  mvc, web-framework
Actframework
An easy to use Java MVC server stack
Stars: ✭ 690 (+2900%)
Mutual labels:  mvc, web-framework
Amber
A Crystal web framework that makes building applications fast, simple, and enjoyable. Get started with quick prototyping, less bugs, and blazing fast performance.
Stars: ✭ 2,345 (+10095.65%)
Mutual labels:  fast, web-framework
Cakephp
CakePHP: The Rapid Development Framework for PHP - Official Repository
Stars: ✭ 8,453 (+36652.17%)
Mutual labels:  mvc, web-framework
Thinkgo
A lightweight MVC framework written in Go (Golang).
Stars: ✭ 184 (+700%)
Mutual labels:  mvc, web-framework
Polyel-Framework
⚡️ Voltis Core: A PHP framework based on Swoole from the ground up
Stars: ✭ 22 (-4.35%)
Mutual labels:  mvc, web-framework
Gramework
Fast and Reliable Golang Web Framework
Stars: ✭ 354 (+1439.13%)
Mutual labels:  fast, web-framework
Kemal
Fast, Effective, Simple Web Framework
Stars: ✭ 3,227 (+13930.43%)
Mutual labels:  fast, web-framework
Iris
The fastest HTTP/2 Go Web Framework. AWS Lambda, gRPC, MVC, Unique Router, Websockets, Sessions, Test suite, Dependency Injection and more. A true successor of expressjs and laravel | 谢谢 https://github.com/kataras/iris/issues/1329 |
Stars: ✭ 21,587 (+93756.52%)
Mutual labels:  mvc, web-framework
fano
Pascal web application framework
Stars: ✭ 90 (+291.3%)
Mutual labels:  web-framework, web-application-framework
Hunt Framework
A Web framework for D Programming Language. Full-stack high-performance.
Stars: ✭ 256 (+1013.04%)
Mutual labels:  mvc, web-framework
Butterfly
🔥 蝴蝶--【简单】【稳定】【好用】的 Python web 框架🦋 除 Python 2.7,无其他依赖; 🦋 butterfly 是一个 RPC 风格 web 框架,同时也是微服务框架,自带消息队列通信机制实现分布式
Stars: ✭ 82 (+256.52%)
Mutual labels:  mvc, web-framework
mojo.js
🦄 The Mojolicious real-time web framework for Node.js
Stars: ✭ 145 (+530.43%)
Mutual labels:  mvc, web-framework
Proteus
Lean, mean, and incredibly fast JVM framework for web and microservice development.
Stars: ✭ 178 (+673.91%)
Mutual labels:  mvc, web-framework
Joy
A full stack web framework written in janet
Stars: ✭ 327 (+1321.74%)
Mutual labels:  web-framework, web-application-framework
Revel
A high productivity, full-stack web framework for the Go language.
Stars: ✭ 12,463 (+54086.96%)
Mutual labels:  web-framework, web-application-framework
framework
Cygnite PHP Framework- A Modern Toolkit For Web Developers
Stars: ✭ 43 (+86.96%)
Mutual labels:  fast, web-framework
Clevergo
👅 CleverGo is a lightweight, feature rich and high performance HTTP router for Go.
Stars: ✭ 246 (+969.57%)
Mutual labels:  fast, web-framework

This project is moved to https://github.com/SimplifyNet/Simplify.Web

Simplify.Web

Simplify

Simplify.Web is a lightweight and fast server-side .NET web-framework based on MVC and OWIN patterns for building HTTP based web-applications, RESTful APIs etc.

It can be used as:

  • An API backend framework
  • As a mix of API backend + some SPA front end like Angular
  • As an old way backend generated web-site

It can be hosted:

  • The same way as an ApsNetCore MVC application (On IIS, or as a console application)
  • Inside a windows service

This project is a continuator of AcspNet web-framework

Package status

Latest version Nuget version
Dependencies Libraries.io dependency status for latest release

Issues

Issues board

Build status

Branch Status
master AppVeyor Build status
develop AppVeyor Build status

Main features

  • Comes as Microsoft.AspNetCore OWIN middleware
  • Can be used as an API backend only with front-end frameworks
  • Based on MVC and MVVM patterns
  • Lightweight & Fast
  • Uses switchable IOC container for itself and controllers, views constructor injection (Simplify.DI)
  • Support async controllers
  • Supports controllers which can be run on any request
  • Localization-friendly (supports templates, strings and data files localization by default)
  • Uses fast templates engine (Simplify.Templates)
  • Mocking-friendly
  • Mono-friendly

Quick start

There is a templates package available at nuget.org for Simplify.Web. It contains a couple of templates which can be a good starting point for your application.

Installing a templates package:

dotnet new -i Simplify.Web.Templates
Template Short Name
Angular template sweb.angular
Api template sweb.api
Minimal template sweb.minimal
Windows service hosted api template sweb.api.windowsservice

Use the short name to create a project based on selected template:

dotnet new sweb.angular -n HelloWorldApplication

Then just run project via F5 (it will download all required nuget and npm packages at first build).

Detailed documentation

API outgoing JSON controller example

[Get("api/v1/weatherTypes")]
public class SampleDataController : Controller
{
    private static readonly string[] Summaries =
    {
        "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
    };

    public override ControllerResponse Invoke()
    {
        try
        {
            return new Json(items);
        }
        catch (Exception e)
        {
            Console.WriteLine(e);

            return StatusCode(500);
        }
    }
}

API ingoing JSON controller example

[Post("api/v1/sendMessage")]
public class SampleDataController : Controller<SampleModel>
{
    public override ControllerResponse Invoke()
    {
        try
        {
            Trace.WriteLine($"Object with message received: {Model.Message}");

            return NoContent();
        }
        catch (Exception e) when (e is ModelValidationException || e is Newtonsoft.Json.JsonException)
        {
            return StatusCode(400, e.Message);
        }
        catch (Exception e)
        {
            Console.WriteLine(e);

            return StatusCode(500, "Site error!");
        }
    }
}

public class SampleModel
{
    [Required]
    public string Message { get; set; }
}

Some simple HTML generation controllers example

Static page controller

// Controller will be executed only on HTTP GET request like http://mysite.com/about
[Get("about")]
public class AboutController : Controller
{
    public override ControllerResponse Invoke()
    {
        // About.tpl content will be inserted into {MainContent} in Master.tpl
        return new StaticTpl("Static/About", StringTable.PageTitleAbout);
    }
}

Any page controller with high run priority example

Runs on any request and adds login panel to a pages

// Controller will be executed on any request and will be launched before other controllers (because they have Priority = 0 by default)
[Priority(-1)]
public class LoginPanelController : AsyncController
{
    public override async Task<ControllerResponse> Invoke()
    {
        return Context.Context.Authentication.User == null
            // Data from GuestPanel.tpl will be inserted into {LoginPanel} in Master.tpl
            ? new InlineTpl("LoginPanel", await TemplateFactory.LoadAsync("Shared/LoginPanel/GuestPanel"))
            // Data from LoggedUserPanelView will be inserted into {LoginPanel} in Master.tpl
            : new InlineTpl("LoginPanel", await GetView<LoggedUserPanelView>().Get(Context.Context.Authentication.User.Identity.Name));
    }
}

View example

public class LoggedUserPanelView : View
{
    public async Task<ITemplate> Get(string userName)
    {
        // Loading template from LoggedUserPanel.tpl asynchronously
        var tpl = await TemplateFactory.LoadAsync("Shared/LoginPanel/LoggedUserPanel");

        // Setting userName into {UserName} variable in LoggedUserPanel.tpl
        tpl.Add("UserName", userName);

        return tpl;
    }
}

Contributing

There are many ways in which you can participate in the project. Like most open-source software projects, contributing code is just one of many outlets where you can help improve. Some of the things that you could help out with are:

  • Documentation (both code and features)
  • Bug reports
  • Bug fixes
  • Feature requests
  • Feature implementations
  • Test coverage
  • Code quality
  • Sample applications

Related Projects

Additional extensions to Simplify.Web live in their own repositories on GitHub. For example:

License

Licensed under the GNU LESSER GENERAL PUBLIC LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].