The Anatomy of a Good Architecture in Android

architecture
Medium.com

Building an Android application is not a piece of Cake. It takes a good amount of time, investment, and commitment for a team to build an Android application. Furthermore - it’s not even a one-time investment. You will have to continue adding new features and put your significant efforts to make it user-friendly in the longer run.

Now, building an application is similar to building a house. Same like every house needs a solid structure, an application needs a good architecture to survive.

History and Evolution of Android Architecture

Android has a long history of uncertainty towards Architectures. With MVC being used as the default architectural pattern, development used to be messy in Android. Literally, there were no guidelines on how to structure an android application back when Android was launched initially. All the code in Android used to be inside Activities and Fragments in Android.

Fortunately, as community members continue to get their hands on the platform, new architectural guidelines and better way to write code emerged as a result. The separation of concern by Uncle Bob became a general principle for architecture apps in Android.

MVC became a history and new architectural patterns such as MVP and MVVM based on Uncle bob clean architecture were introduced in Android.

Furthermore, 2017 continue to add its mark in history when Google officially recommended an app architecture for Android using Architecture components. It is the collection of different libraries that provide developers a practical solution to write modular apps with lesser boilerplate code and building great experiences.

What should be the characteristics of a Good Architecture in Android?

Now that you had understood the Architectural evolution of Android, let’s delve into the five golden nuggets that complement an architectural pattern in Android:

Architecture should satisfy the multitude of Stakeholders

It’s a common thing to have various multitude of Stakeholders and workers in a company. This includes developers, UX/ UI designers, DB engineer, QA etc.  An architecture should be that feasible so that your code is organized in such a way that every stakeholder can work on the components they are supposed to work.

A good Architecture should better reinforce the separation of concerns

As mentioned previously, an architecture should adopt the principle of better separation of concerns or single repository principle. The main idea behind the separation of concerns is that every component should have a single reason to change. That said, an architecture should be neatly separable by module level, package level, and class level.

A good Android architecture should be testable

A good architecture should be testable. MVP is such an architecture which is testable. By implementing Passive View pattern in MVP, you can better make your app more testable. One major reason for this is that in MVP (Passive View), your Views are dumb. It is worth mentioning for that more dumber is your View, more testable will be your UI. 

In case, if you are not able to unit-test everything then you must at least cover your business logic with tests.

A Good architecture should not relate with the Real world

The main concern for a good architecture is to emphasize more on the business logic without caring much about the data-source (Android, database, internet etc.) That said, all the nitty-gritty and dirty stuff that relates to the Real world should be remained hidden, let alone working of the framework under the hood. 

Conclusion

In this article, we explained what does it mean by a Good architecture for Android. In case, you have any proper guidelines to how to create a proper Android workflow. Let us know in comments.

Similar Articles

11 Essential Testing Strategies That Improves Mobile Testing

Mobile technology is changing rapidly, and the quality and performance of mobile applications are of paramount importance. Testing the mobile applications to ensure that they perform as per the design is equally important. This testing can be achieved by using some strategies that can play a critical role in improving the testing of mobile applications

mobile-application-development

In an environment where the speed of technological advancement is breathtaking, maintaining a leading edge in the mobile app development landscape is essential. As we transition into 2024, new and innovative trends are making their mark, altering the methodologies we apply in the creation of mobile apps

Using the CI/CD Approach for Mobile App Development Transformation.

In the dynamic realm of mobile app development, Continuous Integration (CI) and Continuous Deployment (CD) have become crucial practices to ensure the efficient and reliable delivery of high-quality applications. CI/CD pipelines play a pivotal role in automating the integration of changes from various developers and deploying applications to production environments.

Importance of Mobile Apps for Insurance Companies

Mobiles and by extension, mobile apps are the basis for the modern mobile device and take it beyond a mere communication tool. In today’s world, information has to be available at our fingertips and people want mobile applications to do instantly what websites used to do before, give information and details instantly, anytime & anywhere

Benefits and Use Cases of Serverless Architecture in Mobile App Development

In the ever-evolving landscape of app development, embracing innovation is not just a choice but a necessity. Enter serverless architecture, a transformative paradigm reshaping how we approach app development.

Advantages of Using React.js for Developing Engaging Educational Applications

EdTech developers leverage modern technology to create immersive and engaging learning apps. A successful product relies on solid technology, including front-end frameworks like React.js, offering efficient development and incorporating cutting-edge features like gamification and voice recognition for a standout user experience in the education industry

Reasons To Use Flutter for IoT App Development

Internet of Things, or IoT, is a fast-growing concept that promises a transformation in how we live and work. It enables us to connect and control smart devices such as wearables, medical devices, sensors & more using mobile apps. IoT has impacted many aspects of our lives, and some of the most notable are home building, logistics, healthcare, and more.

Xamarin vs Native Mobile App Development: Which one Should You Choose?

Mobile app development has become an essential part of the digital ecosystem as mobile devices have become more prevalent than desktops or laptops. Regarding mobile app development, two popular approaches are Xamarin and native mobile app development.

Top Benefits of Outsourcing React Native Development

With React Native becoming one of the preferred tools for developing mobile and web apps, there has been a growing focus on outsourcing software development based on this language