SlideShare a Scribd company logo
2
Most read
3
Most read
9
Most read
11/28/2024 Prof:Umme Ammara Tariq
Code Re-Structuring
(Code-Refactoring)
11/28/2024 Prof:Umme Ammara Tariq
key points:
• Code restructuring,Importance of Code Restructuring in
Software Engineering,
• 3 Common Scenarios that Require Code
Restructuring(Software Growth and Complexity,Adopting
New Technologies and Frameworks,Software
Modernization Efforts),
• Techniques for Code Restructuring
11/28/2024 Prof:Umme Ammara Tariq
Code Re-Structuring:
• Code restructuring is a critical process in software engineering
that includes modifying existing code to enhance its structure,
organization, and efficiency while ensuring the code retains its
intended functionality.
• Why we do?
• The restructuring process is often performed to address various
issues such as code complexity, maintenance difficulties, poor
readability, performance issues, and scalability limitations. The
process makes small, targeted changes to the codebase,
ensuring that each modification maintains the same functionality.
11/28/2024 Prof:Umme Ammara Tariq
Importance of Code Restructuring in
Software Engineering
• improves its readability by applying consistent formatting,
removing redundant or necessary code, and organizing it
in a logical and cohesive manner.
• It simplifies code complexity by employing design
patterns, refactoring techniques, and appropriate
abstractions.
• the code to be updated, new features and functionality
can be added without causing widespread impact or
introducing unintended consequences.
11/28/2024 Prof:Umme Ammara Tariq
Understanding of code restructuring:
• Code restructuring allows developers to reevaluate the
system’s architecture, identify areas of improvement, and
apply design patterns and principles to enhance the
overall structure. This fosters collaboration, reduces
conflicts during code integration, and improves team
productivity.
11/28/2024 Prof:Umme Ammara Tariq
3 Common Scenarios that Require Code
Restructuring:
1. Software Growth and Complexity
As software systems evolve and are updated with updated features,
they grow in size and complexity. This can lead to changes and
additions to the codebase that become difficult to monitor and
comprehend.
2. Adopting New Technologies and Frameworks
When software teams adopt updated technologies, programming
languages, or frameworks, the existing codebase may not align with
the updated standards and best practices of the adopted technology
11/28/2024 Prof:Umme Ammara Tariq
3. Software Modernization Efforts
• In the process of modernizing software, legacy systems
are upgraded to modern architectures. Legacy systems
may have outdated code, use obsolete technologies, and
lack modern features. Code restructuring plays a critical
role in modernization efforts by transforming the legacy
code into a modern efficient, and maintainable form.
11/28/2024 Prof:Umme Ammara Tariq
4 Techniques for Code Restructuring
1. Refactoring:
• Extracting methods: Breaking down long and complex
methods into smaller, reusable units to enhance code
readability and modularity.
• Variable renaming: Choosing meaningful and
descriptive names for variables, functions, and classes to
improve code clarity.
• Simplifying complex expressions: Breaking down
complex expressions into simpler ones to improve
readability and maintainability.
11/28/2024 Prof:Umme Ammara Tariq
2.Decomposition:
• Decomposition involves breaking down complex
codebases into smaller components, such as modules,
packages, classes, and interfaces. The technique
enhances code organization, maintainability, and
reusability.
• By separating concerns into distinct components,
developers can work on individual parts of the codebase
independently, reducing code dependencies and
improving collaboration among team members.
11/28/2024 Prof:Umme Ammara Tariq
3. Consolidations:
• Consolidations aim to reduce code duplication and
eliminate code smells. Code duplication often leads to
maintenance issues and increases bug introduction
chances. Techniques for consolidation include extracting
common code blocks into reusable functions or libraries,
streamlining conditional statements, and removing
maintainability, and overall software quality.
11/28/2024 Prof:Umme Ammara Tariq
4. Optimization
• Optimization techniques emphasize improving codebase
performance and efficiency. The process involves
analyzing and optimizing algorithms, leveraging
appropriate data structures, and implementing caching
mechanisms where applicable.
11/28/2024 Prof:Umme Ammara Tariq
Migration to Object Oriented platforms
• Moving from procedural programming to object oriented
programing.
• Procedural programming.
• Object oriented Programming.
11/28/2024 Prof:Umme Ammara Tariq
Procedural programming:
• Procedural programming follows a top-down approach.
• Procedural Programming divides the program into small
programs and refers to them as functions.
• Procedural programming is less secure as compare to
OOPs.
• C, BASIC, COBOL, Pascal, etc. are the examples POP
languages.
11/28/2024 Prof:Umme Ammara Tariq
Object Oriented Programming
• Object-oriented programming follows a bottom-up
approach. There is no access specifier in procedural
programming. Object-oriented programming has access
specifiers like private, public, protected, etc.
• Object Oriented Programming divides the program into
small parts and refers to them as objects.
• C++, C#, Java, Python, etc. are the examples of OOP
languages.
11/28/2024 Prof:Umme Ammara Tariq
Why we migrated from procedural
language to OOP:
In procedural programming we face
• Lack of Modularity.
• Limited Code Reusability
• Difficulty in Managing State
• Poor Scalability
• Limited Support for Abstraction
• Difficulty in Code Maintenance
• Reduced Flexibility
11/28/2024 Prof:Umme Ammara Tariq
OOP
Modularity and Reusability:
• Advantage: OOP promotes modularity, allowing
developers to break down a system into smaller, self-
contained modules or classes. These modules can be
reused in different parts of the application or in other
projects.
11/28/2024 Prof:Umme Ammara Tariq
11/28/2024 Prof:Umme Ammara Tariq
Encapsulation:
• Advantage: Encapsulation hides the internal details of an
object and exposes only what is necessary. This reduces
complexity and makes it easier to understand and
maintain the code.
• Benefit: Improved code organization and maintenance.
11/28/2024 Prof:Umme Ammara Tariq
Abstraction:
• Advantage: Abstraction allows developers to focus on
essential features of an object while ignoring unnecessary
details. This simplifies the development process and
enhances code readability.
• Benefit: Clearer, more concise code that aligns with real-
world entities.
11/28/2024 Prof:Umme Ammara Tariq
Inheritance:
• Advantage: Inheritance enables the creation of new
classes by inheriting attributes and behaviors from
existing classes. This promotes code reuse and helps in
building a hierarchy of classes.
• Benefit: Hierarchical organization of code for improved
scalability and extensibility.
11/28/2024 Prof:Umme Ammara Tariq
Polymorphism:
• Advantage: Polymorphism allows objects to be treated as
instances of their parent class, providing a level of
flexibility in designing and implementing solutions.
• Benefit: Enhanced adaptability and the ability to work with
different types of objects through a common interface.
11/28/2024 Prof:Umme Ammara Tariq
Community Support and
Standardization:
• Advantage: Many widely used programming languages,
frameworks, and libraries are built on OOP principles.
• Benefit: Access to a large ecosystem of resources,
community support, and standardized practices.

More Related Content

PPTX
jahnavi oops ppt.ppx object oriented programming
PPTX
Inventory and manufacturing system migration - case study
PDF
Peripheral Libraries and Drivers for Microcontrollers: A Comprehensive Survey
PPTX
Middleware Technologies
PPTX
Middle ware Technologies
PPTX
PCC-202-COM -OOP and CG (2024 Pattern).pptx
PPTX
01- Lecture -Introduction to IT Agile Development.
PPTX
Lecture 5 reusability
jahnavi oops ppt.ppx object oriented programming
Inventory and manufacturing system migration - case study
Peripheral Libraries and Drivers for Microcontrollers: A Comprehensive Survey
Middleware Technologies
Middle ware Technologies
PCC-202-COM -OOP and CG (2024 Pattern).pptx
01- Lecture -Introduction to IT Agile Development.
Lecture 5 reusability

Similar to Code Restructuring in Software Engineering.pptx (20)

PPT
16613874-Object-Oriented-Programming-Presentation.ppt
PPTX
Basic Concept of Object oriented Programming
PPTX
Coding_Guidelines for the better and maintainable coding
PPT
Coding
PPTX
software enginerring project models e.g (waterfall)
PDF
15 Popular Test Automation Frameworks and How to Choose One.pdf
PPT
PPTX
Journey to Forge Mastery: Part 1 - Webinar on building a Forge component usi...
PDF
Software Engineering Practice - Configuration management
PDF
Prominent Back-end frameworks to consider in 2022!
PDF
agile refactoring and integration techniques.pdf
PPTX
agile modeling in project management.pptx
PPTX
2c73sjdjddjdjdjfjfkekxnkawk22cdf3443f75.pptx
PPTX
Domain and Reuse Engineering.pptx
PDF
Chapter 2 of advanced Software Process.pdf
DOC
CV - Rakesh Sharma
DOC
Mannu_Kumar_CV
PDF
A Comparative Study of Forward and Reverse Engineering
PPTX
An intro to building an architecture repository meta model and modeling frame...
16613874-Object-Oriented-Programming-Presentation.ppt
Basic Concept of Object oriented Programming
Coding_Guidelines for the better and maintainable coding
Coding
software enginerring project models e.g (waterfall)
15 Popular Test Automation Frameworks and How to Choose One.pdf
Journey to Forge Mastery: Part 1 - Webinar on building a Forge component usi...
Software Engineering Practice - Configuration management
Prominent Back-end frameworks to consider in 2022!
agile refactoring and integration techniques.pdf
agile modeling in project management.pptx
2c73sjdjddjdjdjfjfkekxnkawk22cdf3443f75.pptx
Domain and Reuse Engineering.pptx
Chapter 2 of advanced Software Process.pdf
CV - Rakesh Sharma
Mannu_Kumar_CV
A Comparative Study of Forward and Reverse Engineering
An intro to building an architecture repository meta model and modeling frame...
Ad

Recently uploaded (20)

PDF
Lecture1.pdf buss1040 uses economics introduction
PPTX
Session 11-13. Working Capital Management and Cash Budget.pptx
PPTX
OAT_ORI_Fed Independence_August 2025.pptx
PPTX
Maths science sst hindi english cucumber
PPT
KPMG FA Benefits Report_FINAL_Jan 27_2010.ppt
PDF
Bitcoin Layer August 2025: Power Laws of Bitcoin: The Core and Bubbles
PDF
Pitch Deck.pdf .pdf all about finance in
PDF
1a In Search of the Numbers ssrn 1488130 Oct 2009.pdf
PDF
Chapter 9 IFRS Ed-Ed4_2020 Intermediate Accounting
PPTX
Session 14-16. Capital Structure Theories.pptx
PDF
ECONOMICS AND ENTREPRENEURS LESSONSS AND
PDF
How to join illuminati agent in Uganda Kampala call 0782561496/0756664682
PDF
discourse-2025-02-building-a-trillion-dollar-dream.pdf
PPT
E commerce busin and some important issues
PDF
Predicting Customer Bankruptcy Using Machine Learning Algorithm research pape...
DOCX
BUSINESS PERFORMANCE SITUATION AND PERFORMANCE EVALUATION OF FELIX HOTEL IN H...
PDF
Why Ignoring Passive Income for Retirees Could Cost You Big.pdf
PPTX
How best to drive Metrics, Ratios, and Key Performance Indicators
PPTX
EABDM Slides for Indifference curve.pptx
PDF
Unkipdf.pdf of work in the economy we are
Lecture1.pdf buss1040 uses economics introduction
Session 11-13. Working Capital Management and Cash Budget.pptx
OAT_ORI_Fed Independence_August 2025.pptx
Maths science sst hindi english cucumber
KPMG FA Benefits Report_FINAL_Jan 27_2010.ppt
Bitcoin Layer August 2025: Power Laws of Bitcoin: The Core and Bubbles
Pitch Deck.pdf .pdf all about finance in
1a In Search of the Numbers ssrn 1488130 Oct 2009.pdf
Chapter 9 IFRS Ed-Ed4_2020 Intermediate Accounting
Session 14-16. Capital Structure Theories.pptx
ECONOMICS AND ENTREPRENEURS LESSONSS AND
How to join illuminati agent in Uganda Kampala call 0782561496/0756664682
discourse-2025-02-building-a-trillion-dollar-dream.pdf
E commerce busin and some important issues
Predicting Customer Bankruptcy Using Machine Learning Algorithm research pape...
BUSINESS PERFORMANCE SITUATION AND PERFORMANCE EVALUATION OF FELIX HOTEL IN H...
Why Ignoring Passive Income for Retirees Could Cost You Big.pdf
How best to drive Metrics, Ratios, and Key Performance Indicators
EABDM Slides for Indifference curve.pptx
Unkipdf.pdf of work in the economy we are
Ad

Code Restructuring in Software Engineering.pptx

  • 1. 11/28/2024 Prof:Umme Ammara Tariq Code Re-Structuring (Code-Refactoring)
  • 2. 11/28/2024 Prof:Umme Ammara Tariq key points: • Code restructuring,Importance of Code Restructuring in Software Engineering, • 3 Common Scenarios that Require Code Restructuring(Software Growth and Complexity,Adopting New Technologies and Frameworks,Software Modernization Efforts), • Techniques for Code Restructuring
  • 3. 11/28/2024 Prof:Umme Ammara Tariq Code Re-Structuring: • Code restructuring is a critical process in software engineering that includes modifying existing code to enhance its structure, organization, and efficiency while ensuring the code retains its intended functionality. • Why we do? • The restructuring process is often performed to address various issues such as code complexity, maintenance difficulties, poor readability, performance issues, and scalability limitations. The process makes small, targeted changes to the codebase, ensuring that each modification maintains the same functionality.
  • 4. 11/28/2024 Prof:Umme Ammara Tariq Importance of Code Restructuring in Software Engineering • improves its readability by applying consistent formatting, removing redundant or necessary code, and organizing it in a logical and cohesive manner. • It simplifies code complexity by employing design patterns, refactoring techniques, and appropriate abstractions. • the code to be updated, new features and functionality can be added without causing widespread impact or introducing unintended consequences.
  • 5. 11/28/2024 Prof:Umme Ammara Tariq Understanding of code restructuring: • Code restructuring allows developers to reevaluate the system’s architecture, identify areas of improvement, and apply design patterns and principles to enhance the overall structure. This fosters collaboration, reduces conflicts during code integration, and improves team productivity.
  • 6. 11/28/2024 Prof:Umme Ammara Tariq 3 Common Scenarios that Require Code Restructuring: 1. Software Growth and Complexity As software systems evolve and are updated with updated features, they grow in size and complexity. This can lead to changes and additions to the codebase that become difficult to monitor and comprehend. 2. Adopting New Technologies and Frameworks When software teams adopt updated technologies, programming languages, or frameworks, the existing codebase may not align with the updated standards and best practices of the adopted technology
  • 7. 11/28/2024 Prof:Umme Ammara Tariq 3. Software Modernization Efforts • In the process of modernizing software, legacy systems are upgraded to modern architectures. Legacy systems may have outdated code, use obsolete technologies, and lack modern features. Code restructuring plays a critical role in modernization efforts by transforming the legacy code into a modern efficient, and maintainable form.
  • 8. 11/28/2024 Prof:Umme Ammara Tariq 4 Techniques for Code Restructuring 1. Refactoring: • Extracting methods: Breaking down long and complex methods into smaller, reusable units to enhance code readability and modularity. • Variable renaming: Choosing meaningful and descriptive names for variables, functions, and classes to improve code clarity. • Simplifying complex expressions: Breaking down complex expressions into simpler ones to improve readability and maintainability.
  • 9. 11/28/2024 Prof:Umme Ammara Tariq 2.Decomposition: • Decomposition involves breaking down complex codebases into smaller components, such as modules, packages, classes, and interfaces. The technique enhances code organization, maintainability, and reusability. • By separating concerns into distinct components, developers can work on individual parts of the codebase independently, reducing code dependencies and improving collaboration among team members.
  • 10. 11/28/2024 Prof:Umme Ammara Tariq 3. Consolidations: • Consolidations aim to reduce code duplication and eliminate code smells. Code duplication often leads to maintenance issues and increases bug introduction chances. Techniques for consolidation include extracting common code blocks into reusable functions or libraries, streamlining conditional statements, and removing maintainability, and overall software quality.
  • 11. 11/28/2024 Prof:Umme Ammara Tariq 4. Optimization • Optimization techniques emphasize improving codebase performance and efficiency. The process involves analyzing and optimizing algorithms, leveraging appropriate data structures, and implementing caching mechanisms where applicable.
  • 12. 11/28/2024 Prof:Umme Ammara Tariq Migration to Object Oriented platforms • Moving from procedural programming to object oriented programing. • Procedural programming. • Object oriented Programming.
  • 13. 11/28/2024 Prof:Umme Ammara Tariq Procedural programming: • Procedural programming follows a top-down approach. • Procedural Programming divides the program into small programs and refers to them as functions. • Procedural programming is less secure as compare to OOPs. • C, BASIC, COBOL, Pascal, etc. are the examples POP languages.
  • 14. 11/28/2024 Prof:Umme Ammara Tariq Object Oriented Programming • Object-oriented programming follows a bottom-up approach. There is no access specifier in procedural programming. Object-oriented programming has access specifiers like private, public, protected, etc. • Object Oriented Programming divides the program into small parts and refers to them as objects. • C++, C#, Java, Python, etc. are the examples of OOP languages.
  • 15. 11/28/2024 Prof:Umme Ammara Tariq Why we migrated from procedural language to OOP: In procedural programming we face • Lack of Modularity. • Limited Code Reusability • Difficulty in Managing State • Poor Scalability • Limited Support for Abstraction • Difficulty in Code Maintenance • Reduced Flexibility
  • 16. 11/28/2024 Prof:Umme Ammara Tariq OOP Modularity and Reusability: • Advantage: OOP promotes modularity, allowing developers to break down a system into smaller, self- contained modules or classes. These modules can be reused in different parts of the application or in other projects.
  • 18. 11/28/2024 Prof:Umme Ammara Tariq Encapsulation: • Advantage: Encapsulation hides the internal details of an object and exposes only what is necessary. This reduces complexity and makes it easier to understand and maintain the code. • Benefit: Improved code organization and maintenance.
  • 19. 11/28/2024 Prof:Umme Ammara Tariq Abstraction: • Advantage: Abstraction allows developers to focus on essential features of an object while ignoring unnecessary details. This simplifies the development process and enhances code readability. • Benefit: Clearer, more concise code that aligns with real- world entities.
  • 20. 11/28/2024 Prof:Umme Ammara Tariq Inheritance: • Advantage: Inheritance enables the creation of new classes by inheriting attributes and behaviors from existing classes. This promotes code reuse and helps in building a hierarchy of classes. • Benefit: Hierarchical organization of code for improved scalability and extensibility.
  • 21. 11/28/2024 Prof:Umme Ammara Tariq Polymorphism: • Advantage: Polymorphism allows objects to be treated as instances of their parent class, providing a level of flexibility in designing and implementing solutions. • Benefit: Enhanced adaptability and the ability to work with different types of objects through a common interface.
  • 22. 11/28/2024 Prof:Umme Ammara Tariq Community Support and Standardization: • Advantage: Many widely used programming languages, frameworks, and libraries are built on OOP principles. • Benefit: Access to a large ecosystem of resources, community support, and standardized practices.