Skip to content

Commit a2d3ca1

Browse files
authored
Merge pull request aspnetzero#216 from aspnetzero/feat/zero-3580
Updated several documents
2 parents f30dcc6 + 458c9fb commit a2d3ca1

12 files changed

+267
-131
lines changed

docs/en/Development-Guide-Rad-Tool-Mac-Linux.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
## Introduction
44

5-
In this document, we will explain how to use **ASP.NET Zero Power Tools** without the Visual Studio extension.
5+
In this document, we will explain how to use **ASP.NET Zero Power Tools** without the Visual Studio extension.
66

7-
Purpose of the **ASP.NET Zero Power Tools VS Extension** is to create an input file. So, in order to use it without extension, input file needs to be created manually.
7+
Purpose of the **ASP.NET Zero Power Tools VS Extension** is to create an input file. So, in order to use it without extension, input file needs to be created manually.
8+
9+
You can find specification of the JSON file fields in the table below;
810

911
***Settings***
1012

@@ -30,11 +32,9 @@
3032
| NavigationProperties | Navigation properties of your entity. See 'Table 3' for more. |
3133
| EnumDefinitions | Enum definitions you use on your entity. See 'Table 4' for more. |
3234

33-
*Table 1*
34-
3535

3636

37-
***Properties:***
37+
***Properties (Array):***
3838

3939
| Name | Description |
4040
| ------------- | ------------------------------------------------------------ |
@@ -48,11 +48,9 @@
4848
| Regex | specifies the regex that this property should match |
4949
| UserInterface | Will this property be listed, have a filter and editable in ui?<br />`"UserInterface": {"List": true,"AdvancedFilter": true,"CreateOrUpdate": true}` |
5050

51-
*Table 2*
5251

5352

54-
55-
***NavigationProperties:***
53+
***NavigationProperties (Array):***
5654

5755
| Name | Description |
5856
| ------------------- | ------------------------------------------------------------ |
@@ -65,8 +63,6 @@
6563
| DuplicationNumber | If you have two navigation property that navigates to same foreign entity, number them starting from 1. If not, just skip this. |
6664
| RelationType | `single` is the only option. |
6765

68-
*Table 3*
69-
7066

7167

7268
***EnumDefinitions***
@@ -177,7 +173,7 @@
177173

178174
## Guide To Create A New Input File
179175

180-
You have to fill the fields of json file according to your entity. However, some of the fields must match our constants. Here is the list of them:
176+
You have to fill the fields of the JSON file for your entity. However, some of the fields must match our constants. Here is the list of them:
181177

182178
- MenuPosition : "main" | "admin"
183179

@@ -194,7 +190,7 @@ You have to fill the fields of json file according to your entity. However, some
194190

195191
### Properties
196192

197-
Properties are written as an array in JSON file. Add an object to that array for every property of your entity. There will be some unnecessary fields depending on property type. For example, you don't have to set regular expression for a numeric property or don't have to set range for a string.
193+
Properties are written as an array in JSON file. Add an object to that array for every property of your entity. There will be some unnecessary fields depending on property type. For example, you don't have to set regular expression for a numeric property or don't have to set range for a string.
198194

199195
A property should be one of those types:
200196

@@ -209,17 +205,17 @@ A property should be one of those types:
209205
- long
210206
- string
211207

212-
or one of the enums you declared in "EnumDefinitions".
208+
or one of the ENUMs you declared in "EnumDefinitions".
213209

214210
## How To Run Power Tools
215211

216-
You can use that command to run it on any device:
212+
You can use the command below to run it:
217213

218214
dotnet AspNetZeroRadTool.dll YourEntity.Json
219215

220216
## Notes
221217

222-
- AspNetZeroRadTool folder is placed in your solution's directory. You have to place the json file and run the command in there.
223-
- Please Keep in mind that JSON file is completely case sensitive.
218+
- AspNetZeroRadTool folder is placed under aspnet-core folder of your solution. You have to place the json file and run the command in there.
219+
- Please Keep in mind that JSON file is completely **case sensitive**.
224220
- Auto add-migration and update-database functions are disabled.
225221
- If you are working on ASP.NET Core & Angular template, after generating the entity via Power Tools, run your ***.Web.Host** project and then run "**./angular/nswag/refresh.bat**" to update **service-proxies.ts**.

docs/en/Development-Guide-Rad-Tool.md

Lines changed: 20 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,51 @@
11
# Development Guide
22

3-
![Generated page result](images/RadToolCarsTable2.jpg)
3+
In this document, we will introduce **ASP.NET Zero Power Tools** and explain it. ASP.NET Zero Power Tools minimizes the effort for creating CRUD pages. It generates all the layers from the database to the user interface by just defining an entity.
44

5-
## Introduction
6-
7-
In this document, we will introduce **ASP.NET Zero Power Tools** and explain it. This tool is developed to minimize the effort of creating a new CRUD page. It creates all the related layers from the database to the user interface by just defining an entity. This tool supports ASP.NET Zero v5.0.0 and later versions.
8-
9-
## Download And Install
10-
11-
If your project version is 5.1.0+, all you have to do is just install the **ASP.NET Zero Power Tools** extension on Visual Studio from [marketplace](https://marketplace.visualstudio.com/items?itemName=Volosoft.AspNetZeroPowerTools) or Extension and Updates.
12-
13-
![Extension installation](images/rad-extension-install.png)
14-
15-
**The Rad tool may require the EF Core tool during database migration. Please refer to its documentation to install it properly.**
16-
17-
https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet
5+
> ASP.NET Zero Power Tools supports ASP.NET Zero v5.0.0 and above versions.
186
197
## How To Use It?
208

21-
The extension can be found inside the **Tools** menu (Tools -> Asp.Net Zero -> Create An Entity). When you run it, you will see the interface for creating an entity. After carefully filling out the fields, press the **Generate** button to start the code generation process.
22-
23-
![Extension UI](images/RadToolUI3New_2.png)
9+
You can use ASP.NET Zero Power Tools in two ways:
2410

25-
A simple console will appear and give you information about the process. If there is no warning or failure, run your project to see the results. If you don't see the new page on UI, grant yourself the required **permissions** in the application.
11+
1. as a Visual Studio Extension
12+
2. Using its DLL files directly with a command line.
2613

27-
Warning: If you are working on ASP.NET Core & Angular template, after generating the entity via Power Tools, run your ***.Web.Host** project and then run "**./angular/nswag/refresh.bat**" to update **service-proxies.ts**.
28-
29-
Warning: Be sure that you have saved your work before running this tool since it will add new files and modify some of the existing files. We strongly recommend using a source control system (like Git). Otherwise, backup your project.
14+
Visual Studio Extension is available for Windows version of Visual Studio. Mac and Linux users can use DLL of ASP.NET Zero Power Tools to generate CRUD pages.
3015

3116
## How It Works?
3217

33-
DLLs (that are inside the folder mentioned above) do all the work. The extension is just a user interface. This design is required, otherwise it would only be available for Visual Studio Windows users. However, since the tool is built on .NET Core platform, **Mac** or **Linux** users can safely use the tool.
34-
35-
On Mac and Linux, you have to manually do some of the work that is done by the extension. This involves just creating a short and basic[ JSON file](https://aspnetzero.com/Documents/Development-Guide-Rad-Tool-Mac-Linux) as input.
18+
DLLs (that are inside the ```aspnet-core\AspNetZeroRadTool``` folder in your solution) do all the work. The extension is just a user interface. Since the tool is built with .NET Core, **Mac** or **Linux** users can safely use it without the user interface.
3619

37-
## Navigation Properties
20+
Using ASP.NET Zero Power Tools on Mac and Linux requires a bit more effort. You have to create a [ JSON file](https://aspnetzero.com/Documents/Development-Guide-Rad-Tool-Mac-Linux) as input for code generation manually. For using ASP.NET Zero Power Power Tools in Mac or Linux, please check [Development Guide(Mac/Linux) document](Development-Guide-Rad-Tool-Mac-Linux).
3821

39-
A navigation property is a type of property on an entity that allows for navigation from one end of an association to the other end. Unlike other properties, navigation properties do not carry data.
22+
Visual Studio extension of ASP.NET Zero Power Tools also uses this DLL file for code generation.
4023

41-
Navigation properties provide a way to navigate an association between two entity types. Every object can have a navigation property for every relationship in which it participates. In ASP.NET Zero, a navigation property allows you create a button on the data table, where you can pick a record from a look up table.
24+
## Edit Pre-defined Templates
4225

43-
Power Tools allow you to create a navigation property for only **1-to-many (1:N)** relationships.
26+
Power Tools uses text templates for code generation, and these templates are located inside ```/AspNetZeroRadTool/FileTemplates``` directory in your project's root directory. Each template is split into three files:
4427

45-
In this scenario there are multiple records from one entity associated with a single record from another entity. This means you have a parent (or primary) entity and many related (or child) entities.
28+
* **MainTemplate.txt**: Power Tools uses this template for main code generation.
29+
* **PartialTemplates.txt**: Power Tools renders some placeholders in MainTemplate.txt conditionally. These conditional templates are stored in PartialTemplates.txt.
30+
* **TemplateInfo.txt**: Stores information about the template like path and condition.
4631

47-
- `Car` entity (1) is associated to `Producer` entity (N).
48-
- `Car` entity (1) is associated to `Country` entity (N).
32+
If you want to edit any file, copy it in the same directory and change it's an extension to ```.custom.txt``` from ```.txt```. For example, you can create ```MainTemplate.custom.txt``` to override ```MainTemplate.txt``` in the same directory. Please don't make any changes to the original templates.
4933

50-
*Currently there's no support for many-to-1 (N:1) or many-to-many (N:N) relationships!*
34+
## Create A New Template
5135

52-
A foreign keys is automatically being created for each navigation property.
36+
You can also create new templates for code generation. Power Tools will generate new files based on your new templates during code generation. To create a new template, do the same process as editing a pre-defined template.
5337

54-
The diagram below shows a conceptual model with three entity types: `Car`, `Producer` and `Country`.
55-
Navigation properties are `Producer` and `Country` that are defined on the `Car` entity.
38+
Power Tools discovers templates in the ```/FileTemplates``` directory every time it is run. So, restarting Power Tools will find your newly created templates.
5639

57-
![Navigation property creation example](images/rad-tool-navigation-property-create.png)
58-
59-
![Navigation property example](images/rad-tool-navigation-property-example.png)
60-
61-
## How To Edit Pre-defined Templates Or Create A New Template?
62-
63-
The templates are inside "/AspNetZeroRadTool/FileTemplates" directory in your project's root directory. Every template is split into three files: "MainTemplate.txt", "PartialTemplates.txt" and "TemplateInfo.txt". If you want to edit any file, just copy it in same directory and change it's extension to ".custom.txt" from ".txt". For example, you can create "MainTemplate.custom.txt" to override "MainTemplate.txt" in same directory. Please don't make any changes to the original templates.
64-
65-
To create a new template, do the same process as editing a pre-defined template. The tool doesn't know any info about templates and discovers them in the "/FileTemplates" directory every time it is run. This means your new template will be processed like the pre-defined ones. (".custom" extension is not needed for new templates.)
66-
67-
You can report your issues or ask questions on [GitHub](https://github.com/aspnetzero/aspnet-zero-core) or [support.aspnetzero.com](https://support.aspnetzero.com).
68-
69-
## How To Change Destination Path Of New Files?
40+
## Change Destination Path Of New Files
7041

7142
To change the destination path of a template, find the template folder of it in "AspNetZeroRadTool/FileTemplates" directory and edit the content of **TemplateInfo.txt** file.
7243

7344
Also, if you have moved a file that is going to be modified during rad tool generation, you can modify "AspNetZeroRadTool/**config.json**" file and set the new path of this file.
7445

75-
7646
## Generated Files
7747

78-
Here is the full list of the files that are created or modified by the tool, if you give a basic "Cars" entity as input.
48+
Here is the full list of the files that are created or modified by the tool, if you give a basic "Cars" entity as input.
7949

8050
### Server Side
8151

@@ -151,9 +121,6 @@ Also, if you have moved a file that is going to be modified during rad tool gene
151121
- (AppArea)PageNames.cs
152122

153123
> Note that lookup files are being created per foreign key.
154-
>
155-
156-
157124
158125
## Final Result
159126

docs/en/Getting-Started.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Getting Started
22

3-
This document is aimed to create and run an ASP.NET Zero based project.
4-
It's assumed that you already [purchased](https://aspnetzero.com/Pricing) and created your
5-
ASP.NET Zero account.
3+
This document guides you through creating and running an ASP.NET Zero project. This document assumes that you've already purchased an [ASP.NET Zero license](https://aspnetzero.com/Pricing) and have an active ASP.NET Zero account.
64

75
## Project Types
86

9-
- [ASP.NET Core & jQuery](../../aspnet-core-mvc/latest/Getting-Started-Core)
7+
ASP.NET Zero provides four different architecture options. Please select the one you want to use and follow its Getting Started document.
8+
9+
- [ASP.NET Core MVC](../../aspnet-core-mvc/latest/Getting-Started-Core)
1010
- [ASP.NET Core & Angular](../../aspnet-core-angular/latest/Getting-Started-Angular)
11-
- [ASP.NET MVC 5x & jQuery](../../aspnet-mvc-jquery/latest/Getting-Started-Mvc-Angularjs)
12-
- [ASP.NET MVC 5x & AngularJS 1x](../../aspnet-mvc-angularjs/latest/Getting-Started-Mvc-Angularjs)
11+
- [ASP.NET MVC 5.x & jQuery](../../aspnet-mvc-jquery/latest/Getting-Started-Mvc-Angularjs)
12+
- [ASP.NET MVC 5.x & AngularJS](../../aspnet-mvc-angularjs/latest/Getting-Started-Mvc-Angularjs)
1313

1414
### MacOS Platform
1515
- [ASP.NET Core & Angular on MacOSX](../../aspnet-core-angular/latest/Getting-Started-MacOSX)

docs/en/Index-Common.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,42 @@
22

33
## Introduction
44

5-
ASP.NET Zero is a starting point for new web applications with a **modern UI** and **SOLID architecture**. It implements basic/common requirements of a **line of business applications**. You get it's **source code** and develop your business application on top of it for saving your valuable time to **focus on your own business code**.
5+
ASP.NET Zero is a starting point for new web applications with a **modern UI** and **SOLID architecture**. It implements basic/common requirements of **line of business applications**. You get its **source code** and develop your business application on top of it for saving your valuable time to **focus on your business code**.
66

77
## Project Types
88

9-
ASP.NET Zero has multiple architecture options. Select the one you want to prefer:
9+
ASP.NET Zero has multiple architecture options. Each option has its own documentation:
1010

11-
- [ASP.NET Core & jQuery](/en/aspnet-core-mvc/latest/Getting-Started-Core)
11+
- [ASP.NET Core MVC](/en/aspnet-core-mvc/latest/Getting-Started-Core)
1212
- [ASP.NET Core & Angular](/en/aspnet-core-angular/latest/Getting-Started-Angular)
1313
- [ASP.NET MVC 5x & jQuery](/en/aspnet-mvc-jquery/latest/Getting-Started-Mvc-Angularjs)
1414
- [ASP.NET MVC 5x & AngularJS 1x](/en/aspnet-mvc-angularjs/latest/Getting-Started-Mvc-Angularjs)
1515

16-
## Miscellaneous
16+
## Before Getting Started
17+
18+
### ASP.NET Boilerplate
19+
20+
ASP.NET Zero is built on top of [ASP.NET Boilerplate](https://aspnetboilerplate.com/) web application framework. ASP.NET Boilerplate is also developed by [Volosoft](https://volosoft.com/). You can refer to [ASP.NET Boilerplate documentation](https://aspnetboilerplate.com/Pages/Documents) to learn more about its capabilities.
21+
22+
### GitHub
23+
24+
ASP.NET Zero customers can access ASP.NET Zero's private GitHub repository and track changes in the project or contribute to the project. Customers can manage their GitHub users on [aspnetzero.com/LicenseManagement](https://aspnetzero.com/LicenseManagement) and gain access to ASP.NET Zero's private repository.
25+
26+
### Support
27+
28+
ASP.NET Zero customers can get help for the technical issues on the support website [support.aspnetzero.com](https://support.aspnetzero.com) ASP.NET Zero customers can log in to support website using their aspnetzero.com credentials.
1729

1830
### Power Tools
1931

20-
ASP.NET Zero Power Tools, helps you to create an entity and its corresponding layers from database to the user interface. It is a Visual Studio Extension hosted on Visual Studio Marketplace. [Go to Power Tools](https://marketplace.visualstudio.com/items?itemName=Volosoft.AspNetZeroPowerTools) or [see how to use it](Rapid-Application-Development.md).
32+
ASP.NET Zero Power Tools helps you create an entity and its corresponding layers from the database to the user interface. It is a Visual Studio Extension hosted on Visual Studio Marketplace. [Go to Power Tools](https://marketplace.visualstudio.com/items?itemName=Volosoft.AspNetZeroPowerTools) or [see how to use it](Rapid-Application-Development.md). You can also use ASP.NET Zero Power Tools via the command-line interface.
33+
34+
### Metronic
35+
36+
ASP.NET Zero uses [Metronic](https://keenthemes.com/metronic/) theme and includes its source code. ASP.NET Zero customers can access Metronic's GitHub repository and its source code by filling the form on [https://keenthemes.com/metronic/?page=github](https://keenthemes.com/metronic/?page=github). To get your Metronic Purchase Code, please send an email to [email protected]
37+
38+
### Upgrade
39+
40+
You can upgrade your ASP.NET Zero solution when a new version is available. Before starting development, please follow [Version Upgrade](Version-Updating.md) document to set up your branching strategy so that you can get updates of ASP.NET Zero easily.
2141

2242
### Change Logs
2343

@@ -29,11 +49,4 @@ See the [road map](Road-Map.md) for some planned features for next releases.
2949

3050
### Old Documents
3151

32-
[Click here](Old-Documents.md) for documents older than v6.2.
33-
34-
## External Links
35-
36-
ASP.NET Zero is developed based on the **ASP.NET Boilerplate** web application framework and the **Metronic** UI Theme. So, you can refer to their web sites to learn more about capabilities of ASP.NET Zero, other details and UI options.
37-
38-
- [ASP.NET Boilerplate](https://aspnetboilerplate.com/Pages/Documents)
39-
- [Metronic](http://www.keenthemes.com/preview/metronic/)
52+
[Click here](Old-Documents.md) for documents older than v6.2.

0 commit comments

Comments
 (0)