[Lazarus] I desperately need some ideas of reducing edit, compile, debug cycle

Martin lazarus at mfriebe.de
Fri Nov 26 21:55:19 CET 2010


On 26/11/2010 19:56, Frank Church wrote:
>
> One thing that has always gottem to me when using Delphi and now 
> Lazarus is the tedious edit, compile, debug cycle. It has been growing 
> worse of late that now I am beginning to dread the whole process any 
> time I have to make some changes, especially when they are just minor 
> GUI changes.
....
>
> Quite simply I am thinking of a way to create the application in 
> parts, so that the parts containing the new functionality can be 
> developed separately as standalone programs, perhaps even console 
> programs.
>
> This raises the question of how procedure parameters and results can 
> be passed, and these are the options that have initially come to mind.
>
> 1. Find a way to automatically translate simple variables, record 
> structures, or objects into text and pass them via the command line or 
> pipes. Perhaps JSON, XML or simple name-value pairs can be used here. 
> Designing the parameters as TPersistent objects that are streamed into 
> text form may be a better option here.
>
> 2. Rather than using the command line, make them network services and 
> pass the parameters that way, or may make them RESTful/XML-RPC  with 
> all the new webby stuff( I am getting into some of that stuff now)
>
> 3. Design them as DLLs initially - I suspect that will bring along a 
> different set of problems.
>
> Once they are well tested I can incorporate them into the main 
> executables.

Yes splitting your project into parts is a good idea. Quite simple use 
packages.

Then you still have one application, you still can pass data around in 
the normal pascal way.

Each package can be tested with a small simple runner application, or 
even better a fully automated testcase.
Testcase are especially useful, if you can extract the functional layer 
from the visual layer.

So instead of writing something big into TForm.SaveDocumentButtonClick, 
you just have "TheDocument.Save" in there
  => all functionality goes into a none visual object TheDocument (or 
whatever it is in your case).
- this object takes instruction, if the user clicks something
- it can be asked what to display.
- it can be given callbacks, if it requires to notify the visual layer.
   for example it can have "OnTitleChange" => which is linked to a 
method changing the forms Caption (Title)
....

Martin





More information about the Lazarus mailing list