Starting the Journey: What You Need to Know
With this article, I'd like to officially mark the beginning of my very fruitful career in Mobile Development. To be factual, this journey began a little over two years ago when I wrote my first line of code in Dart.
Despite the already long road behind me, a promising career begins now. I'm embarking on this journey, not alone but with the guidance of HNG through their internship program and the HNG premium network.
After a long path of solo learning and building projects (a lot of which remain unfinished), I knew I needed a platform that would give me the right push and rigorous deadlines to face Mobile Development as a profitable and fulfilling career true and true. And from everything I heard, HNG is just that platform for me.
Let’s Begin… officially
There's no better way to 'start' this journey than where it all began two years ago. And that is selecting a development platform, you can't survive (or do anything, really) as a mobile developer without a development platform (or two) under your belt.
And that would be the foundation article of my journey into the world of mobile development.
What is a Mobile Development Platform?
Mobile development platforms are essentially software programs that offer the tools needed to build mobile applications for various operating systems. These platforms come specially designed to help us create, test, and deploy mobile apps more efficiently and effectively.
Each platform has it's unique strengths, as well as weakness. Understanding both of which is key for making the right choice to improve your productivity as a developer.
We can't talk about development platforms without first highlighting the two categories under which they all fall… Native and Cross-platform.
Native Development
This category refers to development of mobile application for a specific operating system, typically Android or IOS. Such mobile applications are referred to as Native mobile apps.
Android Development
Language: Kotlin, Java
IDE: Android Studio
Common Architecture Patterns: Model-View-Presenter (MVP), Model-View-ViewModel (MVVM), Clean Architecture, etc
iOS Development
Language: Swift, Objective-C
IDE: Xcode
Common Architecture Patterns: Model-View-Controller (MVC), VIPER (View, Interactor, Presenter, Entity, Router), MVVM
Cross-platform Development Platforms
Unlike the native counterpart, such platforms equip you with necessary tools to create apps that can run on multiple mobile operating systems using a single codebase.
Cross-platform mobile apps typically make use of native UI elements that make the app feel native.
Flutter by Google (My platform of choice)
This is an open-source UI software development kit to allow the development of natively compiled applications for mobile(Android and iOS), web, and desktop from a single codebase.
Language: Dart
IDE: Android Studio, IntelliJ IDEA, Visual Studio Code
Common Architecture Patterns: MVC, BLoC, Clean Architecture, MVVM
React Native by Meta
This platform is largely based on the React framework. It allows development for the iOS and Android platform from a single codebase, greatly reducing development time.
Language: JavaScript
IDE: Any JavaScript-capable editor (e.g., Visual Studio Code)
Common Architecture Patterns: MVC, Component-based
Xamarin by Microsoft
Xamarin makes use of .NET to develop a codebase that works with iOS, Android, and Windows. Because it offers an extensive collection of tools and frameworks, Xamarin is a strong choice for enterprise apps.
Language: C#
IDE: Visual Studio
Common Architecture Patterns: Clean Architecture, MVVM
Software Architecture Patterns
I've been highlighting common Architecture Patterns for each of the platforms earlier mentioned, but what is a Software Architecture pattern though? Simply put, they are the blueprints of our code.
They give our codebase structure, ensuring we don't end up with an unmaintainable mess. Here's a deep dive into the the patterns mentioned above:
Model-View-Controller (MVC)
This pattern is among the oldest used architecture patterns. Especially in iOS development. It works on the principle of organizing your code into three components: Model, View, and Controller.
The model represents the data and business logic, the view defines the user interface, and the controller acts as an intermediary, handling user input and updating the model and view accordingly.
Pros:
Clear separation of concerns, making it easier to manage and update code.
Simplifies development for smaller applications.
Good support from Apple's development ecosystem.
Cons:
Increased complexity in large products due to massive controllers.
Tight coupling between components can make unit testing challenging.
Model-View-ViewModel (MVVM)
With MVVM, the user interface (View) and business logic (Model) are more independent components. The ViewModel acts as the interface point between the two.
Pros:
Decoupling of components results in easier testing.
Facilitates two-way data binding between View and ViewModel.
It is highly scalable.
Cons:
- Steeper learning curve compared to MVC.
VIPER (View, Interactor, Presenter, Entity, Router)
VIPER breaks the application into smaller modules. Responsibilities are shared among each of the distinct modules.
Pros:
Promotes single responsibility principle, making code highly maintainable.
Excellent for unit testing due to well-defined modules.
Ideal for large and complex applications.
Cons:
Not suitable for smaller projects.
Complex pattern for beginners.
Model-View-Presenter (MVP)
This architecture is very similar to the MVC architecture. Two key differences are that MVP is more commonly used on the Android platform and has a more distinct separation between the View and the Presenter. The Presenter here functions much like the Controller in MVC.
Pros:
It is easier to unit test compared to MVC.
The view is passive and only displays data
Cons:
Can lead to bloated presenters if not managed properly
Requires more boilerplate code.
Clean Architecture
This architecture was introduced by Robert C. Martin, works on building an application with multiple layers. Each layer has its specific responsibility and dependencies, resulting in a highly modular and testable codebase.
The main layers include Presentation, Domain, and Data. Clean Architecture is a common architecture pattern in Flutter and Xamarin.
Pros:
High maintainability and scalability
Clear separation of concerns
Enhanced testability due to decoupled layers
Cons:
More complex and time-consuming to implement
Requires a solid understanding of layer interactions
Component-Based Architecture
React Native follows a component-based architecture, where the UI is composed of reusable components. Each component manages its state and lifecycle, making the development process more modular and efficient.
Pros:
Makes the codebase reusable and testable
Simplifies the development and maintenance of UI components
Integrates seamlessly with the React's ecosystem
Cons:
Can result in deeply nested components
Requires careful state management to avoid prop drilling
BLoC (Business Logic Component) Pattern
BLoC is a pattern commonly used in Flutter to separate the business logic, from the user interface. It makes use of streams and sinks to manage the flow of data and events.
Pros:
-Clearly separates business logic from UI Enhances reusability and testability,
Cons:
It has a steep learning curve for individuals not familiar with streams
Conclusion
With this article I know I have laid a solid foundation for ones journey into Mobile Development. Choosing the right mobile development platform is crucial in this career path. As well as picking the right architecture that works for you and your project's needs. These are decisions I had to make, still make and will continue to make as I continue (or begin) my journey as a mobile developer. This is just the beginning, and I can't wait to see where this path will lead me.
Subscribe to my newsletter
Read articles from Dawn directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by