1 / 23

Business Components

Business Components. Alejandro Silva ARTech silva@artech.com.uy. Business components. Develop applications faster and more easily. What are Business Components ?. Transaction. What?. Encapsulates logics Provides viewing User interaction DB Updating Rule validation. Transaction.

marialong
Download Presentation

Business Components

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Business Components Alejandro Silva ARTech silva@artech.com.uy

  2. Business components Develop applications faster and more easily.

  3. What are Business Components ?

  4. Transaction What? • Encapsulates logics • Provides viewing • User interaction • DB Updating • Rule validation

  5. Transaction What? Presentation Business Logics DB Access

  6. Business Component What? O-O Interface Business Logics DB Access

  7. How does it work?

  8. Interface How? O-O Interface Business Logics DB Access

  9. Interface How? (Properties) Load(key) Save() Check() O-O Interface GetMessages() NoErrors() Mode()

  10. Interface Como? (Properties) Load(key) Save() Check() O-O Interface GetMessages() NoErrors() Mode()

  11. Interface – Properties How? Assigns value to modifiable object attributes • Obtains value of attributes • Example • &total = &factura.FacTotal • For &facLinea in &factura.Factura1 &cantidadItems = &cantidadItems + &facLinea.PrdCant EndFor (Properties)

  12. Interface How? (Properties) Load(key) Save() Check() O-O Interface GetMessages() NoErrors() Mode()

  13. Interface - Methods How? • Load(key) • Loads information related to the key given. • Check() • Processes the component without updating the DB. • Save() • Processes the component and updates the DB. • Delete() • Deletes the set. Load(key) Save() Check()

  14. Interface How? (Properties dades) Load(key) Save() Check() O-O Interface GetMessages() NoErrors() Mode()

  15. Interface - Methods How? • NoErrors() • Component status. • GetMessages() • Messages of last operation results. • Mode() • Mode of the component. GetMessages() NoErrors() Mode()

  16. Interface How? • Example &factura.FacFecha = today() &factura.CliCod = 1 &facLinea.PrdId = 1 &facLinea.PrdCantidad = 10 &factura.Factura1.Add( &facLinea) &factura.Save() If NoErrors() return Else &messages = GetMessages() EndIf

  17. Why is it easier and faster?

  18. Advantages Why? • Reuse transaction logics • Delete cascade • Validation • Integrity check • Encapsulate business rules • Not necessary to check rules in all places.

  19. Case I Why? • Delete in procedures • Implementation • Integrity references check • Subordinate tables delete • Problems • Duplicates logics • Maintenance • Lack of functionality

  20. Case II Why ? • Updating in Work Panel • Implementation • Create process – to update DB. • Validate business logics in events • Problems • Duplicates logics • Maintenance • Lack of functionality • Optimistic lock

  21. Case III Why? • Web services • Implementation • Create SOAP procedures – to update DB. • Problems • Duplicates Transaction logics.

  22. Web Services Why? • Present the Business Component as a Web Service • “SOAP” Methods • Load( in:key, out:component, out: messages) • Check( inout: component, out: messages) • Save( inout: component, out: messages)

  23. demo

More Related