 With Lincoln Baxter, the founder of the Forge Project to do the integration of Forge 1 in those days with Javel's tools. But the things that we will end up now, since a couple of years I've been working mainly on hibernate tooling. And so the thing that you will see today, they are actually mainly done by George Castaldi, who is somewhere here. He's the leader of the Forge. So actually he should be here on stage to talk about it, but he lets us have our 50 minutes of fame. Thank you, George. And he's giving a lab tomorrow about Forge. Yes. It's tomorrow. So we are still working on the technical issues, but I'm Sebastien Blanc. I'm 50% French, 50% Dutch. You hear the French part with my sexy accent. I work at Reddit as well. I'm on the Reddit mobile team. I joined Reddit three years ago. And yeah, on my slides you will see my Trito handle if you want to follow my tools. And now I have to speak until... Kun was really good at keep speaking. What you will see today is awesome. That's all I have to say. Yeah, yeah. Oh, look. I think it's better than nothing. Yeah, so the colors are a bit messed up. It's better than nothing. That was my next part we said. We only have two slides. Well, three slides because that's a death comfort for developers. So we don't have boring slides. So we just have two slides and then it will be only live coding. Okay, next slide, yeah. So when you start up a new project, you are facing the whole setup. You have to create a new project, create a whole skeleton. You have to be careful to follow the right practices. You have to do boring stuff like setting up your persistence layer, creating your models, creating the relations, stuff like that. And you will probably make a lot of mistakes and you will lose a lot of time. So you can move to the next slide. We have a solution for that. And the solution for that is FORGE. So FORGE is a rat tool for rapid application development tool. And it relies on a few principles that are famous in the world. Maybe you know grills or rails. They are also rat tools. They are rat-integrated. So you have principle of keep it simple. Keep it stupid simple by don't repeating yourself and by using convention rather than configuration. So that are the three acronyms that you must not say aloud in this order. So you can use this tool standalone. It has a really nice CLI. But we have integration for the three main EDAs, Eclipse, NetBeans and IntelliJ. But you will see that in the demo that will start in less than a minute. It's extendable. What does it mean? It's really easy to create your own add-ons. Imagine you have a project and you sometimes, each time you add a new feature you have a whole process, a whole classes that you have to generate, a configuration you have to do. If you see that you have to repeat this task every time, well it could be a good solution to write your own add-ons and add it to your FORGE tooling. So that's what I mean by extendable. And I think we can start for the demo, no? Right. So let's start. My boss gave me a call two minutes ago and he said, hey listen, Kun and Sebastian, in 40 minutes I need a complete bookstore application Java EE7. I want rest endpoints. I want to deploy it as a microservice. I want the Angular frontend. I want everything. And you have 40 minutes. Kun, do you think we can do that? No, because the command FORGE is not found anymore. Let me see. Let me see what's going on here. Yeah. You're already in a FORGE. Yeah, exactly. Yeah, yeah. So FORGE was already started. Okay. So I'm using the command line here and I start FORGE just by typing. Is the font okay or should we increase a bit the font? Yeah, can you increase a bit the font? Like this. Like this? Okay. Okay, so now FORGE has started and we can start issuing commands and of course you need a little bit of experience, but if you want to start a new project, the thing that you should do is project new. You can actually do this by typing and then when you don't know really what is possible, you hit tab and then it gives you all the possibilities, just like what you would expect. So we will create a bookstore project. Right? Maybe we can do an LS to show. So it's not that exciting. It's just a classic Maven project. Okay. Classic Maven. See your pump. So this is the command line thing for the hardliners. Right? Exactly. We can actually use the IDE integration that you talked about. So let's start with IntelliJ. IntelliJ. So we will import this project into IntelliJ and continue using FORGE in IntelliJ. So we import our bookstore app. Okay. We can keep all the defaults. Here we go. Awesome. So we have our bookstore projects. Shall we start creating a new entity? Okay. For instance, a book, since it's a bookstore. So for creating entities, we start FORGE. You can see it below there. It says loading JBLS FORGE. So you use a key combination. In this case, in my case, it's alt command four. And then it starts under the hood, starts up JBLS FORGE. And then when FORGE has started, this happens only once with the first combination. When FORGE has started, you get all the possible commands that you can condition. So in this case, it's a new entity. A new entity. I can scroll through the list, but I can also start typing. I know it's a JPA thing. And then I reduce the scope of all the things. I create a new entity. Oh, just one on this screen, because it's a first GPA entity that we create. FORGE sees that, though, he proposed to set up our GPA configuration. So here we will stay on the defaults. We can use, we're using Hibernate database, which stay on H2, but maybe you can just click on it to show that you, here you can basically choose whatever database you want. But for demo, H2 is awesome. So here we create our entity, book. And that's all we need. And it creates an almost empty class for us. It's just all the stuff you see here for a GPA to possess your entity. And we just have an ID. So I think we can add a field to our book, like title. So here we just say how we want our field to be called. It's a string. And here we go. It also generates the setters and the getters for us. Okay, can you show me if it works in NetBeans? It's a question. Oh, question, yeah, sure. It's generated by FORGE. It's great to have George here. I can proxy the questions to you. Okay, so now I'm starting up in NetBeans to show the thing in action here. Over here it's even simpler. You can just import, open the project. And it will open everything. And I have the book thing. Oh, there's something we forgot to show. Where is it? Other sources, I guess? Yeah, so there has been a few resources that have been generated by setting up JPA. Yeah, you have the persistence of XML file. I don't know if there is a source view on this. I'm not used to using NetBeans. Anyway, it doesn't matter. Shall we create a new entity, an author? Because a book has an author. And we create an... So here it's a bit different. You have to type there, unless there is something that I'm missing, but you have to start typing there and it starts forged normally behind the scenes. And it can also take a while. It's kind of a drawback, I think, on this platform. It takes a while for some reason. Yeah. JPA, new entity. And as you can see, we have a similar wizard that is issued or that is coming up. Author, okay. Can we add a name to the author? Okay, new fields. Okay. We can move to... Yeah, now we're going to go to the really good tool because that's the one that I'm working on. It's J-BOSS Developer Studio. Now, this deserves maybe a few comments. J-BOSS Developer Studio is based on Eclipse. And it's actually a bunch of plugins, the plugins that are developed under the project of J-BOSS Tools that are packaged and integrated in Eclipse under the product name J-BOSS Developer Studio. And for the rest of the demo, we will stay on J-BOSS Tools. Imports, import an existing Maven project. This is one thing that I don't like about... I've come to realize this using the other platforms. The import of projects is pretty hard compared to the other ones. You have to really click a lot, okay? In the meantime, I can start Forge. It can be done in two different ways. You have an embedded Forge console here. So you can actually type within your J-BOSS Developer Studio environment. Or you can use a key combination, which in my case is a command for. And then this thing comes up that Forge is being started. Now, you might, for people that have really a keen eye, they must have seen that I'm using Forge 3 Beta 3 on JBDS on IntelliJ and that means it was Beta 4, right? But I assume there's not a lot of difference. It comes from an update that I did, and it automatically pulls in the latest version. Okay, so the plan was to... Let's add some new fields to the book entity, like a publication date, and, of course, create a variation between the book and the author. Okay. Let me add new fields. New field and publication date, and the type will be Java, utility date. Okay. Okay. And we want an author on our book. New filters, well, author, and here we can browse, we can search for author in the truth up here. Here, author, here we go. And nice thing is, here you can select which relation it has. So it's a many to one relation, of course. And it will add the right annotation. Maybe you can show it on the author. Yeah, you see here it has added the many to one. So we're basically done. I think that we can... Our backend is done. We need a frontend now to do all the crowd approach. So I know you are keen on very flashy mobile... Yeah, but let's start old school. Let's start with the old school dirty stuff, right? Let's do some JSF stuff. So that's one really powerful feature of Fort. It is scaffolding. So basically it will parse your model, and from that, based on templates, it will generate a complete CRUD application for you. So all you have to do is to choose your entities. So I think... There's the setup as well. So it will set up multiple things for you, which otherwise you might have to go and Google, because how do you set up CDI? How do you set up... How do you prepare your project to set up EJBs? How do you... All these things, which versions work together, which ones doesn't. So it's all done in this setup wizard. And then... You can just do the select all, and the magic happens. And now maybe you can show a bit what has been generated, and then we are ready to deploy, and we should have our bookstore app. So this scaffolding step generates quite a few things, actually. It generates backed beans, JSF-backed beans, like the outer bean, for instance. It has generated a lot of stuff in the web app folder, mainly for both the entities, it generates facelifts, bits of HTML that make up your user interface. And it will also generate the beans.xml, faces.config, and web.xml files for you. Now we can deploy that. We will deploy this application on Wildfly. And so all you have to do is to drag and drop your project there. That's right. I didn't knew that. You showed me that just before. That's awesome. That's where you can deploy your app, okay? Here you can see the Wildfly console. So our app is almost deployed. It is deployed. It's deployed. Okay. So we can open a browser and take a look at our awesome bookstore app. We have a local host. Port 8080, of course. And it's called the bookstore. And here that has been scaffolded for us. So here we can create a new app. George. Which writes books about FORGE. A book about FORGE, surprising. Publication date. Today is the fifth. We can select George. Oh. That was to show that we have also for free when we scaffold some validation. And here it says, hey, the format is not correct. Okay. So he will correct that. And yeah. So we have the creator read list. We can edit an existing entity just to show you, to show that we have all the create functions. So forward. I know what you want to. Yeah. Six. Awesome. Okay. Can we add some more constraints, some more validations? Yeah. Because publication date, 6 February, that is not possible. That is in the future. Can we do something about that? All right. We can do this. Okay. We have some constraints. And we just issue, again, the keyboard combination command star. I could also use this one here. Right. Constraints. Or it's add. I don't know. It's not there. What is this possible? At a constraint. Okay. And it will be used. We will use hibernate validator for that. Okay. This is, again, a setup step. Right. It just will create a validation.xml file for you. On the book. That's right. And then we say on the rich property, well, the publication date, and we want it to be in the past. So easy as this. We have now the constraint. And if we redeploy it again. So redeploy. We should have this. Just here, full publish. Yeah. Full publish. Now, of course, the drawback is that I have to recreate my, oops. Okay. I have to recreate. Oh, yeah. Because we started, we are using an in-memory database. So each time that we redeploy, well, database is destroyed. You're in search. Yeah. The vacation date. So if you type the 6th of February. 6th Feb. Okay. And you do save. You've got a validation must be in the past. So that is also handled really easily. So you can really add validation to your application without too much looking at our hybrid-aid validator works or stuff like that. And it's all scaffolded for you. So we have our old school GSF app. But now we want to expose the bookstore app. We want to expose that. That's what I don't like about it. You have more work because you need to create rest endpoints and all that kind of stuff. Yeah. I want rest endpoints. So everything can consume it. And a mobile app could consume our bookstore app and connected object could consume it. So do you think we can generate? Yeah. I think we already have what like JPA, JSF, EJB. Let's add some JAXRS. CDI. All these things now. JAXRS. Okay. So that's really a command that I love. It's a bit of magic command for me. And it's called generate endpoints from entities. That's exactly what we want. So basically you choose your entities. First you set up your JAXRS, your west setup. We can keep the default. You select your entities and you click finish. And, wow, it generates the endpoints for you. So for those that I don't know if you know a bit JAXRS, I'm going to use this one. Oh, like a teacher. So cool. You don't hit me with this. So basically this annotation here, that is the rest pass of our entity. And then each method, we can just annotate them. Like when a post request will arrive as well, go into this method and it consumes JSON. And the GET, maybe you can show the GET. And the GET is over there. The GET produces JSON. Maybe you can show also, we have that in JDBS, it's really nice. It doesn't make sense because we have just two endpoints, but when you have a lot of endpoints, you can browse them really easily from here. That are small add-ons from JBLS tools, but that are really useful. I have in the meantime, I have redeployed this application. Oh, you already redeployed it. So I will create a few new items here again, or the one item that I always create. This one item, yeah? George, save, book, no, forging action, 0, 0, no, 6, save. Oh, yeah. Okay, here we go. And let's find out if our rest endpoint is deployed correctly. So for that, we are also using a small tool that is in JBLS tools, that is the web service tester. It's a bit like Postman, if you are used to Postman, but here it's integrated in EDA. So basically here you will fire and get a request on our books. And as you can see, we respond. So that means our app is deployed. Everything can consume it. Now that we have that, shall we scaffold an Angular app? Right, because we are cool kids. What the problem is, I don't know anything about Angular. Yeah. With Fortune, you don't need to know about it. Fortunately, you don't, because... What does it for you? I scaffolded it on another web route, so I can use both at the same time. We'll select everything. It will... Yeah, maybe you can... So now if we look in the web app, in the Angular part here, we have a complete standalone web application. Now it's embedded in our Java project. But basically you could take this folder and run it in an OGS server, or even if you want some hybrid mobile apps, you can just grab that, paste that in a Cordova app, and it's just running. So it's really standalone. And I think we can... Yeah, I've already redeployed it. I've redeployed it again. So I can... Now we can go to a bookstore, for instance, bookstore hang, right? It was. And then you see that the Angular application is running in your browser. Okay. Maybe you can create, again, another... Angular and on Bootstrap. So it's based on Bootstrap 3, I think. And that means, of course, that it is responsive. So once Koon is done with creating... So this has a different, you can see, it has a different validation based on the locale. So I need to use 2016, 0.2, 0.5. Yeah. This is also a drawback that you need to... You can actually adapt it by editing the generated class a little bit. Yeah. We could do that because we have 10 minutes left. Yeah, but we can... No. Let's do the plugin. Let's do the plugin. Let's do the plugin. Oh, yeah. Authentication, security. Well, we are working on an add-in for that that will add key cloak security. I don't know if you know about key cloak. Well, key cloak is separate authentication server. And it's really easy to secure your app using that. It's too bad. I submitted a talk for that, for dev companies. It was not accepted. But today, tomorrow, I will be happy to show you if you want. I can give you a small demo of it. Yes. Yeah. So it's a one-shot generation. But of course, you know, as simple as it is, it doesn't matter really. Yeah. We can show again, because I showed the Angular stuff in Firefox, which is not so interesting. We have something really cool here in JBDS, which is called Browsersim. I don't know if people know this. Yeah, it now opens this on this file, I guess, that I've selected. But that's not interesting. I want to, of course, use my application. Right. This is what you see when, you know, when you use the normal. The normal. The faces. The faces scaffolding, which is, of course, not very nice on a phone or on a mobile device. So that's why we, actually, why we did the Angular stuff. So if we do this, then you have the Angular version of it, the bookstore application. As you would expect, you have the menu there on your phone. The hamburger menu. And you can just create a new order. That's what it's called. Okay. You can also rotate it. Okay. And then it shows you the other version, the other way. So it's responsive. And that's why what I told just before, you could take that and put it in a hybrid app if you want the native app, for instance. Okay. Cool. So one last thing that we can show is how you would extend the Forge by creating a Forge plugin. And a Forge plugin is nothing else than a project. So the way how you start is just by creating a new project, Hello World, right? We don't have the time for the key cloak plugin. And then you have to select a different project type, which in this case would be a Forge add-on. Okay. We just accept all the defaults, I think. Yeah. And then it creates the Hello World project. And then to create an actual command, you use the Forge add-on UI command. Say hello. Say hello. For my name. I don't know. Say hello. Okay. Finish. And what it does, it creates a template class in which you see that there is a UI that can be initialized and an execution method that by default results in the... Basically, that is where you will put all your custom logic like generating files. Of course, because we are curious as to how to put this in to work, we can do this by Forge build and install an add-on, right? And then it will behind the scenes invoke a Maven build of this project and install it. And then the next time we hit our key combination, then it will... Demo. Demo. Okay. It's there. Say hello, right? Great as add-on. Now, the interesting part is that if you go back to your command line, yeah, this project is in another location. Software. Worksplaces. Hello World. Okay. Now we are in this project. Yeah. We can do the same here, right? What is it called? Forge, no? Add-on. Build and install. And there it does the same thing, so we can just... Afterwards, we have to say hello here available. Of course, to make this really meaningful, you would have to add UI and in the execute method do something really useful like creating some XML file or adding something to a palm file or that kind of stuff, right? And add-on is some get-up. You can install add-on by pointing to the get account. Exactly. Yeah. I think it's time for the... Yeah, I think we probably did everything we wanted to say. We have a slide for the questions. I don't know if I have it. I need to refresh this or... Oh, just refresh this should be there. Refresh? It doesn't work. Is it four? It doesn't work. Okay. For me, I didn't say it. But you know it by your head. Yeah, it's don't judge a man by his questions, by his answers, but rather by his questions. Meaning, and it's by Voltaire, so this smart guy tells us that it's actually, you shouldn't judge me because of what I answer you on your question, but I should judge you because of what you question. All right. So are there any questions? Yes. Yeah, so they work on a text... Of course, there is... If you do Java generation, then you have the Java... Then it's the Java add-on with its API, the Roaster actually add-on with its API that you're using, which has a meta model. But there is no... For the rest, there is no specific meta model used. There's nothing proprietary or something like that that is used. It's purely text-based. The only thing that is probably important, even though there is a gradle way of doing stuff which was contributed, but the MAVEN POM file projects are the most mature. Okay, so we went... Yeah, of course. We're out of time. Yeah, okay. So if you have any other questions, we are hanging here today and tomorrow. And if you want to do this hands-on, most of the things that you see today will be done tomorrow in the lab, right, in the forge, George? We'll also give a talk about Swarm, and you will be using forge heavily. With the latest add-in. Thank you very much. Thank you. I have another one. So maybe this one is just...