Blog Infos
Author
Published
Topics
Published
Topics
Introduction

Imagine you’re building a magnificent sandcastle on the beach. You have a vision, but how long will it take to bring it to life? Estimating the time for complex projects like software development can be tricky. In this article, we’ll see how clean architecture in Android development can be your secret weapon for efficient estimation, just like having a clear blueprint for your sandcastle. ️

The Essence of Estimation
Image created by AI

 

Estimation, at its core, is intertwined with the notion of time, presenting a challenge in detaching from this perspective. Various methods, including the Fibonacci sequence and T-shirt sizing, offer alternatives, yet the focus remains predominantly on time. This article aims to demonstrate how, regardless of the estimation technique employed, clean architecture can play a pivotal role in streamlining this process, underscoring that its benefits transcend mere code enhancement.

Android Clean Architecture

There are various interpretations of clean architecture, but we’ll focus on a simple and popular approach with distinct layers:

  • Data Source: Imagine this as the builders fetching sand and water from nearby sources.
  • Data: The data layer encapsulates the details of data sources and persistence
  • Domain: That contains the business logic of your app
  • Presentation: This is where the artistry shines — the decorators (UI developers) bring the castle to life visually.

Job Offers

Job Offers


    Senior Android Engineer

    Carly Solutions GmbH
    Munich
    • Full Time
    apply now

    Senior Android Developer

    SumUp
    Berlin
    • Full Time
    apply now

OUR VIDEO RECOMMENDATION

No results found.

Jobs

An Illustrative Example

To concretize our discussion, let’s consider estimating a new feature: displaying user details. Technical specifications reveal the need for a new endpoint (1/user/details) and offline caching. The estimation phase then breaks down into technical steps:

  1. Data Source Layer: Incorporate the new endpoint using Retrofit, including unit tests.
  2. Caching Mechanism: Implement caching (e.g., with Room) with accompanying unit tests.
  3. Repository Logic: Introduce the repository, designed with an offline-first approach, alongside unit tests.
  4. Use Cases: Develop the necessary use cases with unit tests.
  5. View Models: Add view models, ensuring each has unit tests.
  6. UI Development: Craft the UI, whether through XML or Compose, with UI tests.

This breakdown acts as a template for future features. It provides transparency for the team on how each feature will be built, and more importantly, it allows for independent estimation. Each task is like a separate tower block, easily estimated on its own.

To improve accuracy, we can test this approach over several sprints to establish a baseline. Then, we can reuse the template for similar features, adjusting the estimates based on complexity. This way, estimating a new feature with a slightly different endpoint becomes as simple as adjusting the size of a tower block!

Benefits of Clean Architecture for Estimation

Incorporating clean architecture into the development and estimation process offers numerous advantages:

  1. Enhanced Modularity: Facilitates precise and manageable estimations by segregating the application into distinct layers.
  2. Improved Predictability: Simplifies predicting development time based on the clear definition of components and past experiences.
  3. Increased Reusability: Reduces estimation times for features that leverage existing, reusable components.
  4. Simplified Testing: Leads to more accurate estimations of testing time due to easier implementation of tests.
  5. Scalability: Makes estimating the impact of adding new features or scaling existing ones easier.
  6. Enhanced Communication with Stakeholders: Improves the conveyance of estimations and technical challenges to non-technical stakeholders.
Conclusion

Clean architecture’s influence extends beyond the structuring of code, offering significant advantages in the estimation process. By breaking down features into manageable layers and components, teams can achieve more accurate and efficient estimations. This structured approach not only enhances code quality and maintainability but also streamlines the development process, allowing for a more predictable and efficient workflow. As we continue to navigate the complexities of software development, embracing practices like clean architecture can provide a beacon of clarity, not just in code, but in the crucial task of project estimation as well.

This article is previously published on proandroiddev.com

YOU MAY BE INTERESTED IN

YOU MAY BE INTERESTED IN

blog
It’s one of the common UX across apps to provide swipe to dismiss so…
READ MORE
blog
In this part of our series on introducing Jetpack Compose into an existing project,…
READ MORE
blog
This is the second article in an article series that will discuss the dependency…
READ MORE
blog
Let’s suppose that for some reason we are interested in doing some tests with…
READ MORE

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

Menu