Giter Site home page Giter Site logo

Spring Boot Support about electron-java-app HOT 14 CLOSED

jreznot avatar jreznot commented on August 20, 2024
Spring Boot Support

from electron-java-app.

Comments (14)

jreznot avatar jreznot commented on August 20, 2024

Unfortunately, I have no time to provide any ready to use solutions. It is just a Proof-Of-Concept solution that you should adopt to your needs and not a framework at all.

from electron-java-app.

appreciated avatar appreciated commented on August 20, 2024

Which is totally understandable! Would you accept pull requests that make it easier to include custom jars (I was thinking about an additional script parameter and a concerning tweak for the readme)?

from electron-java-app.

jreznot avatar jreznot commented on August 20, 2024

Including custom JARs is available right now, just add necessary dependencies in build.gradle file. In case of Spring Boot - you have to start an additional servlet in org/strangeway/electronvaadin/Launcher.java to be able to work with it or integrate it somehow into Vaadin application. Please note, that this demo uses Vaadin as UI and it cannot be changed, since it is the main idea of the sample - use Java only for the entire application.

from electron-java-app.

jreznot avatar jreznot commented on August 20, 2024

I'm interested in any generic ideas / pull requests that can help developers to build apps using this stack.

from electron-java-app.

appreciated avatar appreciated commented on August 20, 2024

Please note, that this demo uses Vaadin as UI and it cannot be changed, since it is the main idea of the sample - use Java only for the entire application.

I'm aware of that 🙂.

Including custom JARs is available right now, just add necessary dependencies in build.gradle file. In case of Spring Boot - you have to start an additional servlet in org/strangeway/electronvaadin/Launcher.java to be able to work with it or integrate it somehow into Vaadin application.

Just to make things more clear, I am talking about a Vaadin Springboot application.
My goal is that I add the built jar to a specific directory and then build the electron application via a script which then outputs the executable.

This probably requires me to add beforehand some extra dependencies since you seem to do some interprocess communication via JS right?

Another question of mine, I found that you didn't add any license to this repo, in my country if i'm correctly informed this forbids me even to download your repository? Or evenmore so any commercial use of your code. Is this intended by you 😅?

from electron-java-app.

jreznot avatar jreznot commented on August 20, 2024

As of the license - it is the same as other stuff of CUBA Platform team on the Github - Apache License 2.0. I've just added the LICENSE file to the repo. If you provide Vaadin SpringBoot integration it would be great, just do not bring any specifics of your application and usage, use generic approaches. If you are planning to add custom jars from files then it is not interesting approach for others. Just fork the repo and create your application.

In fact - this repo is not a library/framework, it does not have any APIs, so anything can be changed dramatically in the future.

from electron-java-app.

appreciated avatar appreciated commented on August 20, 2024

Thank you for adding the license I will try my best, and I will keep in mind to only use generic approaches 😉.

from electron-java-app.

appreciated avatar appreciated commented on August 20, 2024

If you are interested you can checkout my fork it is already working.
Do you have some ideas what could be improved?

from electron-java-app.

jreznot avatar jreznot commented on August 20, 2024

Hi, I've checked your improvements. I do not want to merge them here, because they are relevant only for those who do not use Vaadin for UI. I'd rather implement Spring integration with Vaadin-Spring Add-on: https://vaadin.com/directory/component/vaadin-spring , see #11

Also, I see that you propose to add jars as files, this is a strange approach. It would be better if we can add jars as Maven dependencies. Anyway, it is not the case for this demo repository. I propose to extract JS launcher to a separate project if you want to use it for Spring Boot applications with custom front-end. There is no need to add Vaadin dependencies for such projects, but instead, we can provide Spring Boot template application.

from electron-java-app.

appreciated avatar appreciated commented on August 20, 2024

Hi, I've checked your improvements. I do not want to merge them here, because they are relevant only for those who do not use Vaadin for UI. I'd rather implement Spring integration with Vaadin-Spring Add-on: https://vaadin.com/directory/component/vaadin-spring , see #11
Also, I see that you propose to add jars as files, this is a strange approach. It would be better if we can add jars as Maven dependencies. Anyway, it is not the case for this demo repository. I propose to extract JS launcher to a separate project if you want to use it for Spring Boot applications with custom front-end. There is no need to add Vaadin dependencies for such projects, but instead, we can provide Spring Boot template application.

First of all if you don't want to merge the new approach thats fine. By reading your comment I got the feeling you might have misunderstood the alternative approach so just to recap:

The new approach is for users who have a slightly different use case than the current one.
If the user wants to ship his ready programmed application as an executable (no matter what framework he is actually using [I tested it with a Vaadin UI]) without adding any code to his application. He can simply built his Vaadin application (with f.e. SpringBoot) externally with the Buildtool of his choice as jar and drop it in the jar folder and run the build script. This will output an Electron Application which starts his jar file and then call a specific url.

If the user requires to actually communicate with the electron framework which is in your solution the case the user needs to add code to his application.

So the difference is that the user does not need to add code to his existing application but is still able to wrap it in electron which I personally find quite nice. Also it allows Users who built their Webapp with another framework to use the library (but this was only a side effect) my primary goal was to make it simpler for a user with a different use case.

Edit:
There is the possibility that I keep this as a fork for users who have the same use case as I do.

from electron-java-app.

jreznot avatar jreznot commented on August 20, 2024

In this case, lets build something like electron-vaadin-wrapper that will contain only code that is required for wrapping an application. That will be really useful for existing applications. But I'd like to keep this demo as a separate PoC on the approach rather than ready to use tool/framework. You can develop your fork in parallel or even rename (if you want) it to fill the niche of electron-runner for java apps. Actually, your approach does not require java source at all, so I recommend that you remove them completely from the project.

My concern is only for purpose of these two approaches. It seems, they should be implemented in separate projects / separate starters.

from electron-java-app.

jreznot avatar jreznot commented on August 20, 2024

Besides, thank you for joining me in this direction of the application development. I'm glad that this topic is relevant for someone else.

from electron-java-app.

appreciated avatar appreciated commented on August 20, 2024

In this case, lets build something like electron-vaadin-wrapper that will contain only code that is required for wrapping an application. That will be really useful for existing applications. But I'd like to keep this demo as a separate PoC on the approach rather than ready to use tool/framework. You can develop your fork in parallel or even rename (if you want) it to fill the niche of electron-runner for java apps.

Sounds like a good idea. I also think that it is better to fork it and keep it separate.

Actually, your approach does not require java source at all, so I recommend that you remove them completely from the project.

I will do so 😉.

Besides, thank you for joining me in this direction of the application development. I'm glad that this topic is relevant for someone else.

You are welcome!

from electron-java-app.

pgerhard avatar pgerhard commented on August 20, 2024

hey guys, thanks for both your work in this direction. I was looking for something like this for a side project

from electron-java-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.