Skip to content

Commit 7a72b25

Browse files
committed
Revised asp.net core overview document
1 parent 6045f2e commit 7a72b25

File tree

3 files changed

+60
-52
lines changed

3 files changed

+60
-52
lines changed

docs/en/Features-Mvc-Core-Login.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Login
22

3+
## Account Controller
4+
5+
**AccountController** provides **login**, **register**, **forgot password** and **email activation** pages.
6+
7+
## Layout
8+
9+
Account management pages have a separated **\_Layout** view under **Views/Account** folder:
10+
11+
<img src="images/account-views-core-v2.png" alt="Account Views" class="img-thumbnail" width="216" height="214" />
12+
13+
Related **Script** and **Style** resources located under **view-resources/Views/Account** folder:
14+
15+
<img src="images/account-views-core-resources.png" alt="Account view resources" class="img-thumbnail" width="205" height="347" />
16+
17+
As similar, all views of the application have corresponding style and script files under **wwwroot/view-resources** folder.
18+
19+
## Login Page
20+
321
Main view for `AccountController` is the Login page:
422

523
<img src="images/login-screen-3.png" alt="Login page" class="img-thumbnail" />
@@ -12,9 +30,9 @@ We can use **admin** user name and **123qwe** password in first run the applicat
1230

1331
After changing password we are redirected to the **backend application**.
1432

15-
## User Lockout
33+
### User Lockout
1634

17-
As seen in the previous section, you can configure user lockout settings. Users are lockout when they enter wrong password for a specified count and duration.
35+
Users are lockout when they enter wrong password for a specified count and duration. You can configure lockout settings in the settings page of the application.
1836

1937
## Next
2038

docs/en/Overview-Angular.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ There may be other ways of doing it but this is the simplest way.
7171

7272
> In the development time, you don't need to use subdomains for tenants for a simpler development experience. When you do like that, a 'tenant switch' dialog is used to manually switch between tenants.
7373
74-
#### AppComponentBase
74+
### AppComponentBase
7575

7676
If you inherit your components from **AppComponentBase** class, you can get many commonly used services as pre-injected (like localization, permission checker, feature checker, UI notify/message, settings and so on...). For example; you can just use **l(...)** function (lowercase of 'L') In views and **this.l(...)** function in component classes for localization. See pre-built components for example usages.
7777

docs/en/Overview-Core.md

Lines changed: 39 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,19 @@
22

33
## Introduction
44

5-
In this document, a new sample project is created named **Acme.PhoneBookDemo**. This document is a complete guide while developing your project. We definitely suggest to read this document before starting to the development. Since ASP.NET Zero is built on [ASP.NET Boilerplate](https://aspnetboilerplate.com/) application framework, this document highly refers it's [documentation](https://aspnetboilerplate.com/Pages/Documents).
6-
7-
Before reading this document, it's suggested to run the application and explore the user interface. This will help you to have a better understanding of concepts defined here.
8-
9-
### Prerequirements
10-
11-
Following tools are needed in order to use ASP.NET Zero Core solution:
12-
13-
- [Visual Studio 2017 v15.3.5+](https://www.visualstudio.com)
14-
- [Typescript 2.0+](https://www.microsoft.com/en-us/download/details.aspx?id=48593)
15-
- [Node.js 6.9+ with NPM 3.10+](https://nodejs.org/en/download/)
16-
- [Gulp](https://www.npmjs.com/package/gulp) (*must be installed globally*)
17-
- [Yarn](https://yarnpkg.com/)
5+
Before reading this document, it's suggested to run the application and explore the user interface as described in the [Getting Started document](Getting-Started-Core.md). This will help you to have a better understanding of the concepts defined here.
186

197
## Solution Structure (Layers)
208

219
After you create and [download](https://aspnetzero.com/Download) your project, you have a solution structure as shown below for **\*.Web.sln**:
2210

23-
There are two more solutions, **\*.Mobile.sln** contains only Xamarin application development projects and **\*.All.sln** contains both mobile and web development projects.
24-
2511
<img src="images/solution-overall-core-5.png" alt="ASP.NET Core solution" class="img-thumbnail" />
2612

13+
There are two more solutions:
14+
15+
* **\*.Mobile.sln** contains the Xamarin projects
16+
* **\*.All.sln** contains both mobile and web development projects.
17+
2718
There are 12 projects in the solution:
2819

2920
- **Core.Shared** project contains `consts`, `enums` and helper classes used both in mobile & web projects.
@@ -41,42 +32,40 @@ There are 12 projects in the solution:
4132

4233
### Applications
4334

44-
ASP.NET Zero solution contains 4 applications:
35+
ASP.NET Zero solution contains four applications:
4536

46-
- **Back End Application** `Web.Mvc`: This is the main application which needs authentication to access. You will mostly work on this application to add your business logic. Backend application is built in a dedicated area, named "**App**" by default, but can be determined while you are [creating the solution](Getting-Started-Core). So, all controllers, views and models are located under **Areas/App** folder. Also, related script and style files are located under **wwwroot/view-resources/Areas/App** folder, as shown below:
37+
- **Back End Application** (`Web.Mvc`): This is the main application which needs authentication to access. You will mostly work on this application to add your business logic. Backend application is built in a dedicated area, named "**App**" by default, but can be configured while you are [creating the solution](Getting-Started-Core). So, all controllers, views and models are located under the **Areas/App** folder. Related script and style files are located under **wwwroot/view-resources/Areas/App** folder, as shown below:
4738

4839
<img src="images/app-folders-core.png" alt="Application folders" class="img-thumbnail" width="161" height="381" />
4940

50-
- **Back End API** `Web.Host`: An application to only serve the main application as API and does not provide UI.
51-
52-
- **Public Web Site** `Web.Public`: This can be used to create a public web site or a landing page for your application.
53-
54-
- **Migration Applier** `Migrator`: Console application that runs database migrations.
41+
- **Back End API** (`Web.Host`): An application to only serve the main application as REST API and does not provide any UI.
5542

56-
## Multi-Tenancy
43+
- **Public Web Site** (`Web.Public`): This can be used to create a public web site or a landing page for your application.
5744

58-
Multi-tenancy is used to build **SaaS** (Software as a Service) applications easily. With this technique, we can deploy **single application** to serve to **multiple customers**. Each Tenant will have it's own **roles**, **users** and **settings**.
45+
- **Migration Executer** (`Migrator`): Console application that runs database migrations.
5946

60-
ASP.NET Zero's all code-base is developed to be **multi-tenant**. But, it [**can be disabled**](Getting-Started-Core#multi-tenancy) with a single line of configuration if you are developing a **single-tenant** application. When you disable it, all multi-tenancy stuff will be hidden and not available. If multi-tenancy is disabled, there will be a single tenant named **Default**.
61-
62-
There are two types of perspective in multi-tenant applications:
63-
64-
- **Host**: Manages tenants and system.
65-
- **Tenant**: Uses the application features.
66-
67-
Read [multi tenant documentation](https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy) if you are building multi-tenant applications.
68-
69-
## Website Root URL
47+
## Basic Configuration
7048

7149
`appsettings.json` in Web.Mvc project contains a setting **WebSiteRootAddress**, which stores the root URL of the web application:
7250

7351
```csharp
7452
"WebSiteRootAddress": "http://localhost:62114/"
7553
```
7654

55+
It's used to calculate some URLs in the application. So, you need to change this on production.
56+
57+
### Multi-Tenancy
58+
59+
Multi-tenancy is used to build **SaaS** (Software as a Service) applications easily. With this technique, we can deploy **single application** to serve to **multiple customers**. Each Tenant will have it's own roles, users, settings and other data.
7760

61+
ASP.NET Zero's code-base is developed to be **multi-tenant**. But, it [**can be disabled**](Getting-Started-Core#multi-tenancy) with a single line of configuration if you are developing a **single-tenant** application. When you disable it, all multi-tenancy stuff will be hidden. If multi-tenancy is disabled, there will be a single tenant named **Default**.
7862

79-
It's used to calculate some URLs in the application. So, you need to change this on deployment. For multi-tenant applications, this URL can contain dynamic tenancy name. In that case, put {TENANCY\_NAME} instead of tenancy name like:
63+
There are two types of perspective in multi-tenant applications:
64+
65+
- **Host**: Manages tenants and the system.
66+
- **Tenant**: Uses the actual application features and pays for it.
67+
68+
For multi-tenant applications, Web Site Root URL can contain dynamic tenancy name. In that case, put {TENANCY\_NAME} as a placeholder for tenancy name like:
8069

8170
```csharp
8271
"WebSiteRootAddress": "http://{TENANCY_NAME}.mydomain.com/"
@@ -88,26 +77,27 @@ Thus, ASP.NET Zero can automatically detect current tenant from URLs. If you con
8877
**\*.mydomain.com**.
8978
2. You should configure IIS to bind this static IP to your application.
9079

91-
Similar to **WebSiteRootAddress**, **ServerRootAddress** setting is also exists in `appsettings.json` in .Web.Host project. In addition, .Web.Host application contains **ClientRootAddress** which is used if this API
92-
is used by the [Angular UI](Developing-Step-By-Step-Angular-Introduction). If you are not using Angular UI, you can ignore it. Finally, **CorsOrigins** setting is used to allow some domains for cross origin requests. This is also useful when you are hosting your Angular UI in a separated server/domain.
93-
94-
## Account Controller
95-
96-
**AccountController** provides **login**, **register**, **forgot password** and **email activation** pages.
80+
There may be other ways of doing it but this is the simplest way.
9781

98-
## Layout
82+
> In the development time, you don't need to use subdomains for tenants for a simpler development experience. When you do like that, a 'tenant switch' dialog is used to manually switch between tenants.
9983
100-
Account management pages have a separated **\_Layout** view under **Views/Account** folder:
84+
Check out the [multi tenant documentation](https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy) if you are building multi-tenant applications.
10185

102-
<img src="images/account-views-core-v2.png" alt="Account Views" class="img-thumbnail" width="216" height="214" />
86+
Similar to **WebSiteRootAddress**, **ServerRootAddress** setting is also exists in `appsettings.json` in .Web.Host project.
10387

104-
Related **Script** and **Style** resources located under **view-resources/Views/Account** folder:
88+
### Angular UI
10589

106-
<img src="images/account-views-core-resources.png" alt="Account view resources" class="img-thumbnail" width="205" height="347" />
90+
In addition, .Web.Host application contains **ClientRootAddress** which is used if this API
91+
is used by the Angular UI. If you are not using Angular UI, you can ignore it.
10792

108-
As similar, all views of the application have corresponding style and script files under **wwwroot/view-resources** folder.
93+
**CorsOrigins** setting is used to allow some domains for cross origin requests. This is also useful when you are hosting your Angular UI in a separated server/domain.
10994

11095
## Next
11196

112-
- [Features](Features-Mvc-Core) to understand the features.
113-
- [Step by Step Development](Developing-Step-By-Step-Core-Introduction) tutorial leads you to develop a multi-tenant, localized, authorized, configurable and testable application step by step.
97+
- Web Application
98+
- [Features](Features-Mvc-Core.md)
99+
- [Development Tutorial](Developing-Step-By-Step-Core-Introduction.md)
100+
- [Deployment](Deployment-Mvc-Core.md)
101+
- Mobile (Xamarin) Application
102+
- [Development Guide](Development-Guide-Xamarin.md)
103+
- [Development Tutorial](Developing-Step-By-Step-Xamarin)

0 commit comments

Comments
 (0)