net for progress programmers
DESCRIPTION
[email protected] [email protected] 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. - PowerPoint PPT PresentationTRANSCRIPT
.NET for Progress Programmers
Data Orientation vs Object OrientationEvent Handling in .NET
Will van BeekIndependent Consultant
www.proWill.nl1 april 2012
[email protected]@proWill.nl
proWillvanBeek
http://nl.linkedin.com/in/proWill
+316 2206 8535
© 2005 Progress Software Corporation2 © - 2012 - proWill
.NET for Progress Programmers
Data Oriented (DOP) Object Oriented (OOP) Event Handling in .NET
.NET for Progress Programmers
© 2005 Progress Software Corporation3 © - 2012 - proWill
.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
© 2005 Progress Software Corporation4 © - 2012 - proWill
.NET for Progress Programmers
Data Orientation and Object Orientation – DataStructures.
Progress 4GL/ABL .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 !
Collection1. – CustNum2. – Name3. – Address4. – Address25. – City6. – State7. – Country8. – Phone9. – Contact10. – SalesRep11. – Comments12. – CreditLimit13. – Balance14. – Terms15. – Discount16. – PostalCode17. – Fax18. – Email
© 2005 Progress Software Corporation5 © - 2012 - proWill
.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
© 2005 Progress Software Corporation6 © - 2012 - proWill
.NET for Progress Programmers
DOP OOP – the Difference is in the Language.
Progress 4GL/ABL• Data is in the Record Buffer
.NET• Data is in Objects
• FIND, FOR EACH, QUERY separated from the data
• Data and Operations (methods) are encapsulated
© 2005 Progress Software Corporation7 © - 2012 - proWill
.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
© 2005 Progress Software Corporation8 © - 2012 - proWill
.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
© 2005 Progress Software Corporation9 © - 2012 - proWill
.NET for Progress Programmers
The Record Buffer through .NET eyes
DataStructure examples – the customer class
© 2005 Progress Software Corporation10 © - 2012 - proWill
.NET for Progress Programmers
The Record Buffer through .NET eyes
DataStructure examples – the customer class
© 2005 Progress Software Corporation11 © - 2012 - proWill
.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
© 2005 Progress Software Corporation12 © - 2012 - proWill
.NET for Progress Programmers
dataField.cls
+ name+ stringValue
dataField.cls
+ name+ stringValue
dataField.cls
+ name+ stringValue
dataRecord.cls
+ dataFieldsdataRecord.cls
+ dataFieldsdataRecord.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
The Temp-Table through .NET eyes
DataStructure examples – Building a dataTable
model.cls
+ loadData(tableName, fieldList, condition)
test.p
+ fetchData+ displayData
© 2005 Progress Software Corporation13 © - 2012 - proWill
.NET for Progress Programmers
Demo
© 2005 Progress Software Corporation14 © - 2012 - proWill
.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
© 2005 Progress Software Corporation15 © - 2012 - proWill
.NET for Progress Programmers
Iterating / Looping through .NET eyes
DataStructure examples – Building an Iterator
© 2005 Progress Software Corporation16 © - 2012 - proWill
.NET for Progress Programmers
Demo
© 2005 Progress Software Corporation17 © - 2012 - proWill
.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
© 2005 Progress Software Corporation18 © - 2012 - proWill
.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
© 2005 Progress Software Corporation19 © - 2012 - proWill
.NET for Progress Programmers
Triggering – You’re gonna hit only one
Event Handling in Progress – Triggering an event
Trigger code
© 2005 Progress Software Corporation20 © - 2012 - proWill
.NET for Progress Programmers
Publishing – You may hit many
Event Handling in .NET – Publishing an event
Event handler
© 2005 Progress Software Corporation21 © - 2012 - proWill
.NET for Progress Programmers
Publishing – examples
Event Handling in .NET – Publishing an event
define event <event-name> void ()
publicprotectedprivate
<event-name>:Publish ()
© 2005 Progress Software Corporation22 © - 2012 - proWill
.NET for Progress Programmers
Subscribing – examples
Event Handling in .NET – Subscribing to an event
Not subscribed
Subscribing
tool<sender>:<event-name>:Subscribe (<name-eventhandler>)
© 2005 Progress Software Corporation23 © - 2012 - proWill
.NET for Progress Programmers
viewCollection.cls
Events provide loose coupling
Event Handling in .NET – Refurbishing the demo
model.cls
+ loadData(tableName,fields, condition)
presenter.cls
- addEntity(tableName,fields, condition) Salesrep
CustomerOrder
Orderline
© 2005 Progress Software Corporation24 © - 2012 - proWill
.NET for Progress Programmers
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
© 2005 Progress Software Corporation25 © - 2012 - proWill
.NET for Progress Programmers
Sender
Event Handling in .NET – The need for event argument classes
Ильинка, ул № 23103132, г. Москва
Россия
Contents
© 2005 Progress Software Corporation26 © - 2012 - proWill
.NET for Progress Programmers
Demo
© 2005 Progress Software Corporation27 © - 2012 - proWill
.NET for Progress Programmers
Thanks you foryour time
© 2005 Progress Software Corporation28 © - 2012 - proWill
.NET for Progress Programmers
www.proWill.nl
[email protected]@proWill.nl
proWillvanBeek
http://nl.linkedin.com/in/proWill
+316 2206 8535
Keep in touch