"O Vício em HQs" (The Comic Addiction) is a cross-platform mobile application (Android and iOS) developed in Xamarin.Forms for comic book collectors. The app allows users to manage comic collections, catalog items through different methods, synchronize data with a server, and track collection goals.
April 2016 to Febulary 2018
- Collection Management: Create, view, edit, and delete comic collections
- Comic Cataloging: Add comics to collections by title, barcode, or search
- Data Synchronization: Sync collections between local device and remote server
- Authentication: Traditional login and Facebook integration
- Detailed View: Complete information for each comic (cover, description, publisher, etc.)
- Collection Goals: Set and track goals for collections
- Reading States: Mark comics as "read", "want to read", "currently reading", etc.
- Offline Functionality: Local persistence with synchronization when connected
- Framework: Xamarin.Forms 2.3.4.247
- Architectural Pattern: MVVM (Model-View-ViewModel) with Prism
- Dependency Injection: Unity 4.0.1
- Local Persistence:
- Realm 1.6.0 (primary)
- SQLite.Net-PCL 3.1.1 (secondary)
- Serialization: Newtonsoft.Json 10.0.2
- Analytics and Monitoring: Microsoft.Azure.Mobile 0.15.0
- Barcode Reading: ZXing.Net.Mobile 2.2.9
- UI/UX:
- Acr.UserDialogs 6.3.10
- CarouselView.FormsPlugin 4.2.9
- Behaviors.Forms 1.2.0
- Connectivity: Xam.Plugin.Connectivity 2.3.0
src/
├── OvicioHqApp/ # Main project
│ ├── OvicioHqApp/ # Shared logic
│ │ ├── ViewModels/ # Presentation logic
│ │ ├── Views/ # XAML interfaces
│ │ ├── Services/ # Application services
│ │ ├── Controls/ # Custom controls
│ │ └── Base/ # Base classes
│ ├── OvicioHqApp.Droid/ # Android implementation
│ └── OvicioHqApp.iOS/ # iOS implementation
├── OVicioHqCore/ # Shared project
│ ├── Models/ # Data models
│ ├── Repository/ # Data access
│ └── WebServices/ # API communication
└── Components/ # Shared components
- Clear separation between UI (Views), presentation logic (ViewModels), and data (Models)
- Two-way binding between Views and ViewModels
- Commands to encapsulate user actions
- Unity container for dependency registration and resolution
- Facilitates unit testing and component decoupling
- Data access abstraction through repositories
- Implementation in
CollectionManagerfor CRUD operations
- Specialized services for specific functionalities
- Authentication, API communication, credential storage
- Service-based navigation through Prism
- Structured navigation flow with MasterDetail and NavigationPage
-
Separation of Concerns
- Clear division between layers (UI, logic, data)
- Consistent use of MVVM pattern
-
Code Reuse
- Shared project for common code
- Base classes to reduce duplication
-
Hybrid Persistence
- Realm for efficient local storage
- Synchronization with server when connectivity is available
-
Offline-First Experience
- Complete functionality without connection
- Automatic synchronization when connected
-
Structured Navigation
- Use of Prism navigation service
- Well-defined navigation flows
-
Dependency Updates
- Some libraries are using older versions
- Migration to more recent versions of Xamarin.Forms
-
Error Handling
- Implement more robust exception handling
- Improve user feedback in failure cases
-
Code Documentation
- Add comments to critical parts
- Document complex flows and architectural decisions
-
Automated Testing
- Implement unit tests for ViewModels
- Add integration tests for main flows
- Visual Studio 2017 or higher
- Xamarin SDK
- .NET Framework 4.5
- Android SDK (for Android development)
- Xcode (for iOS development, macOS only)
- Clone the repository
- Open the
OvicioHqApp.slnsolution in Visual Studio - Restore NuGet packages
- Configure API keys in the
App.xaml.csfile for:- Azure Mobile Center
- Facebook (if applicable)
- For Android: Select the
OvicioHqApp.Droidproject as the startup project - For iOS: Select the
OvicioHqApp.iOSproject as the startup project (requires Mac)
"O Vício em HQs" is a well-structured application that follows best practices for mobile development with Xamarin.Forms. The MVVM architecture with Prism provides a solid foundation, with clear separation of concerns and ease of maintenance.
The use of Realm for local persistence, combined with server synchronization, allows for a good experience both online and offline. Integration with services such as barcode reading and social login enhances the app's functionality.
The code demonstrates a good level of maturity in Xamarin development, with appropriate use of patterns and recommended practices.