| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
9年前发布

Go语言的一个Web框架:ripple

Ripple

Go语言的一个Web MVC框架(基于Echo)

Which features to include in a framework

A framework has 3 parts. A router receiving a request and directing it to a handler, a middleware system to add reusable pieces of software before and after the handler, and the handler processing the request and writing the response.

  • Router
  • Middlewares
  • Handler processing

[architect]()

Middlewares handle:

  • error/panic
  • logging
  • security
  • sessions
  • cookies
  • body parsing

Features

  • MySQL and Foundation database support
  • Modular (you can choose which components to use)
  • Middleware support, compatible Middleware works out of the box
  • Lightweight. Only MVC
  • Multiple configuration files support (currently json)

Overview

ripple is a lightweight MVC framework. It is based on the principles of simplicity, relevance and elegance.

  • Simplicity. The design is simple, easy to understand and doesn't introduce many layers between you and the standard library. It is a goal of the project that users should be able to understand the whole framework in a single day.
  • Relevance. ripple doesn't assume anything. We focus on things that matter, this way we are able to ensure easy maintenance and keep the system well-organized, well-planned and sweet.
  • Elegance. ripple uses golang best practises. We are not afraid of heights, it's just that we need a parachute in our backpack. The source code is heavily documented, any functionality should be well explained and well tested.

Installation

$ go get github.com/bmbstack/ripple  $ go get github.com/bmbstack/ripple/cmd/ripple  $ go get github.com/bmbstack/ripple/cmd/wbs  $ ripple new rippleApp  $ cd $GOPATH/src/rippleApp  $ wbs -c wbs.toml

Then, Open the url: http://localhost:8090

Project structure

This is the structure of the rippleApp list application that will showcase how you can build web apps with ripple:

├── bin  │   └── forum  ├── config  │   └── config.json  ├── controllers  │   └── home.go  ├── frontend  │   ├── static  │   │   ├── css  │   │   │   └── app.css  │   │   └── js  │   │       └── app.js  │   └── templates  │       └── home  │           ├── html.html  │           └── index.html  ├── logger  │   └── logger.go  ├── main.go  ├── models  │   └── user.go  ├── scripts  │   ├── commands.go  │   ├── const.go  │   ├── init.go  │   └── server.go  └── wbs.toml    12 directories, 15 files

Screenshots

ripple new rippleApp Debug mode Release mode Web browser

Acknowledgements

These amazing projects have made ripple possible:

项目地址: https://github.com/bmbstack/ripple

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1456737403781.html
Google Go/Golang开发 ripple: a web framework for Go(base on Echo)