wide/README.md

172 lines
7.2 KiB
Markdown
Raw Normal View History

2015-08-04 17:00:21 +03:00
# Wide [![Build Status](https://img.shields.io/travis/b3log/wide.svg?style=flat)](https://travis-ci.org/b3log/wide) [![Coverage Status](https://img.shields.io/coveralls/b3log/wide.svg?style=flat)](https://coveralls.io/r/b3log/wide) [![Apache License](http://img.shields.io/badge/license-apache2-orange.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) [![API Documentation](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](http://godoc.org/github.com/b3log/wide) [![Download](http://img.shields.io/badge/download-~2.7K-red.svg?style=flat)](http://pan.baidu.com/s/1dD3XwOT)
2014-11-28 04:55:58 +03:00
2015-08-01 08:52:04 +03:00
_Have a [try](http://wide.b3log.org/signup) first, then [download](http://pan.baidu.com/s/1dD3XwOT) and setup it on your local area network, enjoy yourself!_
2014-08-18 17:45:43 +04:00
2015-08-02 10:50:14 +03:00
先试试我们搭建好的[在线服务](http://wide.b3log.org/signup),你可以在这里[下载](http://pan.baidu.com/s/1dD3XwOT)并在本地环境运行,然后邀请小伙伴们来玩吧!
2015-08-01 08:50:46 +03:00
2015-08-26 19:48:54 +03:00
> * 关于 Wide 的产品定位,请看[这里](http://hacpai.com/article/1438407961481),并欢迎参与讨论~
2015-10-09 04:56:57 +03:00
> * 加入[**黑客派**](http://hacpai.com/register),与其他程序员、设计师共同成长!
2015-01-14 08:36:51 +03:00
2015-03-19 16:41:43 +03:00
## Introduction
2014-09-17 16:37:35 +04:00
2015-03-24 16:18:55 +03:00
A <b>W</b>eb-based <b>IDE</b> for Teams using Go programming language/Golang.
2014-08-18 17:45:43 +04:00
2014-12-02 15:58:57 +03:00
![Hello, 世界](https://cloud.githubusercontent.com/assets/873584/4606377/d0ca3c2a-521b-11e4-912c-d955ab05850b.png)
2014-10-12 18:17:35 +04:00
2014-09-08 16:31:31 +04:00
## Motivation
2014-09-26 05:56:14 +04:00
2014-09-26 05:59:22 +04:00
* **Team** IDE:
2014-11-01 15:48:26 +03:00
* _Safe and reliable_: the project source code stored on the server in real time, the developer's machine crashes without losing any source code
* _Unified environment_: server unified development environment configuration, the developer machine without any additional configuration
* _Out of the box_: 5 minutes to setup a server then open browser to develop, debug
* _Version Control_: each developer has its own source code repository, easy sync with the trunk
2014-10-28 10:28:46 +03:00
* **Web-based** IDE:
2014-09-26 05:59:22 +04:00
* Developer needs a browser only
* Cross-platform, even on mobile devices
2014-10-29 16:42:22 +03:00
* Easy to extend
* Easy to integrate with other systems
2014-09-26 05:59:22 +04:00
* For the geeks
* A try for commercial-open source: versions customized for enterprises, close to their development work flows respectively
* Currently more popular Go IDE has some defects or regrets:
* Text editor (vim/emacs/sublime/Atom, etc.): For the Go newbie is too complex
* Plug-in (goclipse, etc.): the need for the original IDE support, not professional
* LiteIDE: no modern user interface :p
* No team development experience
* There are a few of GO IDEs, and no one developed by Go itself, this is a nice try
2014-09-08 16:17:04 +04:00
2014-09-08 16:31:31 +04:00
## Features
2014-09-26 05:53:26 +04:00
2014-12-01 05:53:43 +03:00
* [X] Code Highlight, Folding: Go/HTML/JavaScript/Markdown etc.
* [X] Autocomplete: Go/HTML etc.
* [X] Format: Go/HTML/JSON etc.
* [X] Build & Run
* [X] Multiplayer: a real team development experience
* [X] Navigation, Jump to declaration, Find usages, File search etc.
* [X] Shell: run command on the server
2015-03-18 17:14:09 +03:00
* [X] Web development: HTML/JS/CSS editor with [Emmet](http://emmet.io) integrated
2014-12-01 05:53:43 +03:00
* [X] Go tool: go get/install/fmt etc.
2014-12-01 05:59:42 +03:00
* [X] File Import & Export
2015-03-18 17:19:13 +03:00
* [X] Themes: editor and UI adjust, respectively
2015-08-05 09:16:52 +03:00
* [X] Cross-Compilation
2014-12-09 11:35:12 +03:00
* [ ] Debug
* [ ] Git integration: git command on the web
2014-12-16 11:52:07 +03:00
## Screenshots
2014-12-09 11:35:12 +03:00
* **Overview**
2015-09-28 10:44:57 +03:00
2014-12-16 11:51:31 +03:00
![Overview](https://cloud.githubusercontent.com/assets/873584/5450620/1d51831e-8543-11e4-930b-670871902425.png)
* **Goto File**
2015-09-28 10:44:57 +03:00
2014-12-16 11:51:31 +03:00
![Goto File](https://cloud.githubusercontent.com/assets/873584/5450616/1d495da6-8543-11e4-9285-f9d9c60779ac.png)
* **Autocomplete**
2015-09-28 10:44:57 +03:00
2014-12-16 11:51:31 +03:00
![Autocomplete](https://cloud.githubusercontent.com/assets/873584/5450619/1d4d5712-8543-11e4-8fe4-35dbc8348a6e.png)
2014-12-09 11:35:12 +03:00
* **Theme**
2015-09-28 10:44:57 +03:00
2014-12-16 11:51:31 +03:00
![4](https://cloud.githubusercontent.com/assets/873584/5450617/1d4c0826-8543-11e4-8b86-f79a4e41550a.png)
* **Show Expression Info**
2015-09-28 10:44:57 +03:00
2014-12-16 11:51:31 +03:00
![Show Expression Info](https://cloud.githubusercontent.com/assets/873584/5450618/1d4cd9f4-8543-11e4-950f-121bd3ff4a39.png)
* **Build Error Info**
2015-09-28 10:44:57 +03:00
2014-12-16 11:51:31 +03:00
![Build Error Info](https://cloud.githubusercontent.com/assets/873584/5450632/3e51cccc-8543-11e4-8ca8-8d2427aa16b8.png)
2015-09-28 10:44:57 +03:00
* **Git Clone**
2015-03-08 12:18:50 +03:00
![Git Clone](https://cloud.githubusercontent.com/assets/873584/6545235/2284f230-c5b7-11e4-985e-7e04367921b1.png)
2015-09-28 10:41:16 +03:00
* **Cross-Compilation**
2015-09-28 10:44:57 +03:00
2015-09-28 10:41:16 +03:00
![Cross-Compilation](https://cloud.githubusercontent.com/assets/873584/10130037/226d75fc-65f7-11e5-94e4-25ee579ca175.png)
2014-08-18 17:45:43 +04:00
2014-09-26 05:53:26 +04:00
## Architecture
### Build & Run
![Build & Run](https://cloud.githubusercontent.com/assets/873584/4389219/3642bc62-43f3-11e4-8d1f-06d7aaf22784.png)
2014-09-26 05:52:10 +04:00
2014-09-26 06:00:06 +04:00
* A browser tab corresponds to a Wide session
* Execution output push via WebSocket
2014-09-26 05:38:46 +04:00
2014-09-26 06:04:30 +04:00
Flow:
1. Browser sends ````Build```` request
2. Server executes ````go build```` command via ````os/exec````<br/>
2.1. Generates a executable file
3. Browser sends ````Run```` request
4. Server executes the file via ````os/exec````<br/>
4.1. A running process<br/>
4.2. Execution output push via WebSocket channel
5. Browser renders with callback function ````ws.onmessage````
2014-09-26 05:38:46 +04:00
2014-09-25 07:03:53 +04:00
### Code Assist
2014-09-26 05:44:09 +04:00
![Code Assist](https://cloud.githubusercontent.com/assets/873584/4399135/3b80c21c-4463-11e4-8e94-7f7e8d12a4df.png)
2014-09-26 06:00:06 +04:00
* Autocompletion
2014-12-09 11:35:12 +03:00
* Find Usages/Jump To Declaration/etc.
2014-09-26 05:38:46 +04:00
2014-09-26 06:04:30 +04:00
Flow:
2014-09-26 06:05:08 +04:00
1. Browser sends code assist request
2. Handler gets user workspace of the request with HTTP session
2015-08-05 07:58:39 +03:00
3. Server executes ````gocode````/````ide_stub(gotools)````<br/>
2014-09-26 06:05:08 +04:00
3.1 Sets environment variables (e.g. ${GOPATH})<br/>
3.2 ````gocode```` with ````lib-path```` parameter
2014-09-26 05:38:46 +04:00
2014-09-11 09:32:47 +04:00
## Documents
2014-09-20 06:23:45 +04:00
2015-03-22 06:49:04 +03:00
* [用户指南](https://www.gitbook.com/book/88250/wide-user-guide)
* [开发指南](https://www.gitbook.com/book/88250/wide-dev-guide)
2014-09-11 09:32:47 +04:00
2014-10-30 04:17:50 +03:00
## Setup
2014-09-26 05:56:14 +04:00
2014-10-30 04:17:50 +03:00
### Download Binary
We have provided OS-specific executable binary as follows:
* linux-amd64/386
* windows-amd64/386
* darwin-amd64/386
2014-11-16 11:57:48 +03:00
Download [HERE](http://pan.baidu.com/s/1dD3XwOT)!
2014-10-30 04:17:50 +03:00
### Build Wide for yourself
2015-03-10 12:57:31 +03:00
1. [Download](https://github.com/b3log/wide/archive/master.zip) source or by `git clone https://github.com/b3log/wide`
2014-10-30 04:17:50 +03:00
2. Get dependencies with
2014-11-20 08:20:21 +03:00
* `go get`
2015-08-05 08:50:32 +03:00
* `go get github.com/visualfc/gotools github.com/nsf/gocode github.com/bradfitz/goimports`
2014-10-30 04:17:50 +03:00
3. Compile wide with `go build`
2014-08-18 17:45:43 +04:00
2014-11-18 11:38:49 +03:00
### Docker
1. Get image: `sudo docker pull 88250/wide:latest`
2015-01-12 06:47:04 +03:00
2. Run: `sudo docker run -p 127.0.0.1:7070:7070 88250/wide:latest ./wide -docker=true -channel=ws://127.0.0.1:7070`
3. Open browser: http://127.0.0.1:7070
2014-11-18 11:38:49 +03:00
2014-09-08 16:27:54 +04:00
## Known Issues
2014-09-26 05:56:14 +04:00
2014-09-26 05:59:22 +04:00
* [Shell is not available on Windows](https://github.com/b3log/wide/issues/32)
2015-10-03 12:03:58 +03:00
* [Rename directory](https://github.com/b3log/wide/issues/251)
2014-09-08 16:27:54 +04:00
2015-01-28 06:00:59 +03:00
## Terms
2014-09-26 05:56:14 +04:00
2015-01-28 12:41:14 +03:00
* This software is open sourced under the Apache License 2.0
2015-07-08 05:39:45 +03:00
* You can not get rid of the "Powered by [B3log](http://b3log.org)" from any page, even which you made
* If you want to use this software for commercial purpose, please mail to support@liuyun.io for a commercial license request
2015-07-31 06:42:18 +03:00
* Copyright &copy; b3log.org, all rights reserved
2014-08-18 17:45:43 +04:00
2014-09-08 16:31:31 +04:00
## Credits
2014-09-26 05:56:14 +04:00
2015-09-26 04:48:08 +03:00
Wide is made possible by the following open source projects.
2014-09-26 05:59:22 +04:00
* [golang](http://golang.org)
* [CodeMirror](https://github.com/marijnh/CodeMirror)
* [zTree](https://github.com/zTree/zTree_v3)
* [LiteIDE](https://github.com/visualfc/liteide)
* [gocode](https://github.com/nsf/gocode)
* [Gorilla](https://github.com/gorilla)
2014-11-18 11:38:49 +03:00
* [Docker](https://docker.com)
2014-10-12 18:33:14 +04:00
----
<img src="https://cloud.githubusercontent.com/assets/873584/4606328/4e848b96-5219-11e4-8db1-fa12774b57b4.png" width="256px" />