• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Kotlin Cookbook: Kotlin vs Java

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ken,

Do you think it is a good idea to migrate a giant Java application developed over the years working in harmony with spark , hadoop , kubernetes to Kotlin. Could you  may be help me understand few main advantages Kotlin has over Java for large scale applications.
 
gunslinger & author
Posts: 151
6
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me say first that if I have a working application, I usually leave it alone. That said, if I wanted to port it to another language, I would start by making sure I had a good set of test cases, and if you're trying to learn Kotlin, you can write your tests (including JUnit tests) in Kotlin.

Again, the biggest advantage of Kotlin over Java is its null safety. In addition, it has excellent concurrency support in the form of coroutines. Other advantages provided by the language are modern support for sequences, builders, extension methods, and more. In fact, frameworks like Spring use Kotlin to create DSLs to configure beans or applications, leading to simpler code that's still type safe.

Anything you can do in Java, though, you can do in Kotlin, so there is no reason you could not port over your app. As I say, though, if your app already works, I'd probably live with it.
 
Rashmi varma
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the point of view
 
Greenhorn
Posts: 17
Scala Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I may humbly add to the comprehensive and great answer of Ken: in today's world there is no working application cast in stone, meaning it's a living organism, literally living online! Thus - it must be maintained daily, must improve / grow some functionality, add new one and, yes, get rid of obsolete features, similarly to the old skin and cells we lose daily. Thus, yes, in my opinion, you can use Kotlin in your project along with Java, first to augment (wrapping) features and then,gradually, moving to Kotlin only code. Sure, you have to start with good set of tests, based on your design goals.    
 
Ranch Hand
Posts: 85
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a constant battle that organizations have to face as something new pops up in the technology world as there
is temptation to adopt to the newer kid on the block within the tech community.

Most of the financial /insurance companies that have their large application base in Java /MF don't change  their
underlying systems that easily,its a huge effort,cost,risk for them unless there is a compelling business case ,so
mostly the adoption to newer technologies are driven by business cases,having said that, if there is an opportunity
adopt the newer technologies it will be done through incremental changes mostly outside the boundary of the core
application base,this is from experience that i have seen over the years.

Thanks
Sathya


 
Yury Nebieridze
Greenhorn
Posts: 17
Scala Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is true, Sathya. But true is also that even big companies strive to keep up with the new, advanced methods of SDLC and are trying to embrace a faster technology turnover. Yes, this is to take risk, but risk, with technologies like Kotlin can be pretty calculated and justified, IMHO. And also, there is another, much bigger, risk of being left off behind the competition. Think AI/ML/DL, cloud computing and many more, 5 years ago versus now. Every big name wants a piece of a pie and a new, robust, versatile language is a serious part of the game.
 
Or we might never have existed at all. Freaky. So we should cherish everything. Even this tiny ad:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!