The Patterns in a Practical Position

thc1bl12enPatterns, software development and the last 5-8 years have been pushing patterns.  Like Agile and SCRUMM (I know they are different), the new wave of development is the implementation of patterns into applications (they aren’t new, they are old but as we are developing more and more cross platform application across multiple devices it becomes more and more important to use familiar logic to hook our applications together with).

My biggest issue is not the use of them, they are great, they offer a wonderful reusable way of implementing common functionality throughout you application and then future applications with minimum fuss.  The best one recently I can think of is the MVVM/MVC and its purpose is to decouple the interface from the application, the purpose of this is to have a single backend code and the front end can be across multiple platforms and be native as they are all using the MVVM/MVC pattern.  But why am I?

Also note, MVC isn’t new (Circa. 1970s), but it has become an important part of mobile application development as you can’t always determine how you will connect to a backend and therefore keeping the UI separate means you, as the UI developer, only need to hook in the view to see it working and not concern yourself with calling specific methods, API calls or other more complex ways to get data in and out of an application.

So like Model View View-Model (Model View Controller) other pattern creep in and provide a mechanism to help make life easier for the developer, but there is one thing that irks me about new patterns.  Details, details and I will also say details.  It is all well and good to show me code, this is the way to implement the Snake Pattern; implement this interface, inherit these classes, create concrete classes from the interface, charm a snake and then, you will have your application.  Why?  Why am I doing this?  What purpose is the pattern in solving a problem, can this pattern be used on all applications across all platforms. 

I see code, it shows me how the person implemented this pattern.  I started by doing this, next I added this and this to implement this.  Next I, blah, blah and blah.  That is fine, following word for word code is fine, at the end I hit F5 and everything works, but why?    The one I see and it might be me and not understanding the purposes for such but a pattern was shown to me as a way of decoupling a class’s implementation from it’s abstraction enabling the two to vary from one another.  I understand abstraction, being a core component of object oriented programming, but the decoupling of it, my nature of the abstraction means no implementation of the class is in the definition of the abstraction (please tell me if I am wrong, I would like to know). 

But the remaining part of this article tells me how they did it, using a metaphor that isn’t common in the development of examples.  New technologies and learning new techniques and methodologies is difficult enough and keeping on top of them in an ever changing world is even more so.  So, telling me about useful patterns, Bridge, Adapter, MVC, whatever it might be is good, telling me it is for this, but tell me why, show me why, don’t make me just copy verbatim the code you have provided to make it work.  This means I won’t learn anything.

It has been a bug bear of mine over the many years of learning languages and learning how to program in those languages and it is the examples and the nature of telling me how to do this and that. 

When learning the basics, it is fine to say this is how you create variables

int varable = 1;

But when it comes to things more complex, give me more useful examples.  But it is a gripe and nothing to much other than this is the way I learn new things. 


Posted on June 19, 2014, in Development and tagged . Bookmark the permalink. Leave a comment.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: