Uploaded on Nov 26, 2020
In the upcoming days kotlin will dominate over all the programing language due to its versatility. Lots of companies started shifting to kotlin app development some of the famous companies are Netflix, Uber etc. Check out what makes kotlin that much popular.
Kotlin - The next enterprise language
Kotlin - The next enterprise language
The enterprise is dominated by 2 key programming languages Java and
C# with many companies either choosing 1 or the other or even both
for their backend systems. It makes a lot of sense to use a single core
language for a company as it is cheaper to run and easier to resource
— the benefits for a large corporation clearly out weigh the negatives.
When engineers start a new project we often like to use the latest
technology out there in the
h o p e t h a t t h i s n e w
technology will make it
easier and faster to build
our products. My manager
once told me of about a
project where Closure, a
n e w p r o g r a m m i n g
language at the time, was chosen for this exact reason. However when
the engineers left the company and they tried to backfill these positions
they struggled to find even a single candidate who knew Closure. Yet
on their Java projects they could easily source a candidate from over
20K java resumes if needed. I’m sure you’ve also heard of or worked on
a project where a new technology was adopted, things went south and
the new technology was blamed for the project’s demise. It explains
why some managers and companies are often reluctant and
aphrenrsive when adopting new things.
But what if the rewards are worth the risk? What if a small change
could have a big impact and save your company money? Before I
answer that, let’s go back a few years when times were also tough
during the Dot-com bust of 2002. It wasn’t a great time to be in IT with
mass layoffs and budget cuts, and the need to do more with less was
even greater. This mindset to save money and be more productive was
one of the big catalyst that drove the adoption of open source. If we
didn’t have that dark period in IT, where would we be today? Would
GitHub or Stack-overflow even exist at all? Choosing the right
technology is alway a hard choice especially when we have so many
choices. I usually base my decision on 3 things — maturity, support &
popularity. All technologies will eventually have an expiry date
however you want to maximize it’s shelf life and get as many miles as
you can on whatever you choose.
I strongly believe that Kotlin is going to be the next enterprise
language on the block. It has so many things going for it that it would
be difficult to overlook if you are starting a new Java project.
• Backed by both JetBrains and Google — The IntelliJ IDE is
written in Kotlin & Google has written over 1 million lines of
Kotlin code on both their client & backend apps.
• Excellent community support, with a growing number of libraries
now written purely in Kotlin. Spring now recommends that Kotlin
should be used to write new Spring Boot APIs.
• Excellent tool chain and IDE support, Kotlin is a first class citizen
in both IntelliJ & Android Studio. It can also be used in Gradle to
write your build scripts.
• Full interoperability with Java and its eco-system.
• Native support, so you can choose to run your code outside the
JVM —now that’s real code portability.
• Modern language features which enables you to write 30% less
code than Java — it’s years ahead of where Java needs to be and
was designed to avoid the null pointer or checked exception
issues that have plagued Java apps.
• Very easy to learn and pick up— there are lots of free Kotlin
courses and tutorials out there. Kotlin shares the same DNA as
Java so it looks and feels familiar, not like a foreign language.
• Versatility, it can be used to build APIs, Android, iOS, Windows or
web apps - pretty much any type of application you can think of.
• It has now been mature and stable for quite some time. Kotlin 1.4
was just released with a big focus on quality and stability.
• It has a cool name and is extremely popular with 5.8 million
developer writing Koltin code in that last 12 months.
Koltin has avoided the mistakes that the other JVM languages have
made and was carefully designed with these lessons in mind. If you got
burnt using other JVM languages don’t let it stop you from taking a
look at Kotlin. There are just too many benefits to pass up and it might
even help you with your budget. Let’s say you have 100 developers in
your company earning $100K a year. If you decide to write all your
code in Kotlin on your projects and since Kotlin is a more productive
language and easier to maintain you could save a considerable amount
of money . Let’s be conservative and put this cost saving at 10%, after
5 years that a saving of $5 million, at 20% its $10 million so not a
small amount of money in either case. There also other intangibles
benefits such as developer retention and satisfaction from using a more
modern language.
On our Android app we have noticed that converting 95% of the code
to Kotlin has helped us keep the total number of lines of code stable
while also adding new features. The nullability features of Kotlin have
also enabled us to reduce our crash rates to below 0.02%. We often
look at technologies which are the flavour of the month in the hope
that these technologies will drive business outcomes and transform our
company. Many of these projects often fail to deliver their promises
however making a simple language switch and a change from other
App Development to Kotlin App Development is a risk free and a
guaranteed investment. You don’t get too many of those in this world.
Although Oracle has recently stepped up it game to improve Java with
the release of JDK 14 and has switched to 6 monthly releases, the
reality is that on most platforms where you can’t chose your own
container such as GCP cloud functions and AWS lambdas the highest
supported Java version is still Java 11. Most of the recent Java releases
have also been focused more on improving the runtime and packaging
rather than the language itself. Oracle is working on Fibers their
answer to coroutines in Kotlin but at the end of day Java is still at least
5 years behind Kotlin in terms of being a modern up to date language.
So do you want to use the best language that is ready today or one that
will be ready in 5 years time?
Java has been an incredibly successful language/platform making a big
impact in the industry. It still deserves a lot of credit, did you know
that 90% of Fortune 500 companies use Java? It recently celebrated its
25th birthday and it still has a few more years left in it. I still like Java
although it’s starting show it’s age but I prefer to write all my new code
in Kotlin. Many of our developers at India Post have also made the
switch, and are using kotlin to write new microservices and Android
apps. There are now more and more job opportunities for Kotlin with a
growing number of foreign companies using it. I hope more
engineering managers, developers and tech leads from the enterprise
make the switch, it’s a no brainer but of course you still need to do
your own due diligence first. Although I talked about Kotlin in the
enterprise its also a great fit for any startup considering Java.
Comments