Things to keep in mind while upgrading a project
Upgrading a project has two meanings
1. The project is being upgraded from a previous version of the same programming language to the newer versoin.
2. The project is converted from an older programming language to a different programming language which is new.
This blog is all about the second point. This blog is also applicable if we are converting a project from one programming language to another.
Do not just convert:- The first point to remember if you are converting a project from one programming language to another is that you SHOULD NOT just convert. It is very easy to copy the code from the application, paste it to the IDE of the second language and just convert. But it should be the last thing which is expected from you as a programmer. If you are doing exactly this, you are not a good programmer (in my personal opinion).
First thing that you should keep in your mind when you are converting a project is that, the meaning of the task in your hand is very simple – You are going to write a software which is already written. You can run the old running application and see how it works. But don’t look into the code. Understand the business and follow the style of the new language. Apply whatever framework which is apt for the software, which is applicable to the language.
Reason for my argument for not JUST CONVERT:- The way a particular application can be written in two different programming language will be in two different ways. I will state one simple example –
Consider you are converting an application written ages back in C++ to .NET. Also consider that no table in the database that the application has a primary key (WTF?). If you want to do an update operation in the database, you will have inbuilt method called Post() which the framework provides you which handles the update process smoothly so that you may not want to worry about it, in C++. But if you are using .NET, you will have to write query to update – a query which takes care of everything that no duplication will occur and you need to take care of a long list of columns to make a row unique. If the update process consists of multiple rows, you might find yourself in trouble if you are using .NET and dealing with multiple columns to find a unique row. If anything goes wrong, the DB won’t allow you to save the info and there you can find yourself in trouble.
The above stated is just a single example. Different operations handled in an older programming language might not be safe to apply in the same way in our current language. The new language will have greater security measures to ensure that nothing goes wrong and to keep everything in control.
Things to communicate to the client:- Identify the areas in the existing code base which can be considered as obsolete. An example being – the above mentioned case of not having a primary key. In this case, a change in the DB design should be there. Identify those areas. Suggest new implementations. Convince the client that this is the right way to do things, now. Make the application most robust in every sense.
Time frame calculation:- Also the time frame calculation to complete this type of project is very crucial. It is utterly absurd to calculate the time based on the assumption that we have a code base, whatever be the programming language. It is always better to calculate the time frame by treating the application as a new one. In my personal opinion, calculate the time based on the requirements, and design and the initial stuffs, solely. Never ever assume that this is an existing application and a code base is also there.
Happy Coding.
I agree to your points Anish..
ReplyDeleteSomething I would add is for time frame calculations should be based on the complexity of the functionalities available in the existing application and never under the assumption that the code is already there, as you mentioned.
Also when using a new language for rewriting the old, make sure that you use all the good things in the new language and avoid all the bad things that where there with the old language.