 Good afternoon everyone. I think I'm going to start. I will be talking today about how to use modern graphical user interface toolkits, write it in Go, name it FINE, and really write your application once and distribute it and run it everywhere. I know you have heard that quite a few times in the last few decades, so I'm going to show and see how that goes. I'm Cedric Bay. I'm the current CTO of FINE Labs. We are a company dedicated to the FINE and graphical user interface ecosystem in Go. I will start by an introduction to Go. How many of you have used Go before? Can you raise your hand? That's a pretty good number. Cool. And then I will do an introduction to FINE itself. I'm going to ask if anyone has heard of FINE before this talk. Yeah, that's cool. Two people. And I will do some demo that does integrate Go modules and the ecosystem of Go was fine and see how it does kind of the power of doing an application in Go there. I will show some of their self-updates, which are quite useful when you're distributing your application. And I will show deployment of application on desktop and on mobile as a bonus. So let's start with what is Go? Go is right now already did feel as a young language, but it has been there for over a decade. It's pretty stable. It is not changing much. You can read Go code from a decade ago and it's still completely the same as of today. So that's pretty good in terms of like readability and skills. It's used heavily for the cloud and like Kubernetes and all of these things are in Go and the ecosystem there is in Go for sure. There is a lot of command line tools that are also written in Go. It's pretty straightforward to do that. It's a very simple language. It's easy to learn and easy to read. And I think I'm going to emphasize on the read. It's something that we kind of dismiss, but being able to understand the code just by reading it and not having to wonder what is all the side effect of that function are something that is really powerful. It's very fast to compile. It executes natively. And so it's pretty fast also at execution. And it's very important. It doesn't require any dependency. And so when you distribute your application, you only distribute one binary. And that's it. And that's very interesting when you're doing a graphical user interface because you can just distribute one binary and people receive your application. We'll be back to that later. And it has a really good set of tool for guarantee the quality of your code. And that's also a very useful thing. So let's go with the first very simple LL word. Here we're just going to get some flag from the command line to know we are going to be saying LL to. And after that, we are just going to print that on the command line. And it's kind of a very, I mean, it's a classic example of what LL word could be. I just wanted there to put a little bit of command line to see how that does go. As you can see, I'm pretty sure that everyone here can read that and see what is going on. On the tooling, I think I wanted absolutely to try to cover a lot of what is done with the go tooling. And that's come right out of the box of go tool. So on the command line, you have go test. You have fuzzing with go test fuzz. You have benchmark with go test bench. All of that is just out of the box. You want tool coverage. It goes with go tool coverage. It's there with your compiler when you have installed your toolchain. You have go lint, go import, and go cycle that does give you an idea of your code complexity, of making sure that your code is following the same coding style. And the entire coding style of the entire go ecosystem is the same. And so if you want, you start looking at someone else's code, you don't feel like you are in a foreign code. You are in go code and does like the same as you. And it's also quite important there. Go, vet, and static check are trying to detect common error and bad pattern in your code and report that. So that's also a pretty useful tool out of the box. And one of the last things that I like a lot about go is that the compiler itself will compile for any of the targets supported by go. So you are on Linux, you can cross compile four windows right out of the box. You can cross compile on macOS just there with the same go compiler. And that's absolutely great. There's just a little caveat that it's only work if you don't have any dependency that are outside of the go ecosystem. If you do, right now, one of the best things to do is to use ZIG for doing the compilation of everything that is like C, C++, and link that with your go binary. And then you have the benefit of having like two compiler and you can target all the environment you want with that, which is really, really amazing. And it's also very easy to integrate with GitHub action and all the CI infrastructure. So I'm going to go to other direction later on. Now about FINE. So FINE is a graphical user toolkit that has been around for maybe four or five years now. It's a completely written in go. It's under BF33 close. So completely free software. I think one of the big things here is that it's targeting go and it's to be used by go. And there is no interest for binding in any other language. There is no interest. Like the idea is that your user community are going to be a user of go. And if they have a problem with your code, with FINE itself, it's their skill. They can actually dive into the code of FINE. And as I was saying just earlier, you have the same feeling with a piece of code that you have not looked before in go and your own. Because of all the linting and all of this general ecosystem that push the same logic. And so it's making it very easy for people that are using FINE to actually contribute to FINE. And if we were to do bindings and have something in C or C++ or REST as to do the graphical framework, you will lose. And there will be this barrier for people that are using it to cross and to be able to contribute or to be able to report bugs in a useful way. So I think it's something that is very important to emphasize here is that it is in go for go developer. And that is like a really powerful thing. It's obviously cross-platform. It does support all the major desktop there. It's also support Android and iOS. So your application without any modification will run everywhere there. It's possible to use some desktop specific feature like Cistray for example. So you can have a Cistray for your desktop and obviously on your mobile there is no Cistray. So that feature is just not there and it will not impede your application. The other statement is like saying it's easy to use but it's really easy to use. You will be able to make an application very quickly with FINE. It's something that we I have been doing graphical user interface for like 20 years now and most of the time at the end of the day I was too tired to make my own application with a framework I was developing. With FINE I'm actually enjoying doing site development of my own application. I want something because I have network router that doesn't have an app. I'm making an app for it so I can actually do things with it. I have an app for like other things and it's very easy to actually make your own application for like all kinds of things. It is the idea that you are not necessarily a designer so the toolkit is trying to do everything it can to help you make your app looks okay very quickly for you so that you can focus on making it do what you want and that's kind of the core there. It does integrate with the GoTooling so all of the tests I'm going to show that a bit later but we support all of the test infrastructure of Go into FINE so you can actually have automated tests that will check that the UI is actually doing what you expected to do and enforce that over time. The last part that is also very important is the Go ecosystem has amazing module for doing network for doing database operation and all kind of cloud operation and you can use them with FINE extremely easily and it's where it makes sense a lot to write application in FINE. So here is just a little bit of an example of what an yellow world is. You create an application this application you create a window from it you create a label and you put that label into a Vbox container virtual box vertical box container which has the label and a button and the button has a function that will when you click to it will change the label to a different text. This is basically how any application will be it's just a stack of widget and container together with function and callback that will do the work and at the end we run a show and run because it's need to be blocking until the window lifecycle is done. So that's there. So for the rest of the example I've written a big example application at this address that you can go and take a look at. It is fully tested. There is all use case there of like network that GitHub action and everything is there. I've tried to make it as clean as clear as possible and so I think it's a great demo of what you can do with FINE there and I'm just going to cover a few things during this talk but there is a lot more detail there. So I'm going to be covering the test how to use YAML and network file sharing, do a little bit of GitHub actions that are automated there and look at how the self update for the application is working. So the application itself will look like that when you use it. It's a little bit dark. I should have used the white theme for that. So that's what the application is looking like if you compile it from the Git repository. The idea is that you have a bunch of shops on the left and when you click on one of the shops there is a list of shopping stuff that you want to get from there and you can click on some of the button to add some stuff. You can filter things, you can export and save your shopping list and so we are doing a full automated test for this application and so this test here is making sure that when you click on the checks box that are here you can see it's not great on the screen. So for each item on the shopping list there is a check box and so this test is verifying that when you click on the check box it does update the internal data of the application and that it does correctly match things. So we set up an app data with temporary DB which is like a general function that I have created for that purpose. We check that the UI is properly created. We check that the UI rendered to an image that matched what you have previously checked and expected. So it generates a file or PNG that you can actually manually verify if it doesn't work out. We also render the UI to a markup language so you can actually make comparisons on the string. The obvious benefit between string and PNG comparison is that on markup or like small theme change and change on the font aliasing and things like that will not show up into a markup check. They will show up into an image check. So sometimes you want to make sure it's like pixeled perfect the same thing as it was for the previous version but sometimes you may not want to. You may just want to have the correct information so you want to have your label with the right information and things like that. So that's why there is two different ways to do our testing on your application there. We simulate a tap on the screen at their position where the check box is and we verify that in memory all the shopping list of that item that is displayed at that position get checked. We retap at the same place. We both time have been checking the markup that it does match our expected markup so that the UI has been correctly updated itself and then we check that the value of the shopping list in memory in the structure is also correct. So we have this asset files that is verifying that the double tap on the same check box will actually correctly reflect into the in-memory value to be fast also if you do a double tap. So that's kind of a quick review of what you can do on automated test on a graphical user interface with FINE. There is a lot more tests in that Github repository that are pretty interesting I think to look at. And out of this test you'd get coverage reports. So I'm using cover roles but you can use gotool automatically as a web coverage file generated if you want and it does tell you how much of your code is just covered out of the box by the goal test too. So that's kind of neat. Now if you start to integrate things, one of the nice features that we want is to be able to have you have an app already on your desktop and you want to get your shopping list to your phone or you have your wife as a different phone and you can exchange this shopping list. And so to do that without like a central server or anything the idea is to generate out of a shopping list a YAML file that you can then exchange using warm all which is a protocol that is like peer to peer kind of things and it gives you three words and you just give these three words to the other side and it will download the file. So it's pretty neat when you just want to exchange file pretty quickly but what is really cool is that it's already implemented into a Go module and so in literally two lines of code you transform your Go structure into a YAML file which is the export YAML function up there and in less than 10 line you can actually share your file across internet with nothing more than this few more lines that I have there. So you basically get your YAML from this YAML you just send it over the network you get a code which is these three words that you have to share with your other phone via a different medium and that's it for sharing file which I think is pretty cool and just work on any network and just just there. So that's one of the power of the Go ecosystem is that there is already a lot of modules that do great things with very simple API to use and well 10 line of code I am sharing things across NAT and whatever you have on your network and it just just work. And on top of that we want to add a UI obviously to display this code word so I'm wrapping this upload YAML function as always in Go you test the error return before you do anything and have this show progress bar infinite function that is actually going to create a dialogue and display this word and it will run until the other party the other side has entered the three words and has downloaded the file. And so it will look like that on the screen you have just a dialogue and those infinite progress bar bumping from one side to the other and you have a code that you can type on your phone to download things on the other side and I think I can do a quick demo if I don't want that. So here we go and so if you were to have on your phone if you were to have on your phone the same app you can type the words that are here it's not liking very much yeah it should be okay. So I have the same app on my phone it's Go it's the same thing and you can do this and I was too slow well and it does I instantly download and I get that on my phone. So I find this kind of feature very cool to be able to get them out in like literally 10 line of code so it's 10 line for sending 10 line for receiving and it's going and it's pretty easy to do these kind of things thanks to all of the Go ecosystem. One of the other thing that is really interesting is that you can automate a lot of the static analysis and the quality of your code by using all of these tools I've described earlier and actually making them part of a GitHub action and having them there you can basically copy the GitHub action that are in my repository that I gave you earlier and it will automatically run all of the Go tools to make sure that you have the static check running and make sure that you have no bad construction that your import are only the minimal needs you have that you have the linting that is correct for forgo that's a complexity of a function is not too great and all of that is just like out of the box you copy your file from like one project to the next you don't even need to think about it it just just work and that's really really cool. One of their very very important feature when you do graphical user interface is how are you going to be providing update because most people download your application like once but they don't want to be coming to your website to get the next version ever again this is not happening and so on mobile you have the marketplace you have the app stores that give you that ability to deploy new version on the desktop it's a little bit more complex not everyone like if you go on on windows there is a bunch of different app store all of them don't really necessarily support update and it's sometimes left to the application to do that on Linux it depends if you are installing the application as a user or as an admin so if you are as a user usually you don't have an ability to update your application so it become interesting to figure out how to provide a way to update your application and fine as this fine self-update module which basically require you to point it to some HTTP URL where you put your binary and yep this module will check at pretty fine interval if there is a new version there and if there is it will do download check all for all security if it's the right signature there and just replace the binary and it will just work out of the box for windows linux and macOS and literally again it's a I'm not kidding it's 10 line of code is that right maybe less it's maybe 10 line with the spacing on the screen but this is really really helpful because now your application when it starts it's asking for do you want me to update it and I think just earlier when I was starting the shopping list I think I maybe worked earlier on the new version at some point yeah and so if I just do an update there it's downloading through the network from Wi-Fi that's cool demo it's working it may take a little bit of time because that's a Wi-Fi at the conference but it's basically able to download a new version and it will replace itself when it's done and yeah it worked pretty fast actually ah good I was not expecting it so up and that's a new version it's exactly the same thing oh may have just been like a small bug fix somewhere I did deploy or whatever but with this is the code that is used for that and and the thing that is interesting here is you can share that public key it can be on your git repository because it's just a public key so the private key obviously that you use to sign is not to be put on there in your git repository but for an open source project you can actually have the code completely there and be used without any trouble your private key will have to be end up into the github secret for example to be used so the next the next cool bit is the multi-platform support so um so there is as I was saying earlier there's a little bit of a trick with go itself can compile go to all of this platform but it's relying on another compiler to compile the c library that some of the dependency may use and and in the case of fine we are using glfw and we have like dependency on x or depending on what you have on windows and so on and so there are native dependency that we have to compile uh with or binary so normally it's on the user to install all of this dependency and all the cross compiler to to get that uh working and that's a huge effort usually and so there is an amazing tool which is named fine cross and basically what fine cross does is it has a bunch of docker image that are prepared with a cross compiler and all the dependency for your application and when you say compile me for windows or linux it will pull the image that has all the dependency for linux there and it just work with the fine product kept that up to date so you you have like right now the 1.20 uh go with uh the latest version of fine and the latest version of zig in it and it just pulled this image for you and you don't have to bother with all of that uh complexity uh and it does compile out of the box for windows linux bsd oh i forgot macOS uh aios and android there is a little bit of weirdness around macOS and iOS for macOS you have to manually download the sdk from apple at the moment and to point the image and tell it like that's where i did download the sdk because the license on the sdk is not all friendly to reuse i know that tinego has made some work so that we maybe at some point we'll be able to not use apple sdk but for moment we need to use apple sdk so that's kind of a weird thing ios is a different pain for ios you have to compile on a mac to be able to compile for ios so there is nowhere around that that's how it is so the support for ios require you to be compiling on a mac uh that's kind of a life it's kind of a pain uh the other thing that is cool with fine cross we now support both amd 64 and arm 64 for the ost machine so if you have our uh so we did that first for the mac m one so that you can cross compile with fine cross to cross compile from the mac m one to any other machine but a lot of the user are actually using raspberry pi and friends like that to do the sci as a cheaper cost and cross compile the application using uh raspberry pi to uh or the target uh it does surprisingly work well enough if you're not uh in a rush so that's kind of cool a little bit of an example uh so what you have to do to compile for windows you go into your directory of your application and do fine cross windows and voila it does mean that you have to have installed docker or podman or have access to a Kubernetes cluster to be able to do uh to run fine cross because it's rely on on docker or podman or the ability to run a container to to be able to do the build but um but it just worked there out of the box uh pretty simple setup and as we as I said earlier all the image of the container are being kept up to date so right now we're like 120.4 for the go compiler in the latest image and we have fine 234 in it and the next release of fine or next release of go a new image will be pushed and on as a user you just need to say I compile and we'll check if it has the latest image and just download it if there is not a new image or just use the current one one of the nice things is that you can also include that into your ci cd pipeline so that's a demo with github action and it will actually go and compile for linux windows free bsd and android with this uh using fine cross uh and this github action so you can just drop that github action in your project and it will guarantee you that for every pull request you are doing it's able to compile it for all of his targets uh out of the box so that you if you pull a module that is not compatible with I don't know android it will tell you right away um so one of the product that we have been working on at fine labs is actually an automated test uh automated build and delivery system that put all of your uh binary behind a cdn and those all the signature and all of these things for you and so you just point into your github repository and it's instantly is able to build your application for all of this uh this all of this uh os and different architecture and it does share share with you a binary can be installed it does all of their uh self updates signature and everything for you so out of the box you just have to say that's my github repository and you're done uh your apps is now available uh for the one that are that want to have fun the application I was demonstrating just earlier that's their cure code for android for the application I just just work so we do support github githlab um the build is optimized and all the time off build is pretty optimized we support all of the desktop we have done all the integration for ios you still need to pay for the license to get the key for ios but we do all the build for you so you don't need to have a mac to actually do the build you can just rely on our infrastructure to do that for you which is I think personally uh it's it's great I just don't want to be using a mac for for all of these things um and all of that is behind a cdn so you just can share your url for delivery and it's uh that's good to go so if anyone wants to have some fun with android oh there's a cure code to go there um and uh as a conclusion and I think it's something that is hard to imagine at the beginning on how easy you can actually make an app and get it working on your desktop or your phone with literally no code spatial specific or anything like that so so earlier I did a first demo of like a very uh I would say more like a demonstration of the toolkit than any uh like integration with go and not really a good looking app um uh we have done this application which is a little bit more good looking to to be able to see uh what's the time zone and time at some point somewhere in the world uh it's also completely in go and completely in fine and you can like change time and things like that and it will reflect uh on all the time zone it's pretty useful these days when you don't know where people well you know where people are but you don't know what time it is and and the same uh oh and yes and vzapps also has a cistray down there all that is provided by fine so the same cistray will work on like windows and things or macOS also and uh I have the same I have the same application that is also uh working on my phone here so again no difference it's pure go it's the same thing all over so I think uh as I say I've been doing graphical user interface framework development for over two decades and writing my own application for like small things has always been like a huge bar to step on before doing any apps and with fine I found myself being able to very easily do new apps for like random stuff I would have never started to do an app to control my network router from from here so nice thing I have well I can maybe also do a demo here so I have at home some uh microtec router and one of the thing I really like is that I want to be able to remotely connect uh from anywhere but uh I don't want to have to set up a complex things so I'm using tail scale so there is a go module for tail scale so I've directly integrated into my app and all the connection to my router are now done via tail scale and I'm using another modules that was written to actually do all go request to a microtec router never heard of my tail scale in that module but I can just share the handler to the function that connect via tail scale to that module and I have a tail scale microtec connection and I have that integrated into an app and I can also I can just uh so that is uh kind of further away it's where is that one at my home is not here but I can actually get all of this data kind of read transponderly via tail scale and just just work so that's a really kind of the power of uh oh and I also have the SSH I don't know if that's going to work here yeah it does okay and even SSH is working through our tail scale to the other side so uh that's that's kind of showing a little bit of the power of being able to use go to do your apps there is an amazing ecosystem with everything uh I have not demo anything about like database but there are like ton of database there is all a grpc there is uh all gsrpc and all of these things are there it just work and so if you have any idea of like a small app you want to do just go ahead uh it will be possible and then you can have it on your phone with like no effort I mean you're going to say just one thing if you have android it's no effort if you have iOS you're a little bit more pain but that's just uh apple being apple so uh that's will be it for my side um do you have any question for me yeah is there a microphone for oh yeah uh yeah but I think it's recorded so it will be great I think if you yes yeah hello yeah uh so when you make a graphical application for various with this thing used to be called responsiveness was a big deal like how do you design that works for various with was there any convenience that yeah good question um it's absolutely it's a good question um it uh it depends off your application like for example uh I was showing earlier um nomad um and no where is nomad well nomad is gone um so it depends off your application if you go for with uh this one nomad uh it has a custom layout and on the phone it's all vertical like this but as soon as you go with a slightly larger it will switch to be a grid mode and things like that so you have like a bunch of container that have different layouts that will detect this kind of oh I have like more space now so I should be doing things like that um there is also another widgets container that is designed with the idea where you say oh I have this group of things and at that side of screen I wanted to be like 20 percent for this one 30 percent for this one and 50 for this one but when the screen is like way bigger let's give like 2020 and like things like that so you have like a few container with different layout and some of the widgets for example the the shopping list has a different layout if you are uh on on their kind of sit on a mobile uh but uh on a mobile some of the widget will use tabs for uh for the layout while on a desktop they will put the tab on the side so because it's more logical on a mobile to have your tab at the top and on a desktop you have so much like lateral space it makes sense to have your tab on the side sometime so some like widget are designed with that in mind so that you can actually uh adapt best to the screen but you can always write your own layout so there is a the container object that take a layout function and so you can provide it with the layout function you want if and none of the layout provided by the toolkit actually match your need thanks any other question well okay I guess thank you everyone