Gerrit Grunwald — Not dead yet — Java on desktop

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] okay so what to jokah conf and my session about java on desktop not dead yet so first of all I have a question I can't barely see you but who's using Java on desktop in the audience whatever it is okay some still you see it's not that yet so that's it no okay let's start with it okay so first about me I'm Gary Kumar from Germany working for Kara cool which is a company in Switzerland and I'm mainly doing UI stuff and IOT but my heart beats for you I and I love JavaFX so for what the people of you who know me they know I'm doing JavaFX no since I don't know 2011 or something and I can't stop using it it's just too too good but this is not about job FX in general this is more about Java on desktop because let's go back in time 2012 maybe some of you remember there was Google came out with the Chromebooks and they claimed the desktop is dead right the future of applications in general is the web okay well seven years later made my application folder on my machine according to this announcement from Google and the others should look like this right just browsers because you know desktop and applications in general are dead but you see even I'm using a finder which is a native application so this is a desktop application okay but in fact my application folder looks like this means yeah not really yeah and it takes some time as you can see these are all native apps that I'm using on my Mac and there might be some electron apps in there which is web based technology but it's still running in a native frame which is a desktop app right so what does it mean to me that means desktop is not that all right this is sure who is using desktop apps here I should see every hand because the other ones should then use only mobile or just web apps who is using only web Chromebooks and stuff like that everything well now that's what I thought okay so then what about Java right because yeah I bet you know that it's like Desktop Linux it's the same claim it's that and desktop Java is that for years I am it's it's that just yeah let's take a look at the available toolkits that we have in the drama world and there is first of all the oldest one is a WT which is the abstract window toolkit and someone in the audience they're using a WT Wow one that's that's awesome I mean it's it's around since 1995 it was what is cross-platform is platform dependent because it's bound to native controls and it interfaces to these native controls well then there is the the other one which is SW 2 who who is using Eclipse II and the audience yeah so you are using SWT most of you except you use FX clips from Tom Schindler but yeah this is the so-called standard window toolkit and it's coming from IBM based on some small talk stuff from 1993 it's also cross-platform platform dependent and this is a wrapper around native controls all right so did someone ever try to pimp a UI and SWT for example make it look like I don't know native apps these days native apps this is really not very convenient it's really hard to do so but it's still around then we have Java swing who's using swing here in the audience yay and it's a good audience very good so yes that's the official successor to NWT and yeah it's it's around since Java 1 or 2 1998 roughly and it's again cross-platform it's platform-independent in this case and it introduced so-called looking fields and it emulates the appearance of native controls that was the first one that really wasn't bound to true native stuff which is really nice because you can create cross-platform your eyes looking the same on every platform unfortunately at that time everybody was bound to its platform Mac users would like to have a Mac application it should look like the Mac and on Windows it should look like Windows these days is different but at that time it was list it was the case well then we have JavaFX script who remembers that one a few right yeah this is it was the intended successor to swing but somehow failed because it came out with Java 1.6 and it was again cross-platform platform independent there was no Java syntax this is the biggest problem with JavaFX script when you see it from the from now it was a declarative way to create your eyes and it was based on f3 which was invented by Chris Oliver which was kind of the yeah it's like the grandfather from Java effects but this guy I just read a an interview with this guy and he said that was never my intention so son was looking for something news they saw the project grab it converted it to JavaFX script and it failed ok so then I decided the technology is nice the scripting language somehow the Java developers didn't really get it so let's do something new let's put the whole stuff to Java that's what they did and this is Java FX which is the official successor to swing this is around since Java 7 2011 and when I saw dramatic script these days I was really like wow it sucks then when I came to Java 1 in 2011 some people from Oracle just approached me and said how are you we need people to try Java FX give it a try please and I was like oh no this is it really I can't handle the syntax and the scripting stuff no no we ported everything to Java so ok I gave it a try and like I said in the beginning I couldn't stop using it so I still use it too it's cross-platform again platform-independent it's more or less a port from JavaFX script to Java and if you have old books or find old books of JavaFX script it's very easy to convert the the code in there to Java because the API is more or less the same and this is not part of Java as a distribution since Java 11 so that means if you don't know Java 11 open JDK open JDK or something so you won't get Java FX well but we come to this later on well most of these frameworks are still in use we saw one still using J AWT which is impressive and why not because it works if it does the drop fine so the question I'm always confronted with this is drive affects that so who thinks Java FX is that just honestly I'm it's no one in the audience oh okay that's good yeah so let's let's take a look at it at the point here and it's open source since a long time I can't really remember the year and it's driven by the community these days the community includes or occur in this case so there are people at Oracle working on Java FX and then it it's also mainly driven by a gluon which is a company they create some technology to port Java effects stuff to mobile phones but I will come to that later on like you see here it can run mobile on mobile then it's also it's possible to run Java FX on the web all right there's a company called Jay Pro they make it possible I will show you a demo demo later on and it's it's active actively developed and it's getting new features too so it's it's really not that alright it's just because it's not in the open doesn't mean it's is that but let's take a look at where does Java on desktop really suck and there are some points first of all there is definitely a lack of third-party controls I mean when you come from swing there was a lot of companies they just offer libraries but third party controls like I don't know different list views and all these things so a lot of stuff was available in JavaFX it's it's lagging behind so there are some people who create controls and stuff like that but there is not only I think there's no company that makes business with the library for Java fax at the moment at least I don't know so then we have missing features and did someone use the Java fix type of you in the audience you like it no this is the worst thing ever is the type of view of inswing it was okay you can do whatever you like it's not easy but you can in JavaFX it looks good but you can't really do everything you would like to do because it's simply not possible and if you go to customers they expect a tableview first thing they ask for is I need something like Excel and say ok this is a really small problem to solve and in Java fix this is really really not possible to do with the table view so it really sucks mobile yeah it's necking behind so even good one big one guys said they really do a good job in porting the JavaFX stuff to to native things using gravy on but it's it's not really on par with the native mobile apps but this is the same for web apps right so even if you use the latest and greatest web technology it's still native is native it will ever be like this I guess maybe maybe they're the big companies push JavaScript so so much forward that it's might be on pie in the future but to be honest native should always be faster than then every other technology well UI design towards we have in swing there have been some UI builders that you can use to to build your eyes very easily with drag-and-drop components and stuff like that in Java FX there's only the scene builder which is kind of okay but yeah it's the only tool that is available and it's not really 100 and there so you can do some stuff most of it let's say but some things are really just too hard to do and it's just not possible for swt and swing there are some tools you can use is someone using US UI builder for swing for example nobody everybody is coding your eyes yes that's great I love it yeah then there's lack of Oracle support in the moment they dropped it from the distribution everybody was like ah no it's dead so they don't work on it anymore this is not really true but you get the impression because you don't see anything from Oracle using Java effects for example so you get the impression okay they don't support it anymore so it must be that which is not the case but it feels like right native looking you eyes hard did someone ever did a UI look and feel and swing here in the audience this is really tough I mean there are some guys who did it and I just know a handful of people who are able to do a really good looking your eyes look and feel so caught in swing in Java effects it's more easy but it's the native looking stuff if you take a look at the for example the iOS UI controls Apple is really good and in doing this kind of things there's so many tiny features that you don't see in the beginning and if you analyze a control light they have this tiny switching toggle button or what it is this green one that moves over just press it and hold it and you see that the bubble just gets bigger if you just hold it and you if you take your finger away it just moves over so it's really these tiny things and if you would like to create this kind of stuff it's possible but it's really not easy but I think it's the same for for any other technology it's just not not easy to cover native look in your eyes in a different technology than native OpenGL and DirectX Service someone using OpenGL stuff like for cat and and other applications yeah okay so in in swing there was this joggled stuff and java 3d which gives you more or less direct access to to OpenGL which is great if you are really if you need the the hardware acceleration and the OpenGL and you know what you're doing then that was great JavaFX doesn't have support for OpenGL yet they are working on that and then I think as far as I know in Java FX 14 which is maybe next year I can't really remember with all these release cycles at the moment so but with the next big release I think it's Java FX 14 they will get access to OpenGL also in Java FX so that might be helpful for people that are relying on their technology well yeah this is for for fat lines in general they tend to be quite heavyweight in terms of memory and CPU but yeah if you ever start an electron app and take a look at the memory consumption you are really wondering what's going on this is just JavaScript right it sucks up to one gigabyte RAM in my computer sometimes and I am really surprised so it's but in the end this is also in a desktop and write an electron app uses web technology but it's running in a native frame somehow for me this is small that's the desktop earth so yeah this is always a problem with this month but even if you open some websites and check in chrome for example and you check the memory consumption mmm it's not really a lot of difference between a web application and the desktop application anymore of course yes so JavaScript frameworks more or less for free to be honest I don't know if there's any big framework that you have to pay for in Java FX for example even in swing you have to pay and for example for the gluon guys they do all the stuff with porting the technology to mobile and it's just a handful of people working in that company and of course they they need some money to live right so you have to pay for it which is fair but that sometimes makes a difference for small companies it's really like how we can't afford it so we switch to it because it's cheap and everybody knows it yeah this is a drawback updates this is something that's really tough with Java who's is someone using what was the technology webstart does someone use it here oh yeah one two fu well just let me tell you that our company is working on a successor to Web Start it's called open Web Start which makes it possible to use website in Java 11 and above so if you would like to know more about it just check our website Ankara cool calm and you will just search for open web start so if you rely on Web Start and you hesitate to switch to JDK 9 and above then just check out open Web Start which gives you an opportunity to use it in the future but to be honest if you do native application coding you have to update your application right and there are solutions to do that and you can build native apps with Java so you can use the same mechanism in Java so this is not really a reason but always maybe you talk to people it's like ah updates it's so bad with Java so bad ok but I mean all that the desktop desktop apps that I use someone on my computer they use some update mechanism which is somehow standardized so you can use it but people maybe are just not I don't know they are not used to it from the Java world so they think it's only web start and that sucks so we don't do it and in the browser it's so easy right it's ctrl f5 and that's it update next thing deployment this is also bad so but in the end this is the same as for the native apps because native apps has to be deployed to machines there are mechanisms to do that I agree on the web is much easier but is yeah ok you have to install it on each and every machine yeah that's that's an argument ok that's bad I don't have anything positive to say about that but this one is all that also sucks on Windows if you would like to deploy something in most of the bigger companies you need admin rights to do that so that means the admin either has to go from machine to machine or they have some internal deployment procedure I don't know well yeah that's definitely a drobik which you don't have with a web application more or less well then the biggest thing is there's a lack of UI developers so who's the Java UI developer here in the audience one two three four okay that's that's not bad so when I gave the session at code one San Francisco that was just a few people and the audience was yeah but most Simula so it's there seems to be people but if you take a look for example on some job offerings then it's mainly they either look only for web developers or you only find web developers but if you are looking for Java desktop developer or UI it's really hard to find people now I don't know why but this is really a problem what about now that's enough of all the bad parts just take a look at the good parts all right yeah also some good parts with Java on desktop well first of all it's one platform and it runs on all these different things which is awesome did someone ever use Java on embedded devices one two yeah okay that's cool because I mean for me this is the biggest advantage ever because I can use online on my Mac for example I can code something test it run it run it on the desktop and then deploy it on a embedded device and it works the same way which is great I can run it on Android and it works I can run it on iOS and it works and even on the web and it works that's really a really big advantage I mean this is not WEP against desktop or something but on weapons similar but this is but it's also true for Java on desktop then it just works yes so you get more than roughly 90% of all the functionality that you need comes with the core libraries right in Java 11 we have an HTML client in the JDK which is awesome you can just use it you don't need any additional libraries to do HTML rest course or something which is just an example and there are so many more things in the JDK in the JVM really really nice so and it just works I mean it's easy to style your eyes so in JavaFX at least because we have CSS kind of CSS in java facts it's based on the CSS standard 2.1 which is quite old and they also make the decision to do some prefix on all these things like if you have a background in CSS then in Java XS - FX - background and this goes for all the other things that they support first of all if you are web developer you take a look at it and you say that sucks because it's not CSS well I agree but if you're familiar familiar with CSS then you will figure out there is a reason that they put this minus FX minus in front of it it's just to avoid problems with people that coming from the web and assume everything works because it's not possible to make everything work in Java FX CSS so they just decided to prefix everything then you directly know this is John effects stuff so this works and even for supporting it in the future it wasn't that hard that's the main reason and with this it's really easy to style applications for it for you customers for example we have customers they they come up with well this is all CI we would like to have it in this in blue and this in light blue and this has to be red and whatever and you just say ok no problem just give me the colors and then we can style it very easily because the whole controls and Java effects are based on CSS so every control is styled as CSS you can just overwrite and then the control looks the way you designed it which is really nice oh you can have customized windows in Java in Java in general even in inswing this is not always important in the times of media players in the past that was really nice you saw some round stuff which is with web applications you are bound to the web frame of the browser so you can't really do that but with native apps and also with Java FX and Java swing you can do that and for some applications it's nice but you don't need it forever but if you have some floating apps that are small and they are sitting on the desktop you sometimes would like to have just your own wit styled window right so and that's possible oh yes it's it's really good for for handling large amounts of data for visualization for example we have one customer who's loading last week I had to load a text file which was 30 megabytes plain text which is really that was such a amount of data we have to load and this is not so easy to do in in browsers it's you can do but this is just better in Java right to be honest and visualization is it's really it's easy to do and I will show you some examples where big companies used it the other thing is for me personally this is a big advantage you stay on the same platform so if you work in the project where you have the server-side in Java and then the the windows are the UI stuff is in in whatever web technology you always have to switch between these technologies and that it's not only the technology it's the whole stack it's the building the testing deployment is totally different on these platforms if you stay on the on the Java platform then it's it's really much easier because it's the same testing frameworks the same deployment the same packaging and all these things dependency management all is the same on server side and desktop side which is a really big advantage if you know how to use it right but people these days are just it's just given that everybody said well we do web that's it so we use the web stack okay so they never ask even for for doing job on desktop but but we come to that later on and because it's it's one platform and you stay on that you can also reuse libraries and code so that means you can use the same library on the client side and on the server side which is a really big advantage and even your own stuff you can use on both on the client and server side which is from the from the coding perspective I really like this approach because then it just reduces a lot of complexity because sometimes you build something on the server side in Java then you have to the center same kind of logic in the client-side and then you have to use JavaScript or whatever you use leads to problems sometimes it's a different language it leads to errors so if you use the same you tested once and it works on both platforms right concurrency yeah okay I don't have to tell you Java is made for that and it works and it's great it's in word so you can use it quite well on client and desktop which is in the browser yeah you can do some kind of concurrency but it's not the same you can do native access that someone do J and I or J here in the audience one two three oh yeah a couple of I mean it's not easy for the standard Java developer this is sometimes it's okay yeah yeah I heard of it mmm okay but I don't want to do it well I hope with the project Panama in the future that will be more easy to use but still it's possible and it's sometimes it's really nice to do stuff with native access which is great I mean especially if you have to access hardware like custom hardware then this is at least possible with the browser this is yeah you rely on the browser to offer some stuff for you that you need some API ice or something but here you can do it really on your own you have drag and drop between windows desktop file system you can just drag stuff around this is no problem I'm I don't know if this is it should also work in the web but yeah this is something you have to mention because not everybody knows then of course network programming yeah this is of course it everything is supported in Java as you might know right but that also goes for other technologies so you can easily use all of these things like WebSockets and stuff and WebSockets also in JDK 11 it you can just use it it's there so you don't need any additional library to do that I mean bluetooth and you must be did someone ever use bluetooth or USB in Java yeah and you like it no yeah I know it's really it's possible let's say but I once went down the Bluetooth way and yeah got stuck it was really in its most of the stuff a little bit older and it works sometimes but not really easy to do but it's possible internationalization yeah I think this is also not too hard to do in in web stuff but with Java that was really easy we use that in our internal own application let's say template and we have the internationalization just inbuilt it's so easy to do I just someone pointed me to that and said well you might want to mention that because it's not not easy to do in all of the platforms and languages but in Java it is well then we have offline capability of course because we just built a native app it can always run offline except you have a lot of calls to the web sure but then even then the software doesn't stop to work because everything is just running on your machine you just rely on the stuff that you get from the web I mean with the web technologies you can do well as long as you have all the JavaScript stuff on the browser then it's fine but isn't it as soon as you need some something and javascript in the browser needs a lot of stuff from the web you got stuck this won't happen with the desktop app we have hardware acceleration sure I mean swing was hardware accelerated parts of it not everything and Java access hardware accelerated by default it also has a fallback to Java 2d and then it's software rendering but usually on the major platforms it runs hardware accelerated which is fun and nice so that's also a reason why companies choose it for a science application and stuff like that it runs on mobile and who knows who does someone ever use it do you want stuff so mobile Java FX application nobody yeah it's it's really I would also say this is not the typical use case but let's say you have a small company and then one of your customers asked for a mobile application of your let's say desktop application or whatever then it is possible to to do that and it's even not hard to do and the good thing is it's just standard Java stuff you can test it on your desktop machine and then you just deploy it it will be packaged to a native iOS or Android app and then you can deploy it via the App Store to your mobile device so I mean you will have some restrictions in using that but let's say for business applications there's no problem you can you can do it and of course it's it's running on on embedded devices like raspberry PI's and other ARM based stuff if you have a Raspberry Pi it's even hardware accelerated if you have another device it's most of the time software rendering which is not fast but to be honest who needs really fast rendering on an embedded device it's mainly done used for buttons and stuff so easy things or visualization easy visualization because usually the the devices are quite small but you can run it there it's no problem with J Pro it's even possible to run Java X on the browser and I will come to that later and this is for me this is the the greatest thing that I can do that it's also not for everybody but for some things and I will give you an example this is really great well we have stable API switch is not always the case on the web but this you can run the same code for years without any problem which is a big advantage in big companies they really rely on that things they create some software and and they would like to stick with that for 10 years and it's possible in the web mmm depends not not always and yeah one of these advantages then is the application lifecycle which is totally different compared to web technologies because it can be in the range of decades instead of years or months sometimes so for example if you have a typical JavaScript application right then it looks like this and the frameworks come and go like okay well this than your thing oh that's the new thing oh no this is the new one right so it goes like up and down all the time and you go to a conference this year and then whatever is the latest and greatest stuff next year it might be totally different yeah that's interesting so if you take a look at a Java desktop application looks more like this all right so you create one and then it's just goes forever nobody ever asked about a new framework in Java wife we have swing we have Java of X whatever just use it and it works and it's it's really helpful to have something like that because it takes the stress away with new frameworks and other things right so I met a guy in the company and I was really surprised when he told me they they usually plan to rewrite the complete UI code the complete stuff every two years I have what why well yeah and there's a new technology and we just decided to completely rewrite it so I asked him why don't you reuse that no no we just decided to go completely new to always have the latest and greatest stuff and then I was like why should you do that because your application usually doesn't change every two years in that way that you need to really change the framework to visualize it so there's really no sense to do it but yet people and even companies decide to go this way I don't understand that but okay well let's take a look at the typical environments for Java desktop right because this is really interesting it's insurance companies for examples then banks absolutely industry in general so producing industry they use Java scientific institutes you will find very often their military which is surprising I didn't know that but two years ago at at code one or was it Java one I don't know I think I hope in whichever one I met a guy in San Francisco who was coming from the military and he was telling me that he they use a lot of drug effects internally and I was totally surprised and he said yeah they will never use WEP because it's just they don't want to have something connected to the outside which makes sense and I myself worked in the semiconductor industry and nanotechnology research for 10 years and there was exactly the same so when we went to the to the perhaps where we installed all the big tools there are even tools that don't even have a network cable so because they don't want to have this stuff connected to the outside world so and you just named oh do you have a browser on that browser they don't even talk about that technology right so other companies of course trading is using it aviation companies like Airbus Boeing and things space and defense medical companies and automotive of course there was an interesting story again at JavaOne this is four years ago five years I don't know exactly there was a guy who approached me and said you know you should come to my session and I never met him before and he said well I'm following you on Twitter and I read your block and all that oh yeah that's that's fine and you might be interested then I went to the session and it turned out that this guy was coming from forks wagon and then he showed us JavaFX based media center that is that they are working on for their cars and he mentioned that since I don't know exactly the year but it's in principle all forks wagon company cars which is not false wagon only I think it's also see at Audi Porsche Skoda and they are some more all the media centers running jabba even today and the last couple of years and nobody knew that it's based on Java 1.4 and they've wrote their own UI layer to to render all that stuff but all the stuff if you drive a car like that and we have a media centre that's all Java so not only knew that well then I have some examples so this is only the companies that I knew of they're using Java on desktop that doesn't mean Java FX in general means swing SWT rich client platform applications so just take a look at some of them oh yeah this IntelliJ of course Zeiss iBM is using it then there's nervous Airbus Adi yeah a lot of companies you might know the names and you might wondering that these companies are using Java on desktop and the problem with this is that I mean not with that they use it but that nobody knows they use it internally and nobody talks about that stuff and that gives you the impression because everywhere you look is web everybody's using the browser all the time but this stuff is running behind some company firewalls nobody knows of and I remember once I was I was giving a workshop and there was one guy sitting in the in the audience encoding all the time and every time I proposed for the audience to do something like this and something like that he just finished after a couple of minutes then I approached him in some coffee break and I asked him so why is he so familiar with this technology and he said well I'm working for Zeiss and we use it for years and I was totally surprised that they use it and then I asked him well why don't you talk about that on conferences and he said well it doesn't have any benefit for us because or users they don't care about the technology we can just switch it whatever it is so we never tell them and I think yeah well that's true and why should you bother about the community in general or the public if you have if you found a technology that works for you you just use it you don't have to explain to your customers if you buy an inch of electron microscope or by the way this is running JavaFX right so the customer will say what what is this guy talking about just show me the tool right I just would like to use it and that makes sense it's like Volkswagen using Java and all the media devices why should they should they put a sticker on there this is running on Java well we are interested in that but not the public right and that's the reason why it's not that well-known that Java is still there well then and there are many more companies that I don't really know and some of them I was not able to to mention because they told me no we don't want to know we don't want to be mentioned on on slides or stuff well so in the end that means Java on desktop is that right not yet I think it's still it's still there so but the problem is the question why is not taken into account why don't people use it really right so and I have I was thinking about that and I came to the conclusion this is hype driven development that's the reason why we don't see it and what I define as hype driven development is first thing they do the companies they make the decision about the technology so that means let's use whatever web framework is the latest and greatest fancy stuff we use it and I wasn't a company they used they started with the decision let's use angular 8 and that was in the beginning of the year it was not even out at that time but they made the decision we use angular 8 I said well it will come out in September or something are you sure you would like to use it oh yeah yeah we do that and then the next thing they do they try to solve the problem and whatever it takes they take every workaround to make it work just stick to the technology right that's the because that was given and that's interesting because I thought it should be the way like requirements driven development right so the first thing you do is understand the problem if you understand a problem then you choose the right technology for solving that problem and if you do that then you can solve the problem by using the right technology and not against web technologies but you don't have to use it for everything because it just doesn't make sense for example I was in a company they built an application and they said we use web technology I said well that's fine and then they said it should look like a desktop application okay so that means I start my machine I start a desktop application which is the browser to load a web application that looks like a desktop application so where's the reason behind that what is the I mean and then I ask them ok you can also run it on your mobile device I know because it looks different on mobile whenever so why why you create a desktop looking application in the browser if if it's I mean sometimes it makes sense if it comes to deployment I agree but in this case it wasn't really it doesn't really make sense to use it there but they decided to go this way and they are happy with it so but sometimes I just don't get it what I explained to customers or to potential customers what you can do is you can use something like a questionnaire matrix which is something like that this is just an example you write down all the requirements that your application might have like I don't know complex 2d graphics it should be offline capability it should have a mobile client whatever then you have some like very important important not that important or unimportant points you can make some process and then you have to give it some values between minus 4 and 4 whatever and then you will just count the numbers and then you will see if it makes sense to use web or desktop this is just a very easy approach but you can use it if you are not sure if it's the right technology or not and it doesn't have to be this this topics it's just some examples so it's but if you are not sure at least you can give it a try and see maybe we should use desktop whatever it it's not even only for Java this goes only for also for native applications it's just to make the distinction if it if it makes sense to use web or not all right so ok let's let let me give you some examples for desktop first so for example this is also from Zeiss and the interesting part is they the frame outside here this is JavaFX this is swing they just combine both technologies because in in Java X I told you there's a lack of some of the components like this they used image an image library that was capable of importing like video streams and stuff which worked in swing very easily so they just use it in Java FX which was no problem for them so this this is a good example of how you can combine even swing and Java effects on a desktop platform then there is another one which is mint it's a training system for pilots well you can also do that in web that doesn't mean this is not possible in web right just just examples for first thought that I was allowed to show at a conference then this is from NASA this is the so-called deep-space trajectory Explorer and I talked to the guy who and who created that stuff and this has lots of different screens this is just one I found and it's more or less they calculate the trajectories of satellites going through the solar system and this is a lot of calculations because everything has to be taken into account and has to be visualized and all that and then they figure out graphically what is the best way to put the satellite on the right track and I asked him why he's using Java desktop and this is JavaFX and he told me he tried web but it was just not possible to do that stuff with the web technology at that time I mean I mean maybe today but when they started this project it was not and it's this is in use so they calculate for some mystery missions they calculate the trajectories which is really interesting then there's another one where we this is what we did for a company where we have to you have to calculate the containers on vessels and the whole vessel has to be created and with the length and the height and the the base and all these different colors means different types of containers and all these things so yeah this this is also this is a typical desktop application I bet you can do it on a web browser but this company doesn't even want to do it on the web browser so why should they then there is something that is used within Airbus so they do 3d wing analysis so this is a wing of an Airbus airplane and this project is open sourced so you will find it on on github so they just decided to make it open source I think it's called Equinox or something yeah so you can find that and this is with and what I mean was with the styling so they decided to go with this way it's not my favorite kind of styling and application but you can use CSS to create all these things so that it looks like that then we have a CRM system which is called wanna CRM of course you can do that in web but this was also done in Java fax then there's the heavy iron research lab in Germany they use drug effects for analyzing the iron beam in the acceleration thing that they use there of course then there's my own library that that was used on the Oracle PI cluster there was a cluster with thousand sixty PI's running on code one and they used my library to visualize all the different pies in the cluster and I was yeah I was happy that they used it so that means it was 1060 of these things running on a huge television screen so it was more than I think it was six screens the video wall very interesting so let's take a look at some mobile applications done in Java effects so this is I know most of you will know the devops conference and because the gluon guys at least one of them he's part of the committee and was ever involved in their work so they use JavaFX application to create the program app the scheduler and everything this is done in the JavaFX application running on your android or iOS device and if you just see the screenshots you can't tell if it's a native app or if it's if it's a web app or is the java vector this is the drive effects application and this is the same so just sample applications running Java effects on mobile so that you can see we can do 3d even on a mobile device we have a map view and this is again my library and there's a reason why I show that all the time because I will show it in my demo because it's running as a native application on on a mobile device and then there is this game that you might know and this one is of course done in Java X and you can download it from the App Store so that just shows you there's no blocking point in creating mobile applications the applications using java technology it's just maybe the the blocking point is in your head because it doesn't feel right to create a mobile application in java why should i do that well why not just give it a try it's fun while the requirements to do mobile applications will glue on it's quite easy you just download the IDE plug-in and there are plugins for all general IDs and you didn't just just start a new gluon project and you are good to go and what they do is they give you this folder structure in the project so that means if you start coding then everything goes into main right if you have desktop specific UI stuff you can put it in the desktop folder if you have embedded in iOS right so you let's say you would like to have a native looking Android app so you do all the styling and stuff in the Android folder for iOS the same and then you just compile it and you get a native Android app that it looks like Android and then you can also create a native looking iOS app and it looks like iOS and then you can deploy it differently based on the same source which is great then we have web which is that's really interesting who knows that Jay pro stuff someone heard of it one too okay because that's really fascinating yeah and again it's my own library I know but I still love it and you see this is a browser and this is just my own data dashboard and I run it this is running in my office at home with the little sensors on it and just to yeah I just use it on a PI that's sticking there but I can use it in the browser but it's not even for fun projects but also companies this is a project running in the UK and it's a company for power what is it it's a power line or something so it's everything related to power monitoring in houses and stuff so that it's running in the browser it's and they decided to go this way there is not a desktop application at all they just run on this one on the browser and then rely on it so here are some screenshots and yeah it looks like it could be a web application right you can't really tell but it's running in the browser so what are the requirements for running JavaFX in the browser using j Pro well that's all you need you just if you have Gradle or maven you just add the dependency in the plug-in and then you can either run it directly or you can just create an executable stuff that you can run on your server and that it need just the same code you can test it on your machine and then it runs in the browser and what they do is you have to think about they create all the application and then you started it runs on the server and in the point where the rendering starts they create and convert all the stuff that is rendered in Java effects usually they create SVG and pass it to the browser and then SVG is rendered natively in the browser quite fast so that's how they do it okay there are problems with having sessions multiple sessions because it's one JVM on the server running you can imagine that's not that easy but in the in the times of containers you can just spin up different containers where you run these things just let me give you a short example we have still 10 minutes first of all I will start what else my little dashboard I'm not directly starting it from the IDE so here we go so this is the native app running on my machine you can this is the blood sugar for Sun so I can monitor him here and can trust off yeah okay temperature in my office ok so that's that's the one that's the the native desktop let me show if I can I can just to show you that this is really a window ok now let's start the same thing in the browser so therefore I just start just give me a second have to start up this the browser what I do now is Gradle J Pro run that's what all got it all that I do and just have to wait onto the server's up alright it's running so I use the browser here just let me move it to this one and now we go to localhost 8080 it all it takes is some time to load it ok and here we go so this is the exact same application running and the web it's in in Chrome here I can do the same stuff I can click on things and so you see it's not really hard to do it it even doesn't take long and then if I started I can't even run it on my mobile phone but this one is not really running from the IDE then but let me give it a try because yesterday it failed and why not give it another try today yeah it's always good having stuff failing in the demo show QR code okay just give me a second all right here we go oh it doesn't work mmm like yesterday that's what I expected one more time one more time I tried it in the in the room this morning it worked okay doesn't to bed but you can run it I mean I can at least show it to you from here if I start it on my mobile phone it might be hard to see for you but it's here you see and this is really running on my server so it's the same stuff and that that means you can you don't even need to go native desktop applications you can create web applications using Java effects which is possible alright so in the end if you take desktop Java into account right it won't die so and with this I just say thank you for listening and if you have any questions I'm here I think we still have a couple of minutes left for questions if there are any I'm willing to give answers anyone have any questions please raise your hand up partly here in front hello great talk the question is if you have building the same application for three different platforms like mobile web and desktop they have tools to properly test them on the from the same cold you mean if you have the same stuff running on different platforms or yep how do tests do do you write a separate set of tests for each platform we have to switch supports the same thing same called different platforms you mean which one if you do the mobile stuff or no I mean you talk about you from your ID you're on desktop application verification and mobile application but like in the real production you need to test application right after Meishan test and stuff yeah this is Java you run your Java test on the desktop you test it on the desktop and just believe it works on other widows yeah it will okay okay I know what you mean so okay you know if you use for example groggy and you create a native image you have to believe that growi and does the right job of course you can yes yes that's that's that's for sure I mean but that goes for most of the technologies if you compile it to something you have to believe even if you're good to Java you have to believe that it compiles down they just what may be right is a silver bullet No thank you for for mentioning yeah ok anything else ok as my previous collegue just wanted to thank you for the interesting talk session my question is about the our project you've mentioned about the integration with native api's so could you tell you will it make my life easier for example in approach when I need to in integration scenarios invoke some kind of comb or die comb servers for integrated wisdom not honor or is remained in the same way even here you mean with Panama ok yes yes yes well to be honest I never really took a look at it I just talked to the people who are working on that and they claimed yes it will be easier to do that kind of stuff but we have to wait until it really get alive right so at the moment it's just work in progress but they claim that it will be much easier to do all the native access stuff and also comb decom stuff I hope so ok thank you do they have any this preliminary release date or still not not sure but yeah if you look for Project Panama you will directly find something about that so there's even though I think there's even a website where they explain the lots of stuff what's going on and things so ok thanks a lot it's about taking a look at it definitely and there's a question in the back maybe someone's knowing the answer to that questions better than me hi you mentioned your you the Java vex compiles to SVG and then pushes it to the browser if I have a very interactive application with sliders and knobs is it chatty back to and from the server yes so the problem with this is you are exactly right so if you have for example animations you can imagine that each of the step has to go from the server to the client right with all the conversion with animations it's it's working but what you usually do is you try to avoid heavy a big heavy animations and stuff sliders are fine that that's okay that works even the touch stuff in the browser then works but because of all the conversion going on on the server side it's it's that's definitely some point you have to keep in mind that you don't want to do heavy animations with this technology yeah that it is a problem because they have to split off and run the stuff but they are working on things like in Java except the canvas API this is for example at the moment not supported with the next big release and December it will be supported by dre pro and then that makes things easier I don't know how they if they might handle even animations then in the browser using canvas because then it's easier you can just create JavaScript that is running in the browser into the animation there but but I'm not sure if if it will happen yeah thank you
Info
Channel: JUG .ru
Views: 2,406
Rating: undefined out of 5
Keywords: java, jug, jug.ru, desktop, javafx
Id: v3QHrPCaWUA
Channel Id: undefined
Length: 57min 14sec (3434 seconds)
Published: Fri Feb 14 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.