350 likes | 366 Views
A trip to the other side of the world. Ing. Andr és Aguiar aaguiar@artech.com.uy. Urban Myths. With a good object-oriented programming ‘framework’ I can obtain the same features as with GeneXus. What features?. Multiple platforms Multiple databases
E N D
A trip to the other side of the world Ing. Andrés Aguiar aaguiar@artech.com.uy
Urban Myths • With a good object-oriented programming ‘framework’ I can obtain the same features as with GeneXus
What features? • Multiple platforms • Multiple databases • No need to write code to access data or SQL • Code independent of database structure • Automatic change of database structure
Thesis • Real world is denormalized • On building any model working with normalized entities you lose information • Lost information is critical during applications development
Object/Relational mapping • Mapping from an objects model to a relational model • We will use “Hibernate”
Moral • A GX model captures the relevant hierarchical view for the case use. • With this view we can infer relevant relationships -which do not exist in an object-oriented model- for a case use. • A GeneXus transaction is less liable to changes in the data model than a OO model.
Graphs versus Hierarchies • What is a ‘Customer’? • Customer.Invoices • Customer.City.Country • “Lazy loading” • “Eager loading”
Moral • In a GX transaction we explicitly define the group of data that is relevant for the use case, and only these. • Explaining them is reasonable.
Concurrence problems • There is a concurrence error: • Invoice.CustomerId change • Item.ItemPrice change • There is no concurrence error • Another user changed Customer.CustomerEmail
Concurrence problem • There is a concurrence error: • A new line was added • Other user modified a line that has not been modified by us • A line was deleted
Moral • Concurrence rules are quite more easy to infer if you know exactly the group of data involved in the use case. • GeneXus infers them automatically. If you use an object-oriented programming you must explain them.
‘Service-Oriented Architecture’ • Communication between applications or between the physical tiers of an application is performed with messages. • Messages are data expressed in XML
OO to SOA • How should I map my objects graph to a message? • What is an invoice? • Each message has a different view of my objects model • Customer information in the ‘Invoice’ message is different to the one required in the ‘customer’ message.
Moral • Messages in SOA should have all the information required for this use case, and only this information. • GX transactions are ideal for a SOA environment. An object model is not.
Moral • Inferring the user interface from an object model is not possible.
We did not talk about: • Knowledge Base – protection of technological change • Productivity • Easy use of data • Batch processes! • Database automatic design • Reorganizations
Conclusions • Working with denormalized structures is more productive than working with normalized structures. • Transactions are the key element of GeneXus working philosophy.