Last few years, there is a rise in open-source Delphi projects on GitHub. Many tech companies which utilize Delphi is publishing their code to GitHub to share their different solution for different problems in the software development business.
InstantObjects – this is the integrated framework for developing an object-oriented solution in Delphi. This framework enables the creation of applications based on persistent business objects. A business object is an object that has a set of properties and values, operations, and connections to other business objects. Business objects include business data and model business behavior.
InstantObject framework simplifies the process of realizing ideas into products, it shortens time-to-market and helps keep business focus. Since it is easy to integrate with the Delphi IDE, you can create business applications with it in no time.
InstantObjects offers:
- Model realization in the Delphi IDE via integrated two-way tools.
- Object persistence in the most common relational databases or flat XML-based files.
- Object presentation via standard data-aware controls.
- Serialization/Deserialization of object using delphi-neon library
When you install the framework from the GetIt Package Manager, you will get several demo applications for you to learn more about the use cases of the framework. And you can find more information about the framework on its wiki page.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
program IOConsoleDemo; {$APPTYPE CONSOLE} uses SysUtils, Model in 'Model.pas', InstantPersistence, InstantXML; {$R *.mdr} {Model} var ApplicationPath : string; Connection : TXMLFilesAccessor; Connector : TInstantXMLConnector; SimpleClass : TSimpleClass; Id : string; i : integer; begin ApplicationPath := ExtractFilePath(ParamStr(0)); Try //In every application the mdr file is normally included into the applications //by InstantObjects. //You can generate it at run-time calling, for example: //CreateInstantModel; //You read it from disk, for example: //InstantModel.LoadFromFile(ApplicationPath+'MinimalModel.xml'); //Connect to database Connection := nil; Connector := nil; Try Connection := TXMLFilesAccessor.Create(nil); Connection.RootFolder := ApplicationPath+'XMLStorage'; Connector := TInstantXMLConnector.Create(nil); Connector.Connection := Connection; Connector.LoginPrompt := False; Connector.IsDefault := True; WriteLn('Building Database structure'); Connector.BuildDatabase; WriteLn('Connecting to Database.'); Connector.Connect; for i := 0 to 100 do begin WriteLn('Storing Object.'); SimpleClass := TSimpleClass.Create; Try SimpleClass.StringProperty := IntToStr(Random(MaxInt)); SimpleClass.Store; Id := SimpleClass.Id; Finally SimpleClass.Free; End; WriteLn('Retrieving and changing Object.'); SimpleClass := TSimpleClass.Retrieve(Id); Try SimpleClass.StringProperty := IntToStr(Random(MaxInt)); SimpleClass.Store; Finally SimpleClass.Free; End; (* WriteLn('Retrieving and deleting Object.'); SimpleClass := TSimpleClass.Retrieve(Id); Try SimpleClass.Dispose; Finally SimpleClass.Free; End; *) end; WriteLn('Disconnecting from Database.'); Connector.Disconnect; Finally Connector.Free; Connection.Free; End; WriteLn('Done!'); Except on E: Exception do WriteLn(E.Message); End; end. |
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition