280 likes | 331 Views
progressTrainer@live.com info@proWill.nl proWillvanBeek http:// nl.linkedin.com/in/proWill +316 2206 8535. .NET for Progress Programmers. Data Orientation vs Object Orientation Event Handling in .NET. Will van Beek. Independent Consultant www.proWill.nl 1 april 2012.
E N D
progressTrainer@live.com info@proWill.nl proWillvanBeek http://nl.linkedin.com/in/proWill +316 2206 8535 .NET for Progress Programmers Data Orientation vs Object Orientation Event Handling in .NET Will van Beek Independent Consultant www.proWill.nl 1 april 2012
Data Oriented (DOP) Object Oriented (OOP) Event Handling in .NET .NET for Progress Programmers
Data Oriented (DOP) Object Oriented (OOP) Datastructures – Progress 4GL .NET Differences – DOP OOP Datastructures – Examples Record Buffer Customer class Building a Temp-Table/DataTable Building an Iterator Event Handling in .NET .NET for Progress Programmers
Progress 4GL/ABL Collection – CustNum – Name – Address – Address2 – City – State – Country – Phone – Contact – SalesRep – Comments – CreditLimit – Balance – Terms – Discount – PostalCode – Fax – Email Data Orientation and Object Orientation – DataStructures. • .NET • Primitive Datatypes • DataSet • Temp-Table • Extent • Primitive Datatypes • DataSet • DataTable • Array • , Map, Hash, List, Tree, Dictionary, Bag, Set, Stack, Queue Naming only a few !
Data Oriented (DOP) Object Oriented (OOP) Datastructures – Progress 4GL .NET Differences – DOP OOP Datastructures– Examples Record Buffer Customer class Building a Temp-Table/DataTable Building an Iterator Event Handling in .NET .NET for Progress Programmers
Progress 4GL/ABL DOP OOP – the Difference is in the Language. • Data is in the Record Buffer • FIND, FOR EACH, QUERY separated from the data • .NET • Data is in Objects • Data and Operations (methods) are encapsulated
Data Oriented (DOP) Object Oriented (OOP) Datastructures – Progress 4GL .NET Differences – DOP OOP Datastructures– Examples Record Buffer Customer class Building a Temp-Table/DataTable Building an Iterator Event Handling in .NET .NET for Progress Programmers
Data Oriented (DOP) Object Oriented (OOP) Datastructures – Progress 4GL .NET Differences – DOP OOP Datastructures– Examples Record Buffer Customer class Building a Temp-Table/DataTable Building an Iterator Event Handling in .NET .NET for Progress Programmers
DataStructure examples – the customer class • The Record Buffer through .NET eyes
DataStructure examples – the customer class • The Record Buffer through .NET eyes
Data Oriented (DOP) Object Oriented (OOP) Datastructures – Progress 4GL .NET Differences – DOP OOP Datastructures– Examples Record Buffer Customer class Building a Temp-Table/DataTable Building an Iterator Event Handling in .NET .NET for Progress Programmers
DataStructure examples – Building a dataTable • The Temp-Table through .NET eyes dataField.cls + name + stringValue dataField.cls + name + stringValue dataField.cls + name + stringValue dataRecord.cls + dataFields dataRecord.cls + dataFields dataRecord.cls + dataFields dataField.cls + name + stringValue dataFieldCollection.cls + count + item as dataField (extent) + add(name,stringValue) dataRecordCollection.cls + count + item as dataRecord (extent) + add(name,stringValue) dataRecord.cls + dataFields dataTable.cls + entity + dataRecords model.cls + loadData(tableName, fieldList, condition) test.p + fetchData + displayData
Data Oriented (DOP) Object Oriented (OOP) Datastructures – Progress 4GL .NET Differences – DOP OOP Datastructures– Examples Record Buffer Customer class Building a Temp-Table/DataTable Building an Iterator Event Handling in .NET .NET for Progress Programmers
DataStructure examples – Building an Iterator • Iterating / Looping through .NET eyes
Data Oriented (DOP) Object Oriented (OOP) Event Handling in .NET Triggering Publishing The need for Event Argument Classes .NET events – Examples Defining the event Subscribing to the event Publishing the event .NET for Progress Programmers
Data Oriented (DOP) Object Oriented (OOP) Event Handling in .NET Triggering Publishing The need for Event Argument Classes .NET events – Examples Defining the event Subscribing to the event Publishing the event .NET for Progress Programmers
Event Handling in Progress – Triggering an event • Triggering – You’re gonna hit only one Trigger code
Event Handling in .NET – Publishing an event • Publishing – You may hit many Event handler
Event Handling in .NET – Publishing an event • Publishing – examples public protected private define event <event-name> void () <event-name>:Publish ()
Event Handling in .NET – Subscribing to an event • Subscribing – examples Not subscribed Subscribing tool <sender>:<event-name>:Subscribe (<name-eventhandler>)
Event Handling in .NET – Refurbishing the demo • Events provide loose coupling model.cls + loadData(tableName,fields, condition) viewCollection.cls presenter.cls • - addEntity(tableName,fields, • condition) Salesrep Customer Order Orderline
Data Oriented (DOP) Object Oriented (OOP) Event Handling in .NET Trigger code Event handlers Triggering Publishing The need for Event Argument Classes .NET events – Examples Defining the event Subscribing to the event Publishing the event .NET for Progress Programmers
Event Handling in .NET – The need for event argument classes • Contents • Sender Ильинка, ул № 23103132, г. МоскваРоссия
Keep in touch www.proWill.nl progressTrainer@live.com info@proWill.nl proWillvanBeek http://nl.linkedin.com/in/proWill +316 2206 8535