{"id":45,"date":"2013-03-28T14:25:01","date_gmt":"2013-03-28T14:25:01","guid":{"rendered":"http:\/\/ajaykumar.co.in\/?p=45"},"modified":"2013-03-28T14:25:01","modified_gmt":"2013-03-28T14:25:01","slug":"good-design-high-level-or-low-level","status":"publish","type":"post","link":"https:\/\/ajaykumar.co.in\/?p=45","title":{"rendered":"Good Design &#8211; High Level or Low Level"},"content":{"rendered":"<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Software Design is one interesting topic for coders like me and that is the\u00a0reason I started exploring this topic. I explored various sources to get\u00a0information on this topic. Before starting to work on any item as per general<br \/>\npractice we want to understand what is the end result we have in our mind.<span style=\"mso-spacerun: yes;\">\u00a0 <\/span>So end result what I am concerned is\u00a0design. There is no perfect design so design created by one person will be\u00a0different from design created by other person. Since design created by two\u00a0person may be different, we can only say whether design is good or bad. So I\u00a0should say end result in my mind is a good design. Good is very generic word and\u00a0being in software development for various years I am taught by my experience to\u00a0not make assumptions. So good design for different people can be completely\u00a0different. We need to understand what are the design goals which we want as end\u00a0result. So a good software design as certain attributes which determines whether<br \/>\nis it is good or not.<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">\n<ul style=\"margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;\" type=\"disc\">\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-weight: bold; font-family: Calibri; font-size: 11.0pt;\">Correct<\/span><span style=\"font-family: Calibri; font-size: 11.0pt;\"> &#8211; Design should be correct to\u00a0it&#8217;s requirement. So design should achieve what is stated in requirement of\u00a0software system. It should fulfill functional and non functional requirement.<br \/>\nYou can have look at below classification to get more detail of requirement\u00a0classification which needs to be addressed through implementation for which we\u00a0are preparing design. I have left detail of these requirement since topic of\u00a0discussion is not requirement elicitation.<\/span><\/p>\n<ul style=\"margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;\" type=\"square\">\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Functional<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Non-Functional<\/span>\n<ul style=\"margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;\" type=\"disc\">\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Product<\/span>\n<ul style=\"margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;\" type=\"disc\">\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Usability<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Efficiency<\/span>\n<ul style=\"margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;\" type=\"disc\">\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Speed<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Throughput<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Memory<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Reliability<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Portability<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Organizational<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">External<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-weight: bold; font-family: Calibri; font-size: 11.0pt;\">Robust<\/span><span style=\"font-family: Calibri; font-size: 11.0pt;\"> &#8211; Implemented software should\u00a0be tolerant to misuse. So if there are faulty data\/ parameter\/ action is passed\u00a0to software there should be provision to handle that.<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-weight: bold; font-family: Calibri; font-size: 11.0pt;\">Flexible<\/span><span style=\"font-family: Calibri; font-size: 11.0pt;\"> &#8211; This is very important\u00a0aspect of good design. Making software is different from other engineering\u00a0disciplines like Civil.<span style=\"mso-spacerun: yes;\">\u00a0 <\/span>In case of\u00a0software, requirement changes over the period of development of<span style=\"mso-spacerun: yes;\">\u00a0 <\/span>software. So when we start working on\u00a0software project we have different requirement and during development lot of\u00a0these requirements change. We can not control them because business keeps\u00a0changing on very rapid pace and software are made to fulfill requirement of<br \/>\nbusiness. So only workaround is , to manage those changes. So software design\u00a0should have provision for these changes and should adapt to shifting\u00a0requirement. During change we identify where we need to change, then change and\u00a0then test that change.<span style=\"mso-spacerun: yes;\">\u00a0 <\/span>There are various\u00a0detractors of flexibility like complex code, improper responsibility assignment\u00a0to classes\/methods, unreadable code and repetition in code.<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-weight: bold; font-family: Calibri; font-size: 11.0pt;\">Extendable<\/span><span style=\"font-family: Calibri; font-size: 11.0pt;\"> &#8211; If there are any enhancement\u00a0for the software comes in future, design should have provision to accommodate\u00a0that. This will also have similar impact as above. So if design is good,<br \/>\nfeatures can be added without much hassle or adding new feature may result in\u00a0breaking some existing feature.<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-weight: bold; font-family: Calibri; font-size: 11.0pt;\">Reusable<\/span><span style=\"font-family: Calibri; font-size: 11.0pt;\"> &#8211; In today&#8217;s software\u00a0development world we have rapid development cycle. So reusable components are\u00a0very important for rapid software development. It also saves cost of software<br \/>\ndevelopment. If there are some reusable component development during development\u00a0of one software can definitely help in reducing future software development\u00a0time. Microsoft Patterns &amp; Practices Enterprise library is one good example of\u00a0these kind of reusable components.<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-weight: bold; font-family: Calibri; font-size: 11.0pt;\">Efficient<\/span><span style=\"font-family: Calibri; font-size: 11.0pt;\"> &#8211; Good use of processor and\u00a0memory<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-weight: bold; font-family: Calibri; font-size: 11.0pt;\">Reliable<\/span><span style=\"font-family: Calibri; font-size: 11.0pt;\"> &#8211; The system developed by\u00a0design should be reliable. Reliable means how long software can perform without\u00a0error in specific environment.<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-weight: bold; font-family: Calibri; font-size: 11.0pt;\">Usable<\/span><span style=\"font-family: Calibri; font-size: 11.0pt;\"> &#8211; When we develop software\u00a0systems, these are used by human. There are people who make their livelihood by\u00a0working daily on this software in case of business application.<span style=\"mso-spacerun: yes;\">\u00a0 <\/span>Software which is more usable make people\u00a0more productive.<\/span><\/li>\n<\/ul>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">As for good design attributes, there are attributes which defines how can we say\u00a0this is a bad design. According to Robert Martin (<a href=\"http:\/\/www.objectmentor.com\/omTeam\/martin_r.html\">http:\/\/www.objectmentor.com\/omTeam\/martin_r.html<\/a>),\u00a0below are the attributes of bad design.<\/p>\n<ul style=\"margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;\" type=\"disc\">\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle; color: #222222;\"><span style=\"font-weight: bold; font-family: Verdana; font-size: 10.0pt;\">Rigidity<\/span><span style=\"font-family: Verdana; font-size: 10.0pt;\"> &#8211; It is hard to change because\u00a0every change affects too many other parts of the system. <\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle; color: #222222;\"><span style=\"font-weight: bold; font-family: Verdana; font-size: 10.0pt;\">Fragility<\/span><span style=\"font-family: Verdana; font-size: 10.0pt;\"> &#8211; When you make a change,\u00a0unexpected parts of the system break. <\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle; color: #222222;\"><span style=\"font-weight: bold; font-family: Verdana; font-size: 10.0pt;\">Immobility<\/span><span style=\"font-family: Verdana; font-size: 10.0pt;\"> &#8211; It is hard to reuse in\u00a0another application because it cannot be disentangled from the current\u00a0application. <\/span><\/li>\n<\/ul>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">I tried to consolidate end result attribute and then we need to start design.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Software Design is one interesting topic for coders like me and that is the\u00a0reason I started exploring this topic. I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-45","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/ajaykumar.co.in\/index.php?rest_route=\/wp\/v2\/posts\/45","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ajaykumar.co.in\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ajaykumar.co.in\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ajaykumar.co.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ajaykumar.co.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=45"}],"version-history":[{"count":6,"href":"https:\/\/ajaykumar.co.in\/index.php?rest_route=\/wp\/v2\/posts\/45\/revisions"}],"predecessor-version":[{"id":51,"href":"https:\/\/ajaykumar.co.in\/index.php?rest_route=\/wp\/v2\/posts\/45\/revisions\/51"}],"wp:attachment":[{"href":"https:\/\/ajaykumar.co.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=45"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ajaykumar.co.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=45"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ajaykumar.co.in\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}