Skip to content

Commit 9d9d725

Browse files
authored
Merge pull request #305 from aspnetzero/remove-mvc5-documents
Remove MVC 5.x documents
2 parents 2ba0935 + 2a2ecf4 commit 9d9d725

12 files changed

Lines changed: 2007 additions & 7409 deletions

doc-obsolete/Developing-Step-By-Step-MPA.md

Lines changed: 994 additions & 901 deletions
Large diffs are not rendered by default.

doc-obsolete/Developing-Step-By-Step-Mvc-Angularjs.md

Lines changed: 925 additions & 908 deletions
Large diffs are not rendered by default.

doc-obsolete/Development-Guide-Mvc-Angularjs.md

Lines changed: 41 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,32 @@
22

33
## Introduction
44

5-
In the [Getting Started](Getting-Started.md) document, a new sample
6-
project is created named "**Acme.PhoneBook**". This document is a guide
7-
while developing your project. You should definitely read this document
8-
before starting your custom development. Since ASP.NET Zero is built on
9-
[ASP.NET Boilerplate](https://aspnetboilerplate.com/) application
10-
framework, this document repeatedly refers ASP.NET Boilerplate's
11-
[documentation](https://aspnetboilerplate.com/Pages/Documents).
12-
13-
Before reading this document, you should run the application and explore
14-
the user interface. This will help you to have a better understanding of
15-
concepts defined here.
5+
In the [Getting Started](Getting-Started-Mvc-Angularjs) document, a new sample project is created named "**Acme.PhoneBook**". This document is a guide while developing your project. You should definitely read this document
6+
before starting your custom development. Since ASP.NET Zero is built on [ASP.NET Boilerplate](https://aspnetboilerplate.com/) application framework, this document repeatedly refers ASP.NET Boilerplate's [documentation](https://aspnetboilerplate.com/Pages/Documents).
7+
8+
Before reading this document, you should run the application and explore the user interface. This will help you to have a better understanding of concepts defined here.
169

1710
### Pre Requirements
1811

19-
The following tools are needed in order to use the ASP.NET Zero
20-
solution:
12+
The following tools are needed in order to use the ASP.NET Zero solution:
2113

2214
- Visual Studio 2017 v15.3.5 or higher
2315
- SQL Server
2416

2517
### Solution Structure (Layers)
2618

27-
When you create and [download](https://aspnetzero.com/Download) your project, there will be a
28-
solution structure as shown below:
19+
When you create and [download](https://aspnetzero.com/Download) your project, there will be a solution structure as shown below:
2920

3021
<img src="images/solution-overall-2.png" alt="ASP.NET Zero solution structure" class="img-thumbnail" width="242" height="219" />
3122

3223
There are seven projects in the solution:
3324

34-
- **Core** project contains domain layer classes (like
35-
[entities](https://aspnetboilerplate.com/Pages/Documents/Entities)
36-
and [domain
37-
services](https://aspnetboilerplate.com/Pages/Documents/Domain-Services)).
38-
- **Application** project contains application logic (like
39-
[application
40-
services](https://aspnetboilerplate.com/Pages/Documents/Application-Services)
41-
and
25+
- **Core** project contains domain layer classes (like [entities](https://aspnetboilerplate.com/Pages/Documents/Entities) and [domain services](https://aspnetboilerplate.com/Pages/Documents/Domain-Services)).
26+
- **Application** project contains application logic (like [application services](https://aspnetboilerplate.com/Pages/Documents/Application-Services) and
4227
[DTO](https://aspnetboilerplate.com/Pages/Documents/Data-Transfer-Objects)s).
43-
- **EntityFramework** project contains your DbContext,
44-
[repository](https://aspnetboilerplate.com/Pages/Documents/Repositories)
45-
implementations, database migrations and other EntityFramework
46-
specific concepts.
28+
- **EntityFramework** project contains your DbContext, [repository](https://aspnetboilerplate.com/Pages/Documents/Repositories) implementations, database migrations and other EntityFramework specific concepts.
4729
- **WebApi** project contains Web API Controllers.
48-
- **Web** project contains the presentation layer (javascripts, styles
49-
and views).
30+
- **Web** project contains the presentation layer (JavaScript, styles and views).
5031
- **Migrator** project is a console application that runs database
5132
migrations.
5233
- **Tests** project contains unit and integration tests.
@@ -55,108 +36,72 @@ There are seven projects in the solution:
5536

5637
ASP.NET Zero solution contains **four** applications:
5738

58-
- **Front End MVC Application**: This can be used to create a public
59-
web site or a landing page for your application.
60-
- **AngularJS Back End Single-Page** **Application**. This is the
61-
application which is entered by username and password. It's built as
62-
a SPA with AngularJS.
63-
- **MVC Back End Multi-Page Application**: This has identical
64-
functionality with the AngularJS application but is built using MVC
65-
and jQuery (no AngularJS).
39+
- **Front End MVC Application**: This can be used to create a public web site or a landing page for your application.
40+
- **AngularJS Back End Single-Page** **Application**. This is the application which is entered by username and password. It's built as a SPA with AngularJS.
41+
- **MVC Back End Multi-Page Application**: This has identical functionality with the AngularJS application but is built using MVC and jQuery (no AngularJS).
6642
- **Migrator**: Console application that runs database migrations.
6743

68-
Thus, the back-end application is built in two different architectures
69-
(SPA and MPA). You can choose the one you are most comfortable with. If
70-
you just want to build a SPA, you can safely remove MPA files from your
71-
project, or vice versa.
44+
Thus, the back-end application is built in two different architectures (SPA and MPA). You can choose the one you are most comfortable with. If you just want to build a SPA, you can safely remove MPA files from your project, or vice versa.
7245

7346
### Multi tenancy
7447

75-
Multi-tenancy is used to build **SaaS** (Software as a Service)
76-
applications easily. With this technique, we can deploy **single
77-
application** to serve to **multiple customers**. Each Tenant will have
78-
it's own **roles**, **users** and **settings**.
48+
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**.
7949

80-
All of the ASP.NET Zero's code-base is developed to be **multi-tenant**.
81-
But, it [**can be disabled**](Getting-Started#DocConfigureMultiTenancy)
82-
with a single line of configuration if you are developing
83-
**single-tenant** application. If you disable it, all multi-tenancy
84-
stuff will be hidden and not available. If multi-tenancy is disabled,
85-
there will be a single tenant named **Default**.
50+
All of the ASP.NET Zero's code-base is developed to be **multi-tenant**. But, it [**can be disabled**](Getting-Started-Mvc-Angularjs#DocConfigureMultiTenancy)
51+
with a single line of configuration if you are developing **single-tenant** application. If 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**.
8652

8753
There are two types of perspective in multi-tenant applications:
8854

89-
- **Host**: Manages tenants and system. This is you, the SaaS
90-
provider.
55+
- **Host**: Manages tenants and system. This is you, the SaaS provider.
9156
- **Tenant**: Uses the application features. This is your customers.
9257

93-
ASP.NET Zero uses ABP's (ASP.NET Boilerplate) **[data
94-
filters](https://aspnetboilerplate.com/Pages/Documents/Data-Filters)**.
95-
Therefore it automatically filters tenant data if you properly use
96-
filter interfaces. Read [multi-tenant
97-
documentation](https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy)
98-
if you are building multi-tenant applications.
58+
ASP.NET Zero uses ABP's (ASP.NET Boilerplate) **[data filters](https://aspnetboilerplate.com/Pages/Documents/Data-Filters)**. Therefore it automatically filters tenant data if you properly use filter interfaces. Read [multi-tenant documentation (https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy) if you are building multi-tenant applications.
9959

10060
### Web Site Root URL
10161

102-
**web.config** file contains a setting, named "**WebSiteRootAddress**",
103-
which stores root URL of the web application:
62+
**Web.config** file contains a setting, named "**WebSiteRootAddress**", which stores root URL of the web application:
10463

105-
<add key="WebSiteRootAddress" value="http://localhost:6240/" />
64+
```xml
65+
<add key="WebSiteRootAddress" value="http://localhost:6240/" />
66+
```
10667

107-
It's used to calculate some URLs in the application. So, you need to
108-
change this on deployment. For multi-tenant applications, this URL can
68+
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
10969
contain dynamic tenancy name. In that case, put {TENANCY\_NAME} instead
11070
of tenancy name like:
11171

112-
<add key="WebSiteRootAddress" value="http://{TENANCY_NAME}.mydomain.com/" />
72+
```xml
73+
<add key="WebSiteRootAddress" value="http://{TENANCY_NAME}.mydomain.com/" />
74+
```
11375

114-
Thus, ASP.NET Zero can automatically detect current tenant from URLs. If
115-
you configure it as above, you should also redirect all subdomains to
116-
your application. To do that;
76+
Thus, ASP.NET Zero can automatically detect current tenant from URLs. If you configure it as above, you should also redirect all subdomains to your application. To do that;
11777

118-
1. You should configure DNS to redirect all subdomains to a static IP
119-
address. To declare 'all subdomains', you can use a wildcard e.g.
120-
**\*.mydomain.com**.
78+
1. You should configure DNS to redirect all subdomains to a static IP address. To declare 'all subdomains', you can use a wildcard e.g. **\*.mydomain.com**.
12179
2. You should configure IIS to bind this static IP to your application.
12280

12381
There may be other ways of doing it but this is the simplest.
12482

12583
## Front End MVC Application
12684

127-
ASP.NET Zero contains front-end pages that can be a starting point for
128-
your public web site or a landing page for the application. When you
129-
first run the project, you will see the Home Page as shown below:
85+
ASP.NET Zero contains front-end pages that can be a starting point for your public web site or a landing page for the application. When you first run the project, you will see the Home Page as shown below:
13086

13187
<img src="images/frontend-homepage.jpg" alt="Frontend home page" class="img-thumbnail" width="500" height="496" />
13288

133-
There are two pages here: **Home Page** and **About**. Content of these
134-
pages initially consists of placeholders for demo purposes that you
135-
should change. You can completely remove that content and build your
136-
page based on your needs. Also, you should change the **logo** with your
137-
Company's logo, of course.
138-
139-
See [metronic front-end
140-
theme](http://keenthemes.com/multi-purpose-corporate-frontend-themefreebie-corporate-frontend-theme/)
141-
to review the myriad options and components available as part of the
142-
theme - they are an extensive resource that will enable you to more
143-
quickly build a richer web site.
144-
145-
Menus are defined in **FrontEndNavigationProvider** class. When you add
146-
a new menu item here, it will be automatically shown in the menu. There
147-
is a **Login** link at the top right corner. This link takes us to the
89+
There are two pages here: **Home Page** and **About**. Content of these pages initially consists of placeholders for demo purposes that you should change. You can completely remove that content and build your
90+
page based on your needs. Also, you should change the **logo** with your Company's logo, of course.
91+
92+
See [metronic front-end theme](http://keenthemes.com/multi-purpose-corporate-frontend-themefreebie-corporate-frontend-theme/) to review the myriad options and components available as part of the
93+
theme - they are an extensive resource that will enable you to more quickly build a richer web site.
94+
95+
Menus are defined in **FrontEndNavigationProvider** class. When you add a new menu item here, it will be automatically shown in the menu. There is a **Login** link at the top right corner. This link takes us to the
14896
**Login page** for the **backend** application.
14997

15098
### Layout
15199

152-
Layout of front-end pages is located in the **Views/Layout** folder of
153-
the **.Web** project:
100+
Layout of front-end pages is located in the **Views/Layout** folder of the **.Web** project:
154101

155102
<img src="images/frontend-layout-views.png" alt="Layout views" class="img-thumbnail" width="168" height="234" />
156103

157-
**\_Layout** is the main layout file that includes scripts and styles.
158-
Language flags and the menu is rendered in **\_Header** file.
159-
\_PreFooter is not used but you can add it to the \_Layout if you want.
104+
**\_Layout** is the main layout file that includes scripts and styles. Language flags and the menu is rendered in **\_Header** file. \_PreFooter is not used but you can add it to the \_Layout if you want.
160105

161106
### Tenant Sign Up
162107

@@ -1278,11 +1223,11 @@ shown below:
12781223
[AbpAuthorize(AppPermissions.Pages_Tenants_Edit)]
12791224
public async Task<TenantEditDto> GetTenantForEdit(EntityRequestInput input)
12801225
{
1281-
return (await TenantManager.GetByIdAsync(input.Id)).MapTo<TenantEditDto>();
1226+
return ObjectMapper.MapTo<TenantEditDto>((await TenantManager.GetByIdAsync(input.Id)));
12821227
}
12831228
```
12841229

1285-
**MapTo** method does mapping.
1230+
**ObjectMapper's MapTo** method does mapping.
12861231

12871232
#### Custom Object Mappings
12881233

@@ -1495,9 +1440,6 @@ public class UserAppService_Delete_Tests : UserAppServiceTestBase
14951440
[Fact]
14961441
public async Task Should_Delete_User()
14971442
{
1498-
1499-
1500-
15011443
//Arrange
15021444
CreateTestUsers();
15031445

@@ -1510,7 +1452,6 @@ public class UserAppService_Delete_Tests : UserAppServiceTestBase
15101452
//Assert
15111453
user = await GetUserByUserNameOrNullAsync("artdent");
15121454
user.IsDeleted.ShouldBe(true);
1513-
15141455
}
15151456
}
15161457
```

0 commit comments

Comments
 (0)