Skip to content

Commit e211a7e

Browse files
Update readme files, add image
1 parent ca93669 commit e211a7e

File tree

7 files changed

+93
-316
lines changed

7 files changed

+93
-316
lines changed

ASP.NET Core/Readme.md

Lines changed: 19 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,30 @@
11
# ASP.NET Core DevExtreme Example
22

3-
## Installation
3+
For more information about this example check the [Readme](../README.md).
44

5-
Download the example and use Visual Studio 2022 (or later) or Visual Studio Code to open the project. This project targets .NET 8.0.
5+
## Build and Run
66

7-
## Client-side resources and bundling
7+
Prerequisites: .NET 8 SDK, Node.js (for npm/gulp resource bundling).
88

9-
This project uses [NPM](https://www.npmjs.com/) and [Gulp.js](https://gulpjs.com/) to install client-side libraries. The project restores NPM packages before the first build. Then, Gulp bundles required scripts and CSS files into the resulting package during the first and every next build.
9+
Restore and build:
10+
```sh
11+
dotnet restore
12+
dotnet build
13+
```
1014

11-
The project includes:
12-
- DevExtreme 24.2.3
13-
- DevExtreme.AspNet.Core 24.2.*
14-
- DevExtreme.AspNet.Data 5.*
15-
- jQuery 3.7.1
16-
- Bootstrap 5.3.3
15+
Run (HTTPS on 5001, HTTP on 5000 by default):
16+
```sh
17+
dotnet run
18+
```
1719

18-
The resulted bundles will be located in the `wwwroot` folder:
19-
* `css/vendor.css` - a file with all CSS styles.
20-
* `css/icons` and `css/fonts` - folders that contain fonts and icons for DevExtreme themes.
21-
* `js/vendor.js` - a file that contains all scripts.
22-
23-
The default bundle includes jQuery, Bootstrap, and DevExtreme.
24-
25-
### Add more 3rd-party libraries for additional features/components
26-
27-
The main logic is located in the the `gulpfile.js` file at the root application level. The file contains two tasks:
28-
29-
* the `add-resources` task
30-
31-
* copies JavaScript files located in the `scripts` array and adds them to `vendor.js`. The script bundle is moved to `wwwroot\js`.
32-
* copies CSS styles located in the `styles` array and merges them into the `vendor.css` bundle. Then, this bundle is moved to `wwwroot\css`
33-
* copies DevExtreme `fonts` and `icons` folders from NPM to `wwwroot\css`
34-
35-
* the `clean` task removes all previously created files (`vendor.js` and `vendor.css`) and folders (`icons` and `fonts`)
36-
37-
If you need to include more features, you can uncomment one of the following sections:
38-
39-
* Gantt - scripts and styles for [dxGantt](https://js.devexpress.com/DevExtreme/Guide/UI_Components/Gantt/Getting_Started_with_Gantt/).
40-
* Diagram - scripts and styles for [dxDiagram](https://js.devexpress.com/DevExtreme/Guide/UI_Components/Diagram/Getting_Started_with_Diagram/).
41-
* Export - scripts and styles for the exporting feature: [Export Data to Excel](https://js.devexpress.com/DevExtreme/Guide/UI_Components/DataGrid/Getting_Started_with_DataGrid/#Export_Data).
42-
* HtmlEditor - scripts and styles for [dxHtmlEditor](https://js.devexpress.com/DevExtreme/Guide/UI_Components/HtmlEditor/Overview/).
43-
* Full Bundle - scripts and styles for all above mentioned features/components.
44-
45-
## Code
46-
47-
Take a look at the following files of this example to see the required code:
48-
49-
**Controllers:**
50-
- `Controllers/HomeController.cs` - Main controller with Index action
51-
- `Controllers/SampleDataController.cs` - API controller for sample data
52-
53-
**Models:**
54-
- `Models/SampleData.cs` - Sample data model
55-
- `Models/SampleOrder.cs` - Sample order model
56-
57-
**Views:**
58-
- `Views/Home/Index.cshtml` - Main page with DevExtreme components
59-
- `Views/Shared/_Layout.cshtml` - Layout template
60-
- `Views/_ViewImports.cshtml` - Global imports
61-
- `Views/_ViewStart.cshtml` - View start configuration
62-
63-
**Configuration:**
64-
- `Program.cs` - Application entry point
65-
- `Startup.cs` - Service configuration
66-
- `gulpfile.js` - Build automation
67-
- `package.json` - NPM dependencies
68-
- `ASP.NET Core.csproj` - Project file
69-
70-
## Development server
71-
72-
Use the Visual Studio `Run (F5)` command or `dotnet run` command to run the project. The application will be available at `https://localhost:5001` (HTTPS) or `http://localhost:5000` (HTTP).
20+
You can also use Visual Studio: F5 / Ctrl+F5.
7321

7422
## Further help
7523

76-
You can learn more about the ASP.NET Core components' syntax in our documentation: [Concepts](https://docs.devexpress.com/AspNetCore/400574/devextreme-based-controls/concepts/razor-syntax)
77-
The client-side API is based on jQuery [jQuery documentation](https://api.jquery.com/) and described in the following topics:
78-
* [Get and Set Properties](https://js.devexpress.com/DevExtreme/Guide/jQuery_Components/Component_Configuration_Syntax/#Get_and_Set_Properties)
79-
* [Call Methods](https://js.devexpress.com/DevExtreme/Guide/jQuery_Components/Component_Configuration_Syntax/#Call_Methods)
80-
* [Get a UI Component Instance](https://js.devexpress.com/DevExtreme/Guide/jQuery_Components/Component_Configuration_Syntax/#Get_a_UI_Component_Instance)
81-
82-
To get more help on DevExtreme submit an issue in the [Support Center](https://supportcenter.devexpress.com/ticket/create)
83-
24+
DevExtreme ASP.NET Core Razor syntax: https://docs.devexpress.com/AspNetCore/400574/devextreme-based-controls/concepts/razor-syntax
25+
Client-side API basics:
26+
* Get/Set properties: https://js.devexpress.com/DevExtreme/Guide/jQuery_Components/Component_Configuration_Syntax/#Get_and_Set_Properties
27+
* Call methods: https://js.devexpress.com/DevExtreme/Guide/jQuery_Components/Component_Configuration_Syntax/#Call_Methods
28+
* Get instance: https://js.devexpress.com/DevExtreme/Guide/jQuery_Components/Component_Configuration_Syntax/#Get_a_UI_Component_Instance
8429

30+
To get more help with DevExtreme, submit a ticket through the [Support Center](https://supportcenter.devexpress.com/ticket/create).

Angular/README.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,33 @@
11
# Angular DevExtreme Example
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.0.4 and includes DevExtreme Angular components version 25.1.3.
3+
For more information about this example check the [Readme](../README.md).
44

5-
## Development server
5+
## Build and Lint
66

7-
Run `npm start` or `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
7+
Install dependencies:
8+
```sh
9+
npm install
10+
```
811

9-
## Code scaffolding
12+
Start dev server:
13+
```sh
14+
npm start
15+
```
16+
Open: http://localhost:4200/
1017

11-
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
18+
Build production bundle:
19+
```sh
20+
npm run build
21+
```
1222

13-
## Build
14-
15-
Run `npm run build` or `ng build` to build the project. The build artifacts will be stored in the `dist/Angular/` directory.
16-
17-
## Running unit tests
18-
19-
Run `npm test` or `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20-
21-
## Linting
22-
23-
Run `npm run lint` to execute linting checks for TypeScript, CSS/SCSS, and HTML formatting.
24-
- `npm run lint-ts` - ESLint for TypeScript files
25-
- `npm run lint-css` - Stylelint for CSS/SCSS files
26-
- `npm run lint-html` - Prettier for HTML formatting
27-
28-
## Running end-to-end tests
29-
30-
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
23+
Run linter:
24+
```sh
25+
npm run lint
26+
```
3127

3228
## Further help
3329

34-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
35-
To get more help on DevExtreme submit an issue on [GitHub](https://github.com/DevExpress/devextreme/issues) or [Support Center](https://supportcenter.devexpress.com/ticket/create)
30+
Angular CLI docs: https://angular.dev/tools/cli
31+
DevExtreme Angular docs: https://js.devexpress.com/Angular/Documentation
32+
33+
To get more help with DevExtreme, submit a ticket through the [Support Center](https://supportcenter.devexpress.com/ticket/create).

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
This is the repository template for creating new examples.
1010

11+
![Example image](images/image-template.png)
12+
1113
Use **DevExtreme _Product_ - _Task_** template for a title.
1214

1315
Describe the solved task in this section.
@@ -18,16 +20,18 @@ Then, add implementation details (steps, code snippets, and other technical info
1820

1921
## Files to Review
2022

21-
- **jQuery**
22-
- [index.js](jQuery/src/index.js)
2323
- **Angular**
2424
- [app.component.html](Angular/src/app/app.component.html)
2525
- [app.component.ts](Angular/src/app/app.component.ts)
26-
- **Vue**
27-
- [Home.vue](Vue/src/components/HomeContent.vue)
2826
- **React**
2927
- [App.tsx](React/src/App.tsx)
30-
- **NetCore**
28+
- **Vue**
29+
- [App.vue](Vue/src/App.vue)
30+
- [Home.vue](Vue/src/components/HomeContent.vue)
31+
- **jQuery**
32+
- [index.html](jQuery/src/index.html)
33+
- [index.js](jQuery/src/index.js)
34+
- **ASP.NET Core**
3135
- [Index.cshtml](ASP.NET%20Core/Views/Home/Index.cshtml)
3236

3337
## Documentation

React/README.md

Lines changed: 16 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,34 @@
11
# React + TypeScript + Vite + DevExtreme
22

3-
This template provides a minimal setup to get React working in Vite with HMR, ESLint rules, and DevExtreme components.
3+
For more information about this example check the [Readme](../README.md).
44

5-
This project includes:
6-
- React 18.2.0
7-
- TypeScript 5.8.2
8-
- Vite for fast development and building
9-
- DevExtreme React 25.1.3
10-
- Vitest for testing
11-
- ESLint and Stylelint for code quality
5+
## Build and Lint
126

13-
Currently, two official plugins are available:
14-
15-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
16-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
17-
18-
## Getting Started
19-
20-
### Installation
21-
22-
```bash
7+
Install dependencies:
8+
```sh
239
npm install
2410
```
2511

26-
### Development
27-
28-
Start the development server:
29-
```bash
12+
Start dev server:
13+
```sh
3014
npm run dev
3115
```
16+
Open: http://localhost:5173/
3217

33-
The application will be available at `http://localhost:5173/`
34-
35-
### Building
36-
37-
Build the project for production:
38-
```bash
18+
Build production bundle:
19+
```sh
3920
npm run build
4021
```
4122

42-
### Testing
43-
44-
Run tests:
45-
```bash
46-
npm test
47-
npm run test:watch # Run tests in watch mode
48-
```
49-
50-
### Linting
51-
52-
Run linting checks:
53-
```bash
54-
npm run lint # Run all linting checks
55-
npm run lint-ts # ESLint for TypeScript files
56-
npm run lint-css # Stylelint for CSS files
57-
```
58-
59-
## Code Structure
60-
61-
**Source Files:**
62-
- `src/App.tsx` - Main React component with DevExtreme Button example
63-
- `src/App.test.tsx` - Tests for the main component
64-
- `src/main.tsx` - Application entry point
65-
- `src/App.css` - Component styles
66-
- `src/index.css` - Global styles
67-
- `src/setupTests.ts` - Test setup configuration
68-
- `src/vite-env.d.ts` - Vite environment type definitions
69-
70-
**Configuration Files:**
71-
- `vite.config.ts` - Vite configuration
72-
- `package.json` - Dependencies and scripts
73-
- `tsconfig.json` - TypeScript configuration
74-
- `vitest.config.ts` - Vitest testing configuration
75-
76-
## Expanding the ESLint configuration
77-
78-
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
79-
80-
```js
81-
export default tseslint.config({
82-
extends: [
83-
// Remove ...tseslint.configs.recommended and replace with this
84-
...tseslint.configs.recommendedTypeChecked,
85-
// Alternatively, use this for stricter rules
86-
...tseslint.configs.strictTypeChecked,
87-
// Optionally, add this for stylistic rules
88-
...tseslint.configs.stylisticTypeChecked,
89-
],
90-
languageOptions: {
91-
// other options...
92-
parserOptions: {
93-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
94-
tsconfigRootDir: import.meta.dirname,
95-
},
96-
},
97-
})
98-
```
99-
100-
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
101-
102-
```js
103-
// eslint.config.js
104-
import reactX from 'eslint-plugin-react-x'
105-
import reactDom from 'eslint-plugin-react-dom'
106-
107-
export default tseslint.config({
108-
plugins: {
109-
// Add the react-x and react-dom plugins
110-
'react-x': reactX,
111-
'react-dom': reactDom,
112-
},
113-
rules: {
114-
// other rules...
115-
// Enable its recommended typescript rules
116-
...reactX.configs['recommended-typescript'].rules,
117-
...reactDom.configs.recommended.rules,
118-
},
119-
})
23+
Run linter:
24+
```sh
25+
npm run lint
12026
```
12127

12228
## Further help
12329

124-
You can learn more about React in the [React documentation](https://react.dev/learn).
125-
You can learn more about Vite in the [Vite documentation](https://vite.dev/).
126-
You can learn more about DevExtreme React components in the [DevExtreme React documentation](https://js.devexpress.com/React/).
30+
React docs: https://react.dev/learn
31+
Vite docs: https://vite.dev/
32+
DevExtreme React docs: https://js.devexpress.com/React/Documentation
12733

128-
To get more help on DevExtreme submit an issue in the [Support Center](https://supportcenter.devexpress.com/ticket/create)
34+
To get more help with DevExtreme, submit a ticket through the [Support Center](https://supportcenter.devexpress.com/ticket/create).

0 commit comments

Comments
 (0)