The Anatomy of a Good Architecture in Android
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
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
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.
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
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.
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.
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
With over 6.3 billion estimated smartphone users worldwide, mobile app usage is growing exponentially. Studies have shown that Americans check their phones 262 times daily, once every 5.5 minutes! People check their phones at home, at work, on the street, while eating, in bed, and cars.
With the number of companies embracing digital solutions growing continuously, there is also an increasing demand for cloud services. Cloud development services help businesses (small or big) take advantage of digital transformation and to move their infrastructures to the cloud.
Businesses nowadays are fully enmeshed in the outstaffing and outsourcing trend. In order to boost production and take advantage of the expertise of specialized experts, it is safe to assume that modern professionals are more reliant on outsourcing