SlideShare una empresa de Scribd logo
1 de 40
Complecto Mutatio :  Teaching Software Design Best Practices Using Multi-Platform Development Randy Connolly Dept. Computer Science & Info Systems Mount Royal College Calgary, AB, T2N 0Z6  403 440 6061 [email_address]
“ Observe always that everything is the result of change, and get used to thinking that there is nothing Nature loves so well as to  change  existing forms and to make new ones like them.” -- Marcus Aurelius,  Meditations  iv 36.  “ Software changes its own requirements.” -- Ken Beck,  Extreme Programming Explained .
Of course, today's developers are generally less concerned with barbarian incursions and unruly Praetorian Guards … …  and more concerned with shifting requirements and fast-approaching deadlines.
“ Observe always that everything is the result of change, and get used to thinking that there is nothing  Clients  loves so well as to change existing  Windows  Forms and to make new ones like them.” -- Randy Connolly,  Software Developer Meditations , ix
Many authors on software design have noted the ubiquity of  change  in the typical software project.
One high-profile study, for instance, showed that business rules for a typical software project  changed  at the rate of 8% per month. Another study indicated that over 40% of requirements arrive only after development is well under way. “ Managing the effect of changing requirements remains one of the greatest challenges of enterprise software development .” ( Datta and Engelen, 2006)
The ubiquitous nature of change in the software development world is the principal reason for the  decline in commitment to waterfall development models  and the concomitant rise in interest in iterative and agile methodologies.
Indeed, the subtitle of one of the key texts in the field of iterative development is the English equivalent of the Latin in the title of this paper:  Embrace Change .  As Craig Larmann has noted, rather than fight inevitable change, developers should use a process that acknowledges “ change  and adaptation as unavoidable and indeed essential drivers”
Yet despite the current wide-spread use of iterative approaches in real-world software development … …  the essential ingredient of  change  can be difficult to add into a typical one semester course. …  and the attempt by many teachers to integrate these more agile processes into computer science education …
As a result, most programming assignments end up being  formulated using a waterfall based approach (i.e., fixed requirements by a set date) This is a particularly unfortunate shortcoming since the value of many of the most important object-oriented design precepts can only be appreciated in a project that is undergoing a certain amount of  change .
This rest of this presentation details my attempt to integrate changing requirements into two semester-long development projects ,[object Object],[object Object],[object Object],[object Object],In particular, this presentation will focus on what was perhaps the most lasting lesson learned by the students:  the importance of a layered architecture to software projects driven by  change .
This rest of this presentation details my attempt to integrate changing requirements into two semester-long development projects. In one version of the course, the project was a restaurant browsing application.  In the other, the project was a game.
The projects were in a third-year course on Windows development that uses C# and Windows Forms within Microsoft’s .NET Framework.  This course is somewhat analogous to a capstone course in that it is meant to integrate the development knowledge and experience gained by the students over the three years of the program.
In one version of this course, students had to create a board game/simulator.  In this game, the player creates an army of one or more units that battles the computer’s units. Each unit contains warriors of a specific type (e.g., knights, pirates, trolls, etc).
I have frequently used game projects in this course. The principal benefit of game projects is that they provide an ideal context for teaching the more “higher-order” and abstract software development topics such as architecture, design patterns, and software methodology.
One caution, however, … if there are females in the class … …  you may hope to get this …
…  but you  might   end up with this … At any rate, in the game section of the course, the student body was entirely male.
In the other version of the course, the development project was a restaurant browsing and ordering application. It used the gargantuan open source chef moz (http://chefmoz.org) XML dining guide files.
Change  was a vital part of the projects. ,[object Object],[object Object],[object Object],[object Object],The projects were broken into four distinct milestones.
Milestone 1
Milestones 2 and 3
Milestone 4
The rationale for this approach was mentioned in the introduction: namely, to give the students exposure to the kind of requirements  change  encountered in most real-world projects. While there were numerous changes in the course project, it was not total chaos.  For all four milestones, the students used C#, the Microsoft .NET Framework, and Visual Studio.  And, most importantly, most of the students’ work in one milestone could hopefully be migrated to the next milestone.
Indeed, it was in the second milestone that the students became truly appreciative of the general object-oriented principle that one should separate that which varies …  …  from that which stays the same
In order to adapt their milestones to these different user-interface platforms … …  the students were forced to  refactor  their initial milestone in order to make future transitions less time-consuming.
Almost without exception, in the first milestone students intertwined user interface logic into their basic domain model … As a result, the students were given the choice to instead use the instructor’s solution to the first milestone, which did in fact separate the domain logic and the user interface logic into two distinct  layers . …  and were faced with spending time eliminating the console user interface elements from their design.
What is a  layer ? A layer is simply a group of classes that are functionally or logically related. Using layers is a way of organizing your software design into groups of classes that fulfill a common purpose. Thus  a layer is not a thing, but an organizing principle .
Many software developers have embraced  layers  as the organizing principal of their application designs. The goal of layering is to distribute the functionality of your software among classes so that the coupling of a given class to other classes is minimized.  By organizing an application’s classes into layers, you hopefully end up with  lower coupling  than you otherwise might have without using layers as an organizing principle.
The most important benefit of using layers is that the resulting application should be significantly  more maintainable and adaptable  by reducing the overall coupling in the application.  If there is low coupling between the layers combined with high cohesion within a layer, a developer should be able to modify, extend, or enhance the layer without unduly affecting the rest of the application.
I have taught the design principle of layers to my students in a variety of classes over the years. Until this course students typically echo this content back to me in exams relatively successfully but have a much  harder time  integrating it into their actual programming practice.
To the students, layers (and perhaps other design best practices) often  seem like an unnecessary burden  for the typical one-month to two-month assignment.  In this project by contrast, student attitudes towards design began to change due to their need to adapt software between platforms.
By using the instructor’s domain layer, the students were able to more easily implement the user interface changes in the remaining milestones.  The students, perhaps for the very first time, became receptive to the idea that  proper design will actually   save them time and effort .
Surveyed student comments at the end of the course did seem to verify this impression.  Over half the surveyed students indicated that the most important thing learned in the course was : “ spending time doing good design actually saved me time in the long run because I had to do less coding and debugging,” as one student noted.
The payback for the additional design effort arrived in the fourth and final milestone. On the face of it, this milestone was quite intimidating.  The students had to move their game to a completely different piece of hardware: a hand-held Pocket PC. Yet because the students were using the Compact .NET Framework, they were able to port their domain, data, and presentation helper layers with little or no change.  The students only had to redesign and re-implement their presentation view layer in order to fit their project’s user interface into the constrained space and controls of the device.
As a result, the final milestone was by far the easiest: most students reported that it  only took a day to complete  !  Certainly at this stage of the course the students had become true believers in the benefits of proper software design.
For the very first time in my teaching experience … …  students had not just memorized the design principles nor simply believed in them as an  article of faith  because the professor told them so.
Instead, thanks to the multi-platform nature of their project… …  the students had their own empirical evidence of the utility of design principles in managing requirement  changes  in a software project.
Conclusion
It can be difficult to get students to fully appreciate the benefits of a proper software design.  To appreciate the benefit of a proper design, students need to work on a project with substantially changing requirements.  In such a project, students are able to see for themselves that proper design can save time and effort.  For most assignments, proper design just seems to be an  instructor-enforced hassle  because it generally only increases the amount of work for the student in a given assignment.
Randy Connolly Dept. Computer Science & Information Systems Mount Royal College, Calgary  [email_address]

Más contenido relacionado

Más de Randy Connolly

Where is the Internet? (2019 Edition)
Where is the Internet? (2019 Edition)Where is the Internet? (2019 Edition)
Where is the Internet? (2019 Edition)Randy Connolly
 
Modern Web Development (2018)
Modern Web Development (2018)Modern Web Development (2018)
Modern Web Development (2018)Randy Connolly
 
Helping Prospective Students Understand the Computing Disciplines
Helping Prospective Students Understand the Computing DisciplinesHelping Prospective Students Understand the Computing Disciplines
Helping Prospective Students Understand the Computing DisciplinesRandy Connolly
 
Constructing a Web Development Textbook
Constructing a Web Development TextbookConstructing a Web Development Textbook
Constructing a Web Development TextbookRandy Connolly
 
Web Development for Managers
Web Development for ManagersWeb Development for Managers
Web Development for ManagersRandy Connolly
 
Disrupting the Discourse of the "Digital Disruption of _____"
Disrupting the Discourse of the "Digital Disruption of _____"Disrupting the Discourse of the "Digital Disruption of _____"
Disrupting the Discourse of the "Digital Disruption of _____"Randy Connolly
 
17 Ways to Fail Your Courses
17 Ways to Fail Your Courses17 Ways to Fail Your Courses
17 Ways to Fail Your CoursesRandy Connolly
 
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...Randy Connolly
 
Constructing and revising a web development textbook
Constructing and revising a web development textbookConstructing and revising a web development textbook
Constructing and revising a web development textbookRandy Connolly
 
Computing is Not a Rock Band: Student Understanding of the Computing Disciplines
Computing is Not a Rock Band: Student Understanding of the Computing DisciplinesComputing is Not a Rock Band: Student Understanding of the Computing Disciplines
Computing is Not a Rock Band: Student Understanding of the Computing DisciplinesRandy Connolly
 
Citizenship: How do leaders in universities think about and experience citize...
Citizenship: How do leaders in universities think about and experience citize...Citizenship: How do leaders in universities think about and experience citize...
Citizenship: How do leaders in universities think about and experience citize...Randy Connolly
 
Thinking About Technology
Thinking About TechnologyThinking About Technology
Thinking About TechnologyRandy Connolly
 
A longitudinal examination of SIGITE conference submission data
A longitudinal examination of SIGITE conference submission dataA longitudinal examination of SIGITE conference submission data
A longitudinal examination of SIGITE conference submission dataRandy Connolly
 
Is Human Flourishing in the ICT World of the Future Likely?
Is Human Flourishing in the ICT World of the Future Likely?Is Human Flourishing in the ICT World of the Future Likely?
Is Human Flourishing in the ICT World of the Future Likely?Randy Connolly
 
Constructing a Contemporary Textbook
Constructing a Contemporary TextbookConstructing a Contemporary Textbook
Constructing a Contemporary TextbookRandy Connolly
 
Art and Culture - Module 11 - Enlightenment
Art and Culture - Module 11 - EnlightenmentArt and Culture - Module 11 - Enlightenment
Art and Culture - Module 11 - EnlightenmentRandy Connolly
 

Más de Randy Connolly (20)

Where is the Internet? (2019 Edition)
Where is the Internet? (2019 Edition)Where is the Internet? (2019 Edition)
Where is the Internet? (2019 Edition)
 
Modern Web Development (2018)
Modern Web Development (2018)Modern Web Development (2018)
Modern Web Development (2018)
 
Helping Prospective Students Understand the Computing Disciplines
Helping Prospective Students Understand the Computing DisciplinesHelping Prospective Students Understand the Computing Disciplines
Helping Prospective Students Understand the Computing Disciplines
 
Constructing a Web Development Textbook
Constructing a Web Development TextbookConstructing a Web Development Textbook
Constructing a Web Development Textbook
 
Web Development for Managers
Web Development for ManagersWeb Development for Managers
Web Development for Managers
 
Disrupting the Discourse of the "Digital Disruption of _____"
Disrupting the Discourse of the "Digital Disruption of _____"Disrupting the Discourse of the "Digital Disruption of _____"
Disrupting the Discourse of the "Digital Disruption of _____"
 
17 Ways to Fail Your Courses
17 Ways to Fail Your Courses17 Ways to Fail Your Courses
17 Ways to Fail Your Courses
 
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...
 
Constructing and revising a web development textbook
Constructing and revising a web development textbookConstructing and revising a web development textbook
Constructing and revising a web development textbook
 
Computing is Not a Rock Band: Student Understanding of the Computing Disciplines
Computing is Not a Rock Band: Student Understanding of the Computing DisciplinesComputing is Not a Rock Band: Student Understanding of the Computing Disciplines
Computing is Not a Rock Band: Student Understanding of the Computing Disciplines
 
Citizenship: How do leaders in universities think about and experience citize...
Citizenship: How do leaders in universities think about and experience citize...Citizenship: How do leaders in universities think about and experience citize...
Citizenship: How do leaders in universities think about and experience citize...
 
Thinking About Technology
Thinking About TechnologyThinking About Technology
Thinking About Technology
 
A longitudinal examination of SIGITE conference submission data
A longitudinal examination of SIGITE conference submission dataA longitudinal examination of SIGITE conference submission data
A longitudinal examination of SIGITE conference submission data
 
Web Security
Web SecurityWeb Security
Web Security
 
Is Human Flourishing in the ICT World of the Future Likely?
Is Human Flourishing in the ICT World of the Future Likely?Is Human Flourishing in the ICT World of the Future Likely?
Is Human Flourishing in the ICT World of the Future Likely?
 
Constructing a Contemporary Textbook
Constructing a Contemporary TextbookConstructing a Contemporary Textbook
Constructing a Contemporary Textbook
 
CSS: Introduction
CSS: IntroductionCSS: Introduction
CSS: Introduction
 
HTML: An Introduction
HTML: An IntroductionHTML: An Introduction
HTML: An Introduction
 
How the Web Works
How the Web WorksHow the Web Works
How the Web Works
 
Art and Culture - Module 11 - Enlightenment
Art and Culture - Module 11 - EnlightenmentArt and Culture - Module 11 - Enlightenment
Art and Culture - Module 11 - Enlightenment
 

Último

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Último (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Teaching Software Design Using Multi-Platform Development

  • 1. Complecto Mutatio : Teaching Software Design Best Practices Using Multi-Platform Development Randy Connolly Dept. Computer Science & Info Systems Mount Royal College Calgary, AB, T2N 0Z6 403 440 6061 [email_address]
  • 2. “ Observe always that everything is the result of change, and get used to thinking that there is nothing Nature loves so well as to change existing forms and to make new ones like them.” -- Marcus Aurelius, Meditations iv 36. “ Software changes its own requirements.” -- Ken Beck, Extreme Programming Explained .
  • 3. Of course, today's developers are generally less concerned with barbarian incursions and unruly Praetorian Guards … … and more concerned with shifting requirements and fast-approaching deadlines.
  • 4. “ Observe always that everything is the result of change, and get used to thinking that there is nothing Clients loves so well as to change existing Windows Forms and to make new ones like them.” -- Randy Connolly, Software Developer Meditations , ix
  • 5. Many authors on software design have noted the ubiquity of change in the typical software project.
  • 6. One high-profile study, for instance, showed that business rules for a typical software project changed at the rate of 8% per month. Another study indicated that over 40% of requirements arrive only after development is well under way. “ Managing the effect of changing requirements remains one of the greatest challenges of enterprise software development .” ( Datta and Engelen, 2006)
  • 7. The ubiquitous nature of change in the software development world is the principal reason for the decline in commitment to waterfall development models and the concomitant rise in interest in iterative and agile methodologies.
  • 8. Indeed, the subtitle of one of the key texts in the field of iterative development is the English equivalent of the Latin in the title of this paper: Embrace Change . As Craig Larmann has noted, rather than fight inevitable change, developers should use a process that acknowledges “ change and adaptation as unavoidable and indeed essential drivers”
  • 9. Yet despite the current wide-spread use of iterative approaches in real-world software development … … the essential ingredient of change can be difficult to add into a typical one semester course. … and the attempt by many teachers to integrate these more agile processes into computer science education …
  • 10. As a result, most programming assignments end up being formulated using a waterfall based approach (i.e., fixed requirements by a set date) This is a particularly unfortunate shortcoming since the value of many of the most important object-oriented design precepts can only be appreciated in a project that is undergoing a certain amount of change .
  • 11.
  • 12. This rest of this presentation details my attempt to integrate changing requirements into two semester-long development projects. In one version of the course, the project was a restaurant browsing application. In the other, the project was a game.
  • 13. The projects were in a third-year course on Windows development that uses C# and Windows Forms within Microsoft’s .NET Framework. This course is somewhat analogous to a capstone course in that it is meant to integrate the development knowledge and experience gained by the students over the three years of the program.
  • 14. In one version of this course, students had to create a board game/simulator. In this game, the player creates an army of one or more units that battles the computer’s units. Each unit contains warriors of a specific type (e.g., knights, pirates, trolls, etc).
  • 15. I have frequently used game projects in this course. The principal benefit of game projects is that they provide an ideal context for teaching the more “higher-order” and abstract software development topics such as architecture, design patterns, and software methodology.
  • 16. One caution, however, … if there are females in the class … … you may hope to get this …
  • 17. … but you might end up with this … At any rate, in the game section of the course, the student body was entirely male.
  • 18. In the other version of the course, the development project was a restaurant browsing and ordering application. It used the gargantuan open source chef moz (http://chefmoz.org) XML dining guide files.
  • 19.
  • 23. The rationale for this approach was mentioned in the introduction: namely, to give the students exposure to the kind of requirements change encountered in most real-world projects. While there were numerous changes in the course project, it was not total chaos. For all four milestones, the students used C#, the Microsoft .NET Framework, and Visual Studio. And, most importantly, most of the students’ work in one milestone could hopefully be migrated to the next milestone.
  • 24. Indeed, it was in the second milestone that the students became truly appreciative of the general object-oriented principle that one should separate that which varies … … from that which stays the same
  • 25. In order to adapt their milestones to these different user-interface platforms … … the students were forced to refactor their initial milestone in order to make future transitions less time-consuming.
  • 26. Almost without exception, in the first milestone students intertwined user interface logic into their basic domain model … As a result, the students were given the choice to instead use the instructor’s solution to the first milestone, which did in fact separate the domain logic and the user interface logic into two distinct layers . … and were faced with spending time eliminating the console user interface elements from their design.
  • 27. What is a layer ? A layer is simply a group of classes that are functionally or logically related. Using layers is a way of organizing your software design into groups of classes that fulfill a common purpose. Thus a layer is not a thing, but an organizing principle .
  • 28. Many software developers have embraced layers as the organizing principal of their application designs. The goal of layering is to distribute the functionality of your software among classes so that the coupling of a given class to other classes is minimized. By organizing an application’s classes into layers, you hopefully end up with lower coupling than you otherwise might have without using layers as an organizing principle.
  • 29. The most important benefit of using layers is that the resulting application should be significantly more maintainable and adaptable by reducing the overall coupling in the application. If there is low coupling between the layers combined with high cohesion within a layer, a developer should be able to modify, extend, or enhance the layer without unduly affecting the rest of the application.
  • 30. I have taught the design principle of layers to my students in a variety of classes over the years. Until this course students typically echo this content back to me in exams relatively successfully but have a much harder time integrating it into their actual programming practice.
  • 31. To the students, layers (and perhaps other design best practices) often seem like an unnecessary burden for the typical one-month to two-month assignment. In this project by contrast, student attitudes towards design began to change due to their need to adapt software between platforms.
  • 32. By using the instructor’s domain layer, the students were able to more easily implement the user interface changes in the remaining milestones. The students, perhaps for the very first time, became receptive to the idea that proper design will actually save them time and effort .
  • 33. Surveyed student comments at the end of the course did seem to verify this impression. Over half the surveyed students indicated that the most important thing learned in the course was : “ spending time doing good design actually saved me time in the long run because I had to do less coding and debugging,” as one student noted.
  • 34. The payback for the additional design effort arrived in the fourth and final milestone. On the face of it, this milestone was quite intimidating. The students had to move their game to a completely different piece of hardware: a hand-held Pocket PC. Yet because the students were using the Compact .NET Framework, they were able to port their domain, data, and presentation helper layers with little or no change. The students only had to redesign and re-implement their presentation view layer in order to fit their project’s user interface into the constrained space and controls of the device.
  • 35. As a result, the final milestone was by far the easiest: most students reported that it only took a day to complete ! Certainly at this stage of the course the students had become true believers in the benefits of proper software design.
  • 36. For the very first time in my teaching experience … … students had not just memorized the design principles nor simply believed in them as an article of faith because the professor told them so.
  • 37. Instead, thanks to the multi-platform nature of their project… … the students had their own empirical evidence of the utility of design principles in managing requirement changes in a software project.
  • 39. It can be difficult to get students to fully appreciate the benefits of a proper software design. To appreciate the benefit of a proper design, students need to work on a project with substantially changing requirements. In such a project, students are able to see for themselves that proper design can save time and effort. For most assignments, proper design just seems to be an instructor-enforced hassle because it generally only increases the amount of work for the student in a given assignment.
  • 40. Randy Connolly Dept. Computer Science & Information Systems Mount Royal College, Calgary [email_address]