Simple_Application_Framework_for_VCL[3]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 zblue78 的 blog

application framework. why do i need it?

borland has introduced into the vcl library many useful classes to help us build windows form applications fast and perfectly. so why should we add another layer to our code? there was a time when i did not even think about such things.

almost 10 years ago, i joined a company that developed contact and sales management systems. at that time, they used vb+ms sql for their development. however, a month after i joined, borland released delphi 1, the first rad tool with a true object oriented language. it was decided to use delphi for the next large project. we were really excited about it. we decided that we would have one application for all our modules, so we could reuse our code better. we were young. most of us, including me, had just graduated from university. we worked like mad dogs coding dozens and dozens of specs for different modules. everything went well, until we started to test our application in the real environment. suddenly, we found that fixing bugs was not such an easy task as we had thought. fixing a bug in one module was producing several bugs in other modules. coding new modules was taking more and more time. the logic of our menu/toolbar system that were using for dozens of different modules became a complete nightmare. nobody was able to understand it since it contained a lot of "case/switch" operations, loads of "if" statements etc. we were only able to finish the project by everybody putting in enormous amounts of personal time. when the project finished (it took about a year) everybody was extremely tired and exhausted. most of the developers left the company for a vacation and never came back!

i will lie if i say that we only had problems because we did not use an application framework. there were a lot of mistakes made during the project. i guess we made nearly all the possible mistakes that could be made while working on a software project. of course we never improved our code. automatic tests - what were they? at that time, we had not heard about them and we hardly did any testing at all. everybody only cared about their own modules and the shared code was a real mess. i could go on, but i'm sure you know what i'm saying.

however, i know for sure that not having application framework is one of the main reasons we had problems during development that could have been resolved fairly easily. when the project was almost finished, i found time and looked at the most of the modules. i was pretty surprised. much of the required functionality of every module was quite common, although it had been implemented in different ways.

the next time i participated in a similar project, i pushed everybody to spend several days on creating a very simple framework. it allowed us:

to add/remove modules by adding/removing one line of code
to share common functionality between modules
unify menu/toolbars usage.

本文关键:Simple_Application_Framework_for_VCL
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top