You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
16
9
17
10
### Pre Requirements
18
11
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:
21
13
22
14
- Visual Studio 2017 v15.3.5 or higher
23
15
- SQL Server
24
16
25
17
### Solution Structure (Layers)
26
18
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:
29
20
30
21
<imgsrc="images/solution-overall-2.png"alt="ASP.NET Zero solution structure"class="img-thumbnail"width="242"height="219" />
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.
47
29
-**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).
50
31
-**Migrator** project is a console application that runs database
51
32
migrations.
52
33
-**Tests** project contains unit and integration tests.
@@ -55,108 +36,72 @@ There are seven projects in the solution:
55
36
56
37
ASP.NET Zero solution contains **four** applications:
57
38
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).
66
42
-**Migrator**: Console application that runs database migrations.
67
43
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.
72
45
73
46
### Multi tenancy
74
47
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**.
79
49
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**.
86
52
87
53
There are two types of perspective in multi-tenant applications:
88
54
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.
91
56
-**Tenant**: Uses the application features. This is your customers.
92
57
93
-
ASP.NET Zero uses ABP's (ASP.NET Boilerplate) **[data
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.
99
59
100
60
### Web Site Root URL
101
61
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:
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;
117
77
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**.
121
79
2. You should configure IIS to bind this static IP to your application.
122
80
123
81
There may be other ways of doing it but this is the simplest.
124
82
125
83
## Front End MVC Application
126
84
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:
130
86
131
87
<imgsrc="images/frontend-homepage.jpg"alt="Frontend home page"class="img-thumbnail"width="500"height="496" />
132
88
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
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
148
96
**Login page** for the **backend** application.
149
97
150
98
### Layout
151
99
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:
**\_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.
0 commit comments