|
1 | 1 | ---
|
2 | 2 | title: Guide
|
3 |
| -navTitle: Egg Guide |
| 3 | +navTitle: Guide |
4 | 4 | toc: false
|
5 | 5 | ---
|
6 | 6 |
|
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 we 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