Skip to content

Commit 79129d2

Browse files
committed
docs: guide/README.md
1 parent b76bf68 commit 79129d2

File tree

1 file changed

+48
-2
lines changed

1 file changed

+48
-2
lines changed

docs/guide/README.md

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,53 @@
11
---
22
title: Guide
3-
navTitle: Egg Guide
3+
navTitle: Guide
44
toc: false
55
---
66

7-
guide
7+
In this guide, we'd thoroughly introduce you every bit of Egg. You can also find guides about the applicable situations of Egg, components how-to, common functions and properties, extendability and testing.
8+
9+
## MVC
10+
11+
Egg is a web application framework written in Node.js. It is designed based on the MVC principle, which is commonly seen among other web application frameworks written in Node.js, like Express.js.
12+
13+
Before you step into the details, we strongly recommend you to learn [the structure of an Egg application].
14+
15+
There're some basic concepts that you need to know:
16+
17+
- [Middleware]: Same as `Koa`'s middleware and similar to `Filter` in Java's world.
18+
- [Controller]: Response to the incoming requests and performs interactions on the data models or calling the services.
19+
- [Router]: Dispatches incoming requests to designated controllers.
20+
- [Service]: A bunch of magic functions that contain your business logics.
21+
- [Application]: A handy object includes the [configurations] of the application. It can be accessed globally.
22+
- [Context]: Every user request has a context. It describes the request and defines the response.
23+
- Besides, there're [Cookie], [Session], [Helper], etc.
24+
25+
## Features
26+
27+
Egg provides a range of utilities you can use in your day to day development.
28+
29+
- [Plugins]: The foundation of Egg's eco-system. You can extend your applications using plugins just in one minute.
30+
- [Lifecycle]: Allow you to run your own code at different stages.
31+
- [Logs]: Logging anything to anywhere. It is crucial for monitoring and debugging.
32+
- [Error handling]: Make the application robust.
33+
- [Security]: Be safe.
34+
- Last but not least, [file uploading], [i18n].
35+
36+
[the structure of an Egg application]: ./directory.md
37+
[Controller]: ./controller.md
38+
[Service]: ./service.md
39+
[Router]: ./router.md
40+
[Cookie]: ./cookie.md
41+
[Session]: ./session.md
42+
[Application]: ./application.md
43+
[Context]: ./context.md
44+
[Middleware]: ./middleware.md
45+
[Plugins]: ./plugin.md
46+
[Lifecycle]: ./lifecycle.md
47+
[configurations]: ./config.md
48+
[Logs]: ./logger.md
49+
[Error handling]: ./error_handler.md
50+
[Helper]: ./helper.md
51+
[Security]: ../ecosystem/security/
52+
[file uploading]: ./upload.md
53+
[i18n]: ./i18n.md

0 commit comments

Comments
 (0)