DEV11 Architecting Your Application in Open Edge 10
- Slides: 55
DEV-11: Architecting Your Application in Open. Edge® 10 John Sadd Open. Edge Evangelist
Goals of the Session § (Re-)Introduce the Open. Edge § § 2 Reference Architecture as a set of practical guidelines Make sure you are aware of key Open. Edge 10 features Map features to their benefit in designing (changes to) your application DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Agenda § What’s Your Starting Point? § Using the OERA to Help You Adapt § Pro. Data. Sets and Your Architecture § Opening Your Application to the World § Using Classes in Your Application § Other Areas of Support 3 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
One procedure to do everything DEFINE CREATE Update VARIABLE c. Car. Brand AS CHARACTER NO-UNDO. VARIABLE c. Car. Model AS CHARACTER NO-UNDO. Car. Brand Car. Model Car. Style Car. Color Car. Fuel Car. Engine Car. VIN WITH FRAME Upd. Frame. Car. ID = GUID(GENERATE-UUID). CASE Car. Brand: WHEN "Hinda" THEN FIND Dealer WHERE Dealer. Name MATCHES "*#1*". … FIND Base. Code WHERE Category = "style“ AND Description = Car. Style. Car. Base. Code. Style. ID = Base. Code. ID. IF Dealer. Name MATCHES "*#1*" THEN Car. Description = c. Car. Color + " " +… ELSE IF Dealer. Name MATCHES "*#2*" THEN Car. Description = c. Car. Brand + " " +… 4 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
So what happens when the UI requirements change? Update Car. Brand Car. Model Car. Style Car. Color Car. Fuel Car. Engine Car. VIN WITH FRAME Upd. Frame. § Extracting and changing UI references § Identifying what elements were displayed, § 5 created or updated and in what order Extracting implicit business logic DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
One procedure to do everything DEFINE CREATE Update VARIABLE c. Car. Brand AS CHARACTER NO-UNDO. VARIABLE c. Car. Model AS CHARACTER NO-UNDO. Car. Brand Car. Model Car. Style Car. Color Car. Fuel Car. Engine Car. VIN WITH FRAME Upd. Frame. Car. ID = GUID(GENERATE-UUID). CASE Car. Brand: WHEN "Hinda" THEN FIND Dealer WHERE Dealer. Name MATCHES "*#1*". … FIND Base. Code WHERE Category = "style“ AND Description = Car. Style. Car. Base. Code. Style. ID = Base. Code. ID. IF Dealer. Name MATCHES "*#1*" THEN Car. Description = c. Car. Color + " " +… ELSE IF Dealer. Name MATCHES "*#2*" THEN Car. Description = c. Car. Brand + " " +… 6 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
What happens as your logic grows? CASE Car. Brand: WHEN "Hinda" THEN FIND Dealer WHERE Dealer. Name MATCHES "*#1*". § Adding a brand or a dealership § Many places in the code to change § Finding them all § Being sure they all work the same way § Effects of this on testing 7 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
One procedure to do everything DEFINE CREATE Update VARIABLE c. Car. Brand AS CHARACTER NO-UNDO. VARIABLE c. Car. Model AS CHARACTER NO-UNDO. Car. Brand Car. Model Car. Style Car. Color Car. Fuel Car. Engine Car. VIN WITH FRAME Upd. Frame. Car. ID = GUID(GENERATE-UUID). CASE Car. Brand: WHEN "Hinda" THEN FIND Dealer WHERE Dealer. Name MATCHES "*#1*". … FIND Base. Code WHERE Category = "style“ AND Description = Car. Style. Car. Base. Code. Style. ID = Base. Code. ID. IF Dealer. Name MATCHES "*#1*" THEN Car. Description = c. Car. Color + " " +… ELSE IF Dealer. Name MATCHES "*#2*" THEN Car. Description = c. Car. Brand + " " +… 8 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
How does your database schema affect your application code? FIND Base. Code WHERE Category = "style“ AND Description = Car. Style. Car. Base. Code. Style. ID = Base. Code. ID. § Schema complexities § Many places in the § code Schema changes Relational keys 9 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
One procedure to do everything DEFINE CREATE Update VARIABLE c. Car. Brand AS CHARACTER NO-UNDO. VARIABLE c. Car. Model AS CHARACTER NO-UNDO. Car. Brand Car. Model Car. Style Car. Color Car. Fuel Car. Engine Car. VIN WITH FRAME Upd. Frame. Car. ID = GUID(GENERATE-UUID). CASE Car. Brand: WHEN "Hinda" THEN FIND Dealer WHERE Dealer. Name MATCHES "*#1*". … FIND Base. Code WHERE Category = "style“ AND Description = Car. Style. Car. Base. Code. Style. ID = Base. Code. ID. IF Dealer. Name MATCHES "*#1*" THEN Car. Description = Car. Color + " " +… ELSE IF Dealer. Name MATCHES "*#2*" THEN Car. Description = c. Car. Brand + " " +… 10 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
What happens to business logic variants? IF Dealer. Name MATCHES "*#1*" THEN Car. Description = c. Car. Color + " " +… ELSE IF Dealer. Name MATCHES "*#2*" THEN Car. Description = c. Car. Brand + " " +… § Duplicating and extending the logic § When the code gets out of control § Maintaining each variant 11 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Agenda § What’s Your Starting Point? § Using the OERA to Help You Adapt § Pro. Data. Sets and Your Architecture § Opening Your Application to the World § Using Classes in Your Application § Other Areas of Support 12 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Open. Edge Reference Architecture Update Car. Brand Presentation CREATE CAR… FIND DEALER WHERE… Business Components Data Access Common Infrastructure IF Dealer. Name MATCHES … Enterprise Services Data Sources 13 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Open. Edge Reference Architecture RUN Inventory_Service Presentation AUDIT-CONTROL… Enterprise Services Data Access Common Infrastructure Business Components IF CAN-DO… Data Sources 14 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Basic principles for agility and reuse § Do each job once and only once! § Let each component do only one job and one type of job! § Tackle one part of the problem at a Common Infrastructure Business Components time! 15 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Starting the split § User Interface and Business Logic § Or Client and Server Data Definitions Client User Interface Client-Side Logic Authentication Server Business Logic Database Access Schema Defs 16 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Continuing the split Client Data Definitions User Interface Client-Side Logic Authentication Server § Sharing definitions § Identifying the user § What data for the UI § What data for the business logic Business Logic Database Access Schema Defs 17 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Completing the split Data Definitions. Enterprise Services Presentation User Interface Client-Side Logic Data Access Authentication Common Infrastructure Business Components Business Logic Data Sources Database Access Schema Defs 18 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Agenda § What’s Your Starting Point? § Using the OERA to Help You Adapt § Pro. Data. Sets and Your Architecture § Opening Your Application to the World § Using Classes in Your Application § Other Areas of Support 19 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Pro. Data. Set™ bridges the gap from client to server Pro. Data. Set Master Detail Presentation Business Components § Holds any relational data instance • • • 20 Data relationships Before-and-after versions of changes Input and output data elements Authentication and other data, too Transports all this as a single data object A Document Message in enterprise terms DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Pro. Data. Set holds the logical data definition Pro. Data. Set Business Components Master Detail Data Access § Lets you separate the logical from the physical data definitions • Eliminate schema complexities from logic • Shield logic from schema changes • Hold calculated fields and other values 21 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Remember that complex schema definition? § Keep this in the Data Access object Data Access FIND Car. Brand WHERE Car. Brand. Name = c. Car. Brand. FIND Car. Model WHERE Car. Model. Name = c. Car. Model. FIND Base. Code WHERE Category = "style" AND Base. Code. Description = c. Car. Style. c. Base. Code. Style. ID = Base. Code. ID. FIND Base. Code WHERE Category = "color" AND Base. Code. Description = c. Car. Color. c. Base. Code. Color. ID = Base. Code. ID. FIND Base. Code WHERE Category = "fuel" AND Base. Code. Description = c. Car. Fuel. c. Base. Code. Fuel. ID = Base. Code. ID. FIND Base. Code WHERE Base. Code. Category = "engine" AND Base. Code. Description = c. Car. Engine. c. Base. Code. Engine. ID = Base. Code. ID. 22 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Logical data definition is in temp-tables and Pro. Data. Sets Presentation DEFINE TEMP-TABLE tt. Car. Info FIELD Car. Brand AS CHARACTER FIELD Car. Model AS CHARACTER FIELD Car. Style AS CHARACTER FIELD Car. Color AS CHARACTER FIELD Car. Fuel AS CHARACTER FIELD Car. Engine AS CHARACTER FIELD Car. VIN AS CHARACTER FIELD Car. Desc AS CHARACTER FIELD Car. Dealer AS CHARACTER FIELD Car. Is. Avail AS LOGICAL FIELD Car. Added AS DATE. Usable business data winds up here Business Components Including calculated fields And fields dependent on specific business logic DEFINE DATASET ds. Car. Info FOR tt. Car. Info. 23 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Wrap your code and data as a service § How much code? • Big enough for one request • Small enough to promote reuse § How much data? • Enough to get the job done… • Not so much as to take over somebody else’s business logic! • Can be expressed as a Pro. Data. Set 24 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
In short: Pro. Data. Sets and Your Application Architecture § Document Messages between parts of your application § Organize the data a component uses § Define the scope of a service § Enterprise Services Pro. Data. Set Business. Master Components Detail Data Access Data Sources 25 DEV-11: Architecting Your Application in Open. Edge 10 Common Infrastructure Presentation § § Data your user interface uses Logical schema versus physical data Data shared with another application © 2008 Progress Software Corporation
Agenda § What’s Your Starting Point? § Using the OERA to Help You Adapt § Pro. Data. Sets and Your Architecture § Opening Your Application to the World § Using Classes in Your Application § Other Areas of Support 26 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
How else can you use a business service? § As a component to call from. NET™ § As a component to call from Java™ § As a component to expose as a Web service § As a step in a Sonic™ ESB process 27 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Sharing data with a. NET application…. NET Data. Set Master Detail Presentation . NET Presentation Layer Pro. Data. Set Master Detail Business Components § Open. Edge preserves all the data, • All the relationships, • All the changes to data, • All transparently for you 28 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Sharing data with a Java application… Java SDO Master Detail Presentation Java Presentation Layer Pro. Data. Set Master Detail Business Components § Open. Edge preserves all the data, • All the relationships, • All the changes to data, • All transparently for you 29 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Exposing your service as a Web service Enterprise Services 30 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Running Web services from your application § § § 31 DEV-11: Architecting Your Application in Open. Edge 10 Run Web services as if they were ABL procedures Open. Edge utility generates syntax to paste into your application Parameters converted © 2008 Progress Software Corporation
Pro. Data. Sets as Web service parameters § Convert a Pro. Data. Set (or temp-table) to XML in a single WRITE-XML method • Also WRITE-XMLSCHEMA • Pass a Pro. Data. Set as a parameter directly to a Web service § Converts XML to a Pro. Data. Set (or temptable) with or without schema • READ-XML and READ-XMLSCHEMA • Likewise, receive a parameter directly from a Web service 32 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Integrating Web services into your Business Components RUN Somebodys. Service on h. Web. Service (INPUT DATASET ds. Car. Info, OUTPUT DATASET ds. Result. Set). Pro. Data. Set Master Business Components Detail XML Somebody’s Web service 33 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Breaking up your services into maintainable, reusable units § Two business logic variants in one procedure CASE Car. Brand: WHEN "Hinda" THEN FIND Dealer WHERE Dealer. Name MATCHES "*#1*". § Separate that into two distinct services /* Manage. American. Cars. p */ ASSIGN 34 tt. Car. Info. Car. Dealer = "#2" tt. Car. Info. Car. Desc = /* Manage. Foreign. Cars. p */ tt. Car. Info. Car. Brand + " " + tt. Car. Info. Car. Model + " " + ASSIGN … tt. Car. Info. Car. Dealer = "#1" tt. Car. Info. Car. Is. Avail = YES tt. Car. Info. Car. Desc = tt. Car. Info. Car. Added = TODAY. tt. Car. Info. Car. Color + " " + tt. Car. Info. Car. Brand + " " + … tt. Car. Info. Car. Is. Avail = NO tt. Car. Info. Car. Added = TODAY. DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Integrating your services into Sonic processes Content-Based Routing 35 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Running ABL procedures from Sonic § ABL annotations describe the procedure and § § 36 its parameters Open. Edge Architect or Proxy. Gen can generate the annotations for you Also creates the special-format descriptor file DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
The Open. Edge Architect editor integrated into Sonic Workbench @openapi. openedge. export FILE (type="ESB", esboe. Filename="%FILENAME%", use. Return. Value="false", write. Data. Set. Before. Image="false", execution. Mode="external"). 37 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
In short: Open. Edge supports you in opening your services to the world § Pro. Data. Sets as Document Messages § § § • As parameters to. NET or Java applications Run Web services from your application Expose your ABL procedures as Web services Make your services part of Sonic ESB processes. NET or Java Presentation Pro. Data. Set Master Detail 38 Enterprise Services Business Components DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Agenda § What’s Your Starting Point? § Using the OERA to Help You Adapt § Pro. Data. Sets and Your Architecture § Opening Your Application to the World § Using Classes in Your Application § Common Infrastructure Support 39 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Support for classes in ABL: Inheritance § § Architecture is about isolating common behavior and eliminating redundancy Classes provide inheritance • Common business object behavior • Common infrastructure support • Common support of all kinds Bus. Comp. Super Class Business Components Car Class 40 Dealer Class DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Inheritance in classes § You can define a class with data and methods CLASS Car: /* Source file Car. cls */ METHOD PUBLIC LOGICAL Reserve. Car (INPUT pc. Car. Id AS CHARACTER). /* Do reserve work for all cars. */ END METHOD. END CLASS. § Then you can define a subclass that inherits, overrides, and extends the standard behavior. CLASS American. Car INHERITS Car: /* Source file American. Car. cls */ METHOD PUBLIC OVERRIDE LOGICAL Reserve. Car (INPUT pc. Car. Id AS CHARACTER). SUPER: Reserve. Car(INPUT pc. Car. Id). /* Do reserve work for American cars. */ END METHOD. END CLASS. 41 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Support for classes: strong typing § Enforcing consistency and correctness § Classes provide strong object typing to assist • A variable holds a reference to a specific class • The compiler verifies that all references are correct • …even cross-checking many classes • Interface files also represent programming contracts to enforce Instance of Car Class 42 DEV-11: Architecting Your Application in Open. Edge 10 Instance of Dealer Class © 2008 Progress Software Corporation
Strong typing in classes § Here’s some procedural code: DEFINE VARIABLE h. Proc AS HANDLE. RUN My. Proc. p PERSISTENT SET h. Proc. RUN Some. Proc IN h. Proc(INPUT 5). § Will it work at runtime? My. Proc. p ? Some. Proc: My. Proc. p Some. Func: • Who knows? § Here’s some class-based code: DEFINE VARIABLE r. Car AS CLASS Car. r. Car = NEW Car(). r. Car: Some. Method(INPUT 5). Car. cls Some. Method: § Will it work at runtime? • The compiler makes sure it will! 43 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Under Development § § D I S C L A I M E R This talk includes information about potential future products and/or product enhancements. What I am going to say reflects our current thinking, but the information contained herein is preliminary and subject to change. Any future products we ultimately deliver may be materially different from what is described here. D 44 I S C DEV-11: Architecting Your Application in Open. Edge 10 L A I M E R © 2008 Progress Software Corporation
Classes for the Advanced UI in OE 10. 2 § Use. NET controls (both Microsoft and third § § party) as if they were native to ABL Controls are expressed as objects Use ABL classes to build a UI with them • Visual Designer in Open. Edge Architect § Integrate these new classes with other ABL classes or procedures 45 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
In short: Using Classes in Your Architecture § Consider the practical benefits of using classes • • 46 Definitional inheritance Strong type checking More compiler support for finding errors Using and extending Advanced UI controls DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Agenda § What’s Your Starting Point? § Using the OERA to Help You Adapt § Pro. Data. Sets and Your Architecture § Opening Your Application to the World § Using Classes in Your Application § Other Areas of Support 47 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Other Areas of Support § Auditing § Authentication § Structured error handling § Don’t just think about the feature! • Think about how it contributes to architecture 48 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
In Summary § Consider the Open. Edge § § 49 Reference Architecture as a set of practical guidelines Make sure you are aware of key Open. Edge 10 features Map features to their benefit in designing (changes to) your application DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
For More Information, go to… § PSDN • <URL> to item or category related to session topic § Progress e. Learning Community: • Title § Documentation: • Title 50 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Relevant Exchange Sessions § Session-ID: Session Title 51 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
? Questions 52 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
Thank You 53 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
54 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
OERA component slide Presentation Enterprise Services Data Access Common Infrastructure Business Components Data Sources 55 DEV-11: Architecting Your Application in Open. Edge 10 © 2008 Progress Software Corporation
- 영국 beis
- Rising edge and falling edge
- Open your eyes free your mind
- Open edge computing
- Open edge abl
- Give us your hungry your tired your poor
- Don't put your cup on the border of the table
- Open source cluster application resources
- Open source cluster application resources
- Timers in plc
- Open hearts open hands
- Congratulations your application has been approved
- You say that you love rain
- Open your notebook
- Open your textbook
- Open your eyes the invisible argument
- Lesbian učitelka
- Open your textbook
- Open your book
- Open your books please
- Open your pencil case
- Open your eyes look within
- Accept your loneliness you are your only friend
- Stop blaming your parents for your problems
- How does the heart pump work
- Too many kids in the tub
- How to introduce your friend to your teacher
- Cara ikatan buku sila
- Answer the questions.write in your notebook
- In your notebook define the following terms in your words
- Change your water change your life
- Your conscious awareness of your own name and self identity
- Teach me your ways oh lord
- If your vehicle malfunctions turn on your hazard lights
- Ideal self vs real self examples
- School magazine articles written by students
- Your treasure is where your heart is
- Remember me in the days of your youth
- 2021 graduation songs
- Your passenger jammed his finger in the door of your m1114
- First reconcile with your brother
- Each proportion write your answer in your notebook
- In your notebook write questions about the subject
- What is your treasure
- How old is your name
- I throw my warlike shield
- Your health your responsibility
- Does your walk match your talk
- Put your left foot in
- Fight for your family nehemiah
- The way you see your body is your
- Your vote your choice
- Ysys hse
- In your notebook write questions
- Please clean your room
- Copy the words in your notebook