JavaRush
AI Academy
new
Promotion
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Success stories
Activities
Reviews
Subscriptions
Light theme

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • Separation of responsibilities

    Kotlin SELF
    39 level,0 lecture
    We break down how to stop turning main into a “command centre” and split a console application into three layers: CLI (input/output and command parsing), domain (rules and validations via require), and storage (data storage). Using expense tracking as an example, we build the Expense model, storage, and service; add a command parser; show the data flow (mermaid); and cover typical mistakes that cause layer boundaries to “creep”.
    Open
  • How to lock architecture into a project structure

    Kotlin SELF
    39 level,1 lecture
    We break down how to “bake” architecture into packages and directories in a Kotlin project: why you should sync package with the folder structure, how to use import as an indicator of broken boundaries, how to split responsibilities by layers ( app.cli, domain.model, domain.service, storage), how to fix the dependency direction and avoid turning utils into a “dumping ground.” There is a diagram in mermaid, a practical file layout, and a walkthrough of common mistakes.
    Open
  • Interfaces as API Boundaries

    Kotlin SELF
    39 level,2 lecture
    We break down how to design interfaces in Kotlin as boundaries between layers: why the contract should be “narrow”, how to separate domain rules from storage via ExpenseRepository, how to move report formatting into ReportExporter, why to return List instead of MutableList, when to take a snapshot via toList(), and how the CLI wires dependencies via constructor injection without mixing roles ( println stays in the CLI).
    Open
  • Refactoring in small steps

    Kotlin SELF
    39 level,3 lecture
    We break down the practice of refactoring “without a big bang”: we keep compilation and behavior invariants, take short verifiable steps, introduce explicit types instead of “ubiquitous strings” ( ParsedCommand), move routing into CommandRouter, carefully move files across packages, and replace direct dependencies via an intermediary layer ( MutableList -> ExpenseRepository). Separately, we discuss how to use require()/ check() for explicit contracts and which mistakes most often break refactoring.
    Open
  • Fixation v1 — a unified command contract

    Kotlin SELF
    39 level,4 lecture
    We break down “fixation v1” for a CLI application: introduce a single result contract via sealed interface CommandResult ( Ok/ Error), centralize output with render(), define command handling as handle(...) -> CommandResult, show a minimal pipeline readln() → parse → handle → render → println(), and pin down common mistakes that break layer boundaries.
    Open
Learn
  • Registration
  • Java course
  • Help with tasks
  • Pricing
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success stories
  • Activities
Company
  • About us
  • Contacts
  • Reviews
  • FAQ
  • Support
JavaRushJavaRush — is an interactive online course for learning Java programming from scratch. It contains 1200 practical tasks with one-click solution checking, the necessary minimum of theory on Java basics, and motivating features that help you complete the course: games, quizzes, interesting projects and articles on effective learning and the career of a Java developer.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush
MastercardVisa
"Programmers are not born" © 2026 JavaRush