├── BUILD.bat ├── LICENSE ├── README.md ├── Test ├── Core │ ├── Test.PureMVC.Core.Controller.pas │ ├── Test.PureMVC.Core.Model.pas │ └── Test.PureMVC.Core.View.pas ├── D190-XE5 │ ├── TestPureMVC.dpr │ ├── TestPureMVC.dproj │ ├── TestPureMVC.res │ └── TestPureMVC4D.groupproj ├── D200-XE6 │ ├── TestPureMVC.dpr │ ├── TestPureMVC.dproj │ ├── TestPureMVC.res │ └── TestPureMVC4D.groupproj ├── Patterns │ ├── Command │ │ ├── Test.PureMVC.Patterns.MacroCommand.pas │ │ └── Test.PureMVC.Patterns.SimpleCommand.pas │ ├── Facade │ │ └── Test.PureMVC.Patterns.Facade.pas │ ├── Mediator │ │ └── Test.PureMVC.Patterns.Mediator.pas │ ├── Observer │ │ ├── Test.PureMVC.Patterns.Notification.pas │ │ └── Test.PureMVC.Patterns.Observer.pas │ └── Proxy │ │ └── Test.PureMVC.Patterns.Proxy.pas └── test.optset ├── VERSION ├── VERSION.pas ├── doc ├── PureMVC │ ├── Core │ │ ├── Controller │ │ │ ├── TController.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals Controller.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── Model │ │ │ ├── TModel.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals Model.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── View │ │ │ ├── TView.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals View.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── default.txvpck.html │ │ ├── doc-files │ │ │ ├── default.txvpck.html │ │ │ └── default.txvpck.html.gif │ │ ├── package-summary.html │ │ └── package-tree.html │ ├── Interfaces │ │ ├── ICommand │ │ │ ├── ICommand.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals ICommand.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── IController │ │ │ ├── IController.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals IController.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── IFacade │ │ │ ├── IFacade.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals IFacade.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── IMediator │ │ │ ├── IMediator.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals IMediator.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── IModel │ │ │ ├── IModel.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals IModel.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── INotification │ │ │ ├── INotification.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals INotification.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── INotifier │ │ │ ├── INotifier.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals INotifier.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── IObserver │ │ │ ├── IObserver.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals IObserver.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── IProxy │ │ │ ├── IProxy.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals IProxy.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── IView │ │ │ ├── IView.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals IView.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── default.txvpck.html │ │ ├── doc-files │ │ │ ├── default.txvpck.html │ │ │ └── default.txvpck.html.gif │ │ ├── package-summary.html │ │ └── package-tree.html │ ├── Patterns │ │ ├── Command │ │ │ ├── TCommand.html │ │ │ ├── TCommandClass.html │ │ │ ├── TMacroCommand.html │ │ │ ├── TSimpleCommand.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals Command.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── Facade │ │ │ ├── TFacade.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals Facade.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── Mediator │ │ │ ├── PureMVCNotifyAttribute.html │ │ │ ├── TAttributePredicate.html │ │ │ ├── TAttributedMethod.html │ │ │ ├── TAttributedMethodComparer.html │ │ │ ├── TAttributedMethods.html │ │ │ ├── TMediator.html │ │ │ ├── TPureMVCNotifyHelper.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals Mediator.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── Notification │ │ │ ├── TNotification.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals Notification.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── Notifier │ │ │ ├── TNotifier.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals Notifier.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── Observer │ │ │ ├── TObserver.html │ │ │ ├── TObserverHelper.html │ │ │ ├── TObserverList.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals Observer.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── Proxy │ │ │ ├── TProxy.html │ │ │ ├── default.txvpck.html │ │ │ ├── doc-files │ │ │ │ ├── default.txvpck.html │ │ │ │ └── default.txvpck.html.gif │ │ │ ├── globals Proxy.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── default.txvpck.html │ │ ├── doc-files │ │ │ ├── default.txvpck.html │ │ │ └── default.txvpck.html.gif │ │ ├── package-summary.html │ │ └── package-tree.html │ ├── Utils │ │ ├── IList_T_(T).html │ │ ├── IObjectList.html │ │ ├── Sync.html │ │ ├── TDictionaryOwnerships.html │ │ ├── TInterfacedEnumerableList_T_(T).TEnumerator.html │ │ ├── TInterfacedEnumerableList_T_(T).html │ │ ├── TInterfacedEnumerator.html │ │ ├── TInterfacedEnumerator_T_(T).html │ │ ├── TObjectDictionary_TKey,TValue_(TKey@TValue).html │ │ ├── TObjectList.html │ │ ├── default.txvpck.html │ │ ├── doc-files │ │ │ ├── default.txvpck.html │ │ │ └── default.txvpck.html.gif │ │ ├── globals Utils.html │ │ ├── package-summary.html │ │ └── package-tree.html │ ├── default.txvpck.html │ ├── doc-files │ │ ├── default.txvpck.html │ │ └── default.txvpck.html.gif │ ├── package-summary.html │ └── package-tree.html ├── allclasses-frame.html ├── default.txvpck.html ├── doc-files │ ├── default.txvpck.html │ └── default.txvpck.html.gif ├── gendoc.gdc ├── help-doc.html ├── index-all.html ├── index.html ├── model-tree │ ├── ST_Package Diagram.gif │ ├── ST_Project.gif │ ├── ST_rc_Attribute.gif │ ├── ST_rc_Class.gif │ ├── ST_rc_ClassHelper.gif │ ├── ST_rc_ClassOf.gif │ ├── ST_rc_Constructor.gif │ ├── ST_rc_Destructor.gif │ ├── ST_rc_Interface.gif │ ├── ST_rc_Module.gif │ ├── ST_rc_Namespace.gif │ ├── ST_rc_Operation.gif │ ├── ST_rc_Property.gif │ ├── ST_rc_Struct.gif │ ├── false.gif │ ├── model.tree │ └── true.gif ├── model.xml ├── navigation.jar ├── overview-frame.html ├── overview-summary.html ├── overview-tree.html ├── package-summary.html ├── package-tree.html └── stylesheet.css ├── samples ├── D190-XE5 │ ├── EmployeeAdminVCL.dpr │ ├── EmployeeAdminVCL.dproj │ ├── EmployeeAdminVCL.res │ └── SamplesPureMVC4D.groupproj ├── D200-XE6 │ ├── EmployeeAdminVCL.dpr │ ├── EmployeeAdminVCL.dproj │ ├── EmployeeAdminVCL.res │ └── SamplesPureMVC4D.groupproj ├── EmployeeAdminVCL │ ├── App │ │ ├── EmployeeAdmin.Facade.pas │ │ ├── EmployeeAdmin.MainWin.dfm │ │ └── EmployeeAdmin.MainWin.pas │ ├── Controller │ │ ├── EmployeeAdmin.Controller.AddRoleResultCommand.pas │ │ ├── EmployeeAdmin.Controller.DeleteUserCommand.pas │ │ └── EmployeeAdmin.Controller.StartupCommand.pas │ ├── Model │ │ ├── EmployeeAdmin.Model.RoleProxy.pas │ │ ├── EmployeeAdmin.Model.UserProxy.pas │ │ ├── Enum │ │ │ ├── EmployeeAdmin.Model.Enum.DeptEnum.pas │ │ │ ├── EmployeeAdmin.Model.Enum.Enum.pas │ │ │ └── EmployeeAdmin.Model.Enum.RoleEnum.pas │ │ └── VO │ │ │ ├── EmployeeAdmin.Model.VO.RoleVO.pas │ │ │ └── EmployeeAdmin.Model.VO.UserVO.pas │ ├── View │ │ ├── Components │ │ │ ├── EmployeeAdmin.View.Components.RolePanl.dfm │ │ │ ├── EmployeeAdmin.View.Components.RolePanl.pas │ │ │ ├── EmployeeAdmin.View.Components.UserFrm.dfm │ │ │ ├── EmployeeAdmin.View.Components.UserFrm.pas │ │ │ ├── EmployeeAdmin.View.Components.UserLst.dfm │ │ │ └── EmployeeAdmin.View.Components.UserLst.pas │ │ ├── EmployeeAdmin.View.RolePanelMediator.pas │ │ ├── EmployeeAdmin.View.UserFormMediator.pas │ │ └── EmployeeAdmin.View.UserListMediator.pas │ ├── license.txt │ └── version.txt └── samples.optset └── src ├── Core ├── PureMVC.Core.Controller.pas ├── PureMVC.Core.Model.pas └── PureMVC.Core.View.pas ├── D190-XE5 ├── PureMVC.deployproj ├── PureMVC.dpk ├── PureMVC.dproj ├── PureMVC.res └── PureMVC4D.groupproj ├── D200-XE6 ├── PureMVC.deployproj ├── PureMVC.dpk ├── PureMVC.dproj ├── PureMVC.res └── PureMVC4D.groupproj ├── Interfaces ├── PureMVC.Interfaces.Collections.pas ├── PureMVC.Interfaces.ICommand.pas ├── PureMVC.Interfaces.IController.pas ├── PureMVC.Interfaces.IFacade.pas ├── PureMVC.Interfaces.IMediator.pas ├── PureMVC.Interfaces.IModel.pas ├── PureMVC.Interfaces.INotification.pas ├── PureMVC.Interfaces.INotifier.pas ├── PureMVC.Interfaces.IObserver.pas ├── PureMVC.Interfaces.IProxy.pas └── PureMVC.Interfaces.IView.pas ├── Patterns ├── PureMVC.Patterns.Collections.pas ├── PureMVC.Patterns.Command.pas ├── PureMVC.Patterns.Facade.pas ├── PureMVC.Patterns.Mediator.pas ├── PureMVC.Patterns.Notification.pas ├── PureMVC.Patterns.Notifier.pas ├── PureMVC.Patterns.Observer.pas └── PureMVC.Patterns.Proxy.pas └── source.optset /BUILD.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | set BDSPROJECTGROUPDIR=%~dp0 4 | 5 | call rsvars 6 | cd .\src\D170-XE3 7 | msbuild PureMVC4D.groupproj /p:BuildGroup=All 8 | cd .. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## [PureMVC](http://puremvc.github.com/) Delphi Standard Framework 2 | 3 | PureMVC is a lightweight framework for creating applications based upon the classic [Model-View-Controller](http://en.wikipedia.org/wiki/Model-view-controller) design meta-pattern. This is the specific implementation for the [Delphi](http://www.embarcadero.com/products/delphi) language. It does not support [modular programming](http://en.wikipedia.org/wiki/Modular_programming) since it uses [Singletons](http://en.wikipedia.org/wiki/Singleton_pattern) as Core actors rather than the [Multiton](http://en.wikipedia.org/wiki/Multiton) used in the [MultiCore](https://github.com/PureMVC/puremvc-swift-multicore-framework/wiki) Version. 4 | 5 | * [API Docs](http://puremvc.org/pages/docs/Delphi/standard/) 6 | * Unit Tests - Included in this project 7 | * [Discussion](http://forums.puremvc.org/index.php?board=127) 8 | * [Standard Version Overview Presentation](http://puremvc.tv/#P100) 9 | 10 | ## Demos 11 | * Employee Admin - Included in this project 12 | 13 | ## Status 14 | Experimental - [Version 1.2.0](https://github.com/PureMVC/puremvc-delphi-standard-framework/blob/master/VERSION) 15 | 16 | ## Platforms / Technologies 17 | * [Delphi](http://www.embarcadero.com/products/delphi) 18 | 19 | ## License 20 | * PureMVC Standard Framework for Delphi - Copyright © 2015-2015 Jorge Cangas 21 | * PureMVC - Copyright © 2015-2015 [Futurescale, Inc](http://futurescale.com) 22 | * All rights reserved. 23 | 24 | * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 25 | 26 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 27 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 28 | * Neither the name of Futurescale, Inc., PureMVC.org, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 29 | 30 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /Test/D190-XE5/TestPureMVC.dpr: -------------------------------------------------------------------------------- 1 | program TestPureMVC; 2 | { 3 | Delphi DUnit Test Project 4 | ------------------------- 5 | This project contains the DUnit test framework and the GUI/Console test runners. 6 | Add "CONSOLE_TESTRUNNER" to the conditional defines entry in the project options 7 | to use the console test runner. Otherwise the GUI test runner will be used by 8 | default. 9 | 10 | } 11 | 12 | {$IFDEF CONSOLE_TESTRUNNER} 13 | {$APPTYPE CONSOLE} 14 | {$ENDIF} 15 | 16 | uses 17 | DUnitTestRunner, 18 | Test.PureMVC.Core.Controller in '..\Core\Test.PureMVC.Core.Controller.pas', 19 | Test.PureMVC.Core.Model in '..\Core\Test.PureMVC.Core.Model.pas', 20 | Test.PureMVC.Core.View in '..\Core\Test.PureMVC.Core.View.pas', 21 | Test.PureMVC.Patterns.MacroCommand in '..\Patterns\Command\Test.PureMVC.Patterns.MacroCommand.pas', 22 | Test.PureMVC.Patterns.SimpleCommand in '..\Patterns\Command\Test.PureMVC.Patterns.SimpleCommand.pas', 23 | Test.PureMVC.Patterns.Facade in '..\Patterns\Facade\Test.PureMVC.Patterns.Facade.pas', 24 | Test.PureMVC.Patterns.Mediator in '..\Patterns\Mediator\Test.PureMVC.Patterns.Mediator.pas', 25 | Test.PureMVC.Patterns.Observer in '..\Patterns\Observer\Test.PureMVC.Patterns.Observer.pas', 26 | Test.PureMVC.Patterns.Notification in '..\Patterns\Observer\Test.PureMVC.Patterns.Notification.pas', 27 | Test.PureMVC.Patterns.Proxy in '..\Patterns\Proxy\Test.PureMVC.Patterns.Proxy.pas'; 28 | 29 | {$R *.RES} 30 | 31 | begin 32 | ReportMemoryLeaksOnShutdown := True; 33 | DUnitTestRunner.RunRegisteredTests; 34 | end. 35 | 36 | -------------------------------------------------------------------------------- /Test/D190-XE5/TestPureMVC.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/Test/D190-XE5/TestPureMVC.res -------------------------------------------------------------------------------- /Test/D190-XE5/TestPureMVC4D.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {48DA70E3-3E30-47CE-9558-D9E63CD144D4} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Default.Personality.12 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 | {AD097A7F-2D47-44EC-9C44-AD99AE9A5701} 39 | Test 40 | Win32 41 | True 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /Test/D200-XE6/TestPureMVC.dpr: -------------------------------------------------------------------------------- 1 | program TestPureMVC; 2 | { 3 | Delphi DUnit Test Project 4 | ------------------------- 5 | This project contains the DUnit test framework and the GUI/Console test runners. 6 | Add "CONSOLE_TESTRUNNER" to the conditional defines entry in the project options 7 | to use the console test runner. Otherwise the GUI test runner will be used by 8 | default. 9 | 10 | } 11 | 12 | {$IFDEF CONSOLE_TESTRUNNER} 13 | {$APPTYPE CONSOLE} 14 | {$ENDIF} 15 | 16 | uses 17 | DUnitTestRunner, 18 | Test.PureMVC.Core.Controller in '..\Core\Test.PureMVC.Core.Controller.pas', 19 | Test.PureMVC.Core.Model in '..\Core\Test.PureMVC.Core.Model.pas', 20 | Test.PureMVC.Core.View in '..\Core\Test.PureMVC.Core.View.pas', 21 | Test.PureMVC.Patterns.MacroCommand in '..\Patterns\Command\Test.PureMVC.Patterns.MacroCommand.pas', 22 | Test.PureMVC.Patterns.SimpleCommand in '..\Patterns\Command\Test.PureMVC.Patterns.SimpleCommand.pas', 23 | Test.PureMVC.Patterns.Facade in '..\Patterns\Facade\Test.PureMVC.Patterns.Facade.pas', 24 | Test.PureMVC.Patterns.Mediator in '..\Patterns\Mediator\Test.PureMVC.Patterns.Mediator.pas', 25 | Test.PureMVC.Patterns.Observer in '..\Patterns\Observer\Test.PureMVC.Patterns.Observer.pas', 26 | Test.PureMVC.Patterns.Notification in '..\Patterns\Observer\Test.PureMVC.Patterns.Notification.pas', 27 | Test.PureMVC.Patterns.Proxy in '..\Patterns\Proxy\Test.PureMVC.Patterns.Proxy.pas'; 28 | 29 | {$R *.RES} 30 | 31 | begin 32 | ReportMemoryLeaksOnShutdown := True; 33 | DUnitTestRunner.RunRegisteredTests; 34 | end. 35 | 36 | -------------------------------------------------------------------------------- /Test/D200-XE6/TestPureMVC.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/Test/D200-XE6/TestPureMVC.res -------------------------------------------------------------------------------- /Test/D200-XE6/TestPureMVC4D.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {48DA70E3-3E30-47CE-9558-D9E63CD144D4} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Default.Personality.12 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 | {AD097A7F-2D47-44EC-9C44-AD99AE9A5701} 39 | Test 40 | Win32 41 | True 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /Test/Patterns/Command/Test.PureMVC.Patterns.MacroCommand.pas: -------------------------------------------------------------------------------- 1 | unit Test.PureMVC.Patterns.MacroCommand; 2 | { 3 | 4 | Delphi DUnit Test Case 5 | ---------------------- 6 | This unit contains a skeleton test case class generated by the Test Case Wizard. 7 | Modify the generated code to correctly setup and call the methods from the unit 8 | being tested. 9 | 10 | } 11 | 12 | interface 13 | 14 | uses 15 | TestFramework, 16 | PureMVC.Patterns.Notifier, 17 | PureMVC.Patterns.Notification, 18 | PureMVC.Patterns.Command, 19 | PureMVC.Interfaces.ICommand, 20 | PureMVC.Interfaces.Collections, 21 | PureMVC.Interfaces.INotifier, 22 | PureMVC.Interfaces.INotification; 23 | 24 | type 25 | // Test methods for class TMacroCommand 26 | 27 | TestTMacroCommand = class(TTestCase) 28 | strict private 29 | Command: TMacroCommand; 30 | public 31 | procedure SetUp; override; 32 | procedure TearDown; override; 33 | published 34 | procedure TestExecute; 35 | end; 36 | 37 | implementation 38 | 39 | type 40 | TMacroCommandTestVO = class 41 | private 42 | FInput: Integer; 43 | FResult1: Integer; 44 | FResult2: Integer; 45 | public 46 | constructor Create(Input: Integer); 47 | property Input: Integer read FInput; 48 | property Result1: Integer read FResult1 write FResult1; 49 | property Result2: Integer read FResult2 write FResult2; 50 | end; 51 | 52 | 53 | TMacroCommandTestSub1Command = class(TSimpleCommand) 54 | public 55 | procedure Execute(Note: INotification);override; 56 | end; 57 | 58 | TMacroCommandTestSub2Command = class(TSimpleCommand) 59 | public 60 | procedure Execute(Note: INotification);override; 61 | end; 62 | 63 | TMacroCommandTestCommand = class(TMacroCommand) 64 | protected 65 | procedure InitializeMacroCommand;override; 66 | end; 67 | 68 | { TMacroCommandTestVO } 69 | 70 | constructor TMacroCommandTestVO.Create(Input: Integer); 71 | begin 72 | inherited Create; 73 | FInput := Input; 74 | end; 75 | 76 | { TMacroCommandTestSub1Command } 77 | 78 | procedure TMacroCommandTestSub1Command.Execute(Note: INotification); 79 | var 80 | VO: TMacroCommandTestVO; 81 | begin 82 | VO := Note.Sender as TMacroCommandTestVO; 83 | VO.Result1 := 2 * VO.Input; 84 | end; 85 | 86 | { TMacroCommandTestSub2Command } 87 | 88 | procedure TMacroCommandTestSub2Command.Execute(Note: INotification); 89 | var 90 | VO: TMacroCommandTestVO; 91 | begin 92 | VO := Note.Sender as TMacroCommandTestVO; 93 | VO.Result2 := VO.Input * VO.Input; 94 | end; 95 | 96 | { TMacroCommandTestCommand } 97 | 98 | procedure TMacroCommandTestCommand.InitializeMacroCommand; 99 | begin 100 | inherited; 101 | AddSubCommand(TMacroCommandTestSub1Command); 102 | AddSubCommand(TMacroCommandTestSub2Command); 103 | end; 104 | 105 | { TestTMacroCommand } 106 | 107 | procedure TestTMacroCommand.SetUp; 108 | begin 109 | Command := TMacroCommandTestCommand.Create; 110 | end; 111 | 112 | procedure TestTMacroCommand.TearDown; 113 | begin 114 | Command.Free; 115 | end; 116 | 117 | procedure TestTMacroCommand.TestExecute; 118 | var 119 | VO: TMacroCommandTestVO; 120 | Note: INotification; 121 | begin 122 | VO := TMacroCommandTestVO.Create(5); 123 | try 124 | Note := TNotification.Create('MacroCommandTestNote', VO); 125 | Command.Execute(Note); 126 | 127 | CheckEquals(10, VO.Result1); 128 | CheckEquals(25, VO.Result2); 129 | finally 130 | VO.Free; 131 | end; 132 | end; 133 | 134 | initialization 135 | 136 | // Register any test cases with the test runner 137 | RegisterTest(TestTMacroCommand.Suite); 138 | 139 | end. 140 | -------------------------------------------------------------------------------- /Test/Patterns/Command/Test.PureMVC.Patterns.SimpleCommand.pas: -------------------------------------------------------------------------------- 1 | unit Test.PureMVC.Patterns.SimpleCommand; 2 | { 3 | 4 | Delphi DUnit Test Case 5 | ---------------------- 6 | This unit contains a skeleton test case class generated by the Test Case Wizard. 7 | Modify the generated code to correctly setup and call the methods from the unit 8 | being tested. 9 | 10 | } 11 | 12 | interface 13 | 14 | uses 15 | TestFramework, 16 | PureMVC.Patterns.Notifier, 17 | PureMVC.Patterns.Notification, 18 | PureMVC.Patterns.Command, 19 | PureMVC.Interfaces.ICommand, 20 | PureMVC.Interfaces.Collections, 21 | PureMVC.Interfaces.INotifier, 22 | PureMVC.Interfaces.INotification; 23 | 24 | type 25 | // Test methods for class TSimpleCommand 26 | 27 | TestTSimpleCommand = class(TTestCase) 28 | strict private 29 | Command: TSimpleCommand; 30 | public 31 | procedure SetUp; override; 32 | procedure TearDown; override; 33 | published 34 | procedure TestExecute; 35 | end; 36 | 37 | implementation 38 | 39 | type 40 | TSimpleCommandTestVO = class 41 | private 42 | FInput: Integer; 43 | FResult: Integer; 44 | public 45 | constructor Create(Input: Integer); 46 | property Input: Integer read FInput; 47 | property Result: Integer read FResult write FResult; 48 | end; 49 | 50 | TSimpleCommandTestCommand = class(TSimpleCommand) 51 | public 52 | procedure Execute(Note: INotification); override; 53 | end; 54 | 55 | { TSimpleCommandTestVO } 56 | 57 | constructor TSimpleCommandTestVO.Create(Input: Integer); 58 | begin 59 | inherited Create; 60 | FInput := Input; 61 | end; 62 | 63 | { TSimpleCommandTestCommand } 64 | 65 | procedure TSimpleCommandTestCommand.Execute(Note: INotification); 66 | var 67 | VO: TSimpleCommandTestVO; 68 | begin 69 | inherited; 70 | VO := Note.Sender as TSimpleCommandTestVO; 71 | 72 | // Fabricate a result 73 | VO.Result := 2 * VO.Input; 74 | end; 75 | 76 | { TestTSimpleCommand } 77 | 78 | procedure TestTSimpleCommand.SetUp; 79 | begin 80 | Command := TSimpleCommandTestCommand.Create; 81 | end; 82 | 83 | procedure TestTSimpleCommand.TearDown; 84 | begin 85 | Command.Free; 86 | end; 87 | 88 | procedure TestTSimpleCommand.TestExecute; 89 | var 90 | VO: TSimpleCommandTestVO; 91 | Note: INotification; 92 | begin 93 | VO := TSimpleCommandTestVO.Create(5); 94 | try 95 | Note := TNotification.Create('SimpleCommandTestNote', VO); 96 | Command.Execute(Note); 97 | CheckEquals(10, VO.Result); 98 | finally 99 | VO.Free; 100 | end; 101 | end; 102 | 103 | initialization 104 | 105 | // Register any test cases with the test runner 106 | RegisterTest(TestTSimpleCommand.Suite); 107 | 108 | end. 109 | -------------------------------------------------------------------------------- /Test/Patterns/Mediator/Test.PureMVC.Patterns.Mediator.pas: -------------------------------------------------------------------------------- 1 | unit Test.PureMVC.Patterns.Mediator; 2 | { 3 | 4 | Delphi DUnit Test Case 5 | ---------------------- 6 | This unit contains a skeleton test case class generated by the Test Case Wizard. 7 | Modify the generated code to correctly setup and call the methods from the unit 8 | being tested. 9 | 10 | } 11 | 12 | interface 13 | 14 | uses 15 | TestFramework, 16 | PureMVC.Patterns.Mediator, 17 | PureMVC.Interfaces.IMediator; 18 | 19 | type 20 | 21 | TestTMediator = class(TTestCase) 22 | private 23 | public 24 | published 25 | procedure TestNameAccessor; 26 | procedure TestViewAccessor; 27 | end; 28 | 29 | implementation 30 | 31 | procedure TestTMediator.TestNameAccessor; 32 | var 33 | Mediator: IMediator; 34 | begin 35 | Mediator := TMediator.Create('TestMediator'); 36 | CheckEquals('TestMediator', Mediator.MediatorName); 37 | end; 38 | 39 | procedure TestTMediator.TestViewAccessor; 40 | var 41 | View: TObject; 42 | Mediator: IMediator; 43 | begin 44 | View := TObject.Create; 45 | Mediator := TMediator.Create('TestMediator', View); 46 | CheckSame(View, Mediator.ViewComponent); 47 | View.Free; 48 | end; 49 | 50 | initialization 51 | 52 | // Register any test cases with the test runner 53 | RegisterTest(TestTMediator.Suite); 54 | 55 | end. 56 | -------------------------------------------------------------------------------- /Test/Patterns/Observer/Test.PureMVC.Patterns.Notification.pas: -------------------------------------------------------------------------------- 1 | unit Test.PureMVC.Patterns.Notification; 2 | 3 | { 4 | Delphi DUnit Test Case 5 | ---------------------- 6 | This unit contains a skeleton test case class generated by the Test Case Wizard. 7 | Modify the generated code to correctly setup and call the methods from the unit 8 | being tested. 9 | 10 | } 11 | 12 | interface 13 | 14 | uses 15 | TestFramework, 16 | PureMVC.Patterns.Observer, 17 | PureMVC.Interfaces.INotification, 18 | PureMVC.Interfaces.IObserver; 19 | 20 | type 21 | TestTNotification = class(TTestCase) 22 | private 23 | published 24 | procedure BodyAccessors; 25 | procedure NameAccessors; 26 | procedure TestConstructor; 27 | procedure TestToString; 28 | end; 29 | 30 | implementation 31 | 32 | uses 33 | SysUtils, 34 | PureMVC.Patterns.Notification; 35 | 36 | procedure TestTNotification.NameAccessors; 37 | var 38 | Note: INotification; 39 | begin 40 | Note := TNotification.Create('TestNote'); 41 | CheckEquals('TestNote', Note.Name); 42 | end; 43 | 44 | procedure TestTNotification.BodyAccessors; 45 | var 46 | Note: INotification; 47 | begin 48 | Note := TNotification.Create; 49 | Note.Body := 5; 50 | CheckEquals(5, Note.Body.AsInteger); 51 | end; 52 | 53 | procedure TestTNotification.TestConstructor; 54 | var 55 | Note: INotification; 56 | begin 57 | Note := TNotification.Create('TestNote', Self, 5, 'TestNoteType'); 58 | CheckSame(Self, Note.Sender); 59 | CheckEquals('TestNote', Note.Name); 60 | CheckEquals(5, Note.Body.AsInteger); 61 | CheckEquals('TestNoteType', Note.Kind.AsString); 62 | end; 63 | 64 | procedure TestTNotification.TestToString; 65 | const 66 | ToStrFmt = 'Notification{Name:%s\nSender:%p\nBody:%s\nType:%s}'; 67 | var 68 | Note: INotification; 69 | ToStr: string; 70 | begin 71 | Note := TNotification.Create('TestNote', Self, '1,3,5', 'TestType'); 72 | ToStr := Format(ToStrFmt, ['TestNote', Pointer(Self), '1,3,5', 'TestType']); 73 | CheckEquals(ToStr, Note.ToString); 74 | end; 75 | 76 | initialization 77 | 78 | // Register any test cases with the test runner 79 | RegisterTest(TestTNotification.Suite); 80 | 81 | end. 82 | -------------------------------------------------------------------------------- /Test/Patterns/Observer/Test.PureMVC.Patterns.Observer.pas: -------------------------------------------------------------------------------- 1 | unit Test.PureMVC.Patterns.Observer; 2 | 3 | { 4 | Delphi DUnit Test Case 5 | ---------------------- 6 | This unit contains a skeleton test case class generated by the Test Case Wizard. 7 | Modify the generated code to correctly setup and call the methods from the unit 8 | being tested. 9 | 10 | } 11 | 12 | interface 13 | 14 | uses 15 | TestFramework, 16 | PureMVC.Patterns.Observer, 17 | PureMVC.Interfaces.INotification, 18 | PureMVC.Interfaces.IObserver; 19 | 20 | type 21 | 22 | TestTObserver = class(TTestCase) 23 | private 24 | FObserverTestVar: Integer; 25 | public 26 | // PureMVC handle 27 | procedure ObserverTestMethod(Note: INotification); 28 | published 29 | procedure TestCompareNotifyContext; 30 | procedure TestObserverAccessors; 31 | procedure TestObserverConstructor; 32 | end; 33 | 34 | implementation 35 | 36 | uses 37 | PureMVC.Patterns.Notification; 38 | 39 | procedure TestTObserver.TestObserverAccessors; 40 | var 41 | Observer: IObserver; 42 | Note: INotification; 43 | begin 44 | Observer := TObserver.Create; 45 | Observer.NotifyContext := Self; 46 | Observer.NotifyMethod := 'ObserverTestMethod'; 47 | 48 | // create a test event, setting a payload value and notify 49 | // the observer with it. since the observer is this class 50 | // and the notification method is observerTestMethod, 51 | // successful notification will result in our local 52 | // observerTestVar being set to the value we pass in 53 | // on the note body. 54 | Note := TNotification.Create('ObserverTestNote', Self, 10); 55 | Observer.NotifyObserver(Note); 56 | 57 | CheckEquals(10, FObserverTestVar); 58 | end; 59 | 60 | procedure TestTObserver.TestObserverConstructor; 61 | var 62 | Observer: IObserver; 63 | Note: INotification; 64 | begin 65 | Observer := TObserver.Create('ObserverTestMethod', Self); 66 | 67 | // create a test note, setting a body value and notify 68 | // the observer with it. since the observer is this class 69 | // and the notification method is observerTestMethod, 70 | // successful notification will result in our local 71 | // observerTestVar being set to the value we pass in 72 | // on the note body. 73 | Note := TNotification.Create('ObserverTestNote', Self, 5); 74 | Observer.NotifyObserver(Note); 75 | 76 | CheckEquals(5, FObserverTestVar); 77 | end; 78 | 79 | procedure TestTObserver.TestCompareNotifyContext; 80 | var 81 | Observer: IObserver; 82 | NegTestObj: TObject; 83 | begin 84 | Observer := TObserver.Create('ObserverTestMethod', Self); 85 | NegTestObj := TObject.Create; 86 | try 87 | CheckFalse(Observer.CompareNotifyContext(NegTestObj)); 88 | CheckTrue(Observer.CompareNotifyContext(Self)); 89 | finally 90 | NegTestObj.Free; 91 | end; 92 | end; 93 | 94 | procedure TestTObserver.ObserverTestMethod(Note: INotification); 95 | begin 96 | FObserverTestVar := Note.Body.AsInteger; 97 | end; 98 | 99 | initialization 100 | 101 | // Register any test cases with the test runner 102 | RegisterTest(TestTObserver.Suite); 103 | 104 | end. 105 | -------------------------------------------------------------------------------- /Test/Patterns/Proxy/Test.PureMVC.Patterns.Proxy.pas: -------------------------------------------------------------------------------- 1 | unit Test.PureMVC.Patterns.Proxy; 2 | { 3 | Delphi DUnit Test Case 4 | ---------------------- 5 | This unit contains a skeleton test case class generated by the Test Case Wizard. 6 | Modify the generated code to correctly setup and call the methods from the unit 7 | being tested. 8 | 9 | } 10 | 11 | interface 12 | 13 | uses 14 | TestFramework, 15 | PureMVC.Interfaces.IObserver; 16 | 17 | type 18 | TestTProxy = class(TTestCase) 19 | private 20 | published 21 | procedure TestConstructor; 22 | procedure TestDataAccessors; 23 | procedure TestNameAccessor; 24 | end; 25 | 26 | implementation 27 | 28 | uses 29 | RTTI, 30 | PureMVC.Patterns.Proxy, 31 | PureMVC.Interfaces.IProxy; 32 | 33 | { ** 34 | * Tests getting the name using Proxy class accessor method. Setting can only be done in constructor. 35 | * 36 | } 37 | 38 | procedure TestTProxy.TestNameAccessor; 39 | var 40 | Proxy: IProxy; 41 | begin 42 | Proxy := TProxy.Create('TestProxy'); 43 | 44 | CheckEquals('TestProxy', Proxy.ProxyName); 45 | end; 46 | 47 | procedure TestTProxy.TestDataAccessors; 48 | var 49 | Proxy: IProxy; 50 | Data: TArray; 51 | begin 52 | Proxy := TProxy.Create('Colors'); 53 | Proxy.Data := TValue.FromArray(TypeInfo(TArray), 54 | ['red', 'green', 'blue']); 55 | Data := Proxy.Data.AsType>; 56 | 57 | CheckEquals(3, Length(Data)); 58 | CheckEquals('red', Data[0]); 59 | CheckEquals('green', Data[1]); 60 | CheckEquals('blue', Data[2]); 61 | end; 62 | 63 | { ** 64 | * Tests setting the name and body using the Notification class Constructor. 65 | * 66 | } 67 | procedure TestTProxy.TestConstructor; 68 | var 69 | Proxy: IProxy; 70 | Data: TArray; 71 | begin 72 | Proxy := TProxy.Create('colors', TValue.FromArray(TypeInfo(TArray), 73 | ['red', 'green', 'blue'])); 74 | CheckNotNull(Proxy); 75 | CheckEquals('colors', Proxy.ProxyName); 76 | 77 | Data := Proxy.Data.AsType>; 78 | CheckEquals(3, Length(Data)); 79 | CheckEquals('red', Data[0]); 80 | CheckEquals('green', Data[1]); 81 | CheckEquals('blue', Data[2]); 82 | end; 83 | 84 | initialization 85 | 86 | // Register any test cases with the test runner 87 | RegisterTest(TestTProxy.Suite); 88 | 89 | end. 90 | -------------------------------------------------------------------------------- /Test/test.optset: -------------------------------------------------------------------------------- 1 |  2 | 3 | on 4 | DEBUG;$(DCC_Define) 5 | true 6 | false 7 | true 8 | true 9 | true 10 | true 11 | true 12 | true 13 | true 14 | true 15 | true 16 | true 17 | 2 18 | true 19 | true 20 | $(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\bin 21 | $(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\bin 22 | $(BDS)\Source\DUnit\src;$(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\Debug\lib;$(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\lib;$(DCC_UnitSearchPath) 23 | WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;$(DCC_UnitAlias) 24 | $(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\lib 25 | $(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\lib 26 | 27 | 28 | Delphi.Personality.12 29 | OptionSet 30 | 31 | 32 | 33 | 12 34 | 35 | 36 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | Delphi Port by Jorge L. Cangas 2 | PureMVC - Copyright(c) 2006-15 Futurescale, Inc., Some rights reserved. 3 | -------------------------------------------------------------------------- 4 | Release Date: 05/23/2015 5 | Platform: Delphi (Delphi XE-XE6) 6 | Version: 1 7 | Revision: 2 8 | Minor: 0 9 | Author: Jorge L. Cangas 10 | License: Creative Commons Attribution 3.0 United States License 11 | -------------------------------------------------------------------------- 12 | 1.2.0 - PureMVC.org official release 13 | 1.1.0 - XE6 14 | 1.0.1 - XE5 15 | 1.0.0 - Add Unit Test. Minor fixes. 16 | 0.9.5 - Initial upload of ported code. 17 | -------------------------------------------------------------------------------- /VERSION.pas: -------------------------------------------------------------------------------- 1 | VERSION = '1.2.0' -------------------------------------------------------------------------------- /doc/PureMVC/Core/Controller/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /doc/PureMVC/Core/Controller/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Core/Controller/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Core/Model/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /doc/PureMVC/Core/Model/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Core/Model/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Core/View/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/PureMVC/Core/View/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Core/View/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Core/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /doc/PureMVC/Core/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Core/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Core/package-tree.html: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | 29 |
28 |

36 |

Hierarchy for namespace Core

37 |
38 | Namespace Hierarchies:
39 | all namespaces


40 | 41 | 61 |
60 |

-------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/ICommand/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/ICommand/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Interfaces/ICommand/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/IController/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/IController/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Interfaces/IController/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/IFacade/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Interfaces/IFacade/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/IFacade/package-tree.html: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | 29 |
28 |


35 |

Hierarchy for namespace IFacade

36 |
37 | Namespace Hierarchies:
38 | all namespaces


39 | 40 | 60 |
59 |

-------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/IMediator/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/IMediator/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Interfaces/IMediator/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/IModel/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/IModel/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Interfaces/IModel/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/INotification/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/INotification/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Interfaces/INotification/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/INotifier/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/INotifier/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Interfaces/INotifier/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/IObserver/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/IObserver/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Interfaces/IObserver/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/IProxy/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/IProxy/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Interfaces/IProxy/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/IView/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/IView/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Interfaces/IView/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Interfaces/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Interfaces/package-tree.html: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | 29 |
28 |


36 |

Hierarchy for namespace Interfaces

37 |
38 | Namespace Hierarchies:
39 | all namespaces


40 | 41 | 61 |
60 |

-------------------------------------------------------------------------------- /doc/PureMVC/Patterns/Command/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /doc/PureMVC/Patterns/Command/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Patterns/Command/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Patterns/Facade/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Patterns/Facade/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Patterns/Mediator/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Patterns/Mediator/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Patterns/Notification/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /doc/PureMVC/Patterns/Notification/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Patterns/Notification/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Patterns/Notifier/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /doc/PureMVC/Patterns/Notifier/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Patterns/Notifier/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Patterns/Observer/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /doc/PureMVC/Patterns/Observer/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Patterns/Observer/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Patterns/Proxy/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /doc/PureMVC/Patterns/Proxy/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Patterns/Proxy/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Patterns/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Patterns/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/Patterns/package-tree.html: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | 29 |
28 |


36 |

Hierarchy for namespace Patterns

37 |
38 | Namespace Hierarchies:
39 | all namespaces


40 | 41 | 61 |
60 |

-------------------------------------------------------------------------------- /doc/PureMVC/Utils/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/Utils/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/PureMVC/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/PureMVC/package-tree.html: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | 29 |
28 |


35 |

Hierarchy for namespace PureMVC

36 |
37 | Namespace Hierarchies:
38 | all namespaces


39 | 40 | 60 |
59 |

-------------------------------------------------------------------------------- /doc/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | 28 |
27 |


34 | PureMVC
Namespace Diagram default

35 | 36 | 39 |
37 | 38 | Namespace Summary
40 | PureMVC  
 


41 | 42 | 61 |
60 |

-------------------------------------------------------------------------------- /doc/doc-files/default.txvpck.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Map file for default.txvpck.html 6 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /doc/doc-files/default.txvpck.html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/doc-files/default.txvpck.html.gif -------------------------------------------------------------------------------- /doc/gendoc.gdc: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /doc/index.html: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 7 | <h2 > Frame Alert</h2><p /> This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.<br /> Link to<a href='.//package-summary.html'>Non-frame version.</a> -------------------------------------------------------------------------------- /doc/model-tree/ST_Package Diagram.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/model-tree/ST_Package Diagram.gif -------------------------------------------------------------------------------- /doc/model-tree/ST_Project.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/model-tree/ST_Project.gif -------------------------------------------------------------------------------- /doc/model-tree/ST_rc_Attribute.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/model-tree/ST_rc_Attribute.gif -------------------------------------------------------------------------------- /doc/model-tree/ST_rc_Class.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/model-tree/ST_rc_Class.gif -------------------------------------------------------------------------------- /doc/model-tree/ST_rc_ClassHelper.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/model-tree/ST_rc_ClassHelper.gif -------------------------------------------------------------------------------- /doc/model-tree/ST_rc_ClassOf.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/model-tree/ST_rc_ClassOf.gif -------------------------------------------------------------------------------- /doc/model-tree/ST_rc_Constructor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/model-tree/ST_rc_Constructor.gif -------------------------------------------------------------------------------- /doc/model-tree/ST_rc_Destructor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/model-tree/ST_rc_Destructor.gif -------------------------------------------------------------------------------- /doc/model-tree/ST_rc_Interface.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/model-tree/ST_rc_Interface.gif -------------------------------------------------------------------------------- /doc/model-tree/ST_rc_Module.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/model-tree/ST_rc_Module.gif -------------------------------------------------------------------------------- /doc/model-tree/ST_rc_Namespace.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/model-tree/ST_rc_Namespace.gif -------------------------------------------------------------------------------- /doc/model-tree/ST_rc_Operation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/model-tree/ST_rc_Operation.gif -------------------------------------------------------------------------------- /doc/model-tree/ST_rc_Property.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/model-tree/ST_rc_Property.gif -------------------------------------------------------------------------------- /doc/model-tree/ST_rc_Struct.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/model-tree/ST_rc_Struct.gif -------------------------------------------------------------------------------- /doc/model-tree/false.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/model-tree/false.gif -------------------------------------------------------------------------------- /doc/model-tree/true.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/model-tree/true.gif -------------------------------------------------------------------------------- /doc/navigation.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/doc/navigation.jar -------------------------------------------------------------------------------- /doc/overview-frame.html: -------------------------------------------------------------------------------- 1 |  Overview 17 | 18 | -------------------------------------------------------------------------------- /doc/package-tree.html: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | 29 |
28 |


35 |

Hierarchy for classes of the project in global namespace

36 |
37 | Namespace Hierarchies:
38 | all namespaces


39 | 40 | 60 |
59 |

-------------------------------------------------------------------------------- /doc/stylesheet.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | background-image: none; 4 | background-color: #FFFFFF; 5 | } 6 | .TableHeaderStyle 7 | { 8 | background-image: none; 9 | background-color: #CCCCFF; 10 | } 11 | .NavigationTable 12 | { 13 | background-color: #FFFFFF; 14 | border: 0; 15 | width: 100%; 16 | } 17 | .NavBarCellCommon 18 | { 19 | background-color: #EEEEFF; 20 | } 21 | .NavBarCellCommonRev 22 | { 23 | background-color: #FFFFFF; 24 | } 25 | .NavBarCellPrevNext 26 | { 27 | background-color: #FFFFFF; 28 | } 29 | .TableRow 30 | { 31 | background-color: #FFFFFF; 32 | } 33 | .TableSubHeader 34 | { 35 | background-color: #EEEEFF; 36 | } 37 | -------------------------------------------------------------------------------- /samples/D190-XE5/EmployeeAdminVCL.dpr: -------------------------------------------------------------------------------- 1 | program EmployeeAdminVCL; 2 | 3 | uses 4 | Vcl.Forms, 5 | EmployeeAdmin.Facade in '..\EmployeeAdminVCL\App\EmployeeAdmin.Facade.pas', 6 | EmployeeAdmin.MainWin in '..\EmployeeAdminVCL\App\EmployeeAdmin.MainWin.pas' {MainWindow}, 7 | EmployeeAdmin.Controller.AddRoleResultCommand in '..\EmployeeAdminVCL\Controller\EmployeeAdmin.Controller.AddRoleResultCommand.pas', 8 | EmployeeAdmin.Controller.DeleteUserCommand in '..\EmployeeAdminVCL\Controller\EmployeeAdmin.Controller.DeleteUserCommand.pas', 9 | EmployeeAdmin.Controller.StartupCommand in '..\EmployeeAdminVCL\Controller\EmployeeAdmin.Controller.StartupCommand.pas', 10 | EmployeeAdmin.Model.RoleProxy in '..\EmployeeAdminVCL\Model\EmployeeAdmin.Model.RoleProxy.pas', 11 | EmployeeAdmin.Model.UserProxy in '..\EmployeeAdminVCL\Model\EmployeeAdmin.Model.UserProxy.pas', 12 | EmployeeAdmin.Model.VO.RoleVO in '..\EmployeeAdminVCL\Model\VO\EmployeeAdmin.Model.VO.RoleVO.pas', 13 | EmployeeAdmin.Model.VO.UserVO in '..\EmployeeAdminVCL\Model\VO\EmployeeAdmin.Model.VO.UserVO.pas', 14 | EmployeeAdmin.Model.Enum.DeptEnum in '..\EmployeeAdminVCL\Model\Enum\EmployeeAdmin.Model.Enum.DeptEnum.pas', 15 | EmployeeAdmin.Model.Enum.Enum in '..\EmployeeAdminVCL\Model\Enum\EmployeeAdmin.Model.Enum.Enum.pas', 16 | EmployeeAdmin.Model.Enum.RoleEnum in '..\EmployeeAdminVCL\Model\Enum\EmployeeAdmin.Model.Enum.RoleEnum.pas', 17 | EmployeeAdmin.View.RolePanelMediator in '..\EmployeeAdminVCL\View\EmployeeAdmin.View.RolePanelMediator.pas', 18 | EmployeeAdmin.View.UserFormMediator in '..\EmployeeAdminVCL\View\EmployeeAdmin.View.UserFormMediator.pas', 19 | EmployeeAdmin.View.UserListMediator in '..\EmployeeAdminVCL\View\EmployeeAdmin.View.UserListMediator.pas', 20 | EmployeeAdmin.View.Components.RolePanl in '..\EmployeeAdminVCL\View\Components\EmployeeAdmin.View.Components.RolePanl.pas' {RolePanel: TFrame}, 21 | EmployeeAdmin.View.Components.UserFrm in '..\EmployeeAdminVCL\View\Components\EmployeeAdmin.View.Components.UserFrm.pas' {UserForm: TFrame}, 22 | EmployeeAdmin.View.Components.UserLst in '..\EmployeeAdminVCL\View\Components\EmployeeAdmin.View.Components.UserLst.pas' {UserList: TFrame}; 23 | 24 | {$R *.res} 25 | var 26 | MainWindow: TMainWindow; 27 | begin 28 | Application.Initialize; 29 | Application.MainFormOnTaskbar := True; 30 | Application.CreateForm(TMainWindow, MainWindow); 31 | ApplicationFacade.Startup(MainWindow); 32 | Application.Run; 33 | end. 34 | -------------------------------------------------------------------------------- /samples/D190-XE5/EmployeeAdminVCL.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/samples/D190-XE5/EmployeeAdminVCL.res -------------------------------------------------------------------------------- /samples/D190-XE5/SamplesPureMVC4D.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {48DA70E3-3E30-47CE-9558-D9E63CD144D4} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Default.Personality.12 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 | {50867C30-DC69-414A-9236-0A136A8440EC} 39 | Samples 40 | Win32;Win64 41 | True 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /samples/D200-XE6/EmployeeAdminVCL.dpr: -------------------------------------------------------------------------------- 1 | program EmployeeAdminVCL; 2 | 3 | uses 4 | Vcl.Forms, 5 | EmployeeAdmin.Facade in '..\EmployeeAdminVCL\App\EmployeeAdmin.Facade.pas', 6 | EmployeeAdmin.MainWin in '..\EmployeeAdminVCL\App\EmployeeAdmin.MainWin.pas' {MainWindow}, 7 | EmployeeAdmin.Controller.AddRoleResultCommand in '..\EmployeeAdminVCL\Controller\EmployeeAdmin.Controller.AddRoleResultCommand.pas', 8 | EmployeeAdmin.Controller.DeleteUserCommand in '..\EmployeeAdminVCL\Controller\EmployeeAdmin.Controller.DeleteUserCommand.pas', 9 | EmployeeAdmin.Controller.StartupCommand in '..\EmployeeAdminVCL\Controller\EmployeeAdmin.Controller.StartupCommand.pas', 10 | EmployeeAdmin.Model.RoleProxy in '..\EmployeeAdminVCL\Model\EmployeeAdmin.Model.RoleProxy.pas', 11 | EmployeeAdmin.Model.UserProxy in '..\EmployeeAdminVCL\Model\EmployeeAdmin.Model.UserProxy.pas', 12 | EmployeeAdmin.Model.VO.RoleVO in '..\EmployeeAdminVCL\Model\VO\EmployeeAdmin.Model.VO.RoleVO.pas', 13 | EmployeeAdmin.Model.VO.UserVO in '..\EmployeeAdminVCL\Model\VO\EmployeeAdmin.Model.VO.UserVO.pas', 14 | EmployeeAdmin.Model.Enum.DeptEnum in '..\EmployeeAdminVCL\Model\Enum\EmployeeAdmin.Model.Enum.DeptEnum.pas', 15 | EmployeeAdmin.Model.Enum.Enum in '..\EmployeeAdminVCL\Model\Enum\EmployeeAdmin.Model.Enum.Enum.pas', 16 | EmployeeAdmin.Model.Enum.RoleEnum in '..\EmployeeAdminVCL\Model\Enum\EmployeeAdmin.Model.Enum.RoleEnum.pas', 17 | EmployeeAdmin.View.RolePanelMediator in '..\EmployeeAdminVCL\View\EmployeeAdmin.View.RolePanelMediator.pas', 18 | EmployeeAdmin.View.UserFormMediator in '..\EmployeeAdminVCL\View\EmployeeAdmin.View.UserFormMediator.pas', 19 | EmployeeAdmin.View.UserListMediator in '..\EmployeeAdminVCL\View\EmployeeAdmin.View.UserListMediator.pas', 20 | EmployeeAdmin.View.Components.RolePanl in '..\EmployeeAdminVCL\View\Components\EmployeeAdmin.View.Components.RolePanl.pas' {RolePanel: TFrame}, 21 | EmployeeAdmin.View.Components.UserFrm in '..\EmployeeAdminVCL\View\Components\EmployeeAdmin.View.Components.UserFrm.pas' {UserForm: TFrame}, 22 | EmployeeAdmin.View.Components.UserLst in '..\EmployeeAdminVCL\View\Components\EmployeeAdmin.View.Components.UserLst.pas' {UserList: TFrame}; 23 | 24 | {$R *.res} 25 | var 26 | MainWindow: TMainWindow; 27 | begin 28 | Application.Initialize; 29 | Application.MainFormOnTaskbar := True; 30 | Application.CreateForm(TMainWindow, MainWindow); 31 | ApplicationFacade.Startup(MainWindow); 32 | Application.Run; 33 | end. 34 | -------------------------------------------------------------------------------- /samples/D200-XE6/EmployeeAdminVCL.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/samples/D200-XE6/EmployeeAdminVCL.res -------------------------------------------------------------------------------- /samples/D200-XE6/SamplesPureMVC4D.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {48DA70E3-3E30-47CE-9558-D9E63CD144D4} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Default.Personality.12 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 | {50867C30-DC69-414A-9236-0A136A8440EC} 39 | Samples 40 | Win32;Win64 41 | True 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /samples/EmployeeAdminVCL/App/EmployeeAdmin.MainWin.pas: -------------------------------------------------------------------------------- 1 | unit EmployeeAdmin.MainWin; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, ExtCtrls, StdCtrls, Grids, 8 | EmployeeAdmin.View.Components.UserFrm, 9 | EmployeeAdmin.View.Components.UserLst, 10 | EmployeeAdmin.View.Components.RolePanl; 11 | 12 | type 13 | TMainWindow = class(TForm) 14 | UserForm: TUserForm; 15 | UserList: TUserList; 16 | BottomArea: TPanel; 17 | RolePanel: TRolePanel; 18 | private 19 | public 20 | end; 21 | 22 | implementation 23 | 24 | {$R *.dfm} 25 | 26 | end. 27 | -------------------------------------------------------------------------------- /samples/EmployeeAdminVCL/Controller/EmployeeAdmin.Controller.AddRoleResultCommand.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi / EmployeeAdmin Demo 3 | By Jorge L. Cangas 4 | Copyright(c) 2012 Jorge L. Cangas, Some rights reserved. 5 | } 6 | 7 | unit EmployeeAdmin.Controller.AddRoleResultCommand; 8 | 9 | interface 10 | uses 11 | PureMVC.Interfaces.ICommand, 12 | PureMVC.Interfaces.INotification, 13 | PureMVC.Patterns.Command; 14 | 15 | type 16 | TAddRoleResultCommand = class(TSimpleCommand, ICommand) 17 | public 18 | procedure Execute(Notification: INotification);override; 19 | end; 20 | 21 | implementation 22 | uses Dialogs; 23 | 24 | { TAddRoleResultCommand } 25 | 26 | procedure TAddRoleResultCommand.Execute(Notification: INotification); 27 | var 28 | Result: Boolean; 29 | begin 30 | Result := Notification.Body.AsBoolean; 31 | if not Result then 32 | ShowMessage( 'Add User Role: ' + 'Role already exists for this user!'); 33 | 34 | end; 35 | 36 | end. 37 | -------------------------------------------------------------------------------- /samples/EmployeeAdminVCL/Controller/EmployeeAdmin.Controller.DeleteUserCommand.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi / EmployeeAdmin Demo 3 | By Jorge L. Cangas 4 | Copyright(c) 2012 Jorge L. Cangas, Some rights reserved. 5 | } 6 | 7 | unit EmployeeAdmin.Controller.DeleteUserCommand; 8 | interface 9 | 10 | uses 11 | PureMVC.Interfaces.ICommand, 12 | PureMVC.Interfaces.INotification, 13 | PureMVC.Interfaces.IFacade, 14 | PureMVC.Patterns.Command; 15 | 16 | type 17 | 18 | TDeleteUserCommand = class(TSimpleCommand, ICommand) 19 | public 20 | ///

21 | /// retrieve the user and role proxies and delete the user 22 | /// and his roles. then send the USER_DELETED notification 23 | /// 24 | /// 25 | procedure Execute(Notification: INotification );override; 26 | end; 27 | 28 | implementation 29 | uses 30 | EmployeeAdmin.Model.VO.UserVO, 31 | EmployeeAdmin.Model.RoleProxy, 32 | EmployeeAdmin.Model.UserProxy, 33 | EmployeeAdmin.Facade; 34 | 35 | { TDeleteUserCommand } 36 | 37 | procedure TDeleteUserCommand.Execute(Notification: INotification); 38 | var 39 | User: TUserVO; 40 | UserProxy: TUserProxy; 41 | RoleProxy: TRoleProxy; 42 | begin 43 | inherited; 44 | User := Notification.Body.AsType; 45 | UserProxy := Facade.RetrieveProxy(UserProxy.NAME) as TUserProxy; 46 | RoleProxy := Facade.RetrieveProxy(RoleProxy.NAME) as TRoleProxy; 47 | UserProxy.DeleteItem(User); 48 | RoleProxy.DeleteItem(User); 49 | SendNotification(MSG.USER_DELETED, Self); 50 | 51 | end; 52 | 53 | end. 54 | 55 | -------------------------------------------------------------------------------- /samples/EmployeeAdminVCL/Controller/EmployeeAdmin.Controller.StartupCommand.pas: -------------------------------------------------------------------------------- 1 | unit EmployeeAdmin.Controller.StartupCommand; 2 | 3 | interface 4 | uses 5 | PureMVC.Interfaces.ICommand, 6 | PureMVC.Interfaces.INotification, 7 | PureMVC.Interfaces.IFacade, 8 | PureMVC.Patterns.Command; 9 | 10 | type 11 | 12 | TStartupCommand = class(TSimpleCommand, ICommand) 13 | public 14 | /// 15 | /// Register the Proxies and Mediators. 16 | /// 17 | /// Get the View Components for the Mediators from the app, 18 | /// which passed a reference to itself on the notification. 19 | /// 20 | /// 21 | procedure Execute(Note: INotification);override; 22 | end; 23 | 24 | implementation 25 | uses 26 | EmployeeAdmin.Model.UserProxy, 27 | EmployeeAdmin.Model.RoleProxy, 28 | EmployeeAdmin.View.UserFormMediator, 29 | EmployeeAdmin.View.UserListMediator, 30 | EmployeeAdmin.View.RolePanelMediator, 31 | EmployeeAdmin.MainWin; 32 | 33 | { TStartupCommand } 34 | 35 | procedure TStartupCommand.Execute(Note: INotification); 36 | var 37 | Window: TMainWindow; 38 | begin 39 | Facade.RegisterProxy(TUserProxy.Create); 40 | Facade.RegisterProxy(TRoleProxy.Create); 41 | 42 | Window := Note.Body.AsType; 43 | 44 | Facade.RegisterMediator(TUserFormMediator.Create(Window.UserForm)); 45 | Facade.RegisterMediator(TUserListMediator.Create(Window.UserList)); 46 | Facade.RegisterMediator(TRolePanelMediator.Create(Window.RolePanel)); 47 | 48 | end; 49 | 50 | end. 51 | -------------------------------------------------------------------------------- /samples/EmployeeAdminVCL/Model/EmployeeAdmin.Model.UserProxy.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi / EmployeeAdmin Demo 3 | By Jorge L. Cangas 4 | Copyright(c) 2012 Jorge L. Cangas, Some rights reserved. 5 | } 6 | 7 | unit EmployeeAdmin.Model.UserProxy; 8 | 9 | interface 10 | 11 | uses Generics.Collections, 12 | PureMVC.Interfaces.Collections, 13 | PureMVC.Interfaces.IProxy, 14 | PureMVC.Patterns.Proxy, 15 | EmployeeAdmin.Model.Enum.DeptEnum, 16 | EmployeeAdmin.Model.VO.RoleVO, 17 | EmployeeAdmin.Model.VO.UserVO; 18 | 19 | type 20 | TUserProxy = class(TProxy, IProxy) 21 | private 22 | FUsers: IList; 23 | function GetUsers: IList; 24 | public 25 | const NAME = 'UserProxy'; 26 | constructor Create; 27 | /// 28 | /// Return data property cast to proper type 29 | /// 30 | property Users: IListread GetUsers; 31 | /// 32 | /// add an item to the data 33 | /// 34 | /// 35 | procedure AddItem(User: TUserVO); 36 | /// 37 | /// update an item in the data 38 | /// 39 | /// 40 | procedure UpdateItem(User: TUserVO); 41 | /// 42 | /// delete an item in the data 43 | /// 44 | /// 45 | procedure DeleteItem(User: TUserVO); 46 | end; 47 | 48 | implementation 49 | uses RTTI, 50 | PureMVC.Patterns.Collections; 51 | 52 | { TUserProxy } 53 | 54 | procedure TUserProxy.AddItem(User: TUserVO); 55 | begin 56 | Users.Add(User); 57 | end; 58 | 59 | constructor TUserProxy.Create; 60 | begin 61 | FUsers := TList.Create; 62 | inherited Create(NAME, TValue.From(FUsers)); 63 | 64 | // generate some test data 65 | AddItem(TUserVO.Create('lstooge', 'Larry', 'Stooge', 'larry@stooges.com', 66 | 'ijk456', TDeptEnum.ACCT)); 67 | AddItem(TUserVO.Create('cstooge', 'Curly', 'Stooge', 'curly@stooges.com', 68 | 'xyz987', TDeptEnum.SALES)); 69 | AddItem(TUserVO.Create('mstooge', 'Moe', 'Stooge', 'moe@stooges.com', 70 | 'abc123', TDeptEnum.PLANT)); 71 | 72 | end; 73 | 74 | function TUserProxy.GetUsers: IList; 75 | begin 76 | Result := FUsers 77 | end; 78 | 79 | procedure TUserProxy.UpdateItem(User: TUserVO); 80 | var 81 | i: Integer; 82 | begin 83 | if Users.BinarySearch(User, i) then 84 | Users[i] := User; 85 | end; 86 | 87 | procedure TUserProxy.DeleteItem(User: TUserVO); 88 | var 89 | i: Integer; 90 | begin 91 | if Users.BinarySearch(User, i) then 92 | Users.Delete(i); 93 | end; 94 | 95 | end. 96 | -------------------------------------------------------------------------------- /samples/EmployeeAdminVCL/Model/Enum/EmployeeAdmin.Model.Enum.DeptEnum.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi / EmployeeAdmin Demo 3 | By Jorge L. Cangas 4 | Copyright(c) 2012 Jorge L. Cangas, Some rights reserved. 5 | } 6 | 7 | unit EmployeeAdmin.Model.Enum.DeptEnum; 8 | 9 | interface 10 | 11 | uses Classes, 12 | EmployeeAdmin.Model.Enum.Enum; 13 | 14 | type 15 | TDeptEnum = class(TEnum) 16 | private 17 | class var FItems: array of TDeptEnum; 18 | class function GetItems(Index: Integer): TDeptEnum; static; 19 | class procedure SetItems(Index: Integer; Value: TDeptEnum); static; 20 | public 21 | class function Count: Integer; override; 22 | class procedure Fill(L: TStrings); override; 23 | class property Items[Index: Integer]: TDeptEnum read GetItems write SetItems; 24 | constructor Create(Value: string; Ordinal: Integer);override; 25 | 26 | class property NONE_SELECTED: TDeptEnum index 0 read GetItems; 27 | class property ACCT: TDeptEnum index 1 read GetItems; 28 | class property SALES: TDeptEnum index 2 read GetItems; 29 | class property PLANT: TDeptEnum index 3 read GetItems; 30 | class property SHIPPING: TDeptEnum index 4 read GetItems; 31 | class property QC: TDeptEnum index 5 read GetItems; 32 | end; 33 | 34 | implementation 35 | 36 | { TDeptEnum } 37 | 38 | class function TDeptEnum.Count: Integer; 39 | begin 40 | Result := Length(FItems); 41 | end; 42 | 43 | constructor TDeptEnum.Create(Value: string; Ordinal: Integer); 44 | begin 45 | inherited; 46 | SetItems(Count, Self); 47 | end; 48 | 49 | class procedure TDeptEnum.Fill(L: TStrings); 50 | var 51 | Item: TEnum; 52 | begin 53 | for Item in FItems do 54 | L.AddObject(Item.Value, Item) 55 | end; 56 | 57 | class function TDeptEnum.GetItems(Index: Integer): TDeptEnum; 58 | begin 59 | Result := FItems[Index]; 60 | end; 61 | 62 | class procedure TDeptEnum.SetItems(Index: Integer; Value: TDeptEnum); 63 | begin 64 | if Index >= Count then begin 65 | SetLength(FItems, 1 + Index); 66 | end; 67 | FItems[Index] := Value; 68 | Value.FIndex := Index; 69 | end; 70 | 71 | initialization 72 | 73 | TDeptEnum.Create('-None Selected--', -1); 74 | TDeptEnum.Create('Accounting', 0); 75 | TDeptEnum.Create('Sales', 1); 76 | TDeptEnum.Create('Plant', 2); 77 | TDeptEnum.Create('Shipping', 3); 78 | TDeptEnum.Create('Quality Control', 4); 79 | 80 | end. 81 | -------------------------------------------------------------------------------- /samples/EmployeeAdminVCL/Model/Enum/EmployeeAdmin.Model.Enum.Enum.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi / EmployeeAdmin Demo 3 | By Jorge L. Cangas 4 | Copyright(c) 2012 Jorge L. Cangas, Some rights reserved. 5 | } 6 | 7 | unit EmployeeAdmin.Model.Enum.Enum; 8 | 9 | interface 10 | 11 | uses Classes; 12 | 13 | type 14 | TEnumClass = class of TEnum; 15 | TEnum = class 16 | private 17 | FOrdinal: Integer; 18 | FValue: string; 19 | protected 20 | FIndex: Integer; 21 | public 22 | class function Count: Integer; virtual;abstract; 23 | class procedure Fill(L: TStrings);virtual;abstract; 24 | constructor Create(Value: string; Ordinal: Integer);virtual; 25 | function Equals(e: TObject): Boolean;override; 26 | function ToString: string;override; 27 | property Index : Integer read FIndex; 28 | property Ordinal: Integer read FOrdinal; 29 | property Value: string read FValue; 30 | end; 31 | 32 | implementation 33 | 34 | { TEnum } 35 | 36 | constructor TEnum.Create(Value: string; Ordinal: Integer); 37 | begin 38 | inherited Create; 39 | FValue := Value; 40 | FOrdinal := Ordinal; 41 | end; 42 | 43 | function TEnum.Equals(e: TObject): Boolean; 44 | begin 45 | Result := (e is TEnum) and (Ordinal = TEnum(e).Ordinal) and 46 | (Value = TEnum(e).Value); 47 | end; 48 | 49 | function TEnum.ToString: string; 50 | begin 51 | Result := Value; 52 | end; 53 | 54 | end. 55 | -------------------------------------------------------------------------------- /samples/EmployeeAdminVCL/Model/VO/EmployeeAdmin.Model.VO.RoleVO.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi / EmployeeAdmin Demo 3 | By Jorge L. Cangas 4 | Copyright(c) 2012 Jorge L. Cangas, Some rights reserved. 5 | } 6 | 7 | unit EmployeeAdmin.Model.VO.RoleVO; 8 | 9 | interface 10 | uses 11 | PureMVC.Interfaces.Collections, 12 | EmployeeAdmin.Model.Enum.RoleEnum; 13 | 14 | type 15 | 16 | TRoleVO = class 17 | private 18 | FUserName: string; 19 | //TODO: ObservableCollection m_roles = new ObservableCollection(); 20 | FRoles: IList; 21 | public 22 | constructor Create(Username: string);overload; 23 | constructor Create(Username: string; Roles: IList);overload; 24 | constructor Create(Username: string; const Roles: array of TRoleEnum);overload; 25 | 26 | property UserName: string read FUserName; 27 | property Roles: IList read FRoles; 28 | end; 29 | 30 | implementation 31 | uses 32 | PureMVC.Patterns.Collections; 33 | 34 | { TRoleVO } 35 | 36 | constructor TRoleVO.Create(Username: string); 37 | begin 38 | inherited Create; 39 | FUserName := Username; 40 | 41 | // TODO: FRoles := TObservableCollection(); 42 | //public class ObservableCollection : Collection, INotifyCollectionChanged, INotifyPropertyChanged 43 | FRoles := TList.Create; 44 | end; 45 | 46 | constructor TRoleVO.Create(Username: string; Roles: IList); 47 | var 48 | Role: TRoleEnum; 49 | begin 50 | inherited Create; 51 | Create(Username); 52 | 53 | if not Assigned(Roles) then Exit; 54 | 55 | for Role in Roles do 56 | FRoles.Add(Role); 57 | end; 58 | 59 | constructor TRoleVO.Create(Username: string; const Roles: array of TRoleEnum); 60 | begin 61 | inherited Create; 62 | Create(Username); 63 | FRoles.AddRange(Roles); 64 | end; 65 | 66 | end. 67 | 68 | -------------------------------------------------------------------------------- /samples/EmployeeAdminVCL/Model/VO/EmployeeAdmin.Model.VO.UserVO.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi / EmployeeAdmin Demo 3 | By Jorge L. Cangas 4 | Copyright(c) 2012 Jorge L. Cangas, Some rights reserved. 5 | } 6 | 7 | unit EmployeeAdmin.Model.VO.UserVO; 8 | 9 | interface 10 | uses EmployeeAdmin.Model.Enum.DeptEnum; 11 | 12 | type 13 | 14 | TUserVO = class(TObject) 15 | private 16 | FEmail: string; 17 | FLastName: string; 18 | FDepartment: TDeptEnum; 19 | FPassword: string; 20 | FFirstName: string; 21 | FUserName: string; 22 | function GetIsValid: Boolean; 23 | function GetGivenName: string; 24 | public 25 | constructor Create;overload; 26 | constructor Create(UName:string; FName: string; LName: string; Email: string; Password: string; Department: TDeptEnum);overload; 27 | function Equals(Other: TObject): Boolean;override; 28 | property UserName: string read FUserName; 29 | property FirstName: string read FFirstName; 30 | property LastName: string read FLastName; 31 | property Email: string read FEmail; 32 | property Password: string read FPassword; 33 | property Department: TDeptEnum read FDepartment; 34 | property IsValid: Boolean read GetIsValid; 35 | property GivenName: string read GetGivenName; 36 | end; 37 | 38 | implementation 39 | 40 | { TUserVO } 41 | 42 | constructor TUserVO.Create; 43 | begin 44 | inherited Create; 45 | FDepartment := TDeptEnum.NONE_SELECTED; 46 | end; 47 | 48 | constructor TUserVO.Create(UName, FName, LName, Email, Password: string; 49 | Department: TDeptEnum); 50 | begin 51 | Create; 52 | FUserName := UName; 53 | FFirstName := FName; 54 | FLastName := LName; 55 | FEmail := Email; 56 | FPassword := Password; 57 | FDepartment := Department; 58 | end; 59 | 60 | function TUserVO.Equals(Other: TObject): Boolean; 61 | begin 62 | Result := (Other is TUserVO) and (Self.UserName = TUserVO(Other).UserName) 63 | end; 64 | 65 | function TUserVO.GetGivenName: string; 66 | begin 67 | Result := LastName + ', ' + FirstName; 68 | end; 69 | 70 | function TUserVO.GetIsValid: Boolean; 71 | begin 72 | Result :=(UserName <> '') and 73 | (Password <> '') and 74 | (Department <> TDeptEnum.NONE_SELECTED); 75 | end; 76 | 77 | end. 78 | -------------------------------------------------------------------------------- /samples/EmployeeAdminVCL/View/Components/EmployeeAdmin.View.Components.RolePanl.dfm: -------------------------------------------------------------------------------- 1 | object RolePanel: TRolePanel 2 | AlignWithMargins = True 3 | Left = 0 4 | Top = 0 5 | Width = 287 6 | Height = 244 7 | Padding.Left = 5 8 | Padding.Top = 5 9 | Padding.Right = 5 10 | Padding.Bottom = 5 11 | TabOrder = 0 12 | object UserRolesCtl: TListBox 13 | Left = 5 14 | Top = 5 15 | Width = 277 16 | Height = 204 17 | Align = alClient 18 | ItemHeight = 13 19 | TabOrder = 0 20 | OnClick = UserRolesCtlClick 21 | end 22 | object BottomPanel: TPanel 23 | Left = 5 24 | Top = 209 25 | Width = 277 26 | Height = 30 27 | Align = alBottom 28 | BevelOuter = bvNone 29 | TabOrder = 1 30 | DesignSize = ( 31 | 277 32 | 30) 33 | object RemoveBtn: TButton 34 | Left = 220 35 | Top = 3 36 | Width = 57 37 | Height = 25 38 | Action = RoleRemoveAct 39 | Anchors = [akTop, akRight] 40 | TabOrder = 0 41 | end 42 | object AddBtn: TButton 43 | Left = 152 44 | Top = 3 45 | Width = 54 46 | Height = 25 47 | Action = RoleAddAct 48 | Anchors = [akTop, akRight] 49 | TabOrder = 1 50 | end 51 | object RoleListCtl: TComboBox 52 | Left = 0 53 | Top = 5 54 | Width = 137 55 | Height = 21 56 | Style = csDropDownList 57 | Anchors = [akLeft, akTop, akRight] 58 | TabOrder = 2 59 | OnSelect = RoleListCtlSelect 60 | end 61 | end 62 | object ActionList: TActionList 63 | Left = 128 64 | Top = 112 65 | object RoleAddAct: TAction 66 | Category = 'Role' 67 | Caption = 'Add' 68 | OnExecute = RoleAddActExecute 69 | end 70 | object RoleRemoveAct: TAction 71 | Category = 'Role' 72 | Caption = 'Remove' 73 | OnExecute = RoleRemoveActExecute 74 | end 75 | end 76 | end 77 | -------------------------------------------------------------------------------- /samples/EmployeeAdminVCL/View/Components/EmployeeAdmin.View.Components.RolePanl.pas: -------------------------------------------------------------------------------- 1 | unit EmployeeAdmin.View.Components.RolePanl; 2 | 3 | interface 4 | 5 | uses 6 | Windows, 7 | Messages, 8 | SysUtils, 9 | Variants, 10 | Classes, 11 | Graphics, 12 | Controls, 13 | Forms, 14 | Dialogs, 15 | StdCtrls, 16 | ExtCtrls, 17 | ActnList, 18 | PureMVC.Interfaces.Collections, 19 | EmployeeAdmin.Model.Enum.Enum, 20 | EmployeeAdmin.Model.Enum.RoleEnum, 21 | EmployeeAdmin.Model.VO.UserVO, System.Actions; 22 | 23 | type 24 | TRolePanel = class(TFrame) 25 | UserRolesCtl: TListBox; 26 | BottomPanel: TPanel; 27 | RemoveBtn: TButton; 28 | AddBtn: TButton; 29 | RoleListCtl: TComboBox; 30 | ActionList: TActionList; 31 | RoleAddAct: TAction; 32 | RoleRemoveAct: TAction; 33 | procedure RoleAddActExecute(Sender: TObject); 34 | procedure RoleRemoveActExecute(Sender: TObject); 35 | procedure RoleListCtlSelect(Sender: TObject); 36 | procedure UserRolesCtlClick(Sender: TObject); 37 | private 38 | FAddRole: TNotifyEvent; 39 | FRemoveRole: TNotifyEvent; 40 | FRoles: IList; 41 | FUser: TUserVO; 42 | FSelectedRole: TRoleEnum; 43 | public 44 | procedure UpdateCombo(EnumClass: TEnumClass; Selected: TEnum); 45 | procedure ClearForm; 46 | procedure ShowUser(User: TUserVO; Roles: IList); 47 | procedure ShowUserRoles(Roles: IList); 48 | 49 | property User: TUserVO read FUser; 50 | property Roles: IList read FRoles; 51 | property SelectedRole: TRoleEnum read FSelectedRole; 52 | property OnAddRole: TNotifyEvent read FAddRole write FAddRole; 53 | property OnRemoveRole: TNotifyEvent read FRemoveRole write FRemoveRole; 54 | end; 55 | 56 | implementation 57 | 58 | {$R *.dfm} 59 | 60 | { TRolePanel } 61 | 62 | procedure TRolePanel.UpdateCombo(EnumClass: TEnumClass; Selected: TEnum); 63 | begin 64 | RoleListCtl.Items.Clear; 65 | EnumClass.Fill(RoleListCtl.Items); 66 | RoleListCtl.ItemIndex := Selected.Index; 67 | end; 68 | 69 | procedure TRolePanel.ClearForm(); 70 | begin 71 | FUser := nil; 72 | FRoles := nil; 73 | UserRolesCtl.Clear; 74 | RoleListCtl.ItemIndex := TRoleEnum.NONE_SELECTED.Index; 75 | end; 76 | 77 | procedure TRolePanel.ShowUser(User: TUserVO; Roles: IList); 78 | begin 79 | if User = nil then 80 | ClearForm() 81 | else begin 82 | FUser := User; 83 | FRoles := Roles; 84 | ShowUserRoles(Roles); 85 | RoleListCtl.ItemIndex := TRoleEnum.NONE_SELECTED.Index; 86 | end; 87 | end; 88 | 89 | procedure TRolePanel.ShowUserRoles(Roles: IList); 90 | var 91 | R: TRoleEnum; 92 | begin 93 | UserRolesCtl.Clear; 94 | for R in Roles do 95 | UserRolesCtl.Items.AddObject(R.Value, R); 96 | end; 97 | 98 | procedure TRolePanel.RoleAddActExecute(Sender: TObject); 99 | begin 100 | OnAddRole(Self); 101 | end; 102 | 103 | procedure TRolePanel.RoleRemoveActExecute(Sender: TObject); 104 | begin 105 | OnRemoveRole(Self); 106 | end; 107 | 108 | procedure TRolePanel.UserRolesCtlClick(Sender: TObject); 109 | begin 110 | if (UserRolesCtl.ItemIndex = -1) then 111 | FSelectedRole := nil 112 | else 113 | FSelectedRole := UserRolesCtl.Items.Objects[UserRolesCtl.ItemIndex] as TRoleEnum; 114 | end; 115 | 116 | procedure TRolePanel.RoleListCtlSelect(Sender: TObject); 117 | begin 118 | if (RoleListCtl.ItemIndex = TRoleEnum.NONE_SELECTED.Index) then 119 | FSelectedRole := nil 120 | else 121 | FSelectedRole := TRoleEnum.Items[RoleListCtl.ItemIndex]; 122 | end; 123 | 124 | end. 125 | -------------------------------------------------------------------------------- /samples/EmployeeAdminVCL/View/Components/EmployeeAdmin.View.Components.UserFrm.dfm: -------------------------------------------------------------------------------- 1 | object UserForm: TUserForm 2 | Left = 0 3 | Top = 0 4 | Width = 305 5 | Height = 281 6 | TabOrder = 0 7 | DesignSize = ( 8 | 305 9 | 281) 10 | object Label1: TLabel 11 | Left = 31 12 | Top = 209 13 | Width = 57 14 | Height = 13 15 | Caption = 'Department' 16 | end 17 | object FirstNameCtl: TLabeledEdit 18 | Left = 95 19 | Top = 8 20 | Width = 192 21 | Height = 21 22 | Anchors = [akLeft, akTop, akRight] 23 | EditLabel.Width = 51 24 | EditLabel.Height = 13 25 | EditLabel.Caption = 'First Name' 26 | LabelPosition = lpLeft 27 | LabelSpacing = 5 28 | TabOrder = 0 29 | end 30 | object LastNameCtl: TLabeledEdit 31 | Left = 95 32 | Top = 41 33 | Width = 192 34 | Height = 21 35 | Anchors = [akLeft, akTop, akRight] 36 | EditLabel.Width = 50 37 | EditLabel.Height = 13 38 | EditLabel.Caption = 'Last Name' 39 | LabelPosition = lpLeft 40 | LabelSpacing = 5 41 | TabOrder = 1 42 | end 43 | object EmailCtl: TLabeledEdit 44 | Left = 95 45 | Top = 75 46 | Width = 192 47 | Height = 21 48 | Anchors = [akLeft, akTop, akRight] 49 | EditLabel.Width = 24 50 | EditLabel.Height = 13 51 | EditLabel.Caption = 'Email' 52 | LabelPosition = lpLeft 53 | LabelSpacing = 5 54 | TabOrder = 2 55 | end 56 | object UserNameCtl: TLabeledEdit 57 | Left = 95 58 | Top = 108 59 | Width = 192 60 | Height = 21 61 | Anchors = [akLeft, akTop, akRight] 62 | EditLabel.Width = 48 63 | EditLabel.Height = 13 64 | EditLabel.Caption = 'Username' 65 | LabelPosition = lpLeft 66 | LabelSpacing = 5 67 | TabOrder = 3 68 | end 69 | object PasswordCtl: TLabeledEdit 70 | Left = 95 71 | Top = 142 72 | Width = 192 73 | Height = 21 74 | Anchors = [akLeft, akTop, akRight] 75 | EditLabel.Width = 46 76 | EditLabel.Height = 13 77 | EditLabel.Caption = 'Password' 78 | LabelPosition = lpLeft 79 | LabelSpacing = 5 80 | TabOrder = 4 81 | end 82 | object ConfirmPasswordCtl: TLabeledEdit 83 | Left = 95 84 | Top = 177 85 | Width = 192 86 | Height = 21 87 | Anchors = [akLeft, akTop, akRight] 88 | EditLabel.Width = 86 89 | EditLabel.Height = 13 90 | EditLabel.Caption = 'Confirm Password' 91 | LabelPosition = lpLeft 92 | LabelSpacing = 5 93 | TabOrder = 5 94 | end 95 | object DepartmentCtl: TComboBox 96 | Left = 95 97 | Top = 206 98 | Width = 192 99 | Height = 21 100 | Anchors = [akLeft, akTop, akRight] 101 | TabOrder = 6 102 | end 103 | object SaveBtn: TButton 104 | Left = 95 105 | Top = 241 106 | Width = 72 107 | Height = 25 108 | Action = SaveAct 109 | TabOrder = 7 110 | end 111 | object CancelBtn: TButton 112 | Left = 215 113 | Top = 241 114 | Width = 72 115 | Height = 25 116 | Action = CancelAct 117 | Anchors = [akTop, akRight] 118 | TabOrder = 8 119 | end 120 | object ActionList: TActionList 121 | Left = 40 122 | Top = 224 123 | object SaveAct: TAction 124 | Caption = 'Update' 125 | OnExecute = SaveActExecute 126 | OnUpdate = SaveActUpdate 127 | end 128 | object CancelAct: TAction 129 | Caption = 'Cancel' 130 | OnExecute = CancelActExecute 131 | OnUpdate = CancelActUpdate 132 | end 133 | end 134 | end 135 | -------------------------------------------------------------------------------- /samples/EmployeeAdminVCL/View/Components/EmployeeAdmin.View.Components.UserLst.dfm: -------------------------------------------------------------------------------- 1 | object UserList: TUserList 2 | Left = 0 3 | Top = 0 4 | Width = 623 5 | Height = 337 6 | TabOrder = 0 7 | object UserGrid: TStringGrid 8 | Left = 0 9 | Top = 0 10 | Width = 623 11 | Height = 298 12 | Align = alClient 13 | BorderStyle = bsNone 14 | ColCount = 6 15 | Ctl3D = False 16 | DoubleBuffered = True 17 | Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing, goRowSelect] 18 | ParentCtl3D = False 19 | ParentDoubleBuffered = False 20 | ScrollBars = ssVertical 21 | TabOrder = 0 22 | OnClick = UserGridClick 23 | end 24 | object ButtonBar: TPanel 25 | Left = 0 26 | Top = 298 27 | Width = 623 28 | Height = 39 29 | Align = alBottom 30 | TabOrder = 1 31 | DesignSize = ( 32 | 623 33 | 39) 34 | object NewBtn: TButton 35 | Left = 444 36 | Top = 6 37 | Width = 75 38 | Height = 25 39 | Anchors = [akTop, akRight] 40 | Caption = 'New' 41 | TabOrder = 0 42 | OnClick = NewBtnClick 43 | end 44 | object DeleteBtn: TButton 45 | Left = 541 46 | Top = 6 47 | Width = 75 48 | Height = 25 49 | Anchors = [akTop, akRight] 50 | Caption = 'Delete' 51 | TabOrder = 1 52 | OnClick = DeleteBtnClick 53 | end 54 | end 55 | end 56 | -------------------------------------------------------------------------------- /samples/EmployeeAdminVCL/View/EmployeeAdmin.View.UserFormMediator.pas: -------------------------------------------------------------------------------- 1 | unit EmployeeAdmin.View.UserFormMediator; 2 | 3 | interface 4 | uses 5 | PureMVC.Interfaces.Collections, 6 | PureMVC.Patterns.Mediator, 7 | PureMVC.Interfaces.INotification, 8 | EmployeeAdmin.Facade, 9 | EmployeeAdmin.Model.UserProxy, 10 | EmployeeAdmin.View.Components.UserFrm; 11 | 12 | type 13 | TUserFormMediator = class(TMediator) 14 | private 15 | FuserProxy: TUserProxy; 16 | function GetUserForm: TUserForm; 17 | 18 | public 19 | const NAME = 'UserFormMediator'; 20 | [PureMVCNotify(Msg.NEW_USER)] 21 | procedure NewUser(Note: INotification); 22 | 23 | [PureMVCNotify(Msg.USER_SELECTED)] 24 | procedure UserSelected(Note: INotification); 25 | 26 | [PureMVCNotify(Msg.USER_DELETED)] 27 | procedure UserDeleted(Note: INotification); 28 | 29 | procedure OnRegister;override; 30 | constructor Create(ViewComponent: TUserForm); 31 | 32 | procedure UserFormOnAddUser(Sender: TObject); 33 | procedure UserFormOnUpdateUser(Sender: TObject); 34 | procedure UserFormOnCancelUser(Sender: TObject); 35 | 36 | property UserForm: TUserForm read GetUserForm; 37 | end; 38 | 39 | implementation 40 | uses 41 | Types, 42 | EmployeeAdmin.Model.Enum.DeptEnum, 43 | EmployeeAdmin.Model.VO.UserVO; 44 | 45 | { TUserFormMediator } 46 | 47 | constructor TUserFormMediator.Create(ViewComponent: TUserForm); 48 | begin 49 | inherited Create(NAME, ViewComponent); 50 | UserForm.UpdateCombo(TDeptEnum, TDeptEnum.NONE_SELECTED); 51 | 52 | UserForm.OnAddUser := UserFormOnAddUser; 53 | UserForm.OnUpdateUser := UserFormOnUpdateUser; 54 | UserForm.OnCancelUser := UserFormOnCancelUser; 55 | end; 56 | 57 | function TUserFormMediator.GetUserForm: TUserForm; 58 | begin 59 | Result := ViewComponent as TUserForm; 60 | end; 61 | 62 | procedure TUserFormMediator.NewUser(Note: INotification); 63 | var 64 | User: TUserVO; 65 | begin 66 | User := Note.Body.AsType; 67 | UserForm.ShowUser(User, TUserFormMode.ADD); 68 | end; 69 | 70 | procedure TUserFormMediator.UserSelected(Note: INotification); 71 | var 72 | User: TUserVO; 73 | begin 74 | User := Note.Body.AsType; 75 | UserForm.ShowUser(User, TUserFormMode.EDIT); 76 | end; 77 | 78 | procedure TUserFormMediator.UserDeleted(Note: INotification); 79 | begin 80 | UserForm.ClearForm; 81 | end; 82 | 83 | procedure TUserFormMediator.OnRegister; 84 | begin 85 | inherited; 86 | FUserProxy := (Facade.RetrieveProxy(TUserProxy.NAME) as TUserProxy); 87 | end; 88 | 89 | procedure TUserFormMediator.UserFormOnAddUser(Sender: TObject); 90 | var 91 | User: TUserVO; 92 | begin 93 | User := UserForm.User; 94 | FUserProxy.AddItem(user); 95 | SendNotification(MSG.USER_ADDED, Self, User); 96 | UserForm.ClearForm; 97 | end; 98 | 99 | procedure TUserFormMediator.UserFormOnCancelUser(Sender: TObject); 100 | begin 101 | SendNotification(MSG.CANCEL_SELECTED, Self); 102 | UserForm.ClearForm; 103 | end; 104 | 105 | procedure TUserFormMediator.UserFormOnUpdateUser(Sender: TObject); 106 | var 107 | User: TUserVO; 108 | begin 109 | User := UserForm.User; 110 | FUserProxy.UpdateItem(User); 111 | SendNotification(MSG.USER_UPDATED, Self, User); 112 | UserForm.ClearForm; 113 | end; 114 | 115 | end. 116 | -------------------------------------------------------------------------------- /samples/EmployeeAdminVCL/View/EmployeeAdmin.View.UserListMediator.pas: -------------------------------------------------------------------------------- 1 | unit EmployeeAdmin.View.UserListMediator; 2 | 3 | interface 4 | uses 5 | PureMVC.Interfaces.Collections, 6 | PureMVC.Interfaces.INotification, 7 | PureMVC.Patterns.Mediator, 8 | EmployeeAdmin.Facade, 9 | EmployeeAdmin.Model.UserProxy, 10 | EmployeeAdmin.View.Components.UserLst; 11 | 12 | type 13 | TUserListMediator = class(TMediator) 14 | private 15 | UserProxy: TUserProxy; 16 | procedure UserListDeleteUser(Sender: TObject); 17 | procedure UserListNewUser(Sender: TObject); 18 | procedure UserListSelectUser(Sender: TObject); 19 | function GetUserList: TUserList; 20 | public 21 | const NAME = 'UserListMediator'; 22 | constructor Create(UserList: TUserList); 23 | procedure OnRegister;override; 24 | property UserList: TUserList read GetUserList; 25 | 26 | [PureMVCNotify(Msg.CANCEL_SELECTED)] 27 | procedure CancelSelected(Note: INotification); 28 | [PureMVCNotify(Msg.USER_ADDED)] 29 | procedure UserAdded(Note: INotification); 30 | [PureMVCNotify(Msg.USER_UPDATED)] 31 | procedure UserUpdated(Note: INotification); 32 | [PureMVCNotify(Msg.USER_DELETED)] 33 | procedure UserDeleted(Note: INotification); 34 | end; 35 | 36 | implementation 37 | 38 | uses Types, 39 | EmployeeAdmin.Model.VO.UserVO; 40 | 41 | 42 | { TUserListMediator } 43 | 44 | procedure TUserListMediator.CancelSelected(Note: INotification); 45 | begin 46 | UserList.Deselect; 47 | end; 48 | 49 | procedure TUserListMediator.UserAdded(Note: INotification); 50 | begin 51 | UserList.Deselect; 52 | UserList.BindUpdateCtl; 53 | end; 54 | 55 | procedure TUserListMediator.UserDeleted(Note: INotification); 56 | begin 57 | UserList.Deselect; 58 | UserList.BindUpdateCtl; 59 | end; 60 | 61 | procedure TUserListMediator.UserUpdated(Note: INotification); 62 | var 63 | User: TUserVO; 64 | begin 65 | UserList.Deselect; 66 | User := Note.Body.AsType; 67 | UserList.BindUpdateCtlItem(User); 68 | end; 69 | 70 | constructor TUserListMediator.Create(userList: TUserList); 71 | begin 72 | inherited Create(NAME, UserList); 73 | UserList.OnNewUser := UserListNewUser; 74 | UserList.OnDeleteUser := UserListDeleteUser; 75 | UserList.OnSelectUser := UserListSelectUser; 76 | end; 77 | 78 | function TUserListMediator.GetUserList: TUserList; 79 | begin 80 | Result := TUserList(ViewComponent); 81 | end; 82 | 83 | procedure TUserListMediator.OnRegister; 84 | begin 85 | inherited; 86 | UserProxy := Facade.RetrieveProxy(UserProxy.NAME) as TUserProxy; 87 | UserList.Users := UserProxy.Users; 88 | end; 89 | 90 | procedure TUserListMediator.UserListNewUser(Sender: TObject); 91 | begin 92 | SendNotification(MSG.NEW_USER, Self, TUserVO.Create); 93 | end; 94 | 95 | procedure TUserListMediator.UserListDeleteUser(Sender: TObject); 96 | begin 97 | SendNotification(MSG.DELETE_USER, Self, UserList.SelectedUser); 98 | end; 99 | 100 | procedure TUserListMediator.UserListSelectUser(Sender: TObject); 101 | begin 102 | SendNotification(MSG.USER_SELECTED, Self, UserList.SelectedUser); 103 | end; 104 | 105 | end. 106 | -------------------------------------------------------------------------------- /samples/EmployeeAdminVCL/version.txt: -------------------------------------------------------------------------------- 1 | PureMVC Delphi / EmployeeAdmin Demo 2 | By Jorge L. Cangas 3 | Copyright(c) 2012 Jorge L. Cangas, Some rights reserved. 4 | -------------------------------------------------------------------------- 5 | Release Date: 2/21/09 6 | Platform: Delphi 7 | Version: 1 8 | Revision: 0 9 | Author: Jorge L. Cangas 10 | License: Creative Commons Attribution 3.0 United States License 11 | -------------------------------------------------------------------------- 12 | 1.0 - Complete port of the classic AS3 Employee Admin Demo 13 | 14 | -------------------------------------------------------------------------------- /samples/samples.optset: -------------------------------------------------------------------------------- 1 |  2 | 3 | DEBUG;$(DCC_Define) 4 | $(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\bin 5 | $(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\bin 6 | $(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\lib;$(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\Debug\lib;$(DCC_UnitSearchPath) 7 | WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;$(DCC_UnitAlias) 8 | $(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\lib 9 | $(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\lib 10 | 11 | 12 | Delphi.Personality.12 13 | OptionSet 14 | 15 | 16 | 17 | 12 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/D190-XE5/PureMVC.deployproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 12 5 | 6 | 7 | 8 | 9 | 10 | 11 | PureMVC\ 12 | libcgunwind.1.0.dylib 13 | 1 14 | 15 | 16 | True 17 | 18 | 19 | 20 | 21 | 22 | PureMVC.app\ 23 | libcgunwind.1.0.dylib 24 | 0 25 | 26 | 27 | True 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/D190-XE5/PureMVC.dpk: -------------------------------------------------------------------------------- 1 | package PureMVC; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS OFF} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION ON} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO OFF} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES OFF} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE RELEASE} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$LIBSUFFIX '190'} 29 | {$IMPLICITBUILD OFF} 30 | 31 | requires 32 | rtl; 33 | 34 | contains 35 | PureMVC.Core.Controller in '..\Core\PureMVC.Core.Controller.pas', 36 | PureMVC.Core.Model in '..\Core\PureMVC.Core.Model.pas', 37 | PureMVC.Core.View in '..\Core\PureMVC.Core.View.pas', 38 | PureMVC.Interfaces.ICommand in '..\Interfaces\PureMVC.Interfaces.ICommand.pas', 39 | PureMVC.Interfaces.IController in '..\Interfaces\PureMVC.Interfaces.IController.pas', 40 | PureMVC.Interfaces.IFacade in '..\Interfaces\PureMVC.Interfaces.IFacade.pas', 41 | PureMVC.Interfaces.IMediator in '..\Interfaces\PureMVC.Interfaces.IMediator.pas', 42 | PureMVC.Interfaces.IModel in '..\Interfaces\PureMVC.Interfaces.IModel.pas', 43 | PureMVC.Interfaces.INotification in '..\Interfaces\PureMVC.Interfaces.INotification.pas', 44 | PureMVC.Interfaces.INotifier in '..\Interfaces\PureMVC.Interfaces.INotifier.pas', 45 | PureMVC.Interfaces.IObserver in '..\Interfaces\PureMVC.Interfaces.IObserver.pas', 46 | PureMVC.Interfaces.IProxy in '..\Interfaces\PureMVC.Interfaces.IProxy.pas', 47 | PureMVC.Interfaces.IView in '..\Interfaces\PureMVC.Interfaces.IView.pas', 48 | PureMVC.Patterns.Command in '..\Patterns\PureMVC.Patterns.Command.pas', 49 | PureMVC.Patterns.Facade in '..\Patterns\PureMVC.Patterns.Facade.pas', 50 | PureMVC.Patterns.Mediator in '..\Patterns\PureMVC.Patterns.Mediator.pas', 51 | PureMVC.Patterns.Notification in '..\Patterns\PureMVC.Patterns.Notification.pas', 52 | PureMVC.Patterns.Notifier in '..\Patterns\PureMVC.Patterns.Notifier.pas', 53 | PureMVC.Patterns.Observer in '..\Patterns\PureMVC.Patterns.Observer.pas', 54 | PureMVC.Patterns.Proxy in '..\Patterns\PureMVC.Patterns.Proxy.pas', 55 | PureMVC.Interfaces.Collections in '..\Interfaces\PureMVC.Interfaces.Collections.pas', 56 | PureMVC.Patterns.Collections in '..\Patterns\PureMVC.Patterns.Collections.pas'; 57 | 58 | end. 59 | 60 | -------------------------------------------------------------------------------- /src/D190-XE5/PureMVC.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/src/D190-XE5/PureMVC.res -------------------------------------------------------------------------------- /src/D190-XE5/PureMVC4D.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {48DA70E3-3E30-47CE-9558-D9E63CD144D4} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Default.Personality.12 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 | {25811770-0120-4D90-ABD3-A47020842BE6} 39 | Debug;Release 40 | Android;iOSDevice;iOSSimulator;OSX32;Win32;Win64 41 | True 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/D200-XE6/PureMVC.deployproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 12 5 | 6 | 7 | 8 | 9 | 10 | 11 | PureMVC\ 12 | libcgunwind.1.0.dylib 13 | 1 14 | 15 | 16 | True 17 | 18 | 19 | 20 | 21 | 22 | PureMVC.app\ 23 | libcgunwind.1.0.dylib 24 | 0 25 | 26 | 27 | True 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/D200-XE6/PureMVC.dpk: -------------------------------------------------------------------------------- 1 | package PureMVC; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS OFF} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION ON} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO OFF} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES OFF} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE RELEASE} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$LIBSUFFIX '200'} 29 | {$IMPLICITBUILD OFF} 30 | 31 | requires 32 | rtl; 33 | 34 | contains 35 | PureMVC.Core.Controller in '..\Core\PureMVC.Core.Controller.pas', 36 | PureMVC.Core.Model in '..\Core\PureMVC.Core.Model.pas', 37 | PureMVC.Core.View in '..\Core\PureMVC.Core.View.pas', 38 | PureMVC.Interfaces.ICommand in '..\Interfaces\PureMVC.Interfaces.ICommand.pas', 39 | PureMVC.Interfaces.IController in '..\Interfaces\PureMVC.Interfaces.IController.pas', 40 | PureMVC.Interfaces.IFacade in '..\Interfaces\PureMVC.Interfaces.IFacade.pas', 41 | PureMVC.Interfaces.IMediator in '..\Interfaces\PureMVC.Interfaces.IMediator.pas', 42 | PureMVC.Interfaces.IModel in '..\Interfaces\PureMVC.Interfaces.IModel.pas', 43 | PureMVC.Interfaces.INotification in '..\Interfaces\PureMVC.Interfaces.INotification.pas', 44 | PureMVC.Interfaces.INotifier in '..\Interfaces\PureMVC.Interfaces.INotifier.pas', 45 | PureMVC.Interfaces.IObserver in '..\Interfaces\PureMVC.Interfaces.IObserver.pas', 46 | PureMVC.Interfaces.IProxy in '..\Interfaces\PureMVC.Interfaces.IProxy.pas', 47 | PureMVC.Interfaces.IView in '..\Interfaces\PureMVC.Interfaces.IView.pas', 48 | PureMVC.Patterns.Command in '..\Patterns\PureMVC.Patterns.Command.pas', 49 | PureMVC.Patterns.Facade in '..\Patterns\PureMVC.Patterns.Facade.pas', 50 | PureMVC.Patterns.Mediator in '..\Patterns\PureMVC.Patterns.Mediator.pas', 51 | PureMVC.Patterns.Notification in '..\Patterns\PureMVC.Patterns.Notification.pas', 52 | PureMVC.Patterns.Notifier in '..\Patterns\PureMVC.Patterns.Notifier.pas', 53 | PureMVC.Patterns.Observer in '..\Patterns\PureMVC.Patterns.Observer.pas', 54 | PureMVC.Patterns.Proxy in '..\Patterns\PureMVC.Patterns.Proxy.pas', 55 | PureMVC.Interfaces.Collections in '..\Interfaces\PureMVC.Interfaces.Collections.pas', 56 | PureMVC.Patterns.Collections in '..\Patterns\PureMVC.Patterns.Collections.pas'; 57 | 58 | end. 59 | 60 | -------------------------------------------------------------------------------- /src/D200-XE6/PureMVC.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PureMVC/puremvc-delphi-standard-framework/8c30be4c3d234d4d2883a4ef282c4080458aadc1/src/D200-XE6/PureMVC.res -------------------------------------------------------------------------------- /src/D200-XE6/PureMVC4D.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {48DA70E3-3E30-47CE-9558-D9E63CD144D4} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Default.Personality.12 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 | {25811770-0120-4D90-ABD3-A47020842BE6} 39 | Debug;Release 40 | Android;iOSDevice;iOSSimulator;OSX32;Win32;Win64 41 | True 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/Interfaces/PureMVC.Interfaces.ICommand.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi Port by Jorge L. Cangas 3 | PureMVC - Copyright(c) 2006-11 Futurescale, Inc., Some rights reserved. 4 | Your reuse is governed by the Creative Commons Attribution 3.0 License 5 | } 6 | 7 | unit PureMVC.Interfaces.ICommand; 8 | 9 | interface 10 | 11 | uses 12 | PureMVC.Interfaces.INotification; 13 | 14 | type 15 | /// 16 | /// The interface definition for a PureMVC Command 17 | /// 18 | /// 19 | 20 | ICommand = interface 21 | ['{39A5AA54-698E-4E79-8005-2CB6E34302D4}'] 22 | /// 23 | /// Execute the ICommand's logic to handle a given INotification 24 | /// 25 | /// An INotification to handle 26 | procedure Execute(Notification: INotification); 27 | end; 28 | 29 | implementation 30 | 31 | end. 32 | -------------------------------------------------------------------------------- /src/Interfaces/PureMVC.Interfaces.IController.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi Port by Jorge L. Cangas 3 | PureMVC - Copyright(c) 2006-11 Futurescale, Inc., Some rights reserved. 4 | Your reuse is governed by the Creative Commons Attribution 3.0 License 5 | } 6 | 7 | unit PureMVC.Interfaces.IController; 8 | 9 | interface 10 | 11 | uses 12 | PureMVC.Interfaces.INotification; 13 | 14 | type 15 | 16 | /// 17 | /// The interface definition for a PureMVC Controller 18 | /// 19 | /// 20 | /// In PureMVC, an IController implementor follows the 'Command and Controller' strategy, and assumes these responsibilities: 21 | /// 22 | /// Remembering which ICommands are intended to handle which INotifications 23 | /// Registering itself as an IObserver with the View for each INotification that it has an ICommand mapping for 24 | /// Creating a new instance of the proper ICommand to handle a given INotification when notified by the View 25 | /// Calling the ICommand's execute method, passing in the INotification 26 | /// 27 | /// 28 | /// 29 | /// 30 | 31 | IController = interface 32 | ['{066ACB38-CA73-42B4-8CBB-2903A60DCA2C}'] 33 | /// 34 | /// Register a particular ICommand class as the handler for a particular INotification 35 | /// 36 | /// The name of the INotification 37 | /// The Type of the ICommand 38 | procedure RegisterCommand(NotificationName: string; CommandType: TClass); 39 | 40 | /// 41 | /// Execute the ICommand previously registered as the handler for INotifications with the given notification name 42 | /// 43 | /// The INotification to execute the associated ICommand for 44 | procedure ExecuteCommand(Notification: INotification); 45 | 46 | /// 47 | /// Remove a previously registered ICommand to INotification mapping. 48 | /// 49 | /// The name of the INotification to remove the ICommand mapping for 50 | procedure RemoveCommand(NotificationName: string); 51 | 52 | /// 53 | /// Check if a Command is registered for a given Notification. 54 | /// 55 | /// The name of the INotification to check the ICommand mapping for 56 | /// whether a Command is currently registered for the given notificationName. 57 | function HasCommand(NotificationName: string): Boolean; 58 | end; 59 | 60 | implementation 61 | 62 | end. 63 | -------------------------------------------------------------------------------- /src/Interfaces/PureMVC.Interfaces.IMediator.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi Port by Jorge L. Cangas 3 | PureMVC - Copyright(c) 2006-11 Futurescale, Inc., Some rights reserved. 4 | Your reuse is governed by the Creative Commons Attribution 3.0 License 5 | } 6 | 7 | unit PureMVC.Interfaces.IMediator; 8 | 9 | interface 10 | 11 | uses 12 | PureMVC.Interfaces.Collections, 13 | PureMVC.Interfaces.INotification; 14 | 15 | type 16 | 17 | /// 18 | /// The interface definition for a PureMVC Mediator. 19 | /// 20 | /// 21 | /// In PureMVC, IMediator implementors assume these responsibilities: 22 | /// 23 | /// Implement a common method which returns a list of all INotifications the IMediator has interest in. 24 | /// Implement a common notification (callback) method 25 | /// 26 | /// Additionally, IMediators typically: 27 | /// 28 | /// Act as an intermediary between one or more view components such as text boxes or list controls, maintaining references and coordinating their behavior. 29 | /// In Flash-based apps, this is often the place where event listeners are added to view components, and their handlers implemented 30 | /// Respond to and generate INotifications, interacting with of the rest of the PureMVC app 31 | /// 32 | /// When an IMediator is registered with the IView, the IView will call the IMediator's listNotificationInterests method. The IMediator will return an IList of INotification names which it wishes to be notified about 33 | /// The IView will then create an Observer object encapsulating that IMediator's (handleNotification) method and register it as an Observer for each INotification name returned by listNotificationInterests 34 | /// 35 | /// 36 | IMediator = interface 37 | ['{04873D3B-0566-4221-9CEF-DB2E1F352592}'] 38 | /// 39 | /// Tthe IMediator instance name 40 | /// 41 | function GetMediatorName: string; 42 | property MediatorName: string read GetMediatorName; 43 | 44 | /// 45 | /// The IMediator's view component 46 | /// 47 | function GetViewComponent: TObject; 48 | procedure SetViewComponent(Value: TObject); 49 | property ViewComponent: TObject read GetViewComponent 50 | write SetViewComponent; 51 | 52 | /// 53 | /// List INotification interests 54 | /// 55 | /// An IList of the INotification names this IMediator has an interest in 56 | function ListNotificationInterests: IList; 57 | 58 | /// 59 | /// Handle an INotification 60 | /// 61 | /// The INotification to be handled 62 | procedure HandleNotification(Notification: INotification); 63 | 64 | /// 65 | /// Called by the View when the Mediator is registered 66 | /// 67 | procedure OnRegister; 68 | 69 | /// 70 | /// Called by the View when the Mediator is removed 71 | /// 72 | procedure OnRemove; 73 | end; 74 | 75 | implementation 76 | 77 | end. 78 | -------------------------------------------------------------------------------- /src/Interfaces/PureMVC.Interfaces.IModel.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi Port by Jorge L. Cangas 3 | PureMVC - Copyright(c) 2006-11 Futurescale, Inc., Some rights reserved. 4 | Your reuse is governed by the Creative Commons Attribution 3.0 License 5 | } 6 | 7 | unit PureMVC.Interfaces.IModel; 8 | 9 | interface 10 | 11 | uses 12 | PureMVC.Interfaces.IProxy; 13 | 14 | type 15 | /// 16 | /// The interface definition for a PureMVC Model 17 | /// 18 | /// 19 | /// In PureMVC, IModel implementors provide access to IProxy objects by named lookup 20 | /// An IModel assumes these responsibilities: 21 | /// 22 | /// Maintain a cache of IProxy instances 23 | /// Provide methods for registering, retrieving, and removing IProxy instances 24 | /// 25 | /// 26 | IModel = interface 27 | ['{9F376D21-60A8-4C14-8C48-DC2B24100BCC}'] 28 | /// 29 | /// Register an IProxy instance with the Model 30 | /// 31 | /// A reference to the proxy object to be held by the Model 32 | procedure RegisterProxy(Proxy: IProxy); 33 | 34 | /// 35 | /// Retrieve an IProxy instance from the Model 36 | /// 37 | /// The name of the proxy to retrieve 38 | /// The IProxy instance previously registered with the given proxyName 39 | function RetrieveProxy(ProxyName: string): IProxy; 40 | 41 | /// 42 | /// Remove an IProxy instance from the Model 43 | /// 44 | /// The name of the IProxy instance to be removed 45 | function RemoveProxy(ProxyName: string): IProxy; 46 | 47 | /// 48 | /// Check if a Proxy is registered 49 | /// 50 | /// The name of the proxy to check for 51 | /// whether a Proxy is currently registered with the given proxyName. 52 | function HasProxy(ProxyName: string): Boolean; 53 | end; 54 | 55 | implementation 56 | 57 | end. 58 | -------------------------------------------------------------------------------- /src/Interfaces/PureMVC.Interfaces.INotification.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi Port by Jorge L. Cangas 3 | PureMVC - Copyright(c) 2006-11 Futurescale, Inc., Some rights reserved. 4 | Your reuse is governed by the Creative Commons Attribution 3.0 License 5 | } 6 | 7 | unit PureMVC.Interfaces.INotification; 8 | 9 | interface 10 | 11 | uses RTTI; 12 | 13 | type 14 | 15 | /// 16 | /// The interface definition for a PureMVC Notification 17 | /// 18 | /// 19 | /// PureMVC does not rely upon underlying event models 20 | /// The Observer Pattern as implemented within PureMVC exists to support event-driven communication between the application and the actors of the MVC triad 21 | /// Notifications are not meant to be a replacement for Events. 22 | /// Generally, IMediator implementors place event handlers on their 23 | /// view components, which they then handle in the usual way. 24 | /// This may lead to the broadcast of Notifications to trigger ICommands 25 | /// or to communicate with other IMediators. 26 | /// IProxy and ICommand instances communicate with each other 27 | /// and IMediators by broadcasting INotifications 28 | /// 29 | /// 30 | /// 31 | INotification = interface 32 | ['{CFF56816-6DB6-4FC4-9895-4728BA0BE3C6}'] 33 | function GetBody: TValue; 34 | procedure SetBody(Value: TValue); 35 | function GetKind: TValue; 36 | procedure SetKind(const Value: TValue); 37 | function GetName: string; 38 | procedure SetSender(const Value: TObject); 39 | function GetSender: TObject; 40 | 41 | /// 42 | /// The Sender of the INotification instance. Introduced to be 43 | /// more "Delphi idiomatic" 44 | /// 45 | /// No setter, should be set by constructor only 46 | property Sender: TObject read GetSender; 47 | /// 48 | /// The name of the INotification instance 49 | /// 50 | /// No setter, should be set by constructor only 51 | property Name: string read GetName; 52 | 53 | /// 54 | /// The body of the INotification instance 55 | /// 56 | property Body: TValue read GetBody write SetBody; 57 | 58 | /// 59 | /// The type of the INotification instance 60 | /// 61 | property Kind: TValue read GetKind write SetKind; 62 | 63 | /// 64 | /// Get the string representation of the INotification instance 65 | /// 66 | /// The string representation of the INotification instance 67 | function ToString: string; 68 | end; 69 | 70 | implementation 71 | 72 | end. 73 | -------------------------------------------------------------------------------- /src/Interfaces/PureMVC.Interfaces.INotifier.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi Port by Jorge L. Cangas 3 | PureMVC - Copyright(c) 2006-11 Futurescale, Inc., Some rights reserved. 4 | Your reuse is governed by the Creative Commons Attribution 3.0 License 5 | } 6 | 7 | unit PureMVC.Interfaces.INotifier; 8 | 9 | interface 10 | 11 | uses 12 | RTTI; 13 | 14 | type 15 | /// 16 | /// The interface definition for a PureMVC Notifier 17 | /// 18 | /// 19 | /// MacroCommand, Command, Mediator and Proxy all have a need to send Notifications 20 | /// The INotifier interface provides a common method called sendNotification that relieves implementation code of the necessity to actually construct Notifications 21 | /// The Notifier class, which all of the above mentioned classes extend, also provides an initialized reference to the Facade Singleton, which is required for the convienience method for sending Notifications, but also eases implementation as these classes have frequent Facade interactions and usually require access to the facade anyway 22 | /// 23 | /// 24 | /// 25 | INotifier = interface 26 | ['{7D004307-4A98-4E58-AC61-BE4F3AD634A2}'] 27 | 28 | /// 29 | /// Send a INotification 30 | /// 31 | /// 32 | /// Convenience method to prevent having to construct new notification instances in our implementation code 33 | /// 34 | /// The name of the notification to send 35 | procedure SendNotification(NotificationName: string; Sender: TObject = nil);overload; 36 | 37 | /// 38 | /// Send a INotification 39 | /// 40 | /// 41 | /// Convenience method to prevent having to construct new notification instances in our implementation code 42 | /// 43 | /// The name of the notification to send 44 | /// The body of the notification 45 | procedure SendNotification(NotificationName: string; Sender: TObject; 46 | Body: TValue);overload; 47 | 48 | /// 49 | /// Send a INotification 50 | /// 51 | /// 52 | /// Convenience method to prevent having to construct new notification instances in our implementation code 53 | /// 54 | /// The name of the notification to send 55 | /// The body of the notification 56 | /// The 'kind' of the notification 57 | procedure SendNotification(NotificationName: string; Sender: TObject; Body: TValue; 58 | Kind: TValue);overload; 59 | end; 60 | 61 | implementation 62 | 63 | end. 64 | -------------------------------------------------------------------------------- /src/Interfaces/PureMVC.Interfaces.IObserver.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi Port by Jorge L. Cangas 3 | PureMVC - Copyright(c) 2006-11 Futurescale, Inc., Some rights reserved. 4 | Your reuse is governed by the Creative Commons Attribution 3.0 License 5 | } 6 | 7 | unit PureMVC.Interfaces.IObserver; 8 | 9 | interface 10 | 11 | uses 12 | PureMVC.Interfaces.INotification; 13 | 14 | type 15 | /// 16 | /// The interface definition for a PureMVC Observer 17 | /// 18 | /// 19 | /// In PureMVC, IObserver implementors assume these responsibilities: 20 | /// 21 | /// Encapsulate the notification (callback) method of the interested object 22 | /// Encapsulate the notification context (this) of the interested object 23 | /// Provide methods for setting the interested object' notification method and context 24 | /// Provide a method for notifying the interested object 25 | /// 26 | /// PureMVC does not rely upon underlying event models 27 | /// The Observer Pattern as implemented within PureMVC exists to support event driven communication between the application and the actors of the MVC triad 28 | /// An Observer is an object that encapsulates information about an interested object with a notification method that should be called when an INotification is broadcast. The Observer then acts as a proxy for notifying the interested object 29 | /// Observers can receive Notifications by having their notifyObserver method invoked, passing in an object implementing the INotification interface, such as a subclass of Notification 30 | /// 31 | /// 32 | /// 33 | IObserver = interface 34 | ['{8AEDD8F9-29D9-4FB8-A249-2DA31347BA62}'] 35 | 36 | /// 37 | /// The notification (callback) method of the interested object 38 | /// 39 | /// The notification method should take one parameter of type INotification 40 | procedure SetNotifyMethod(const Value: string); 41 | property NotifyMethod: string write SetNotifyMethod; 42 | 43 | /// 44 | /// The notification context (this) of the interested object 45 | /// 46 | 47 | procedure SetNotifyContext(Value: TObject); 48 | property NotifyContext: TObject write SetNotifyContext; 49 | 50 | /// 51 | /// Notify the interested object 52 | /// 53 | /// The INotification to pass to the interested object's notification method 54 | procedure NotifyObserver(Notification: INotification); 55 | 56 | /// 57 | /// Compare the given object to the notificaiton context object 58 | /// 59 | /// The object to compare 60 | /// Indicates if the notification context and the object are the same. 61 | function CompareNotifyContext(Obj: TObject): Boolean; 62 | end; 63 | 64 | implementation 65 | 66 | end. 67 | -------------------------------------------------------------------------------- /src/Interfaces/PureMVC.Interfaces.IProxy.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi Port by Jorge L. Cangas 3 | PureMVC - Copyright(c) 2006-11 Futurescale, Inc., Some rights reserved. 4 | Your reuse is governed by the Creative Commons Attribution 3.0 License 5 | } 6 | 7 | unit PureMVC.Interfaces.IProxy; 8 | 9 | interface 10 | uses RTTI; 11 | 12 | type 13 | 14 | /// 15 | /// The interface definition for a PureMVC Proxy 16 | /// 17 | /// 18 | /// In PureMVC, IProxy implementors assume these responsibilities: 19 | /// 20 | /// Implement a common method which returns the name of the Proxy 21 | /// 22 | /// Additionally, IProxys typically: 23 | /// 24 | /// Maintain references to one or more pieces of model data 25 | /// Provide methods for manipulating that data 26 | /// Generate INotifications when their model data changes 27 | /// Expose their name as a public const called NAME 28 | /// Encapsulate interaction with local or remote services used to fetch and persist model data 29 | /// 30 | /// 31 | 32 | IProxy = interface 33 | ['{D04338EF-900E-4DC3-8F0C-0BE2F7D3B373}'] 34 | /// 35 | /// The Proxy instance name 36 | /// 37 | function GetProxyName: string; 38 | property ProxyName: string read GetProxyName; 39 | 40 | /// 41 | /// The data of the proxy 42 | /// 43 | function GetData: TValue; 44 | procedure SetData(Value: TValue); 45 | property Data: TValue read GetData write SetData; 46 | 47 | /// 48 | /// Called by the Model when the Proxy is registered 49 | /// 50 | procedure OnRegister(); 51 | 52 | /// 53 | /// Called by the Model when the Proxy is removed 54 | /// 55 | procedure OnRemove(); 56 | end; 57 | 58 | implementation 59 | 60 | end. 61 | -------------------------------------------------------------------------------- /src/Patterns/PureMVC.Patterns.Notification.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi Port by Jorge L. Cangas 3 | PureMVC - Copyright(c) 2006-11 Futurescale, Inc., Some rights reserved. 4 | Your reuse is governed by the Creative Commons Attribution 3.0 License 5 | } 6 | 7 | unit PureMVC.Patterns.Notification; 8 | 9 | interface 10 | 11 | uses Rtti, 12 | PureMVC.Interfaces.INotification; 13 | type 14 | TNotification = class(TInterfacedObject, INotification) 15 | private 16 | FSender: TObject; 17 | FBody: TValue; 18 | FKind: TValue; 19 | FName: string; 20 | protected 21 | function GetName: string; 22 | function GetSender: TObject; 23 | function GetBody: TValue; 24 | function GetKind: TValue; 25 | procedure SetName(Value: string); 26 | procedure SetSender(const Value: TObject); 27 | procedure SetBody(Value: TValue); 28 | procedure SetKind(const Value: TValue); 29 | public 30 | constructor Create(Name: string; Sender: TObject; Body: TValue; Kind: TValue);overload; 31 | constructor Create(Name: string; Sender: TObject; Body: TValue);overload; 32 | constructor Create(Name: string; Sender: TObject = nil);overload; 33 | function ToString: string;override; 34 | property Sender: TObject read GetSender; 35 | property Name: string read GetName; 36 | property Body: TValue read GetBody; 37 | property Kind: TValue read GetKind; 38 | end; 39 | 40 | implementation 41 | uses SysUtils; 42 | 43 | constructor TNotification.Create(Name: string; Sender: TObject; Body: TValue ; Kind: TValue); 44 | begin 45 | inherited Create; 46 | SetName(Name); 47 | SetSender(Sender); 48 | SetBody(Body); 49 | SetKind(Kind); 50 | end; 51 | 52 | constructor TNotification.Create(Name: string; Sender: TObject; Body: TValue); 53 | begin 54 | Create(Name, Sender, Body, nil); 55 | end; 56 | 57 | constructor TNotification.Create(Name: string; Sender: TObject = nil); 58 | begin 59 | Create(Name, Sender, nil, nil); 60 | end; 61 | 62 | function TNotification.GetName: string; 63 | begin 64 | Result := FName 65 | end; 66 | 67 | function TNotification.GetSender: TObject; 68 | begin 69 | Result := FSender; 70 | end; 71 | 72 | function TNotification.GetBody: TValue; 73 | begin 74 | Result := FBody; 75 | end; 76 | 77 | function TNotification.GetKind: TValue; 78 | begin 79 | Result := FKind; 80 | end; 81 | 82 | procedure TNotification.SetName(Value: string); 83 | begin 84 | FName := Value; 85 | end; 86 | 87 | procedure TNotification.SetSender(const Value: TObject); 88 | begin 89 | FSender := Value; 90 | end; 91 | 92 | procedure TNotification.SetBody(Value: TValue); 93 | begin 94 | FBody := Value; 95 | end; 96 | 97 | procedure TNotification.SetKind(const Value: TValue); 98 | begin 99 | FKind := Value; 100 | end; 101 | 102 | function TNotification.ToString: string; 103 | const 104 | ToStrFmt = 'Notification{Name:%s\nSender:%p\nBody:%s\nType:%s}'; 105 | begin 106 | Result := Format(ToStrFmt, [Name, Pointer(Sender), Body.AsString, Kind.AsString]); 107 | end; 108 | 109 | end. 110 | -------------------------------------------------------------------------------- /src/Patterns/PureMVC.Patterns.Notifier.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi Port by Jorge L. Cangas 3 | PureMVC - Copyright(c) 2006-11 Futurescale, Inc., Some rights reserved. 4 | Your reuse is governed by the Creative Commons Attribution 3.0 License 5 | } 6 | 7 | unit PureMVC.Patterns.Notifier; 8 | 9 | interface 10 | 11 | uses 12 | RTTI, 13 | PureMVC.Interfaces.INotifier, 14 | PureMVC.Interfaces.IFacade; 15 | 16 | type 17 | TNotifier = class(TInterfacedObject, INotifier) 18 | public 19 | 20 | /// 21 | /// Send an INotification 22 | /// 23 | /// The name of the notiification to send 24 | /// Keeps us from having to construct new notification instances in our implementation code 25 | /// This method is thread safe 26 | procedure SendNotification(Name: string; Sender: TObject = nil);overload; 27 | 28 | /// 29 | /// Send an INotification 30 | /// 31 | /// The name of the notification to send 32 | /// The body of the notification 33 | /// Keeps us from having to construct new notification instances in our implementation code 34 | /// This method is thread safe 35 | procedure SendNotification(Name: string; Sender: TObject; Body: TValue);overload; 36 | 37 | /// 38 | /// Send an INotification 39 | /// 40 | /// The name of the notification to send 41 | /// The body of the notification 42 | /// The kind of the notification 43 | /// Keeps us from having to construct new notification instances in our implementation code 44 | /// This method is thread safe 45 | procedure SendNotification(Name: string; Sender: TObject; Body: TValue; Kind: TValue);overload; 46 | 47 | protected 48 | /// 49 | /// Local reference to the Facade Singleton 50 | /// 51 | function Facade: IFacade; 52 | end; 53 | 54 | implementation 55 | 56 | uses 57 | PureMVC.Patterns.Facade; 58 | 59 | procedure TNotifier.SendNotification(Name: string; Sender: TObject = nil); 60 | begin 61 | SendNotification(Name, Sender, nil, TValue.Empty); 62 | end; 63 | 64 | procedure TNotifier.SendNotification(Name: string; Sender: TObject; 65 | Body: TValue); 66 | begin 67 | SendNotification(Name, Sender, Body, TValue.Empty); 68 | end; 69 | 70 | procedure TNotifier.SendNotification(Name: string; Sender: TObject; 71 | Body: TValue; Kind: TValue); 72 | begin 73 | Facade.SendNotification(Name, Sender, Body, Kind); 74 | end; 75 | 76 | function TNotifier.Facade: IFacade; 77 | begin 78 | Result := TFacade.Instance; 79 | end; 80 | 81 | end. 82 | -------------------------------------------------------------------------------- /src/Patterns/PureMVC.Patterns.Observer.pas: -------------------------------------------------------------------------------- 1 | { 2 | PureMVC Delphi Port by Jorge L. Cangas 3 | PureMVC - Copyright(c) 2006-11 Futurescale, Inc., Some rights reserved. 4 | Your reuse is governed by the Creative Commons Attribution 3.0 License 5 | } 6 | 7 | unit PureMVC.Patterns.Observer; 8 | 9 | interface 10 | 11 | uses 12 | PureMVC.Patterns.Collections, 13 | PureMVC.Interfaces.IObserver, 14 | PureMVC.Interfaces.INotification; 15 | 16 | type 17 | TObserver = class(TInterfacedObject, IObserver) 18 | private 19 | FNotifyMethod: string; 20 | FNotifyContext: TObject; 21 | public 22 | constructor Create(Notify: string = ''; Context: TObject = nil); 23 | procedure NotifyObserver(Notification: INotification); 24 | function CompareNotifyContext(Other: TObject): Boolean; 25 | 26 | procedure SetNotifyMethod(const Value: string); 27 | property NotifyMethod: string write SetNotifyMethod; 28 | 29 | procedure SetNotifyContext(Value: TObject); 30 | property NotifyContext: TObject write SetNotifyContext; 31 | end; 32 | 33 | TObserverList = TObjectList; 34 | 35 | implementation 36 | uses RTTI; 37 | 38 | type 39 | TObserverHelper = class Helper for TObject 40 | protected 41 | procedure InvokeByRTTI(MethodName: string; Args: array of TValue); 42 | public 43 | procedure HandlePureMVCNotification(MethodName: string; Notification: INotification); 44 | end; 45 | 46 | procedure TObserverHelper.InvokeByRTTI(MethodName: string; Args: array of TValue); 47 | var 48 | RC: TRttiContext; 49 | RType: TRttiInstanceType; 50 | RMethod: TRttiMethod; 51 | begin 52 | RC := TRttiContext.Create; 53 | try 54 | RType := RC.GetType(Self.ClassType) as TRttiInstanceType; 55 | RMethod := RType.GetMethod(MethodName); 56 | if Assigned(RMethod) then RMethod.Invoke(Self, Args); 57 | finally 58 | RC.Free; 59 | end; 60 | end; 61 | 62 | procedure TObserverHelper.HandlePureMVCNotification(MethodName: string; Notification: INotification); 63 | begin 64 | InvokeByRTTI(MethodName, [TValue.From(Notification)]); 65 | end; 66 | 67 | function TObserver.CompareNotifyContext(Other: TObject): Boolean; 68 | begin 69 | Result := FNotifyContext = Other; 70 | end; 71 | 72 | constructor TObserver.Create(Notify: string; Context: TObject); 73 | begin 74 | FNotifyMethod := Notify; 75 | FNotifyContext := Context; 76 | end; 77 | 78 | procedure TObserver.NotifyObserver(Notification: INotification); 79 | begin 80 | FNotifyContext.HandlePureMVCNotification(FNotifyMethod, Notification); 81 | end; 82 | 83 | procedure TObserver.SetNotifyContext(Value: TObject); 84 | begin 85 | FNotifyContext := Value; 86 | end; 87 | 88 | procedure TObserver.SetNotifyMethod(const Value: string); 89 | begin 90 | FNotifyMethod := Value; 91 | end; 92 | 93 | end. 94 | -------------------------------------------------------------------------------- /src/Patterns/PureMVC.Patterns.Proxy.pas: -------------------------------------------------------------------------------- 1 | unit PureMVC.Patterns.Proxy; 2 | 3 | interface 4 | 5 | uses 6 | RTTI, 7 | PureMVC.Interfaces.INotifier, 8 | PureMVC.Interfaces.IProxy, 9 | PureMVC.Patterns.Notifier; 10 | 11 | type 12 | /// 13 | /// A base IProxy implementation 14 | /// 15 | /// 16 | /// In PureMVC, Proxy classes are used to manage parts of the application's data model 17 | /// A Proxy might simply manage a reference to a local data object, in which case interacting with it might involve setting and getting of its data in synchronous fashion 18 | /// Proxy classes are also used to encapsulate the application's interaction with remote services to save or retrieve data, in which case, we adopt an asyncronous idiom; setting data (or calling a method) on the Proxy and listening for a Notification to be sent when the Proxy has retrieved the data from the service 19 | /// 20 | /// 21 | TProxy = class(TNotifier, IProxy, INotifier) 22 | {$REGION 'Members'} 23 | protected 24 | /// 25 | /// The name of the proxy 26 | /// 27 | FProxyName: string; 28 | 29 | /// 30 | /// The data object to be managed 31 | /// 32 | FData: TValue; 33 | 34 | {$ENDREGION} 35 | {$REGION 'Constants'} 36 | public 37 | /// 38 | /// The default proxy name 39 | /// 40 | const 41 | NAME = 'Proxy'; 42 | {$ENDREGION} 43 | {$REGION 'Constructors'} 44 | /// 45 | /// Constructs a new proxy with the specified name and data 46 | /// 47 | /// The name of the proxy 48 | /// The data to be managed 49 | constructor Create(ProxyName: string; Data: TValue); overload; 50 | constructor Create(ProxyName: string = NAME); overload; 51 | {$ENDREGION} 52 | {$REGION 'Methods'} 53 | {$REGION 'IProxy Members'} 54 | public 55 | /// 56 | /// Called by the Model when the Proxy is registered 57 | /// 58 | procedure OnRegister; virtual; 59 | /// 60 | /// Called by the Model when the Proxy is removed 61 | /// 62 | procedure OnRemove; virtual; 63 | 64 | function GetProxyName: string; 65 | function GetData: TValue;virtual; 66 | procedure SetData(Value: TValue);virtual; 67 | property Data: TValue read GetData write SetData; 68 | 69 | {$ENDREGION} 70 | {$ENDREGION} 71 | end; 72 | 73 | implementation 74 | 75 | { TProxy } 76 | 77 | constructor TProxy.Create(ProxyName: string; Data: TValue); 78 | begin 79 | inherited Create; 80 | FProxyName := ProxyName; 81 | if FProxyName = '' then 82 | FProxyName := NAME; 83 | 84 | FData := Data; 85 | end; 86 | 87 | constructor TProxy.Create(ProxyName: string); 88 | begin 89 | Create(ProxyName, nil); 90 | end; 91 | 92 | procedure TProxy.SetData(Value: TValue); 93 | begin 94 | FData := Value; 95 | end; 96 | 97 | function TProxy.GetData: TValue; 98 | begin 99 | Result := FData; 100 | end; 101 | 102 | function TProxy.GetProxyName: string; 103 | begin 104 | Result := FProxyName; 105 | end; 106 | 107 | procedure TProxy.OnRegister; 108 | begin 109 | 110 | end; 111 | 112 | procedure TProxy.OnRemove; 113 | begin 114 | 115 | end; 116 | 117 | end. 118 | -------------------------------------------------------------------------------- /src/source.optset: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\lib 4 | $(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\lib 5 | $(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\bin 6 | $(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\bin 7 | $(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\lib;$(DCC_UnitSearchPath) 8 | WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;$(DCC_UnitAlias) 9 | $(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\lib 10 | $(BDSPROJECTGROUPDIR)\out\$(IDEVersion)\$(Platform)\$(Config)\lib 11 | 12 | 13 | Delphi.Personality.12 14 | OptionSet 15 | 16 | 17 | 18 | 12 19 | 20 | 21 | --------------------------------------------------------------------------------