Increible GP en la Pedrera

Va a ser el domingo próximo veinticuatro de noviembre a lo largo de toda la jornada. Tras recorrer diferentes circuitos callejeros en múltiples localidades de la provincia, la categoría cierra su año…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Presenters and Views meet The Interface Segregation Principle

also known as “the 4th letter in the SOLID acronym”

There are several posts about the MVP¹ pattern (or whatever fancy name some authors use to call it :wink:) and even more of them explaining what SOLID² stands for, so we will focus on:

Time and again we are told that we must avoid repetition and redundancy because “the less code to maintain the better” but then we find ourselves typing almost the same interfaces over and over again an indefinite number of times.

What can we do to follow the DRY principle mentioned above? Applying the Interface Segregation Principle. That’s it.

What do you think? From my point of view, among other benefits, it looks much cleaner, more refactor-friendly and certainly a better way to avoid monolithic interfaces with hundreds of methods.

It’s true that we haven’t gone into the details but I think the code fragments shown above are worth more than a thousand words :sunglasses:

Add a comment

Related posts:

Why we need sustainable tourism

British author and self-proclaimed traveller, Tahir Shah, once said in one his books that the very places tourists love are destroyed by their affection. Unfortunately, the facts do not lie. Tourism…

Building for Libra blockchain is now easy than ever

First is proud to announce the revamp of the original Libra Testnet explorer librabrowser.io and our new Blockchain API for developers. A lot has happened since we released the first Blockchain…

Bubble boy

Failure in a poet is from a lack of rigor in life.. “Bubble boy” is published by John of the Moon.