diff --git a/docs/en/solution-templates/guide.md b/docs/en/solution-templates/guide.md index cb5cc5ae41..56bf92d1fe 100644 --- a/docs/en/solution-templates/guide.md +++ b/docs/en/solution-templates/guide.md @@ -34,8 +34,33 @@ When you create a new ABP solution, fundamental modules are already installed. Y ## The Startup Solution Templates -We understood what is a startup solution template. Now, we can explore which startup solution templates are provided by ABP Platform. +We understood what is a startup solution template. Now, we can explore which startup solution templates are provided by the ABP Platform. -### Single-Layer Solution Template +### Single-Layer Application Solution Template + +The [single-layer solution template](single-layer-web-application/index.md) is the most simple startup template. It provides a minimal solution architecture while starting a new project. Your .NET solution typically contains a single, or a few .NET projects depending on your UI and other preferences while creating your solution. + +The following figure shows a single-project web application that has [MVC (Razor Pages) UI](../framework/ui/mvc-razor-pages/overall.md) and [Entity Framework Core](../framework/data/entity-framework-core/index.md) database provider with default configuration: + +![single-layer-abp-solution](images/single-layer-abp-solution.png) + +As you see in the preceding figure, all the application code (entities, data access, services, UI pages, etc.) are located in a single .NET project. + +#### When to use the Single-Layer Solution Template? + +In the following conditions, you may consider to use the single-layer solution template: + +* If **your project is small** and you don't expect that it will grow by the time. But remember that many projects are thought as small in the beginning. +* If your project is a **temporary project** and it will be thrown away in a short time. It can be a POC project or a temporary application for a short-term advertisement campaign. +* If you are a single developer or there are only 2-3 developers working on your solution. +* If the developer(s) working on your solution are not experienced or don't understand the structure and benefits of a layered application, and don't want to learn it. + +If the preceding conditions are meet with your case, you can consider to start with this solution template. However, be noticed that your solution can quickly become a [big ball of mud](https://thedomaindrivendesign.io/big-ball-of-mud/). We think that only a very small portion of applications are suitable for that kind of structure that has not an explicit architecture. + +#### Can I use the Single-Layer Solution Template for Modular Applications? + +If you want to [build a modular application](../tutorials/modular-crm/index.md) and want to use that single-layer application as only the host application, then it can be a good decision to get started with this solution template. In that case, you can use that single-layer application just for referencing to other modules' .NET projects and use that host application for configuring the modules to run a monolith application. In that case, do not add any application functionality to the host application. Even if you need to make multi-module functionalities, just create another module that uses the modules you want to work on. + +### Layered Solution Template TODO \ No newline at end of file diff --git a/docs/en/solution-templates/images/single-layer-abp-solution.png b/docs/en/solution-templates/images/single-layer-abp-solution.png new file mode 100644 index 0000000000..034e412f1d Binary files /dev/null and b/docs/en/solution-templates/images/single-layer-abp-solution.png differ diff --git a/docs/en/solution-templates/index.md b/docs/en/solution-templates/index.md index 76a5348bec..aba26d01da 100644 --- a/docs/en/solution-templates/index.md +++ b/docs/en/solution-templates/index.md @@ -2,10 +2,10 @@ ABP provides pre-architected and production-ready templates to jump start a new solution. The following solution templates are provided out of the box: -* **[Single-Layer Solution](single-layer-web-application)**: A single-project solution. Recommended for building an application with a **simpler and easy to understand** architecture. -* **[Layered Solution](layered-web-application)**: A fully layered (multiple projects) solution based on [Domain Driven Design](../framework/architecture/domain-driven-design) practices. Recommended for long-term projects that need a **maintainable and extensible** codebase. -* **[Microservice Solution](microservice)**: A **distributed solution** to build **microservice systems**. It includes pre-built services, API gateways, web and mobile applications, Kubernetes and Helm configuration, and everything you need to start your large-scale microservice solution. -* **[Application Module](application-module)**: A template that can be used to create a **reusable [application module](../modules)** based on the [module development best practices & conventions](../framework/architecture/best-practices). It is also suitable for creating **services** (with or without UI). +* **[Single-Layer Solution](single-layer-web-application/index.md)**: A single-project solution. Recommended for building an application with a **simpler and easy to understand** architecture. +* **[Layered Solution](layered-web-application/index.md)**: A fully layered (multiple projects) solution based on [Domain Driven Design](../framework/architecture/domain-driven-design) practices. Recommended for long-term projects that need a **maintainable and extensible** codebase. +* **[Microservice Solution](microservice/index.md)**: A **distributed solution** to build **microservice systems**. It includes pre-built services, API gateways, web and mobile applications, Kubernetes and Helm configuration, and everything you need to start your large-scale microservice solution. +* **[Application Module](application-module/index.md)**: A template that can be used to create a **reusable [application module](../modules/index.md)** based on the [module development best practices & conventions](../framework/architecture/best-practices/index.md). It is also suitable for creating **services** (with or without UI). * **Others** - [MAUI Application](../get-started/maui.md) - [WPF Application](../get-started/wpf.md) diff --git a/docs/en/solution-templates/single-layer-web-application/index.md b/docs/en/solution-templates/single-layer-web-application/index.md index 5984ffa70a..5c910b7bbf 100644 --- a/docs/en/solution-templates/single-layer-web-application/index.md +++ b/docs/en/solution-templates/single-layer-web-application/index.md @@ -1,66 +1,14 @@ # Single Layer Application Solution Template -## Introduction - This template provides a simple solution structure with a single project. This document explains that solution structure in details. -### The Difference Between the Application Solution Templates - -ABP's [Layered Application Solution Template](../layered-web-application) provides a well-organized and layered solution to create maintainable business applications based on the [Domain Driven Design](../../framework/architecture/domain-driven-design) (DDD) practices. However, some developers find this template a little bit complex for simple and short-term applications. The single-layer application template has been created to provide a simpler development model for such applications. This template has the same functionality, features and modules on runtime with the [Layered Application Solution Template](../layered-web-application) but the development model is minimal and everything is in a single project (`.csproj`). - -## How to Start with It? - -You can use the [ABP CLI](../../cli) to create a new project using this startup template. Alternatively, you can generate a CLI command for this startup template from the [Get Started](https://abp.io/get-started) page. In this section, we will use the ABP CLI. - -Firstly, install the ABP CLI if you haven't installed it before: - -```bash -dotnet tool install -g Volo.Abp.Studio.Cli -``` - -Then, use the `abp new` command in an empty folder to create a new solution: - -```bash -abp new Acme.BookStore -t app-nolayers -``` - -* `Acme.BookStore` is the solution name, like *YourCompany.YourProduct*. You can use single-level, two-level or three-level naming. -* In this example, the `-t` (or `--template`) option specifies the template name. - -### Specify the UI Framework +## Getting Started -This template provides multiple UI frameworks: - -* `mvc`: ASP.NET Core MVC UI with Razor Pages (default) -* `blazor`: Blazor UI -* `blazor-server`: Blazor Server UI -* `angular`: Angular UI -* `none`: Without UI (for HTTP API development) - -Use the `-u` (or `--ui`) option to specify the UI framework while creating the solution: - -```bash -abp new Acme.BookStore -t app-nolayers -u angular -``` - -This example specifies the UI type (the `-u` option) as `angular`. You can also specify `mvc`, `blazor`, `blazor-server` or `none` for the UI type. - -### Specify the Database Provider - -This template supports the following database providers: - -- `ef`: Entity Framework Core (default) -- `mongodb`: MongoDB - -Use the `-d` (or `--database-provider`) option to specify the database provider while creating the solution: - -```bash -abp new Acme.BookStore -t app-nolayers -d mongodb -``` +Follow the [Getting Started guide](../../get-started/single-layer-web-application.md) to create a new solution using this startup solution template. -## Solution Structure +## The Solution Structure -If you don't specify any additional options while creating an `app-nolayers` template, you will have a solution as shown below: +If you created your solution with the default options, you will have a .NET solution as shown below: ![](../../images/bookstore-single-layer-solution-structure.png)