Home > Uncategorized > YAGNI and Flexibility

YAGNI and Flexibility

Building for requirement which does not exist means, always using this (whenever there is a dependency)

 

YAGNI Means using

When there is only one client and one service flavor. Service is not even a separate class yet.

 

And using,

When there are multiple clients and one service flavor. One might argue that getInstance is not Yagni because you don’t have another Service flavor yet?? But since there are multiple clients I think its better we move that(construction) into a single location. Service isn’t abstract yet.

 

And using,

When there are couple of clients and couple of service flavors.

And using,
 
When there are couple of clients and a services side is really complex.
Idea borrowed form Encapsulating Construction Streamzine from netobjectives.
Gaurav raised the question of more examples like this.
I’ll try to post more examples like this in the future.

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: