Subscribe by Email


Showing posts with label Code restructuring. Show all posts
Showing posts with label Code restructuring. Show all posts

Sunday, June 17, 2012

Data Restructuring - An activity involved in software re-engineering process model

Software re- engineering process model constitutes of the below mentioned 6 major  steps:
  1. Inventory analysis
  2. Documentation reconstruction
  3. Reverse engineering
  4. Code re- structuring
  5. Data re- structuring
  6. Forward engineering
In this article we have discussed about the 5th stage of the software re- engineering process model i.e., the data re- structuring. 
Without a working code or an active flow of data a software system or application cannot be considered to be working. Therefore for the software systems and applications which have become outdated should be again brought up to the current acceptable software standards and data re- structuring is the one of the processes that can help in this regard. 


- This step of software re- engineering process model takes into consideration the restructuring of the data without making changes to the functionality of the software system or application. 
- With the re- structuring of data, the maintenance of the whole software system or application becomes so very easy. 
- The need to re- structure data arises when the data bases become too obsolete to be handled directly. 
- When the changes made to the data are confined only to the sub system, the data of the sub system needs to be re- structured. 
- The data re- structuring becomes even easier when the data re- structuring tools are easily available. 
- This step is carried out after the completion of the code re- structuring. 
- Unlike the previous re- structuring step, this step calls for a full cycle of reverse engineering. 
- The current structure of the data is dissected while defining the data models and the existing data models are run through a quality check or review test.
- So many of the legacy systems tend to make use of the global data structures and shared tables in order to save the memory space.
- Such shared data structures need to be converted in to objects like ADTs for restructuring. 



Benefits of Data Re-structuring


One of the benefits of restructuring the data is that it certainly improves the quality of the software program or application. 
- Furthermore, it becomes easier to test and debug the software system or application along with a reduction in the efforts in the maintenance of the software and also the frustration of the developer is reduced. 
- As a bonus point, the productivity is also improved. 



Steps in Data Re-structuring


The re- structuring of the data involves the following steps:
  1. Analysis of the source code of the application.
  2. Redesigning of the data
  3. Standardization of the data record.
  4. Rationalization of the data name.
  5. Translation of the file or data base.

Drawbacks of Data Restructuring


In spite of having so much plus points, the re- structuring does have some minus points which have been listed below:
  1. Re- structuring does not improve the understandability of the data driven programs.
  2. Re- structuring demands for heavy computations.
  3. Re- structuring can lead to a loss of source code comments.
  4. Restructuring does not helps with the problems with poor modularization i.e., the programs in which the components are wide spread through out the program.
  5. Restructuring can lead to the loss of documentation.
From the discussion above, we can say the restructuring of data is a process that re –structures the source data in to the target data during the transformation process. 
Data re- structuring forms an integral part of the software re- engineering process model and therefore the above mentioned disadvantages of the data re- structuring are ignored. It is necessary that the data re- structuring is carried out after the code re- structuring since during the execution of the program, the code only handles the flow of the data. Therefore if the code itself has not been re- structured before re- structuring the data then the whole process does not makes any sense. 


Saturday, June 16, 2012

Code Restructuring - An activity involved in software re-engineering process model

As we know “Software re- engineering process model” is a model that has been used over the years to improvise the already existing poor code that is no longer accepted.  The poor code is restructured to meet the current standards of software engineering. This model consists of 6 basic steps as mentioned below:
  1. Inventory analysis
  2. Documentation reconstruction
  3. Reverse engineering
  4. Code re- structuring
  5. Data re- structuring
  6. Forward Engineering
This article is dedicated to the discussion regarding the fourth stage of the software re- engineering process model i.e., the code reconstruction. 



What is meant by Code Reconstruction?


- The code restructuring process involves analyzation of the source code. 
- The violations of the programming practices are noted down and later repaired. 
- The revised code is then reviewed and subjected to extensive testing. 
-Firstly, in this stage the program files that are executable are identified with the consultation of the person in the company who is intimate enough with the knowledge of the files and can grant some logic to their existence. 
- Next step, in this stage is the verification of the identified and setting up of the baseline. 
This step requires a lot of investigative work since the executable might have been affected by a lot of factors. 
- The code is verified using the sample input data or test files.
- The baseline for the executable is formed by documented data files and source code files. 
Now the developer who holds the responsibility to re- engineer the code, needs to familiarize himself with the existing code and figure how is going to re- engineer it. 
- He then carries out several walk-throughs and code reviews under many different conditions with its users.
- At this stage, the developer is free to introduce comments in to the code as per its re- structuring needs.
- Other requirements can be stated in the project log. 
- It is very common for the developer to encounter bugs at this stage. 
- The developer needs to discuss with the client and figure out a way of dealing with the bugs. 
- Next follows the identification of the requirements of the process like:
  1. Commenting the code.
  2. Modularity of the code.
  3. Documentation of the code.
  4. Enhancement of the code.
  5. Removal of the unused or unnecessary code.
  6. Removal of the duplicate code.
  7. Removal of duplicate parameters.
  8. Porting of the code to another platform.
  9. Enhancement of the user interface.
  10. Defining the language standard of the code.
  11. Conversion of the code in to an alternative development language.
  12. Improvement and maintenance of the performance.
  13. Optimization of the code.
  14. Improvising the internal error handling capacity of the code.
  15. Inclusion of additional functionality.
  16. Fixing the existing bugs.
  17. Implementing alternate third party products.

More about Code Restructuring


- The code is restructured in identifiable phases i.e., the original code is re- engineered in the phases that have been identified. 
- The software tools here may be helpful in the investigation of the code coverage, unused variables, hot spots, coding standards and so on. 
- Apart from these, manual inspections can also help a big deal in identification and removal of the duplicated and false code, collate parameter definitions and optimize the array storage. 
- On an overall basis, restructuring of the code greatly improves its performance. 
- Even the simplest of the “not so obvious” issue can significantly affect the performance of the code like accessing of the data. 
- Different languages have their own way of storing arrays. 
- Therefore, the way that is used to access this data can hamper the performance to a great extent without coming to the knowledge of the developer. 
- Lastly, the code is tested after the completion of the restructuring. 


Wednesday, September 16, 2009

Restructuring Concepts

Software restructuring modifies source code and/or data in an effort to make it amenable to future changes. In general, restructuring does not modify the overall program architecture. It tends to focus on the design details of individual modules and on local data structures defined within modules. Reasons for restructuring :

1. The current code would have reached a stage where it is impossible to do any more modifications without breaking something else.
2. The requirements have changed so much that the current architecture/design cannot handle it without a redesign.
3. The current application doesn’t/will not scale, perform well enough as it wasn’t designed to handle the current load/anticipated growth.
4. The folks who worked on the code are no longer there and nobody knows what the code really does.
5. You don’t really like the current way it is implemented and think that there is a better way to do it using framework X or library Y.

Code Restructuring :
It is performed to yield a design that produces the same function as the original program but with higher quality. In general, code restructuring techniques model program logic using Boolean algebra and then apply a series of transformation rules that yield restructured logic. A resource exchange diagram maps each program module and the resources that are exchanged between it and other modules. By creating representations of resource flow, the program architecture can be restructured to achieve minimum coupling among modules.

Data Restructuring :
Before data restructuring begins, a reverse engineering activity called analysis of source code must be conducted. Once the data analysis is done, data redesign commences. A data record standardization step clarifies data definitions to achieve consistency among the data item names or physical record formats within an existing data structure or file format. Another form of redesign, called data name rationalization ensures that all data naming conventions conform to local standards and that aliases are eliminated as data flow through the system. When restructuring moves beyond standardization and rationalization, physical modifications to existing data structures are made to make the data design more effective.


Facebook activity