Help, I need to refactor, but where should I start ? (SDP to the rescue)

Of course it’s impossible to answer this question in one single post, or even in one single book (the best known book for this is the one from M.Feathers, “Working Effectively with Legacy Code” that you can buy here). In fact it’s impossible to answer this question at all as it will all depend on what is the current status of what you have to refactor and every situation is specific. But still, there are few things that can be said and that can/should be applied when it’s about refactoring. Continue reading “Help, I need to refactor, but where should I start ? (SDP to the rescue)”

From VIPER to VIP’R (VIP – pause – R) or how to eject Entity!

For this week, I want to give a clear example of the type of architecture that I’m trying to push on the projects I work on. Some of you probably already know VIPER. It tends to become a classical architecture in iOS development and in other platforms like Android. VIPER goes for :

  • V : View
  • I: Interactor
  • P: Presenter
  • E: Entitie
  • R: Router

It was inspired by the Onion Architecture or Clean Architecture pushed by Robert Cecil Martin, more known as Uncle Bob.

The Clean Architecture – © Robert Martin.

On the image The Clean Architecture, you can see an example of what it looks like. You see “skins”, or layers, that go from external to internal, crossing boundaries in one way and going right to the center where you find Entities. Continue reading “From VIPER to VIP’R (VIP – pause – R) or how to eject Entity!”