29
Introduction to ECO Malcolm Groves [email protected]

Introduction to ECO Malcolm Groves [email protected]

Embed Size (px)

Citation preview

Page 1: Introduction to ECO Malcolm Groves mgroves@borland.com

Introduction to ECO

Malcolm Groves

[email protected]

Page 2: Introduction to ECO Malcolm Groves mgroves@borland.com

Agenda

• Overview• ECOSpace• Model• User Interface• ECO II• Other Resources

Page 3: Introduction to ECO Malcolm Groves mgroves@borland.com

ECO Overview

Page 4: Introduction to ECO Malcolm Groves mgroves@borland.com

Database-Driven Development

Page 5: Introduction to ECO Malcolm Groves mgroves@borland.com

Database-Driven Development

• Advantages– Familiar– Low barrier to entry

• Disadvantages– Typically, low cohesion of business logic– Maintenance

Page 6: Introduction to ECO Malcolm Groves mgroves@borland.com

Model-Driven Development

Page 7: Introduction to ECO Malcolm Groves mgroves@borland.com

Model-Driven Development

• Advantages– Maintenance– Documentation– Higher Cohesion of Business Logic

• Disadvantages– Higher barrier to entry– Lot’s of plumbing code to be written

• Objects <-> DB• UI <-> Objects• Collections

Page 8: Introduction to ECO Malcolm Groves mgroves@borland.com

Enterprise Core Objects

• ECO is still Model-Driven Development• More automation

– Database Mapping– UI Mapping– Associations– OCL in your model

• Derived Attributes, Associations• Constraints

– Services• Undu/Redo, AutoForms, etc

Page 9: Introduction to ECO Malcolm Groves mgroves@borland.com

ECO

• Advantages– Maintenance– Productivity– Nice, clean separation of concerns

• Disadvantages– Requires a little bit of a mindset change– Addictive

Page 10: Introduction to ECO Malcolm Groves mgroves@borland.com

ECOSpace

Page 11: Introduction to ECO Malcolm Groves mgroves@borland.com

EcoSpace

• Runtime container for your objects• Manages

– Object Lifecycle (ie. it creates, and destroys your objects)

– Persistence– Executes OCL– Object Transactions– Etc

Page 12: Introduction to ECO Malcolm Groves mgroves@borland.com

Mary : Person

ABC123 : Invoice

ABC123 : Invoice

ECOSpace

Fred : Person

Mary : Person

ABC123 : Invoice

SERVICES

OCL SQL*

* Depends on the Datastore chosen

Page 13: Introduction to ECO Malcolm Groves mgroves@borland.com

Services

• Persistence• Relationships• Transactions• Subscriptions• Caching• Querying • Undo / Redo• Versioning• …

Page 14: Introduction to ECO Malcolm Groves mgroves@borland.com

Model Basics

• Example– Classes– Attributes– Operations– Associations– Generalization

Page 15: Introduction to ECO Malcolm Groves mgroves@borland.com

More Advanced Model Features

• Derived Attributes – OCL and Code• Derived Associations• Association Classes• Constraints• Regions• …

Page 16: Introduction to ECO Malcolm Groves mgroves@borland.com

User Interface

Page 17: Introduction to ECO Malcolm Groves mgroves@borland.com

Handles

• ReferenceHandle– Connection between your UI Controls

and your ECOSpace• ExpressionHandle

– Executes OCL and returns one or more values

– Implements IList so can be used as a DataSource for Databinding

Page 18: Introduction to ECO Malcolm Groves mgroves@borland.com

Handles

• CurrencyManagerHandle– Acts as a cursor into a collection of

Objects– Example

• VariableHandle– Allows you to create dynamic OCL– Example

Page 19: Introduction to ECO Malcolm Groves mgroves@borland.com

ECO From Sourcecode

• Creating an Object• Getting a Reference To The Currently

Selected Object• Creating Objects Part 2• Executing OCL from Code

Page 20: Introduction to ECO Malcolm Groves mgroves@borland.com

Forms

• AutoForms– ECO can automatically generate a form

based on the model– Great during development, you probably

wouldn’t deploy them • Custom Forms• Custom Auto Forms

Page 21: Introduction to ECO Malcolm Groves mgroves@borland.com

Extender Components

• Delphi 8 ECO ships with a number of components to remove the need for common coding– ECOAutoFormExtender– ECOActionExtender– ECOListActionExtender– ECODragDropExtender

• Like anything, use them once you know what they do for you.

Page 22: Introduction to ECO Malcolm Groves mgroves@borland.com

Persistence

• PersistenceMapper component– XML– BDP– SQLServer

• ECOSpace.UpdateDatabase;• Transient Objects• Example

Page 23: Introduction to ECO Malcolm Groves mgroves@borland.com

Summary

• Overview• ECOSpace• Model• User Interface• ECO II• Other Resources

Page 24: Introduction to ECO Malcolm Groves mgroves@borland.com

But wait, there’s more…

• This was a very brief introduction• Should be enough for you to start

exploring• ECO is very rich, and there is plenty for

you to get into– Constraints, Subscriptions, other

Services, Optimistic Locking, …• ECO II is even richer…

Page 25: Introduction to ECO Malcolm Groves mgroves@borland.com

ECO II

• Ships in Diamondback• Everything you learned today is still applicable• Adds:

– ASP.NET Support (Web Forms and Web Services)

– Legacy Database Support– Synchronization Server– Concurrency– Improved Designer– …

Page 26: Introduction to ECO Malcolm Groves mgroves@borland.com

Other Resources

• My Blog– http://blogs.borland.com/malcolmgroves

• ECO Tutorials– http://www.borland.com/delphi_net/architect/

eco/tutorial/• Christophe Floury‘s Technical Whitepaper

– http://www.borland.com/products/white_papers/del_unleashing_enterprise_models_with_delphi_for_dotnet.html

Page 27: Introduction to ECO Malcolm Groves mgroves@borland.com

Other Resources

• Newsgroups– borland.public.delphi.modeldrivenarchitecture.eco

– borland.public.csharpbuilder.modeldrivenarchitecture.eco 

– …

Page 28: Introduction to ECO Malcolm Groves mgroves@borland.com

Other Sessions

• Tuesday 3:00pm– ECO for ASP.NET – John Kaster

• Wednesday 1:15pm– ECO for ASP.NET – John Kaster

Page 29: Introduction to ECO Malcolm Groves mgroves@borland.com

Thank you!