Sometimes on the enter in Delphi that holds lots of data, and that i question which method is the greatest in order to save it to file for. Now we use records and "file of" in order to save it but It ought to be better techniques. I'd should you prefer a system that causes it to be simple to migrate in the system we use now.

EDIT: The applying is really a kind of a database application. The consumer utilize it to handle data.

It is dependent around the data! Common means are databases (rows of plenty of records), XML (structured data storage), ini files (simple data) or custom formats (graphic images etc). Delphi is excellent with databases, with a variety of 3rd party choices to allow fully put together-in code, so for general data they are effective well.

You will find several choices. If you are sure you won't ever require more the other user, I'd choose ClientDatasets held in XML. Serta Miser has written a couple of articles about the subject that work great. If you're not sure you'll need a number of customers later on I'd choose an embedded database. Firebird is a great option for your. See http://www.firebirdsql.org/manual/fbmetasecur-embedded.html to learn more. With similar code you'll have the ability to create a Multi user version later on.

If it's a type of a database application, storing the information inside a database may be the logical choice.

One alternative approach is always to make use of a streamer:

procedure TmyThing.PutData(AFile: String);
var
  writer: TWriter;
  stream: TFileStream;
begin
  stream := TFileStream.Create(AFile, fmCreate);
  try
    writer := TWriter.Create(stream, $ff);
    try
      with writer do
      begin
        WriteSignature;         {marker to indicate a Delphi filer object file.}
        WriteListBegin;         {outer list marker}
        WriteFloat(cVersion);   {write the version for future use}
        WriteString(someProperty);
        {... etc. ...}
        WriteListEnd;           {outer list marker}
      end;
    finally
      writer.Free;
    end;
  finally
    stream.Free;
  end;
end;

For any simple application, why don't you make use of a local TclientDataset? It might allow searching, sorting, and using the database controls. Should you include midaslib inside your uses clause, you may also deploy the applying with no exterior dll's.

Also is dependent on what you would like related to it after you have saved it... could it be just storage of 'archived' data at this time ? Or would you like to search it, locating a few of the data sooner or later later on then saving it again (potentially transformed), or would you load everything in, manipulate it in some manner, then save it then back out again ?

var

 FileStream: TFileStream;


procedure TForm1.Load(Sender: TObject);

Begin

if FileExists ('Thing2.dat') then

      Begin             
      FileStream := TFileStream.Create('Thing2.dat', fmOpenRead);
      FileStream.ReadComponent( {Thing like Edit1} );
      FileStream.Free;
      End;
end;

procedure TForm1.Save(Sender: TObject);

Begin



 FileStream := TFileStream.Create('Thing2.dat', fmcreate);

 FileStream.WriteComponent(  {Thing like Edit1}   );

 FileStream.Free;



end;