.NET for Progress Programmers
-
Upload
caesar-stanton -
Category
Documents
-
view
45 -
download
0
description
Transcript of .NET for Progress Programmers
![Page 1: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/1.jpg)
.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
![Page 2: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/2.jpg)
© 2005 Progress Software Corporation2 © - 2012 - proWill
.NET for Progress Programmers
Data Oriented (DOP) Object Oriented (OOP) Event Handling in .NET
.NET for Progress Programmers
![Page 3: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/3.jpg)
© 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
![Page 4: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/4.jpg)
© 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
![Page 5: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/5.jpg)
© 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
![Page 6: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/6.jpg)
© 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
![Page 7: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/7.jpg)
© 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
![Page 8: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/8.jpg)
© 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
![Page 9: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/9.jpg)
© 2005 Progress Software Corporation9 © - 2012 - proWill
.NET for Progress Programmers
The Record Buffer through .NET eyes
DataStructure examples – the customer class
![Page 10: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/10.jpg)
© 2005 Progress Software Corporation10 © - 2012 - proWill
.NET for Progress Programmers
The Record Buffer through .NET eyes
DataStructure examples – the customer class
![Page 11: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/11.jpg)
© 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
![Page 12: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/12.jpg)
© 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
![Page 13: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/13.jpg)
© 2005 Progress Software Corporation13 © - 2012 - proWill
.NET for Progress Programmers
Demo
![Page 14: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/14.jpg)
© 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
![Page 15: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/15.jpg)
© 2005 Progress Software Corporation15 © - 2012 - proWill
.NET for Progress Programmers
Iterating / Looping through .NET eyes
DataStructure examples – Building an Iterator
![Page 16: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/16.jpg)
© 2005 Progress Software Corporation16 © - 2012 - proWill
.NET for Progress Programmers
Demo
![Page 17: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/17.jpg)
© 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
![Page 18: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/18.jpg)
© 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
![Page 19: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/19.jpg)
© 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
![Page 20: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/20.jpg)
© 2005 Progress Software Corporation20 © - 2012 - proWill
.NET for Progress Programmers
Publishing – You may hit many
Event Handling in .NET – Publishing an event
Event handler
![Page 21: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/21.jpg)
© 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 ()
![Page 22: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/22.jpg)
© 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>)
![Page 23: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/23.jpg)
© 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
![Page 24: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/24.jpg)
© 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
![Page 25: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/25.jpg)
© 2005 Progress Software Corporation25 © - 2012 - proWill
.NET for Progress Programmers
Sender
Event Handling in .NET – The need for event argument classes
Ильинка, ул № 23103132, г. Москва
Россия
Contents
![Page 26: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/26.jpg)
© 2005 Progress Software Corporation26 © - 2012 - proWill
.NET for Progress Programmers
Demo
![Page 27: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/27.jpg)
© 2005 Progress Software Corporation27 © - 2012 - proWill
.NET for Progress Programmers
Thanks you foryour time
![Page 28: .NET for Progress Programmers](https://reader035.fdocuments.in/reader035/viewer/2022081501/56813031550346895d95c930/html5/thumbnails/28.jpg)
© 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