All Projects → calidion → Vig

calidion / Vig

Licence: other
A web framework focusing on web logic ( or Web Straight Line as we call it), no mvc, no controller

Programming Languages

typescript
32286 projects

Labels

Projects that are alternatives of or similar to Vig

Nodejs Rest Api Project Structure Express
Nodejs project structure practices for building RESTful APIs using Express framework and MongoDB.
Stars: ✭ 134 (-8.84%)
Mutual labels:  express
Jest Express
Mock Express for testing with Jest
Stars: ✭ 141 (-4.08%)
Mutual labels:  express
Js Stack Boilerplate
Final boilerplate code of the JavaScript Stack from Scratch tutorial –
Stars: ✭ 145 (-1.36%)
Mutual labels:  express
Javascript Testing Best Practices
📗🌐 🚢 Comprehensive and exhaustive JavaScript & Node.js testing best practices (August 2021)
Stars: ✭ 13,976 (+9407.48%)
Mutual labels:  express
163music
🎵163 music web app built with Vue 2.6, server side render, webpack 4
Stars: ✭ 139 (-5.44%)
Mutual labels:  express
Vue Shoppingcart
ShoppingCart (Ecommerce) 🛒 Application using Vuejs, + Node.js + Express + MongoDB 🚀🤘
Stars: ✭ 141 (-4.08%)
Mutual labels:  express
Loon
☁️ Spring like framework build with Typescript
Stars: ✭ 133 (-9.52%)
Mutual labels:  express
Promster
⏰A Prometheus exporter for Hapi, express and Marble.js servers to automatically measure request timings 📊
Stars: ✭ 146 (-0.68%)
Mutual labels:  express
2019 Ncov Frontend
🌏 Map, data and timeline of coronavirus (COVID-19)
Stars: ✭ 141 (-4.08%)
Mutual labels:  express
Nodejs Shopping Cart
NodeJS Shopping Cart - NodeJS, Express, Express-Session, Express handlebars (hbs)
Stars: ✭ 144 (-2.04%)
Mutual labels:  express
Nextjs Express
A simple app using Next.js
Stars: ✭ 136 (-7.48%)
Mutual labels:  express
React With Wordpress
🔥 Example of react application to access WordPress REST API
Stars: ✭ 137 (-6.8%)
Mutual labels:  express
Webchat
🔈 Websocket project based on vue(基于vue2.0的实时聊天项目)
Stars: ✭ 1,856 (+1162.59%)
Mutual labels:  express
Node Elm
基于 node.js + Mongodb 构建的后台系统
Stars: ✭ 11,224 (+7535.37%)
Mutual labels:  express
Apollo Server
🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.
Stars: ✭ 12,145 (+8161.9%)
Mutual labels:  express
Manual Node
📗 📒 (PT-BR Tradução) 2020 Edition - Tradução por Christy e Vinicius Dias (https://github.com/ViniciusmDias).
Stars: ✭ 134 (-8.84%)
Mutual labels:  express
Javascript Obfuscator Ui
A web UI to the JavaScript Obfuscator node.js package.
Stars: ✭ 142 (-3.4%)
Mutual labels:  express
Node Express Mongoose Passport Jwt Rest Api Auth
Node, express, mongoose, passport and JWT REST API authentication example
Stars: ✭ 146 (-0.68%)
Mutual labels:  express
React Fondue
⚛ ReactFondue is minimal React boilerplate with support for code splitting, hot module reload and server side rendering.
Stars: ✭ 146 (-0.68%)
Mutual labels:  express
Xto
💌 Just an API for Node.js to query each express.
Stars: ✭ 144 (-2.04%)
Mutual labels:  express

(this project is deprecated in favor of the new fast, simple, async web framework for nodejs: aex)

vig

NPM version Downloads Downloads Build Status Dependency Status Coverage percentage Backers Sponsors

简介

一个受sailsjs启发的新Web框架,但是追求小而美,而又敏捷,灵活,高效。以完成MVC的C端为重点,插件化的Web框架。

交流QQ群

423652352

导航

[缘起] [教程]

示例

国内: https://t1bao.com/

国外: https://forum.webfullstack.me/

vig与其它框架单机性能测试对照

详细见文章:

一个支持async的超高性能的基于node.js的Web业务框架

vig是一个Web业务框架,本身并不想处理Web协议层面的事情。

但是因为协议与上层的业务是紧密关联的,所以未来可能会参与到协议层框架的开发上去。

原因很简单,虽然vig相对于express的折损只有1%多点。 但是如果基于koa的也只折损1%,那么vig的性能就会大大的提高。

关于vig

是一个专注于Web业务逻辑的组件化框架,主要关心:

  1. 精减Web业务处理的代码
  2. 简化常规Web业务的处理
  3. 加速项目的开发
  4. 是一个简化Web业务处理的Web框架
  5. 将Web的业务逻辑标准化,可重用化是vig的主要目标

目标是:

  1. 模块化(Modular)
  2. 可插件化(Pluggable)
  3. 可重入化(Reenterable)
  4. 可集成化(Integratable)

功能列表

  1. 组件化,所的功能都是组件级的
  2. 简化的路由机制
  3. 简洁,而强大的数据输入校检
  4. 方便的权限验证功能
  5. 框架内的事件机制
  6. 实用的VIG API规范支持
  7. 简单的文件上传机制
  8. 简单的模型定义方式(基于waterline)
  9. 统一的错误处理机制(基于Errorable)
  10. 组件配置支持与全局配置支持
  11. 模板支持

快速上手

1、创建一个test.ts文件(推荐使用TS)

vi test.ts

2、添加如下代码

import { VHandler } from "vig";
let app = require('express')();
const handler = new VHandler();

handler.set({
  prefix: '/demo',
  urls: ['/', '/hello'],
  routers: {
    get: async (req, res, scope) => {
      res.send('Hello world!');
    }
  }
});

handler.attach(app);

app.listen(10000, function () {
  console.log('server running on http://localhost:10000');
});

3、安装包

yarn install

4、测试

npm test

关于async/await支持的几点说明

vig对async/await的支持依赖于用户的开发环境本身,与vig框架无关。
但是开发者需要注意的是:

  1. async/await无法实现对事件的支持,所以回调函数与async/await是不同的。
  2. 回调函数不会消失,async/await也无法适用于所有的场景

所以在使用vig框架时需要注意事件与IO回调的区别。

下面再将事件与常规的IO调用的差别说明一下。

  1. IO的调用本身也是事件。
  2. IO调用本身也是可以不定期的,比如网络IO。
  3. 对于时间与任务明确的IO调用,推荐async/awati,比如数据库访问,文件访问等。
  4. 对于不明确的事件应该使用回调,比如有些网络IO,一些硬件的IO事件,如键盘事件,鼠标事件等。
  5. async/await无法取代回调函数

安装

$ npm install --save vig
$ yarn add vig

# 推荐使用1.0版本
$ npm install --save [email protected]
$ yarn add [email protected]

版本说明

Semver不但引起了版本爆炸,也让版本失去了意义。

所以vig采用 · Effective Versioning · 的版本管理方式。

  1. 尽量保持小版本的一致性,但是不保证小版本升级一定是接口不变的
  2. 不推荐动不动升级,只有你当前的版本不能满足你的需要时再升级

使用yarn取代npm作为包管理软件

由于semver的错误,npm5之后软件的版本已经固定下来,不再执行semver里自动升级的方式。

对于非npm5的用户来说,仍存在严重的包版自动升级风险,因此vig推荐所有人使用yarn来解决你的版本不一致的问题。

项目地址

https://github.com/calidion/vig

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

License

Apache-2.0 © calidion

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].