2014-09-24 07:25:07 +04:00
|
|
|
# Wide [![Build Status](https://drone.io/github.com/b3log/wide/status.png)](https://drone.io/github.com/b3log/wide/latest)
|
2014-08-18 17:45:43 +04:00
|
|
|
|
2014-09-08 16:31:31 +04:00
|
|
|
## Intro
|
2014-09-17 16:37:35 +04:00
|
|
|
|
2014-09-27 11:36:03 +04:00
|
|
|
A <b>W</b>eb <b>IDE</b> for Teams using Golang.
|
2014-08-18 17:45:43 +04:00
|
|
|
|
2014-10-13 05:38:36 +04:00
|
|
|
<img src="https://cloud.githubusercontent.com/assets/873584/4606377/d0ca3c2a-521b-11e4-912c-d955ab05850b.png" width="100%" />
|
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:
|
|
|
|
* 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
|
|
|
|
* **Web based** IDE:
|
|
|
|
* Developer needs a browser only
|
|
|
|
* Cross-platform, even on mobile devices
|
2014-09-27 07:27:24 +04:00
|
|
|
* Easy for extensions
|
|
|
|
* Easy integration 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-09-26 05:59:22 +04:00
|
|
|
* Code Highlight, Folding: Go/HTML/JavaScript/Markdown etc.
|
|
|
|
* Autocomplete: Go/HTML etc.
|
|
|
|
* Format: Go/HTML/JSON etc.
|
|
|
|
* Run & Debug: run/debug multiple processes at the same time
|
|
|
|
* Multiplayer: a real team development experience
|
|
|
|
* Navigation, Jump to declaration, Find usages, File search etc.
|
|
|
|
* Shell: run command on the server
|
|
|
|
* Git integration: git command on the web
|
|
|
|
* Web development: Frontend devlopment (HTML/JS/CSS) all in one
|
|
|
|
* Go tool: go get/install/fmt etc.
|
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
|
|
|
|
* Find Usages
|
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
|
|
|
|
3. Server executes ````gocode````/````ide_stub````<br/>
|
|
|
|
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
|
|
|
|
2014-10-11 07:42:55 +04:00
|
|
|
* [用户指南](http://88250.gitbooks.io/wide-user-guide)
|
|
|
|
* [开发指南](http://88250.gitbooks.io/wide-dev-guide)
|
2014-09-11 09:32:47 +04:00
|
|
|
|
2014-09-08 16:31:31 +04:00
|
|
|
## Demos
|
2014-09-10 19:30:41 +04:00
|
|
|
|
2014-09-27 10:47:57 +04:00
|
|
|
* 20140927, png ![](http://b3log.org/wide/demo/20140927.png)
|
2014-09-13 09:58:35 +04:00
|
|
|
|
|
|
|
### Olds
|
2014-09-27 10:50:20 +04:00
|
|
|
* [20140913, png](http://b3log.org/wide/demo/20140913.png)
|
2014-09-26 05:59:22 +04:00
|
|
|
* [20140910, png](http://b3log.org/wide/demo/20140910.png)
|
|
|
|
* [20140823, swf](http://b3log.org/wide/demo/20140823.html)
|
2014-08-28 05:29:28 +04:00
|
|
|
|
2014-09-10 18:42:36 +04:00
|
|
|
## Setup from sources
|
2014-09-26 05:56:14 +04:00
|
|
|
|
2014-09-26 05:59:22 +04:00
|
|
|
1. Downloads source
|
|
|
|
2. Gets dependencies with
|
|
|
|
* `go get -u`
|
|
|
|
* `go get -u github.com/88250/ide_stub`
|
|
|
|
* `go get -u github.com/nsf/gocode`
|
|
|
|
3. Compiles wide with `go build`
|
|
|
|
4. Configures `conf/wide.json`
|
|
|
|
5. Runs the executable `wide` or `wide.exe`
|
2014-08-18 17:45:43 +04: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)
|
2014-09-08 16:27:54 +04:00
|
|
|
|
2014-09-08 16:31:31 +04:00
|
|
|
## License
|
2014-09-26 05:56:14 +04:00
|
|
|
|
2014-08-18 17:51:03 +04:00
|
|
|
Copyright (c) 2014, B3log Team (http://b3log.org)
|
2014-08-18 17:45:43 +04:00
|
|
|
|
2014-08-18 17:51:03 +04:00
|
|
|
Licensed under the [Apache License 2.0](https://github.com/b3log/wide/blob/master/LICENSE).
|
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
|
|
|
|
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-10-12 18:33:14 +04:00
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
<img src="https://cloud.githubusercontent.com/assets/873584/4606328/4e848b96-5219-11e4-8db1-fa12774b57b4.png" width="256px" />
|
2014-10-12 18:46:54 +04:00
|
|
|
</center>
|