🎄Heute öffnet sich Türchen 1 unseres #Java #URLShortener Adventskalenders. 24 Tage voller Features, Deep Dives & Architektur-Einblicke.

Warum ein eigener URL-Shortener?
Jetzt lesen: https://javapro.io/de/url%e2%80%91shortener-adventskalender-2025/
Autor: SvenRuppert

#OpenSource #Vaadin #Jetty #EclipseStore

Introduction to the URL‑Shortener Advent Calendar 2025

December 2025 is all about a project that has grown steadily in recent months: the Java-based URL Shortener, an open-source project implemented entirely with Core Java, Jetty, and Vaadin Flow. The Advent calendar accompanies users every day with a new feature, a technical deep dive, or an architectural improvement – from the basic data structure and REST handlers to UI components and security aspects.

  • Motivation: Why your own URL shortener?
  • What can users expect in the Advent calendar?
  • Reasons for the choice of technology
  • Core Java (Java 24)
  • Jetty as an embedded web server
  • Vaadin Flow for the UI
  • EclipseStore as a persistence solution
  • Reference to previously published articles
  • Why, as an Advent calendar?
  • Motivation: Why your own URL shortener?

    The entire project is developed openly on GitHub. There, users will not only find the current state of the code, but also all historical development steps, patches, branches, and PRs discussed in the context of the Advent calendar. The source code can be viewed at https://github.com/svenruppert/url-shortener.

    Commercial URL shorteners are practical – but often non-transparent. They collect usage data, offer proprietary APIs, or block essential functions behind paywalls. The goal of this project is therefore a completely self-powered, transparent, and secure shortener suitable for internal networks, development teams, companies, and hobby projects alike.

    The project pursues three central basic principles: transparency, in which every decision is documented in the code in a comprehensible way; didactics, as the project is not only intended to be a tool, but above all a learning platform; and extensibility, because each feature is designed to be modular and can therefore be easily adapted or expanded.

    What can users expect in the Advent calendar?

    The technical journey through Advent is visible both in terms of content and directly in the repository. Each day is created as its own Git branch, starting with feature/advent-2025-day-01 and continuing until the final Christmas door. This allows the project’s development to be traced in small, clearly defined steps – including all refactorings, architectural adjustments, and new functions. In the same structure, the Advent Calendar presents a precisely outlined feature every day, which is reproduced using the associated patch or PR. Supplementary code excerpts from the core and UI modules, architectural explanations and references to typical anti-patterns deepen the understanding. Each door is rounded off with suitable visualisations and a compact summary, so that the project’s development becomes transparent and tangible step by step.

    Reasons for the choice of technology

    For the URL shortener, technologies were deliberately chosen that are both practical and didactically valuable. Every decision supports the project’s goal: to create a modern yet easy-to-understand system that requires no unnecessary dependencies.

    Core Java (Java 24)

    The project’s basis is pure Core Java. The reasons for this are:

    The use of pure core Java enables maximum transparency: Without any framework magic, users can see exactly how data models, handlers, error handling or serialisation are structured. By deliberately avoiding additional libraries, the attack surface is reduced, and the risk of supply chain problems is minimised. At the same time, this approach makes it very clear to developers how robust and comprehensive the JDK already is today: Many tasks that used to require external dependencies can now be easily solved with onboard tools.

    Jetty as an embedded web server

    A deliberate alternative to Spring Boot or Jakarta EE:
    Jetty is characterised by its lightweight design and rapid launch time, which are especially beneficial in development scenarios. At the same time, Jetty offers complete control over routing and servlets, so that HTTP mechanics can be precisely demonstrated and implemented in a targeted manner. Thanks to its modular structure, Jetty is ideal for small, well-defined microservices while remaining a stable, proven technology whose long production history speaks for high reliability.

    Jetty offers just the right balance between simplicity and technical relevance for this open source project.

    Vaadin Flow for the UI

    The project uses Vaadin Flow to implement an entirely server-side, Java-focused UI that does not require an additional JavaScript or TypeScript stack, making it particularly suitable for developers who want to focus entirely on Java. Instead of relying on a complex front-end ecosystem, Vaadin enables end-to-end development in a language, significantly reducing the cognitive load and flattening the learning curve. The component-based architecture enables a productive and structured way of working, in which user interfaces can be clearly modelled and reused. At the same time, server-side rendering eliminates the need for direct REST calls from the browser, increasing security and reducing attack surfaces. Despite this technical simplicity, Vaadin offers modern styling and a user experience that is reminiscent of the professionalism of enterprise applications. This makes the framework ideal for internal tools, administrative interfaces and corporate projects where security, robustness and long-term maintainability are paramount.

    EclipseStore as a persistence solution

    EclipseStore replaces classic databases with an object-oriented persistence approach that deliberately does not require ORM layers, entities, table models or complex abstractions. Instead of having to convert data into a relational structure, it remains in its natural form: Java records, lists and other object structures are directly persisted. This eliminates the usual mapping logic, significantly reducing the complexity of the persistence layer and making the architecture more straightforward to understand.

    EclipseStore shows its strength especially in small, focused services. Persistence fits seamlessly into the domain model without forcing developers to adapt their data structures to a relational mindset. This direct approach not only leads to more elegant modelling but also to excellent performance. Since EclipseStore manages in-memory-compliant object graphs, data access is high-speed and does not require any additional caching mechanisms or complex optimisations. The result is a lightweight yet powerful persistence system ideal for a modern, compact Java service.

    Didactically, EclipseStore provides valuable insight into how persistent data models can operate when not constrained by relational database constraints. Developers gain a deeper understanding of what object lifecycles, data flows, and modelling decisions look like in an environment that is designed entirely from the Java world. This makes EclipseStore particularly suitable for this URL shortener.

    Reference to previously published articles

    Before we get into the Advent calendar, it’s worth taking a look at the previous publications, which already present the basics, architecture and the first UI concepts of the project. These articles form the foundation on which the content of the Advent calendar is built:

    These items offer a first technical introduction and are perfect as preparation for the individual doors of the Advent calendar.

    Why, as an Advent calendar?

    A project like a URL shortener doesn’t happen in a weekend – it consists of many small steps, refactorings, decisions and improvements. An Advent calendar offers the perfect format for this: short, daily, understandable bites that come together to form an overall understanding.

    It is, at the same time, a review of the project’s journey and a motivating start to the new year: a project that users can run, expand, change, or completely rethink.

    #eclipsestore #java #jetty #urlshortener #vaadin

    Jetty protecting the harbor immediately south of Portsmouth, NY seen from Odiorne State Park

    #photo #photography #jetty #newhampshire #oceans #sea #landscape

    JETTY is an incredible film chronicling of Rockaway Beach culture and ecological engineering (you can purchase it for $7 directly from the filmmaker).

    It's a meditation on Rockaway and the jetties they're building, Rockaway Beach culture glorious (and sobering). With music by Animal Collective.

    https://www.criterion.com/current/posts/8798-sam-fleischner-s-jetty?srsltid=AfmBOooUJxTKKGpSp_vKUsdW_oD65GwmfBQ5r-X-v2qh-umu2ybK2HDt

    #jetty #rockawaybeach #SamFleischner #animalcollective

    Sam Fleischner’s Jetty

    An absorbing fifty-three-minute meditation on a massive construction project opens in New York on May 14.

    The Criterion Collection

    Scaling the Web: Jetty, Multi-Core, Performance Myths

    #java #jetty

    https://www.youtube.com/watch?v=fJvg5zTKHeE

    Scaling the Web: Jetty, Multi-Core, Performance Myths – Ludovic Orban | The Marco Show

    YouTube
    Weathered wood and restless skies over the Southern Ocean.

    Esperance, Western Australia.

    © 𝓐𝓵𝓵 𝓡𝓲𝓰𝓱𝓽𝓼 𝓡𝓮𝓼𝓮𝓻𝓿𝓮𝓭 𝓫𝔂 𝓚𝓮𝓿 𝓟𝓮𝓲𝓻𝓬𝓮.

    #photo #photography #australia #westernaustralia #Esperance #TankerJetty #BlackAndWhitePhotography #BnW #Monochrome #CoastalVibes #MoodySky #Jetty #OceanView
    ×