Wednesday, June 21, 2006

Modular Application Development

In the earlier days, programs were primarily structured. The spagetti code style of old Fortran and Basic were replaced by the structured programming style of C language. But this didn't solve all the problems of the programmers. As the code got bigger, writing code and maintaining the code also became very difficult. Imagine a single C file containing tens of thousands of code with thousands of function modules! Perhaps, it needs a few people to be assigned explicitly to maintain the code alone! Well, then came the Object Oriented Programming style. This proved to be a great solution to maintain the complexity of the coding and code maintanence.

Thousands of functions were split into thousands of classes. This also provided the application programmer the ability to reuse the code with restricted access. Accessing a public method of a class while maintaining the abstractions implemented with the private methods. This proved to be a great gift to the programmers.

So, we try to develop an application with this Object Oriented Programming style. We come across lot of difficulties when developing an application. An application development is surely a different experience altogether when compared to writing simple standalone files.

To start with, any application needs an installer. It needs a basic framework runtime environment where it can load and run the files. If you are planning to do this in an Object Oriented way, you might have to create thousands of class and use the methods provided by each other's APIs to create your application.

But think of application development in this way. You create a small module which performs some work. You make that a seperate executable entity. Once this is done, you can import this small module into your module to do that work for you. In this way, you keep developing small small modules which perform some work independently and finally as and when you need, you use these modules to create your application. This particular style of application development is called Modular Programming.

Being a Sun guy, I will encourage the usage of NetBeans. NetBeans provides you with skeleton application framework, that is , it provides all the basic functionalities required by any application like providing GUI, menu items, tool bars, etc. In addition to this, you need few clicks to create your module. The runtime environment needed by your application to run all the programs is provided by the NetBeans Infrastructure. All these makes the life of an application developer much much simpler. Above all, it is an open source product! Try it out! NetBeans link


  1. hi sk.. can this Modular programming which you have talked about in keeping java in mind be related to COM or TypeLib of .Net.. There too similar functionality is obtained..

    Next talking abt Netbeans! How do you say that it makes each event modularised!

  2. Hi vijesh,
    As for the modular programming, I was talking about creating a small pluggable module. This pluggable module can be plugged into a platform like netbeans. This reduces the amount of work needed to create a platform. For example, If you want to create a xml editor, you can write your netbeans module and plug it into netbeans. You dont have to worry about the platform. You can simply start with the editor features, like syntax highlighting , code completion, etc.
    As for the COM and other stuffs...forgive me...i'm not too familiar with microsoft technologies and terminologies