First and foremost, if you don't know what a design pattern is, then this blog is most certainly targeted at you.
Secondly those who don't really understand the Model View Controller (MVC) design pattern should also keep on reading.
My intention was never to write a blog on what it is or how to implement it. There is heaps of content on the internet and also on SCN. A simple search and you can find tons of stuff out there. It's been around for ages, in fact it's older than me, so it's pretty old.
Here are some of my favourites:
http://blog.codinghorror.com/understanding-model-view-controller/
http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller
I've worked at quite a few clients over the years and it never ceases to amaze me at the number of developers unaware of MVC & it's importance to SAP frameworks. Even more horrifying is the number of developments/extensions I have seen that break this pretty straight forward design pattern.
The most classic example of this is those who code business logic within the UI (a view). This results in two very frustrating outcomes
.
It's the same pattern that keeps cropping up again and again and it does not appear to be going away any time soon...
So if you don't know MVC, you really can't say you know these frameworks and even worse are potentially using them incorrectly.
Many non SAP programming languages incorporate frameworks built on this concept and the sooner you spot it the easier it will be for you to adopt a particular framework and the less likely you are to fall into one of the pitfalls described in previous section.
The ability to have a clean separation of code, that promotes code reuse is fantastic. So much so that I find myself using this priniciple even when writing ABAP reports. The ability to plug in different views makes it quick to extend the logic to expose the report data as an e-mail, alv, file download, etc. And is abundantly clear to anyone maintaining it on where to make changes.
Please, please, please. If you don't understand it and before you attempt to create or extend any more content, take some time out to learn this pattern. Your collleagues, your employers and everyone who works with your code will forever appreciate it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
4 | |
3 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |