Best of Kotlin2024

  1. 1
    Article
    Avatar of foojayioFoojay.io·2y

    Be a Better Java Developer: 19 Tips for Staying Ahead in 2024

    Tips for becoming a better Java developer, including upgrading Java versions, learning Kotlin, exploring other languages/frameworks, and staying updated with the Java community.

  2. 2
    Article
    Avatar of medium_jsMedium·2y

    Kotlin MultiPlatform (KMP)

    Learn about setting up the environment for Kotlin MultiPlatform development, the structure of a KMM project, and using coroutines in iOS.

  3. 3
    Article
    Avatar of medium_jsMedium·2y

    What’s new in Flutter 3.22

    Flutter 3.22 introduces new features such as WebAssembly, graphics rendering enhancements, and more options for AI integration. The Impeller rendering engine has significant updates, including a feature complete Vulkan backend on Android. Other improvements include widget state properties, dynamic view sizing, improved form validation, and flavor-conditional asset bundling. The release also includes updates for Android, iOS, ecosystem, and DevTools.

  4. 4
    Article
    Avatar of devtoDEV·2y

    Digging Deep to Find the Right Balance Between DDD, Clean and Hexagonal Architectures

    Choosing the right architecture for software can be challenging. The author shares their journey and practical experiences in balancing Clean Architecture, Domain-Driven Design (DDD), and Hexagonal Architecture in their project, TimeMates. Key highlights include ensuring the separation of concerns, maintaining a consistent mental model, and reusing value objects effectively while avoiding unnecessary boilerplate. The post emphasizes the importance of practical implementation over theoretical adherence and encourages developers to use critical thinking tailored to their specific needs.

  5. 5
    Article
    Avatar of medium_jsMedium·2y

    Advanced Kotlin Coroutine Cheat sheet (for Android Engineer)

    This cheat sheet provides advanced insights and best practices for using Kotlin Coroutines in Android development. Key elements like CoroutineContext, Job, Dispatcher, and CoroutineScope are thoroughly explained. It covers essential concepts such as coroutine builders, dispatcher selection, and how to manage parallel execution and cancellation of coroutines. Additionally, it offers practical advice on avoiding synchronization issues and optimizing performance.

  6. 6
    Article
    Avatar of kotlinKotlin·2y

    Celebrating Kotlin 2.0: Fast, Smart, and Multiplatform

    Kotlin 2.0 is released with a stable K2 compiler, multiplatform support, and improved code analysis. It has gained popularity among developers and major companies like AWS, Adobe, Atlassian, and Google. Kotlin Multiplatform allows sharing code across various platforms and has seen significant adoption. The release introduces the K2 compiler, which unifies all platforms and improves compilation speed. IntelliJ IDEA's K2 mode offers faster code highlighting and completion. The new compiler understands code better and introduces new features. Kotlin 2.0 is a high-quality release focused on data recognition, abstraction, high-performance code, and library author experience.

  7. 7
    Article
    Avatar of pandProAndroidDev·2y

    Stop throwing exceptions!

    In Kotlin, it's recommended to avoid throwing exceptions and instead handle error scenarios using try/catch expressions, result objects, and functional programming paradigms. The default usage of try/catch is criticized for reducing readability and maintainability. The post suggests Kotlin's built-in Result class for better error handling, providing examples of how to wrap operations in Result objects and handle errors more effectively. This approach promotes cleaner, more testable code without relying on exceptions.

  8. 8
    Article
    Avatar of communityCommunity Picks·2y

    Kotlin & Modern Java: The 17 Differences

    This post explores 17 differences between Kotlin and modern Java, including functional programming, null safety, observability, syntax, checked exceptions, coroutines support, data classes, type inference, extension functions, smart casts, constructors, ternary operator, primitive types, string templates, operator overloading, wildcard types vs. declaration-site variance, and cross-platform and multiplatform development.

  9. 9
    Article
    Avatar of jetbrainsJetBrains·1y

    Kotlin 2.1.0 Released

    Kotlin 2.1.0 has been released, featuring new language capabilities in preview, updates to the K2 compiler, improvements in Kotlin Multiplatform, Kotlin/Native, and Kotlin/Wasm, as well as enhanced compatibility with newer versions of Gradle. The release also includes a livestream for further insights and a detailed migration guide.

  10. 10
    Article
    Avatar of medium_jsMedium·2y

    Kotlin Lazy vs Lateinit Explained

    The post explains the differences between lazy and lateinit property initializers in Kotlin. Lazy initialization is used for immutable properties (val), ensuring they are initialized when first accessed, which can help with resource management. Lateinit is used for mutable properties (var) and must be initialized before use to avoid runtime exceptions. The post also discusses when to use these initializers, provides code examples, and touches on advanced concepts like using delegates for primitive types.

  11. 11
    Article
    Avatar of java_libhuntAwesome Java Newsletter·1y

    Top 10 IntelliJ IDEA Plugins to Boost Development Efficiency in 2024

    IntelliJ IDEA developers can boost their efficiency using specific plugins designed for various tasks. Key plugins include Apidog Fast Request for API debugging, JetBrains AI Assistant for intelligent code assistance, Lombok for reducing boilerplate code, SonarLint for code quality assurance, Save Actions for automating file save tasks, Key Promoter X for learning keyboard shortcuts, CodeGlance for quick code navigation, Rainbow Brackets for enhanced readability with colored brackets, Translation for real-time code translation, and JRebel for efficient hot deployment.

  12. 12
    Article
    Avatar of communityCommunity Picks·2y

    11 Non-AI Java Trends: From GraalVM to Spring Modulith

    Java developers are showcasing interest in several non-AI trends. These include GraalVM for improving runtime efficiency, Data-Oriented Programming (DOP) for treating data as first-class citizens, the debate between Quarkus and Spring Boot, in-depth details of Spring Internals, Kotlin integration with Spring Boot, and security improvements with Spring Security 3 and OAuth2. Additionally, discussions focus on the benefits of Spring Data JDBC, alternatives to Thymeleaf templates, the evolving Spring Modulith architecture, enhanced runtime efficiency with virtual threads and CRaC in Java 21, and observability improvements introduced in Spring Boot 3.2 and 3.3.

  13. 13
    Article
    Avatar of trendyoltechTrendyol Tech·2y

    Turning Millions of Kafka Events Into Meaningful Reports for Sellers

    Trendyol’s Export Center developed the Seller Reporting API to transform Kafka event data into insightful reports for sellers. They used Elasticsearch for data storage and effective Date Histogram Aggregation to handle time-based data. The implementation involved creating a system to index order events and querying the indexed data to create detailed reports. These reports cater to sellers' needs for data over various periods, comparing sales across different regions and currencies.

  14. 14
    Article
    Avatar of communityCommunity Picks·2y

    Ktor vs. Spring Boot: 5 Key Differences for Kotlin Devs

    Ktor and Spring Boot offer distinct advantages for Kotlin developers. Ktor, built purely with Kotlin, is lightweight, supports asynchronous server-side web apps with fast start-up times, and uses Kotlin Coroutines for concurrency. Spring Boot, while more established with extensive documentation and community support, is more suitable for larger applications with its robust ecosystem. Both frameworks offer great developer experiences, but the choice depends on the project's needs.

  15. 15
    Article
    Avatar of springSpring·1y

    Bootiful Spring Boot 3.4: Spring Batch

    Spring Batch 5.2 introduces various new features to enhance batch processing. Notable additions include multiple job repository implementations, such as a MongoDB-backed JobRepository and a resource-less JobRepository. The release improves support for Spring Data JPA and item readers/writers, including new Kotlin data class support and concurrent steps using blocking queues. The new features like CompositeItemReader and BlockingQueueItemWriter promise more robust and scalable batch processing by leveraging staged event-driven architecture and virtual threads in Java 21.

  16. 16
    Article
    Avatar of pandProAndroidDev·2y

    The best way to load data in ViewModels

    Loading data into ViewModels is a complex task that involves managing states such as loading, success, and failure. A simplified and reactive approach is proposed using Kotlin's Flow and StateFlow. This method also includes handling data from memory, adding a refresh function, and dealing with side effects. The article provides a comprehensive solution with example code and a GitHub repository link for further reference.

  17. 17
    Article
    Avatar of medium_jsMedium·2y

    Modern Android Development in 2024

    This post discusses various topics related to modern Android development in 2024, including the use of Kotlin, key features of Jetpack Compose, architecture patterns, dependency injection, modularization, testing, in-app updates and reviews, security, loggers, Google Play Instant, AI coding assistants, and Kotlin Multiplatform.

  18. 18
    Article
    Avatar of jetbrainsJetBrains·2y

    Ktor 101: Efficient JVM HTTP Toolkit

    Ktor is a toolkit for building server applications on the JVM using Kotlin. It leverages Kotlin's features like coroutines to ensure efficient and flexible web applications. Ktor includes essential components for web development such as routing, authentication, and support for various protocols, including HTTP and WebSockets. With native support for asynchronous programming, it allows for declarative and non-blocking code. The toolkit also provides built-in testability and extensibility through plugins and interceptors, making it suitable for modern application architectures like microservices.

  19. 19
    Article
    Avatar of game_developersGame Developers·2y

    Trying out Godot

    The author is experimenting with Godot and finds it easy to write code, though they feel the code is less reliable compared to Java/Kotlin. Despite this, they are impressed with the features available in the engine.

  20. 20
    Article
    Avatar of pandProAndroidDev·2y

    Convert Your Native Project to Kotlin Multiplatform: Why, When and How

    Kotlin Multiplatform (KMP) enables a new approach to cross-platform development without the need to rewrite existing native applications. KMP allows sharing code between Android and iOS while retaining native performance and user experience. This guide highlights the advantages of migrating to KMP, such as gradual migration, maintaining native functionality, faster feature delivery, and improved team collaboration. The migration process typically involves setting up a multiplatform module, migrating models, data sources, and business logic in an iterative manner.

  21. 21
    Article
    Avatar of pandProAndroidDev·2y

    Kotlin Lazy vs Lateinit Explained

    Explore ways to initialize properties in Kotlin using lazy and lateinit keywords. Lazy is used for immutable properties and initializes the value upon first use, promoting better resource management. Lateinit is for mutable properties, allowing initialization to occur later, but requires careful handling to avoid crashes. For primitive types, use Delegates.notNull to achieve similar functionality.

  22. 22
    Article
    Avatar of medium_jsMedium·2y

    Kotlin Sealed Class Explained

    Kotlin's sealed class is a special kind of class that restricts its inheritance to a specific package, providing a type-safe way to handle different types of data. This makes code more readable and manageable, especially when paired with Kotlin's 'when' expression, which ensures all possible types are handled at compile time. The article includes practical examples and emphasizes best practices for organizing sealed classes in your code, highlighting their utility in handling API responses and other generic data holders.

  23. 23
    Article
    Avatar of jetbrainsJetBrains·2y

    Kotlin Multiplatform Development Roadmap for 2025

    Kotlin Multiplatform is gaining traction, with Google officially supporting it for Android and iOS business logic sharing. JetBrains plans to enhance the ecosystem in 2025, including upgrading Compose Multiplatform for iOS to Stable, releasing Kotlin-to-Swift export, and a dedicated KMP IDE. Key focus areas include achieving feature parity across platforms, improving tooling, and refining the library ecosystem.

  24. 24
    Article
    Avatar of medium_jsMedium·2y

    Kotlin Coroutine Essentials: Everything you need to know

    Learn the essentials of Kotlin coroutines, including the different builders, the CoroutineScope, and the Job instance in the coroutineContext.

  25. 25
    Article
    Avatar of itnextITNEXT·2y

    Comparing WebFlux and Spring MVC with JMeter, Kotlin, and Spock — A concerts registration WebApps example

    The post discusses the comparison between Spring WebFlux and Spring MVC architectures by implementing two Spring Boot applications with Kotlin and benchmarking their performances using JMeter. The WebFlux application, which follows a reactive non-blocking model, is compared to the traditional blocking MVC model. It highlights the increased capacity and performance benefits of using WebFlux, especially in handling high-load scenarios. Detailed setup instructions for JMeter and Docker configurations are provided, along with test results showing WebFlux's resilience in processing more requests compared to the MVC architecture.