All Projects → richeterre → Swiftgoal

richeterre / Swiftgoal

Licence: mit
MVVM + ReactiveCocoa 4, in Swift

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Swiftgoal

Lpdmvvmkit
LPDMvvmKit - Elegant MVVM framework in Objective-C.
Stars: ✭ 400 (+31.15%)
Mutual labels:  reactivecocoa, mvvm
Zhuishushenqi
追书神器Swift版客户端(非官方)。 不断更新中......
Stars: ✭ 196 (-35.74%)
Mutual labels:  reactivecocoa, mvvm
Wechat
🔥 iOS 利用MVVM + RAC + ViewModel-Based Navigation来搭建微信(WeChat 7.0.0+)的整体基本架构,以及实现微信朋友圈、通讯录、下拉小程序、搜索等主要功能,代码规范惊为天人、注释详解令人发指、细节处理精益求精、核心功能配备文档、接近98%还原度的原生App视觉体验,代码不多,注释多。(持续更新,敬请期待,欢迎Star和Fork…)
Stars: ✭ 870 (+185.25%)
Mutual labels:  reactivecocoa, mvvm
Mvvmreactivecocoademo
ReactiveCocoa的知识点及MVVM模式运用(不断更新中....)
Stars: ✭ 255 (-16.39%)
Mutual labels:  reactivecocoa, mvvm
Reactivecocoa use
RAC的基础用法,提高开发效率
Stars: ✭ 89 (-70.82%)
Mutual labels:  reactivecocoa, mvvm
Swinjectmvvmexample
An example to use Swinject in MVVM architecture with ReactiveCococa
Stars: ✭ 301 (-1.31%)
Mutual labels:  reactivecocoa, mvvm
Android Mvp Mvvm Flytour
🔥🔥🔥 FlyTour是Android MVVM+MVP+Dagger2+Retrofit+RxJava+组件化+插件组成的双编码架构+双工程架构+双语言Android应用开发框架,通过不断的升级迭代该框架已经有了十个不同的版本,5.0之前工程架构采用gradle配置实现组件化,5.0之后的工程架构采用VirtualAPK实现了插件化,5.0之前采用Java编码实现,5.0之后采用Kotlin编码实现,编码架构由MVVM和MVP组成,工程架构和编码架构及编码语言开发者可根据自己具体的项目实际需求去决定选择使用,该框架是Android组件化、Android插件化、Android MVP架构、Android MVVM架构的集大成者,帮助你快速的搭建自己的App项目开发框架,以便把主要的精…
Stars: ✭ 2,948 (+866.56%)
Mutual labels:  mvvm
Worlds Simplest Csharp Wpf Mvvm Example
The World's Simplest C# WPF MVVM Example
Stars: ✭ 279 (-8.52%)
Mutual labels:  mvvm
Modernmvvm
A movie iOS app built with the MVVM architecture, Combine and SwiftUI frameworks https://www.vadimbulavin.com/modern-mvvm-ios-app-architecture-with-combine-and-swiftui/.
Stars: ✭ 252 (-17.38%)
Mutual labels:  mvvm
Relight
A light MVVM framework for Android. 一个轻量级的安卓MVVM框架
Stars: ✭ 258 (-15.41%)
Mutual labels:  mvvm
Knight
Knight is a game framework based on Unity3D engine. It includes a complete assetbundle manager, a c# hotfix module based on ILRuntime, and a UI module based on MVVM, and other basic functions support.
Stars: ✭ 302 (-0.98%)
Mutual labels:  mvvm
Clean Mvvm Archcomponents
👽 Android app consuming Star Wars API.Built with clean architecture ,MVVM pattern, Koin , Coroutines + Flows ,Architecture Components, Data Binding , Firebase , Unit/UI Tests ,Motion Layout
Stars: ✭ 285 (-6.56%)
Mutual labels:  mvvm
Verge
🟣 Verge is a very tunable state-management engine on iOS App (UIKit / SwiftUI) and built-in ORM.
Stars: ✭ 273 (-10.49%)
Mutual labels:  mvvm
Kotlinjetpackinaction
🔥🔥 Kotlin Jetpack zero to hero. 新手到高手
Stars: ✭ 264 (-13.44%)
Mutual labels:  mvvm
Awesome Jetpack Compose Learning Resources
👓 A continuously updated list of learning Jetpack Compose for Android apps.
Stars: ✭ 275 (-9.84%)
Mutual labels:  mvvm
Simpleeyes
🔥🔥🔥A Video app illustrating Android development best practices with Kotlin
Stars: ✭ 261 (-14.43%)
Mutual labels:  mvvm
Cleanarchitecturerxswift
Example of Clean Architecture of iOS app using RxSwift
Stars: ✭ 3,256 (+967.54%)
Mutual labels:  mvvm
Mvvm
《安卓-深入浅出MVVM教程》 附带的案例。本系列已废弃,如对MVVM有需求,可看我的新开源项目 relight
Stars: ✭ 259 (-15.08%)
Mutual labels:  mvvm
Wtm
Use WTM to write .netcore app fast !!!
Stars: ✭ 3,403 (+1015.74%)
Mutual labels:  mvvm
Coroutineswanandroid
超完整的「玩 Android」客户端,项目采用 MVVM, Android Jetpack, Retrofit, Kotlin 协程, Koin 编写。如果该项目对你学习过程有用,请给个 star,感谢
Stars: ✭ 287 (-5.9%)
Mutual labels:  mvvm

SwiftGoal

Sponsored No Maintenance Intended

This project showcases the Model-View-ViewModel (MVVM) architecture with ReactiveCocoa 4, while serving as a digital logbook of FIFA matches. It was inspired on a theoretical level by Justin Spahr-Summers' talk Enemy of the State, and on a more practical one by Ash Furrow's C-41 app.

As the Swift language and the ecosystem around it matured, porting the original ObjectiveGoal project became a natural next step, as Swift's type safety makes it a perfect fit for functional reactive programming.

Requirements

SwiftGoal runs on iOS 9+ and requires Xcode 8 with Swift 2.3 to build.

Setup

No separate backend is required to use the app, as it stores all its data locally in the Documents directory by default. Note that things might break in future releases, e.g. if some model fields change! Also, you need to terminate the app to trigger a write to local storage.

For serious use and if you want to share data across multiple devices, I recommend you use Goalbase as a backend. It's easy to get started:

  1. Follow the setup instructions in the Goalbase documentation.
  2. Enable the "Use Remote Store" switch under Settings > SwiftGoal.
  3. Make sure the base URL is set correctly. The default value should be fine if you run rails server in your Goalbase directory, but for a remote setup (e.g. on Heroku) you'll need to update this setting.

Unit Tests

SwiftGoal is thoroughly covered by unit tests, which are written with Quick and Nimble. An advantage of such BDD-style frameworks is that they document the behavior of the tested code in plain English. To run the unit tests, simply hit Cmd + U in Xcode.

User Features

  • [x] Create players
  • [x] Create matches with home/away players and score
  • [x] View list of matches
  • [x] Edit existing match information
  • [x] Delete matches
  • [x] Pull-to-refresh any list in the app
  • [x] See animated list changes
  • [x] Enjoy custom fonts and colors
  • [x] Get alerts about network and server errors
  • [x] View player rankings
  • [ ] Switch between different ranking periods (last month, all time, …)
  • [ ] See date and time of each match
  • [ ] See matches grouped by date range (e.g. last week, last month, earlier)
  • [ ] View more player statistics (e.g. won/drawn/lost count, nemesis player, …)

Code Checklist

  • [x] Validate player name before creating
  • [x] Validate match player counts before creating
  • [x] Move base URL to Settings for easy customization
  • [ ] Cancel network requests when the associated view becomes inactive
  • [ ] Retry network requests 1 or 2 times before giving up
  • [x] Detect and animate match data changes
  • [x] Write tests for models
  • [x] Write tests for view models
  • [ ] Write tests for helpers and store
  • [x] Deduplicate isActiveSignal code on view controllers (via a class extension)
  • [ ] Create watchOS 2 app for quick match entry

Benefits of MVVM

High testability: The basic premise of testing is to verify correct output for a given input. As a consequence, any class that minimizes the amount of dependencies affecting its output becomes a good candidate for testing. MVVM's separation of logic (the view model layer) from presentation (the view layer) means that the view model can be tested with minimal setup. For instance, injecting a mock Store that provides a known amount of Match instances is enough to verify that the MatchesViewModel reports the correct amount of matches. The view layer becomes trivial, as it simply binds to those outputs.

Better separation of concerns: UIViewController and its friends have been rightfully scorned for handling far too many things, from interface rotation to networking to providing table data. MVVM solves this by making a clear cut between UI and business logic. While a view controller would still acts as its table view's data source, it forwards the actual data queries to its own view model. Presentation details, such as animating new rows into the table view, will be handled in the view layer.

Encapsulation of state: As suggested by Gary Bernhardt in his famous talk “Boundaries”, view models offer a stateful shell around the stateless core of the app, the model layer. If need be, the app's state can be persisted and restored simply by storing the view model. While the view may be extremely stateful too, its state is ultimately derived from that of the view model, and thus does not require to be stored.

Acknowledgements

This project is kindly sponsored by Futurice as part of their fantastic open-source program. Kiitos!

The icons within the app are courtesy of Icons8 – a resource well worth checking out.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].