What is Kotlin

Matt Greencroft
A free video tutorial from Matt Greencroft
Course tutor at Virtual Pair Programmers
4.6 instructor rating • 10 courses • 49,771 students

Learn more from the full course

Build Spring Boot Apps with the Kotlin Programming Language

Build fully functional, robust and efficient applications with Spring Boot and the Kotlin programming language

07:56:16 of on-demand video • Updated October 2019

  • Build fully functional, robust and efficient applications with Spring Boot and the Kotlin programming language
English [Auto] Hello and welcome to this course on Koplin for Java developers featuring splinted boat. My name is Matt green cloth and I'm going to be your trainer on this course. If you've not heard of Cartland Well it's a language that is interoperable with Java and it provides a number of features which many people consider to be an improvement on the core Java language. We'll be exploring a lot of these features through this course like Java. KOPPLIN runs on the JVM that coddling code can also be compiled to javascript and to native executable files that can be run on a PC or a Mac. That said writing Cartland code that can be compiled into javascript is quite a different experience to writing in code to run on the JVM and writing Cottenham code that can be compiled to native machine code is still described as a feature which is in development in this course. We're only going to be looking at using Cartland to run on the JVM. In fact this course is specifically for experienced Java developers. You don't have to be a job expert to take it's course but some experience of writing production Java code will definitely be useful. I'm saying this because doing this course I'm going to be explaining concepts by comparing them to how you would write the equivalent features in Java. This is not there for a basic programming course. I won't be teaching the fundamentals of programming. I expect you'll be familiar with how to write loops and conditions in Java and you'll be comfortable using the various Java collections classes for example. Now I do want us to get stuck in with the learning so I'm going to say very little about where Kollin comes from and why you might want to consider it instead of Java for your next project. So here's the minimum if you like the you need to know about Cartland before we start learning. So cotland is an open source programming language developed by jet brains. Jet planes are the people who provide the intelligent ID. In fact they develop the language partly to build intelligence. Now although it's open source chaplains have been very open about the fact that they hope it will help them sell more copies of the intelligent ID. Now I've got on screen right now the Codlin Web site and I want to just point out where you'll find the documentation for Carlen. I think the documentation is pretty good. It doesn't look exactly like a typical chapbook box but it's very navigable and you tend to find a clear explanation for anything that you're looking for. But how to get to it is not obvious so the first thing to do is to click on learn at the top layer and then you want to click on this link here to standard library. And this is the entry point to the documentation. There's a search function up here. So for example if we were to search for print line and we don't even need to press Enter it'll give us a link to the most relevant page we can click on that. And here's the documentation for the print line function. Now print line does exactly what you'd expect it to do. So in fact the documentation here is just actually this one line here prints the give a message and a new line to the standard output stream. But as we get into some of the more detailed functions in Scotland we'll find some clear documentation here that's worth looking at. So Cartland was developed by the same people who built the intelligent idea. And so it would be no surprise that you can write Codling code in intelligence. You can also use Eclipse or in fact just your favorite text editor. But as you probably guess intelligence has the best support for cotton right now and that we go to use intelligence in this course. Also Google have adopted Koplin as an official development language for Android apps. So Android studio which is also based on intelligence has full support of them. However we're not going to be building Android apps in this course. So we'll be sticking to the regular intelligence. Don't worry if you've not used intelligence before and we will be installing and configuring it in just a moment before we do that however I just want to mention a little about the features that make Koplin a compelling alternative to Java. Firstly one of the features of Collen is that the way the language is designed means that it's very difficult to get a null pointer exception. It's not completely impossible but you do have to actually in quite specific code to get one we'll be understanding how cotland avoids the null pointer exception. As we progress through this course. But I hope you'll agree this is a useful feature. No point to exceptions are a common cause of software crashes. So hopefully avoiding them at compile time. Which is exactly what cotland does will make your code more robust. Secondly Cantlin is far less Bowse than Java. You can optimize the equivalent code in far fewer characters and a lot of the boilerplate code that we write. Again and again in Java such as getters and setters hash code and equals methods for our classes. Well these will be written for us. Thirdly cotterless provides immutable variables that is variables whose values cannot be changed and in fact more than that there are immutable collection types as well. These are really important for functional programming and of course even in object oriented programming using a mutable variables can make your code safer. And finally Cartland provides genuine functional programming. Far better than the lambdas approach that was introduced in Java 8 and we going to be covering all of these features as we progress through the course. The final thing I want to say before we get started is just a little about how this course is structured. We're going to start learning about the Koplin syntax and how to write code in cotland that would be a replacement for Java code. Now this is going to be about the first two thirds of the course because we need to get a really good grounding in call in basics. So at this point we're going to be writing console based applications really object oriented code not production standard but just enough for us to be able to explore the syntax and the cotton in libraries along the way that Ruby a couple of exercises view to have a go at as well. Once you've got through that I'm then going to introduce how you would use Koplin with a Java framework. In this case swing votes. And in fact by the end of the course we'll build a fully functional web application with a database using spring NBC and hibernate after we've introduced introducing boot. We're going to then take a look at functional Pergamon KOPPLIN And we'll finish the course with a few extra topics which I couldn't really fit in anywhere else. So that's a long way to go and to get started in this chapter. I'd like to just install and configure intelligent.