using java.
I want to have a system applications as well api access to that same applications. I want pack both in same jar(i can use this jar for multiplatform like windows, Mac, linux) . Is it possible? If possible what would be best practices .
Thanks in advance
I don't understand what exactly you want to do, but answer to your question - yes, it's possible to pack anything in a single jar
Take example calculator app. I want to develop system applications (ui and logic) using java also I want to have api (backend/logic) of calculator to access outside of this system application.
finally i found answer for my question thanks for your help. https://stackoverflow.com/questions/52856512/spring-boot-for-desktop-application
Ah, I see now. Yeah, spring boot has tons of features that allows you to run your app in different way. However, consider one important thing. Though, you can theoretically come up with some meaningful way to launch calculator app both as a gui app, and as a rest-api service, but those app types are completely different semantically. Gui apps are usually single user ones, "you launch - you use", and have launch-use-close flow. rest-apis are usually for services, something that is running for a long time and serves many users, thus is multisessioned. another thing to consider is state. gui-apps are usually much more coarse-grained with state and if they ever need to persist something it's not on every single action of the user. services are the opposite - you usually have to persist state on every interaction. More common usecase is to have backend and multiple frontends, i.e. multiple ways to to use your app: with web ui, rest api, mobile app, gui app. In that case you need to have at least two apps: backend and gui app that communicates with backend. And in such case, you start you backend and have it running 24/7, and launch your gui client app only when you need to use it. Just like you run telegram: your mobile app or desktop app is running only for the duration of your session, and telegram backend is running 24/7
Thanks. But this api and system applications work for a single user only
I just gave an example as calculator. I want my applications to be access from google chrome. So I need api for it.
Chrome extension*
to communicate with chrome extension
yeah i got it👍
thanks
so you'll use spring boot now?
Обсуждают сегодня