Best of JavaOctober 2024

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

    Java Performance Optimization Techniques

    Optimizing Java code performance is critical, especially considering that most users abandon a page if it takes longer than 3 seconds to load. Key techniques include using Java virtual threads, enabling lazy loading in Hibernate, implementing effective caching strategies, avoiding GenerationType.TABLE due to its performance overhead, and leveraging Hibernate's Query Plan Cache.

  2. 2
    Video
    Avatar of teluskoTelusko·2y

    Data Structures and Algorithms (DSA) in Java 2024

    Data structures are essential for efficiently organizing and storing data to improve application performance and memory usage. They allow programmers to process data quickly and optimally, important in industries like e-commerce and banking. Understanding when to use different data structures (arrays, sets, linked lists, trees, graphs) is crucial, as is knowing how to implement efficient algorithms. Companies emphasize data structures and algorithms (DSA) as they help in reducing costs and improving user experience. Linear search and binary search are discussed to illustrate different algorithm efficiencies.

  3. 3
    Video
    Avatar of communityCommunity Picks·2y

    8 Design Patterns EVERY Developer Should Know

    The post discusses eight essential design patterns every developer should know, originating from the 1994 'Gang of Four' book. These patterns are categorized into creational, structural, and behavioral types. Key patterns covered include Factory, Builder, Singleton, Observer, Iterator, Strategy, Adapter, and Facade. Each pattern is explained with practical examples, highlighting their use cases and benefits in programming.

  4. 4
    Article
    Avatar of baeldungBaeldung·2y

    Reduce Memory Footprint in Java

    Application size is crucial for performance, and optimizing memory usage can significantly reduce an application's memory footprint. This guide explains how to estimate the memory size of Java applications, explore techniques like using primitive types, combining classes, and bit packing for optimizing memory. It also covers using the Java Object Layout (JOL) library for verification and comparing standard Java collections with third-party libraries like Eclipse Collection for additional optimization.

  5. 5
    Article
    Avatar of faunFaun·2y

    Java 23, SpringBoot 3.3.4, Jakarta 10

    A rapid-start template optimized for microservices and cloud-native architectures using Java 23, SpringBoot 3.3.4, and Jakarta 10. It features a packaging structure based on Hexagonal Architecture, cross-cutting concerns handled via AOP, JWT for authentication and authorization, robust web security, and Docker containerization. The Hexagonal Architecture ensures a clear separation of concerns, maintaining flexibility and adaptability. Comprehensive logging, multiple Spring profiles, and extensive use of Swagger and OpenAPI for API documentation are also highlighted.

  6. 6
    Article
    Avatar of kramtiKramti·2y

    Java Performance Optimization Techniques

    Learn key techniques to optimize Java performance, including using virtual threads from Java 19, implementing lazy loading in Hibernate, and utilizing caching strategies in the Spring framework. Additionally, avoid using GenerationType.TABLE for key generation in JPA to enhance efficiency.

  7. 7
    Article
    Avatar of baeldungBaeldung·2y

    A Guide to @Locked in Lombok

    Project Lombok's @Locked annotation, introduced in version 1.18.32, is designed to enhance support for virtual threads in Java by acting as a variant of the ReentrantLock, ensuring better performance in concurrent applications. It simplifies the locking mechanism in methods, reducing boilerplate code, and provides a clear advantage over the @Synchronized annotation, particularly with virtual threads. Multiple methods can share the same lock, or different locks can be specified for read and write operations to boost performance.

  8. 8
    Article
    Avatar of baeldungBaeldung·2y

    Rapid Spring Boot Prototyping with Bootify

    Bootify is a tool designed to accelerate Spring Boot development by automating the creation of boilerplate code and configuration files. It provides a user-friendly interface to set up entities, relationships, and application components, making it easier to focus on business logic and custom features. The post details a step-by-step guide to creating a Spring Boot CRUD application using Bootify, from project setup to code generation.

  9. 9
    Article
    Avatar of javarevisitedJavarevisited·2y

    THIS COULD be your Ultimate Back-end Developer Roadmap

    Discusses the critical skills required to be a successful backend developer, emphasizing the importance of mastering tools and concepts such as DSA, API design, secure coding, microservices, and more. It introduces a YouTube series designed to help with backend developer interview preparation, specifically focusing on Java, but applicable to various programming languages.

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

    Book Review: Mastering the Java Virtual Machine

    Otávio Santana's 'Mastering the Java Virtual Machine' offers an in-depth exploration of JVM internals, combining nostalgic elements of Java programming with modern concepts. The book covers JVM architecture, performance optimization, class file structure, bytecode operations, memory management, JIT compilation, garbage collection, alternative JVMs like GraalVM, and advanced topics such as Java frameworks, reflection API, and code generation. It's an essential resource for Java developers aiming to improve their understanding and efficiency in Java development.

  11. 11
    Article
    Avatar of infoworldInfoWorld·2y

    JDK 24: The new features in Java 24

    JDK 24, set for release on March 18, 2025, will include improvements to the G1 garbage collector and introduce warnings for unsafe uses of the Java Native Interface (JNI). Other potential features could follow previews from JDK 23, such as enhancements to the class-file API, stream gatherers, structured concurrency, and the vector API. JDK 24 will be a non-long-term support release, receiving only six months of Premier-level support.

  12. 12
    Article
    Avatar of javarevisitedJavarevisited·2y

    Oracle Java Certification: is it worth it?

    The Oracle Java SE Certification is known for its complexity and extensive range of topics, requiring significant time and effort for preparation. The exam can be beneficial for individuals looking to validate their Java knowledge, especially within recruitment processes, and for those eager to explore core language APIs and new features. However, it may not be suitable for beginners or those unwilling to commit several months to study.

  13. 13
    Article
    Avatar of javarevisitedJavarevisited·2y

    Lazy vs Eager Singleton in Java

    Lazy and Eager Singleton patterns in Java serve to create controlled instances of a class. While Eager Singleton initializes an instance at load time, Lazy Singleton delays this until it's explicitly needed. Despite subtle differences, if all use cases require an instance, Eager Singleton is generally more efficient.

  14. 14
    Video
    Avatar of teluskoTelusko·2y

    Spring Boot and Spring Security with JWT

    The post discusses the Spring Framework, popular in enterprise Java applications for its scalability and security. It highlights the evolution from Java EE to Spring and introduces Spring Boot, which simplifies project setup and management. The post also mentions Spring's role in building various applications like microservices and serverless apps, emphasizing dependency injection and the ioc container. The discussion extends to auto-wiring and configuring Spring Boot via annotations for efficient object management.

  15. 15
    Article
    Avatar of justjavaJust Java·2y

    Are SOLID Principles worth the hype ? 🤔(PART - 2)

    The post discusses two SOLID principles: Interface Segregation Principle (ISP) and Dependency Inversion Principle (DIP). ISP states that no client should be forced to depend on methods it does not use, demonstrated using Java examples. DIP indicates that high-level modules should not depend on low-level modules but rather on abstractions, illustrated similarly with Java code. Applying these principles can enhance the structure and maintainability of Java applications.

  16. 16
    Article
    Avatar of justjavaJust Java·1y

    Java Spring Boot for Beginners | Part 3 : Dependency Injection and Components

    Discover how Dependency Injection and IoC containers in Java Spring Boot can help make your code cleaner and more efficient. The tutorial provides an in-depth explanation of these concepts for beginners.

  17. 17
    Article
    Avatar of vaadinVaadin·2y

    Building a custom AI agent in Java: A hands-on guide

    Learn how to create a custom AI agent in Java tailored to your business needs. This guide details the process with a hands-on example of building an AI-powered customer support agent for an airline using technologies like Spring Boot for the backend, React for the frontend, and LangChain4j for AI coordination. The guide covers setting up dependencies, defining AI interactions, maintaining chat history, and integrating business-specific knowledge using retrieval-augmented generation (RAG). It also explores how to empower the AI to perform specific actions, enhancing user experience and automating tasks.

  18. 18
    Video
    Avatar of TechWithTimTech With Tim·2y

    How can you truly stand out and land a job as a developer?

    To stand out and land a job as a developer, it's crucial to diversify your skill set beyond just Python. Learning additional programming languages like Java, C++, or even PHP can help you differentiate yourself from other candidates who only know Python.

  19. 19
    Article
    Avatar of cerbosCerbos·2y

    Guide to Java authentication and authorization

    Authorization is crucial for ensuring only authorized users can access specific resources in an application. Traditional methods like RBAC have been supplemented by ABAC and PBAC for more granular control. OAuth and OpenID Connect are popular for secure authentication. The post reviews three Java frameworks: Spring Security, Apache Shiro, and JAAS, and discusses their features and integration capabilities. The role of authorization in microservices, its challenges, and emerging technologies like zero trust architecture are also explored.

  20. 20
    Article
    Avatar of baeldungBaeldung·1y

    How to Mock Multiple Responses for the Same Request

    Learn how to use MockServer to simulate multiple responses for the same API request, particularly for a payment processing system. This setup helps test the application's polling mechanism without requiring actual backend services. The guide covers defining the payment request model, integrating with the bank's payment service, and validating the polling logic by mocking different payment statuses.

  21. 21
    Article
    Avatar of faunFaun·1y

    Java 23, SpringBoot 3.3.4: Logback Setup— Part 3

    This post provides a detailed guide on setting up Logback in a Spring Boot application, focusing on best practices for logging, including managing log levels, avoiding sensitive data leaks, using rolling file appenders, enabling asynchronous logging, and externalizing logging configurations. It also discusses the integration of logging properties in application properties, and configuring rolling policies based on size and time. The post outlines how to implement meaningful log messages, use MDC for contextual information, and leverage structured logging for better log aggregation and monitoring.

  22. 22
    Article
    Avatar of baeldungBaeldung·2y

    Caching Guide

    Caching enhances system performance by temporarily storing data from resource-intensive methods. This guide explores popular caching libraries like Caffeine, Ehcache, and JCache, and provides steps for implementing cache abstraction in Spring applications. Advanced topics include two-level caching configuration and the use of multiple caching managers within the same project.

  23. 23
    Article
    Avatar of faunFaun·2y

    Java 23

    Java 23, released on September 17, 2024, introduces numerous features enhancing developer productivity, performance, and accessibility. Key updates include pattern matching for primitive types, a Class-File API, Markdown support in JavaDoc comments, vector API improvements, and more efficient garbage collection with ZGC. It also simplifies modular programming and lowers the entry barrier for beginners with implicit class declarations and instance main methods. Safety in concurrent programming is improved through structured concurrency and scoped values.

  24. 24
    Article
    Avatar of justjavaJust Java·1y

    Why Spring Boot

    Spring Boot streamlines project setup, making development easier with features like auto-configuration, extensive tools, and strong community support. It excels in microservices, cloud-based projects, and simplifies testing processes.

  25. 25
    Article
    Avatar of dockerDocker·1y

    Model-Based Testing with Testcontainers and Jqwik

    Model-based testing (MBT) automates test case generation by modeling expected software behavior. Using jqwik and Testcontainers for regression testing, the method efficiently covers edge cases, improving software reliability. By leveraging actions and sequences, the approach rapidly tests numerous requests, ensuring application states remain consistent across different environments.