From 27613f70d884c82f5662f50dfb8dd9ffcb0bb3a7 Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Fri, 19 Jun 2020 08:44:32 +0300 Subject: [PATCH] semi-sync with the e-book --- About.md | 50 -------------------------- Home.md | 54 +++++----------------------- Installation.md | 20 +++-------- Publications.md | 22 ++++++------ Getting-started.md => Quick-start.md | 11 ++---- Starter-kits.md | 4 +-- Support.md | 20 +++++------ _Sidebar.md | 39 ++++++++++---------- 8 files changed, 58 insertions(+), 162 deletions(-) delete mode 100644 About.md rename Getting-started.md => Quick-start.md (85%) diff --git a/About.md b/About.md deleted file mode 100644 index 60dbd36..0000000 --- a/About.md +++ /dev/null @@ -1,50 +0,0 @@ -Iris is a fast, simple yet fully featured and very efficient web framework written in [Go](https://golang.org). - -Iris provides a beautifully expressive and easy to use foundation for your next website or API. - -Iris offers a complete and decent support to its users. - -## Our Philosophy - -The Iris philosophy is to provide robust tooling for HTTP, making it a great solution for single page applications, web sites, hybrids, or public HTTP APIs. Keep note that, so far, iris is the fastest web framework ever created in terms of real-world performance. - -Iris does not force you to use any specific ORM or template engine. With support for the most powerful and fast template engines, you can quickly craft the perfect application. - -## Why Yet Another Web Framework? - -Go is a great technology stack for building scalable, web-based, back-end systems for web -applications. - -When you think about building web applications and web APIs, or simply building HTTP servers in Go, does your mind go to the standard net/http package? -Then you have to deal with some common situations like dynamic routing (a.k.a parameterized), security and authentication, real-time communication and many other issues that net/http doesn't solve. - -The net/http package is not complete enough to quickly build well-designed back-end web systems. When you realize this, you might be thinking along these lines: - -- Ok, the net/http package doesn't suit me, but there are so many frameworks, which one will work for me?! -- Each one of them tells me that it is the best. I don't know what to do! - -### The truth - -I did some deep research and benchmarks with [wrk](https://github.com/wg/wrk) and [ab](https://httpd.apache.org/docs/2.4/programs/ab.html) in order to choose which framework suits me and my new project. The results, unfortunately, were really disappointing to me. - -I started wondering if Golang wasn't as fast for net or http applications as I was reading from different kind of online sources... but right before I leave Golang for good and continue to develop with nodejs and .net core, I whispered to myself: - -> Makis, don't lose hope, give at least a chance to Golang. Try to build something totally new without basing it off the "slow" code you saw earlier; learn the secrets of this language and make *others* follow your steps! - -These are the words I told myself that day [**13 March 2016**]. - -The same day, later the night, I was reading a book about Greek mythology. I saw an ancient goddess name there and I was immediately inspired to give her name to this new web framework I was already started to design and code - **Iris**. - -Some weeks later, Iris was trending on position #1 in Github, this is very rare phenomenon especially for a new personal project, back then, with such a young developer behind it. - -[[_assets/trendings2016.png]] - -After that, as was reasonable, competitors who couldn't handle their losses, and individuals - began to pull out themselves and their jealousy about the success of others, started to randomly throw defamations and fake news around. Of course they never even thought to argument on the fact that Iris the fastest and greatest in terms of performance and features because numbers never lie and their whole narrative would fall very fast. Instead they tried to bullying me through my personality, they tried to put me down in order to stop the active development of Iris. - - -However, I strongly believe that we should not respond back with the same coin, instead, I think we should prove them that compassion and love live inside each one of us, by forgiving them and their actions and look forward for a better place to express ourselves without fear and racism. - -Nowadays, Iris is more popular than ever. In fact, their posts, unintentionally, made Iris even more popular than it already was and people started to be very supportive to my dream and this is the reason we are still here. - -Do you want to find out how supportive Iris is as a return? You can continue reading our [[Support]] section. diff --git a/Home.md b/Home.md index b184938..9dc9f22 100644 --- a/Home.md +++ b/Home.md @@ -1,49 +1,11 @@ -Welcome to **Iris** - the fastest backend web framework for [Go](https://golang.org). +# What is Iris -This wiki is the main source of documentation for **developers** working with (or contributing to) the Iris project. +**Iris** is a free, open-source [Go](https://golang.org) web framework, created by [Gerasimos Maropoulos](https://twitter.com/MakisMaropoulos) and intended for the development of modern web applications. + +**Iris** helps back-end developers to quickly create extremely fast web applications in Go with minimal effort. + +**Iris** is the only one Go module with **first-class** support to develop web applications following the model-view-controller [MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) architectural pattern. -## Table of Contents +**Iris** can be used as a web port for [gRPC](https://grpc.io/). REST API for gRPC services. -* [[About]] -* [[Benchmarks]] -* [[Support]] -* [[Installing Iris|Installation]] -* [[Getting Started|Getting-started]] -* [[Host]] - * [[Automatic Public Domain with TLS|Automatic-public-address]] -* [[Configuration]] -* [[Routing]] - * [[Path Parameter Types|Routing-path-parameter-types]] - * [[Reverse Lookups|Routing-reverse-lookups]] - * [[Middleware|Routing-middleware]] - * [[Handle HTTP errors|Routing-error-handlers]] - * [[Subdomains|Routing-subdomains]] - * [[Wrap the Router|Routing-wrap-the-router]] - * [[Override Context|Routing-override-context]] - * [[Context Methods|Routing-context-methods]] -* [[HTTP Method Override|HTTP-method-override]] -* [[API Versioning|API-versioning]] -* [[Content Negotiation|Content-negotiation]] -* [[Response Recorder|Response-recorder]] -* [[HTTP Referrer|HTTP-referrer]] -* [[Request Authentication|Request-authentication]] -* [[URL Query Parameters|URL-query-parameters]] -* [[Forms]] -* [[Model Validation|Model-validation]] -* [[Cache]] -* [[File Server|File-server]] -* [[View]] -* [[Cookies]] -* [[Sessions]] - * [Database](Sessions-database) - * [Flash Messages](Sessions-flash-messages) -* [[Websockets]] -* [[Dependency Injection|Dependency-injection]] -* [[MVC]] -* [[gRPC|Grpc]] -* [[Sitemap]] -* [[Localization]] -* [[Testing]] -* [➲ Examples](https://github.com/kataras/iris/tree/master/_examples) -* [[Starter Kits|Starter-kits]] -* [[Publications]] +The source code of Iris is hosted on [GitHub ](https://github.com/kataras/iris) and licensed under the terms of [BSD 3-clause License](https://opensource.org/licenses/BSD-3-Clause), like the [Go project](https://github.com/golang/go) itself. diff --git a/Installation.md b/Installation.md index ccba4d4..830d85e 100644 --- a/Installation.md +++ b/Installation.md @@ -2,38 +2,30 @@ Iris is a cross-platform software. The only requirement is the [Go Programming Language](https://golang.org/dl/), version 1.13 and above. -```sh +```bash $ go env -w GO111MODULE=on ``` ## Install -```sh -$ go get github.com/kataras/iris/v12@latest +```bash +$ go get github.com/kataras/iris/v12@master ``` Or edit your project's `go.mod` file. -```sh +```bash module your_project_name go 1.14 require ( - github.com/kataras/iris/v12 v12.2.0 + github.com/kataras/iris/v12 v12.1.9-0.20200618063647-c11725ab44d1 ) ``` > `$ go build` - - ## Troubleshooting If you get a network error during installation please make sure you set a valid [GOPROXY environment variable](https://github.com/golang/go/wiki/Modules#are-there-always-on-module-repositories-and-enterprise-proxies). @@ -41,5 +33,3 @@ If you get a network error during installation please make sure you set a valid ```sh go env -w GOPROXY=https://goproxy.cn,https://gocenter.io,https://goproxy.io,direct ``` - -Continue by reading our [[Getting Started]] tutorial. diff --git a/Publications.md b/Publications.md index fc152a6..909e42b 100644 --- a/Publications.md +++ b/Publications.md @@ -5,8 +5,8 @@ Prepare a cup of coffee or tea, whatever pleases you the most, and read some art * [How to write a Go API Part 1: A Webserver With Iris](https://bit.ly/32xmf4Q) * [How to write a Go API Part 2: Database Integration With GORM](https://bit.ly/34PvKxR) * [How to write a Go API Part 3: Testing With Dockertest](https://bit.ly/2NoZziF) -* [A URL Shortener Service using Go, Iris and Bolt (Updated)](https://bit.ly/2KeP6pE) -* [CRUD REST API in Iris (a framework for golang)](https://bit.ly/2X9EsXl) +* [A URL Shortener Service using Go, Iris and Bolt \(Updated\)](https://bit.ly/2KeP6pE) +* [CRUD REST API in Iris \(a framework for golang\)](https://bit.ly/2X9EsXl) * [Monitor APIs in realtime using Go and Iris](https://pusher.com/tutorials/monitor-api-go) * [A Todo MVC Application using Iris and Vue.js](https://bit.ly/2yjBvoZ) * [A Hasura starter project with a ready to deploy Golang hello-world web app with IRIS](https://bit.ly/2Kfdsjf) @@ -21,16 +21,14 @@ Prepare a cup of coffee or tea, whatever pleases you the most, and read some art ## Video Courses | Description | Link | Author | Year | -| -----------|-------------|-------------|-----| -| Web Course | https://bit.ly/web-course-2019 | TechMaster | 2019 | -| Quick Start with Iris | https://bit.ly/2wQIrJw | J-Secur1ty | 2019 | -| Iris & Mongo DB Complete | https://bit.ly/2IcXZOu | Musobar Media | 2018 | -| Getting Started with Iris | https://bit.ly/2XGafMv | stephgdesign | 2018 | - -------- +| :--- | :--- | :--- | :--- | +| Web Course | [https://bit.ly/web-course-2019](https://bit.ly/web-course-2019) | TechMaster | 2019 | +| Quick Start with Iris | [https://bit.ly/2wQIrJw](https://bit.ly/2wQIrJw) | J-Secur1ty | 2019 | +| Iris & Mongo DB Complete | [https://bit.ly/2IcXZOu](https://bit.ly/2IcXZOu) | Musobar Media | 2018 | +| Getting Started with Iris | [https://bit.ly/2XGafMv](https://bit.ly/2XGafMv) | stephgdesign | 2018 | Contact via [e-mail](mailto:kataras2006@hotmail.com?subject=Iris%20Web%20Framework%20Press) to help you out. -- Do you want to write an Article about Iris but you neeed a kind of assistance or help? -- Have you already written one that's not listed here? -- Did you create a video course about Iris that it's not listed here? +* Do you want to write an Article about Iris but you neeed a kind of assistance or help? +* Have you already written one that's not listed here? +* Did you create a video course about Iris that it's not listed here? diff --git a/Getting-started.md b/Quick-start.md similarity index 85% rename from Getting-started.md rename to Quick-start.md index 4a07a5e..2e4b892 100644 --- a/Getting-started.md +++ b/Quick-start.md @@ -1,7 +1,3 @@ -Iris has an expressive syntax for routing which feels like home. The routing algorithm is powered by the [muxie project](https://github.com/kataras/muxie) which handles requests and matches routes faster than its alternatives like httprouter and gin or echo. - -Let's get started without any hassle. - Create an empty file, let's assume its name is `example.go`, then open it and copy-paste the below code. ```go @@ -30,7 +26,7 @@ func myMiddleware(ctx iris.Context) { Start a terminal session and execute the following. -``` +```text # run example.go and visit http://localhost:8080/ping on browser $ go run example.go ``` @@ -79,7 +75,7 @@ func main() { } ``` -```html +```markup @@ -93,6 +89,5 @@ func main() { > Wanna re-start your app automatically when source code changes happens? Install the [iris-cli](https://github.com/kataras/iris-cli) tool and execute `iris-cli run` instead of `go run main.go`. ----------------- +At the next section we will learn more about [Routing](../routing/). -At the next section we will learn more about [[Routing]]. diff --git a/Starter-kits.md b/Starter-kits.md index 4d74342..29c195b 100644 --- a/Starter-kits.md +++ b/Starter-kits.md @@ -1,5 +1,5 @@ | Project | Description | Stars | Author | -| --------|-------------|-------|--------| +| :--- | :--- | :--- | :--- | | [peterq/pan-light](https://bit.ly/33qfKlt) | Baidu network disk unlimited speed client, golang + qt5, cross-platform graphical interface | 10460 | @peterq | | [eltaline/wzd](https://github.com/eltaline/wzd) | wZD is a powerful storage and database server, designed for big data storage systems with small and large files for mixed use and dramatically reduces count of small files for extend abilities any normal or clustered POSIX compatible file systems | 68 | @eltaline | | [eltaline/ctrl](https://github.com/eltaline/ctrl) | cTRL is a server for remote execution of pending tasks and commands in real time, supporting a queue with continuous thread limiting and throttling | 2 | @eltaline | @@ -12,7 +12,7 @@ | [yz124/superstar](https://bit.ly/2WF4ZfK) | Iris + xorm to implement the star library | 105 | @yz124 | | [pusher.com](https://pusher.com/tutorials/monitor-api-go) | A realtime API monitor written with go | 5 | @neoighodaro | | [jebzmos4/Iris-golang](https://bit.ly/2XFyESo) | A basic CRUD API in golang with Iris | 8 | @jebzmos4 | -| [gauravtiwari/go_iris_app](https://bit.ly/2XFVYQ4) | Basic web app built in Iris | 21 | @gauravtiwari | +| [gauravtiwari/go\_iris\_app](https://bit.ly/2XFVYQ4) | Basic web app built in Iris | 21 | @gauravtiwari | | [iris-contrib/Iris-Mini-Social-Network](https://bit.ly/2KJvZn7) | A mini social-network created with the awesome Iris💖💖 | 49 | @iris-contrib | | [iris-contrib/iris-starter-kit](https://bit.ly/2ReoGoH) | Iris isomorphic react/hot reloadable/redux/css-modules | 38 | @iris-contrib | | [TimothyYe/iris-demo](https://bit.ly/34AJEDw) | Iris demo project | 2 | @TimothyYe | diff --git a/Support.md b/Support.md index b19b147..d6ca4d4 100644 --- a/Support.md +++ b/Support.md @@ -1,19 +1,19 @@ -Have you ever be in a position of waiting weeks or months for someone to respond to a github issue of yours? -If you choose Iris for your main backend development you will never be treated like a ghost again. +Have you ever be in a position of waiting weeks or months for someone to respond to a github issue of yours? If you choose Iris for your main backend development you will never be treated like a ghost again. -Iris is one of the few github public repositories that offers real support to individuals and collectivities, including companies. -Unbeatable free support for the last three years and that is just the beginning of our journey. +Iris is one of the few github public repositories that offers real support to individuals and collectivities, including companies. Unbeatable free support for the last three years and that is just the beginning of our journey. -In these difficult and restless days we stand beside you. We do not judge bad english writing. -We are here for you, no matter who you are. +In these difficult and restless days we stand beside you. We do not judge bad english writing. We are here for you, no matter who you are. Navigate through the Iris github [repository](https://github.com/kataras/iris) to see by yourself the features and the hard work that we putted to improve how the web is built. -### Read the latest and greatest features and get migration help +## Read the latest and greatest features and get migration help + * [HISTORY](https://github.com/kataras/iris/blob/master/HISTORY.md) file is your best friend, it contains the changelog, information about the latest features and changes to the framework. -### Did you happen to find a bug? +## Did you happen to find a bug? + * Post it at github issues. [Report a bug](https://github.com/kataras/iris/issues). -### Communication -* Do you have any questions or need to speak with someone experienced enough to solve a problem at real-time? Join us to the [Community Chat](https://chat.iris-go.com). \ No newline at end of file +## Communication + +* Do you have any questions or need to speak with someone experienced enough to solve a problem at real-time? Join us to the [Community Chat](https://chat.iris-go.com). diff --git a/_Sidebar.md b/_Sidebar.md index 001ef9b..49f8c43 100644 --- a/_Sidebar.md +++ b/_Sidebar.md @@ -1,21 +1,19 @@ -* [[Home]] -* [[About]] -* [[Benchmarks]] -* [[Support]] -* [[Installing Iris|Installation]] -* [[Getting Started|Getting-started]] +* [[What is Iris|Home]] +* 📌Getting Started + * [[Installing Iris|Installation]] + * [[Quick start|Quick-start]] * [[Host]] * [[Automatic Public Domain with TLS|Automatic-public-address]] * [[Configuration]] * [[Routing]] - * [[Path Parameter Types|Routing-path-parameter-types]] - * [[Reverse Lookups|Routing-reverse-lookups]] - * [[Middleware|Routing-middleware]] - * [[Handle HTTP errors|Routing-error-handlers]] - * [[Subdomains|Routing-subdomains]] - * [[Wrap the Router|Routing-wrap-the-router]] - * [[Override Context|Routing-override-context]] - * [[Context Methods|Routing-context-methods]] + * [[Path Parameter Types|Routing-path-parameter-types]] + * [[Reverse Lookups|Routing-reverse-lookups]] + * [[Middleware|Routing-middleware]] + * [[Handle HTTP errors|Routing-error-handlers]] + * [[Subdomains|Routing-subdomains]] + * [[Wrap the Router|Routing-wrap-the-router]] + * [[Override Context|Routing-override-context]] + * [[Context Methods|Routing-context-methods]] * [[HTTP Method Override|HTTP-method-override]] * [[API Versioning|API-versioning]] * [[Content Negotiation|Content-negotiation]] @@ -30,8 +28,8 @@ * [[View]] * [[Cookies]] * [[Sessions]] - * [Database](Sessions-database) - * [Flash Messages](Sessions-flash-messages) + * [Database](Sessions-database) + * [Flash Messages](Sessions-flash-messages) * [[Websockets]] * [[Dependency Injection|Dependency-injection]] * [[MVC]] @@ -39,6 +37,9 @@ * [[Sitemap]] * [[Localization]] * [[Testing]] -* [Examples](https://github.com/kataras/iris/tree/master/_examples) -* [[Starter Kits|Starter-kits]] -* [[Publications]] +* 🤓Resources + * [[Starter Kits|Starter-kits]] + * [[Publications]] + * [[Benchmarks]] + * [[Support]] + * [Examples](https://github.com/kataras/iris/tree/master/_examples)