Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
YassineOuhadi authored Jan 5, 2024
1 parent 008ccde commit 7f0fd99
Showing 1 changed file with 31 additions and 11 deletions.
42 changes: 31 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Welcome to Jgen VS Code Extension
# Welcome to Jgen Vs Code Extension

<img src='https://github.com/YassineOuhadi/Jgen/assets/109771302/6ef3ebd1-56f2-4175-802b-60179011fd50' width='80'>

Expand Down Expand Up @@ -229,9 +229,9 @@ hidden terminal SL_COMMENT: /\/\/[^\n\r]*/;

### Jgen Instance

You can write your Jgen code in Vs Code extension runtime window using the tree view offer by Jgen extension or in monaco editor, you have aussi the possibilty to innitializ the jgen code and personaliser.
You can write your Jgen code in the VS Code extension runtime window using the tree view offered by the Jgen extension, or in the Monaco editor. You also have the possibility to initialize the Jgen code and personalize it.

This is example of our Jgen dsl language corrspent au operation crud for user entity and tweet entity:
Here is an example of our Jgen instance, the main idea is to generate code that corresponds to CRUD operations for entities such as User and Tweet. This instance includes specifications for entities, relationships, repositories, services, and controllers:

```
project Demo
Expand Down Expand Up @@ -296,27 +296,47 @@ project Demo
```
If you dont use manaco editor or extention runtime window, you can validate your jgen code using CLI. Look in the top to see how you can do it.
If you don't use Monaco Editor or the extension's runtime window, you can validate your Jgen code using the Command Line Interface (CLI). Refer to the instructions at the top to learn how to do this.
### Extention Editor - tree view
### Extention Editor - Tree View
This is the tree view correpent for our Jgen instance :
This is the corresponding tree view for our Jgen instance. You can use it to create your entities, services, repositories .. etc, and all changes are synchronized with the corresponding Jgen file:
![jgen metamodel ecore](https://github.com/YassineOuhadi/Jgen/assets/109771302/c842fce7-2ec1-4261-87d1-e60505a524e6)
![jgen-treeview](https://github.com/YassineOuhadi/Jgen/assets/109771302/1dc46a59-62cd-4f23-92ba-5fb00e9ed699)
### Web editor - monaco editor
### Monaco Editor - Web Editor
This is the tree view correpent for our Jgen instance :
This is the web editor integrated with the same functionalities as our extension runtime, thanks to the use of LSP and Monaco. It allows us to create Jgen code directly on a website, which is extremely convenient, especially for code generation. Here is an example of our Jgen instance.
![jgen metamodel ecore](https://github.com/YassineOuhadi/Jgen/assets/109771302/c842fce7-2ec1-4261-87d1-e60505a524e6)
![jgen-web](https://github.com/YassineOuhadi/Jgen/assets/109771302/e6a238bb-1189-4304-a902-34a77aaeea27)
### Code generation using CLI
For the code generation of our Jgen instance using the CLI, as indicated in the source code structure, the Jgen instance exists in `./example/test/jgen`. We generate a Jgen file from this path, and the destination is `/generated` in the same root directory. The command for this process is `./bin/cli generateRESTfulAPI -d /generated -p ./example/test.jgen`.
The generated code for our instance is as follows:
![jgen codegenrated](https://github.com/YassineOuhadi/Jgen/assets/109771302/7e6b687d-3224-4d1d-8b96-fd532d41c833)
### Code generation in the Web
For code generation, having the capability to generate code directly in the web editor is crucial. We plan to enhance this feature in the upcoming versions of Jgen, allowing users to generate their Rest API without relying on the CLI. It will be a purely web-based solution.
## Perspectives
- Regarding the perspectives, we plan to create a graphical model synchronized with our DSL. We're not sure to use Sprotty or Sirius Web.
In the short-term perspectives, we aim to further enrich the integration of the Monaco editor with Langium. In this web integration, we envision the following:
- User Project Management: This feature will enable users to generate, visualize, and manage their Jgen projects in a centralized manner.
- Advanced Export: The export button will be expanded to include advanced options. In addition to downloading the current Jgen project code, users will be able to choose from various file formats, such as Jgen, JSON, or Ecore. This flexibility will facilitate seamless integration with other tools and platforms.
- File Import: Users will also have the ability to directly import Jgen, JSON, or Ecore files into the editor. This will open the door to simplified collaboration, allowing users to share and import Jgen projects with their colleagues and partners.
- Version Management: A crucial aspect of project management is version control. We plan to implement version tracking functionality for each project, enabling users to revert to previous versions of the generated code, providing better control and traceability.
Looking ahead to future perspectives, it would be interesting to generalize our DSL to incorporate more concepts related to REST API development. This extension would allow broader coverage of use cases and provide greater flexibility to developers.
Furthermore, automation could be enhanced by integrating a synchronized diagram with our DSL, using tools such as Sprotty. This would enable a graphical visualization of entities and their relationships, offering a more intuitive understanding of the model.
## References
Expand Down

0 comments on commit 7f0fd99

Please sign in to comment.