The State of Server Side Java Webapps by Maarten Mulders

Learn why server-side Java web apps may be a better choice than SPAs. Explore frameworks, patterns, and hybrid approaches for modern server-side development.

Key takeaways
  • Consider server-side rendering instead of defaulting to Single Page Applications (SPAs) - evaluate actual business needs before choosing an architecture

  • Server-side rendering provides benefits like:

    • Better SEO and accessibility
    • Reduced initial load times and data transfer
    • Simpler security implementation
    • Lower resource usage and energy consumption
  • Main server-side Java web frameworks:

    • Jakarta Faces
    • Jakarta MVC
    • Spring MVC
    • Apache Wicket
    • Quarkus
  • Two main architectural patterns for server-side apps:

    • Action-based (traditional request/response)
    • Component-based (UI component trees)
  • Use hybrid approaches when needed:

    • Enhance server-rendered pages with minimal JavaScript
    • Consider tools like HTMx or Alpine.js for dynamic features
    • Web Components can help with reusable UI elements
  • Java ecosystem has good support for common requirements:

    • Cloud platform SDKs
    • CMS integrations
    • UI component libraries
    • Standard security features
  • Key considerations when choosing architecture:

    • Business requirements
    • Time and budget constraints
    • Team expertise
    • Performance needs
    • SEO requirements
    • Accessibility needs
  • Document architectural decisions and tradeoffs using ADRs (Architecture Decision Records)