Introduction to ECO Malcolm Groves mgroves@borland.com

Preview:

Citation preview

Introduction to ECO

Malcolm Groves

mgroves@borland.com

Agenda

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

ECO Overview

Database-Driven Development

Database-Driven Development

• Advantages– Familiar– Low barrier to entry

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

Model-Driven Development

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

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

ECO

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

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

ECOSpace

EcoSpace

• Runtime container for your objects• Manages

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

– Persistence– Executes OCL– Object Transactions– Etc

Mary : Person

ABC123 : Invoice

ABC123 : Invoice

ECOSpace

Fred : Person

Mary : Person

ABC123 : Invoice

SERVICES

OCL SQL*

* Depends on the Datastore chosen

Services

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

Model Basics

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

More Advanced Model Features

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

User Interface

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

Handles

• CurrencyManagerHandle– Acts as a cursor into a collection of

Objects– Example

• VariableHandle– Allows you to create dynamic OCL– Example

ECO From Sourcecode

• Creating an Object• Getting a Reference To The Currently

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

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

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.

Persistence

• PersistenceMapper component– XML– BDP– SQLServer

• ECOSpace.UpdateDatabase;• Transient Objects• Example

Summary

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

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…

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– …

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

Other Resources

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

– borland.public.csharpbuilder.modeldrivenarchitecture.eco 

– …

Other Sessions

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

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

Thank you!