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
Copy file name to clipboardExpand all lines: devon4j-app/index.asciidoc
+29-14Lines changed: 29 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
====
3
3
devon4j is the Java stack of devonfw. It allows you to build business applications (backends) using Java technology in a highly efficient and standardized way based on established best-practices.
4
4
5
-
## Prerequisites
5
+
# Prerequisites
6
6
* User should have Java development experience
7
7
8
-
## Learning goals
9
-
After completing this scenario, you will have learned how to generate Java application using devon4j.
8
+
# Learning goals
9
+
* After completing this scenario, you will have learned how to generate Java application using devon4j.
10
10
11
11
More information about devon4j on https://devonfw.com/website/pages/docs/devon4j.asciidoc.html
12
12
@@ -17,13 +17,18 @@ More information about devon4j on https://devonfw.com/website/pages/docs/devon4j
17
17
restoreDevonfwIde (["java","mvn","vscode"])
18
18
--
19
19
====
20
-
### Create devon4j sample application
20
+
### A devon4j Sample Application
21
+
22
+
Note: Startup script will take some time for set up. After that you can proceed further.
21
23
22
24
If you want to create devon4j application on your local machine there are two ways to do it:
25
+
23
26
* In eclipse as shown [here](https://devonfw.com/website/pages/docs/devon4j.asciidoc_tutorials.html#tutorial-newapp.asciidoc_from-eclipse)
27
+
24
28
* Using command line as shown [here](https://devonfw.com/website/pages/docs/devon4j.asciidoc_tutorials.html#tutorial-newapp.asciidoc_from-command-line)
25
29
26
-
Now, we will create sample devon4j application with name *sampleapp*. This step will guide you on how to do it.
30
+
Now, you will create sample devon4j application with name *sampleapp*. This step will guide you on how to do it.
Once sampleapp is created switch to next tab of IDE. In IDE explorer you can see folder structure like devonfw-> workspaces->main->sampleapp .
34
39
35
-
sampleapp contains 3 modules i.e api, core and server.
40
+
Sampleapp contains 3 modules i.e api, core and server.
36
41
37
42
**api**: It contains API for sampleapp.The API contains the required artifacts to interact with your application via remote services. This can be REST service interfaces, transfer-objects with their interfaces and datatypes but also OpenAPI or gRPC contracts.
38
43
39
44
**core**: It is the core of the application.In this module you can write actual business logic with service implementation, as well as entire logic layer and dataaccess layer.
40
45
41
-
**batch**: optional module for batch layer. In this example we have not created it. To add batch module while generating from commandline use -Dbatch=batch parameter. And to generate it from eclipse using mave archetype enter batch variable value as batch in project creation page.
46
+
**batch**: Optional module for batch layer. In this example we have not created it. To add batch module while generating from commandline use -Dbatch=batch parameter. And to generate it from eclipse using maven archetype, enter batch variable value as batch in project creation page.
42
47
43
48
**server**: This module bundles the entire app (core with optional batch) typically as a bootified WAR file.
44
49
45
-
If you want to know more about modules and project structure refer [here](https://github.com/devonfw/devon4j/blob/master/documentation/guide-structure.asciidoc#project-structure).
50
+
If you want to know more about modules and project structure refer [here](#https://github.com/devonfw/devon4j/blob/master/documentation/guide-structure.asciidoc#project-structure).
As shown in above image,devon4j application follows [multilayered architecture](https://en.wikipedia.org/wiki/Multitier_architecture).
60
+
As shown in above image,devon4j application follows [multilayered architecture](https://en.wikipedia.org/wiki/Multitier_architecture).
54
61
55
62
Each component is divided into following layers:
63
+
56
64
* [client layer](https://github.com/devonfw/devon4j/blob/master/documentation/guide-client-layer.asciidoc) for the front-end (GUI).
57
65
58
66
* [service layer](https://github.com/devonfw/devon4j/blob/master/documentation/guide-service-layer.asciidoc) for the services used to expose functionality of the back-end to the client or other consumers. For example, in sampleapp we generated com.example.application.sampleapp.<componentname>.service.impl will have all rest service implementation.
@@ -61,12 +69,12 @@ Each component is divided into following layers:
61
69
62
70
* [logic layer](https://github.com/devonfw/devon4j/blob/master/documentation/guide-logic-layer.asciidoc) for the business logic. For example, in sampleapp we generated com.example.application.sampleapp.<componentname>.logic will contain business logic or usecase implementation.
63
71
64
-
* [data-access layer](https://github.com/devonfw/devon4j/blob/master/documentation/guide-dataaccess-layer.asciidoc) for the data access (esp. persistence).For example, in sampleapp we generated com.example.application.sampleapp.<compoenntname>.dataaccess will contain entity, repositories etc.
65
-
====
72
+
* [data-access layer](https://github.com/devonfw/devon4j/blob/master/documentation/guide-dataaccess-layer.asciidoc) for the data access (esp. persistence).For example, in sampleapp we generated com.example.application.sampleapp.<componentname>.dataaccess will contain entity, repositories etc.
66
73
====
67
-
### Build devon4j sample application
68
74
69
-
Build the java project
75
+
76
+
====
77
+
Now you have to build a devon4j sample application i.e. sampleapp.
70
78
71
79
[step]
72
80
--
@@ -76,14 +84,21 @@ buildJava("sampleapp", false)
76
84
Once build is successful you will get bootified-war generated in server module target folder. In sampleapp check for path sampleapp/server/sampleapp-server-bootified.war
77
85
78
86
====
87
+
88
+
79
89
====
80
90
## Conclusion
81
91
82
92
In this tutorial you have learnt how to create devon4j application using command line or via Eclipse. Next you can check for other tutorials such as:
83
-
* Java backend code generation using CobiGen (Code Generator)
0 commit comments