samedi 23 janvier 2016

Swift iOS - MVC, MVVM or anything else for reusable business logic classes

Sorry if it's a wrong place to ask. I searched a lot in google, but I was pretty confused on the choices.

Currently in my new project, we want to develop a ios swift library which has a bunch of screens and some validation + business logic associated with each of those screens. We would like to distribute this library to other developers within the company so that they use this library to accelerate the development.

Now the requirement is that, as a developer I should be able to use the screens itself such as login with its associated validation and business logic together in my new App or if need to present my own UI, I can ignore the UI and use the validation + business logic alone and use with my own UI. What's the best approach to solve such problem.

Added to that, if I want the core logic (Validation + Business Rules) in a separate library and UI in a separate library which can import the first one.

In short, I want the UI and backend logic in separate libraries and import them as required and what's the best way to achieve it?

Aucun commentaire:

Enregistrer un commentaire