Modelos para que vos quero ou Web Application
“Modelos para que vos quero” ou “Web Application Maker: a declarative web database tool” Miguel Calejo, Mário Araújo Declarativa, Portugal http: //www. declarativa. com 24 -Nov-2005 Copyright Declarativa 2000 -2005 1
http: //www. declarativa. com Plan for today • Romantic vision and “real world” impact • About WAM – – – WAM principles An example Meta-model editing Real apps grow beyond models Another example, “business story” • Conclusion 24 -Nov-2005 Copyright Declarativa 2000 -2005 2
http: //www. declarativa. com Vision • Goal (1990 -2010) – Telepathic specifications – Instantaneous development – Continuous fixing/adapting; only dead apps are “done” • Getting there (2000 -2005) – There may be lots of tiers in an application. . . • . . . but there’s always a relational back-end – Pick a decent one to start: MS SQL Server • A word about PROLOG and XSB Inc. ’s XJ – Cut the crap, focus on the problem, apply GUI patterns – Ride on Moore’s Law: don’t generate, interpret • Will it work? 24 -Nov-2005 Copyright Declarativa 2000 -2005 3
http: //www. declarativa. com WAM projects: Do. D/XSB, Inc. Front-end to a “knowledge warehouse” for the largest part DB in the world 27 tables, 110 hours Currently in beta program 24 -Nov-2005 Copyright Declarativa 2000 -2005 4
http: //www. declarativa. com WAM projects: CVRVV VVSHOP, VVROUTE, DCPonline, PAS, PS/SC, Gestão de notícias, Rotulagem, Contactos, i. Lab (LIMS), Receitas verdes, OLAP front-end, Boas Vinhas, . . . 24 -Nov-2005 Copyright Declarativa 2000 -2005 5
http: //www. declarativa. com WAM projects: Servisoft Custom “ERP” 60+ tables, 4000 hours In use since Nov 2001 24 -Nov-2005 Copyright Declarativa 2000 -2005 6
http: //www. declarativa. com Today’s plan (progress) • Romantic vision and “real world” impact • About WAM – – – WAM principles An example Meta-model editing Real apps grow beyond models Another example, “business story” • Conclusion 24 -Nov-2005 Copyright Declarativa 2000 -2005 7
http: //www. declarativa. com More WAM projects • XSB Inc. – XT: time billing and project management • CCDR-N – repository for all Information Systems • CRAT – Image database, crafts shop, invoicing, etc • About 18 applications, including several “medium-sized” critical web ISs 24 -Nov-2005 Copyright Declarativa 2000 -2005 8
http: //www. declarativa. com Spaghetti code in the internet era 24 -Nov-2005 Copyright Declarativa 2000 -2005 9
http: //www. declarativa. com More declarative scenario 24 -Nov-2005 Copyright Declarativa 2000 -2005 10
http: //www. declarativa. com Enter: declarative web development • Web Application Maker (WAM) – – Model-driven, based on SQL Server Given a DB schema with triggers, constraints, etc. . . get web interface with user profiles, etc. Flexible: GUI generators exposed to the developer • Follow any software engineering method, . . –. . . and use the resulting database • Part of Declarativa’s Web Information Systems Toolkit 24 -Nov-2005 Copyright Declarativa 2000 -2005 11
http: //www. declarativa. com The WAM picture 24 -Nov-2005 Copyright Declarativa 2000 -2005 12
http: //www. declarativa. com WAM “Equations” • Web interface = WAM(DB Meta Information + WAMmodel) + Custom. ASP pages using WAM objects + other pages • Default web interface = WAM(DB Meta Inf. + Default WAMmodel) • An acceptable and easy-to-change interface working sooner is much better than a fancy one later! 24 -Nov-2005 Copyright Declarativa 2000 -2005 13
http: //www. declarativa. com WAMmodel • Information added to the database schema to allow generation of a reasonable GUI instance – – – WAM_PRESENTATION WAM_LIST, WAM_LIST_COLUMN WAM_LOOKUP_COLUMN WAM_PROCEDURE_CALL. . . 10 tables total • Strongly tied to the relational meta-model • Non-redundant 24 -Nov-2005 Copyright Declarativa 2000 -2005 14
http: //www. declarativa. com WAM: a web GUI fragment factory for. . . • Entry page • (Regular) Lists, List columns • Detail lists – Stand-alone – Embbeded • Search Criteria • Rows, Row fields, Lookup fields • Context path, procedure callers, error reporting 24 -Nov-2005 Copyright Declarativa 2000 -2005 15
http: //www. declarativa. com GUI fragment example: lookups 24 -Nov-2005 Copyright Declarativa 2000 -2005 16
http: //www. declarativa. com Today’s plan (progress) • Romantic vision and “real world” impact • About WAM – – – WAM principles An example Meta-model editing Real apps grow beyond models Another example, “business story” • Conclusion 24 -Nov-2005 Copyright Declarativa 2000 -2005 17
http: //www. declarativa. com Demo – “Northwind” database 24 -Nov-2005 Copyright Declarativa 2000 -2005 18
http: //www. declarativa. com Entry page A default entry page, with all lists plus direct navigation to “interesting” tables Uses WAM_TABLE_GROUP 24 -Nov-2005 Copyright Declarativa 2000 -2005 19
http: //www. declarativa. com A user-configurable list Automatic joins, both detail master and master detail 24 -Nov-2005 Copyright Declarativa 2000 -2005 20
http: //www. declarativa. com Row with embedded list and 3 LKs 24 -Nov-2005 Copyright Declarativa 2000 -2005 21
http: //www. declarativa. com Relational navigation extreme 24 -Nov-2005 Copyright Declarativa 2000 -2005 22
http: //www. declarativa. com Today’s plan (progress) • Romantic vision and “real world” impact • About WAM – – – WAM principles An example Meta-model editing Real apps grow beyond models Another example, “business story” • Conclusion 24 -Nov-2005 Copyright Declarativa 2000 -2005 23
http: //www. declarativa. com Editing the WAMmodel • SQL client tools, or. . . • WAMAdmin – A WAM application – Standard lists and rows for all WAMmodel tables – Some utilities • WAMmodel/DB consistency checking, DB dependency extractor, etc. – Complemented by runtime “edition mode”, adequate for administrators/power users – Try it at http: //showroom. declarativa. com 24 -Nov-2005 Copyright Declarativa 2000 -2005 24
http: //www. declarativa. com WAMAdmin 24 -Nov-2005 Copyright Declarativa 2000 -2005 25
http: //www. declarativa. com Editing the WAMmodel for a row 24 -Nov-2005 Copyright Declarativa 2000 -2005 26
http: //www. declarativa. com Editing a WAMmodel tuple 24 -Nov-2005 Copyright Declarativa 2000 -2005 27
http: //www. declarativa. com Today’s plan (progress) • Romantic vision and “real world” impact • About WAM – – – WAM principles An example Meta-model editing Real apps grow beyond models Another example, “business story” • Conclusion 24 -Nov-2005 Copyright Declarativa 2000 -2005 28
http: //www. declarativa. com Back to the WAM equations • So far we’ve seen. . . • Web interface = WAM(DB Meta Information + WAMmodel) + Custom ASP pages using WAM objects + other pages • Default web interface = WAM(DB Meta Inf. + Default WAMmodel) 24 -Nov-2005 Copyright Declarativa 2000 -2005 29
http: //www. declarativa. com Customized ASPs: WAM API Single DB dependence. Custom ASP nearly “unbreakable” with DB changes 24 -Nov-2005 Copyright Declarativa 2000 -2005 30
http: //www. declarativa. com An ASP invoked from a WAM list 24 -Nov-2005 Copyright Declarativa 2000 -2005 31
http: //www. declarativa. com Complementing WAM – WIS Toolkit • Making Web Information Systems real • The Web IS Tookit contains WAM plus. . . – “Impressor” • “Calibrated” HTML printing with IE control by VB slave • A 4 layout Javascript library – “Comunicador” (Java DB and email-driven agent) • Automatic generation and archive of instituional email/fax communications • Automatic URL validation • Extraction of structured data from (HTML) documents – Utilities • Template-based user document “draft” generator • Emailing helpers • Web application Load Balancer 24 -Nov-2005 Copyright Declarativa 2000 -2005 32
http: //www. declarativa. com Web Information Systems Toolkit 24 -Nov-2005 Copyright Declarativa 2000 -2005 33
http: //www. declarativa. com Today’s Plan (progress) • Romantic vision and “real world” impact • About WAM – – – WAM principles An example Meta-model editing Real apps grow beyond models Another example, “business story” • Conclusion 24 -Nov-2005 Copyright Declarativa 2000 -2005 34
http: //www. declarativa. com A Defense Logistics Agency (Do. D, USA) • Grande esforço em curso desde meados anos 90 para melhorar gestão da cadeia de fornecimento – Lenda 1: ”Era uma vez um general que precisava do seu jeep. Então. . . ” – Lenda 2: “X 0% de peças dentro dos parâmetros durante. . . ” • Muitas “plataformas” com décadas de tempo de vida, muitas peças, muitos fabricantes e fornecedores – Informação evolutiva e dispersa por fontes estruturadas e textuais (redundância, incoerência, validade, etc) • A XSB Inc. (cliente da Declarativa, www. xsb. com/partners. html) – Desenvolveu “Coherent View” para a DLA integrando a informação acima. . • . . . mais novos atributos de items inferidos da info DLA + bases de conhecimento • Sub-sistemas Prolog alimentando base de dados SQL Server – Tecnologia para descobrir equivalência entre items, fornecedores alternativos, impacto da alteração de normas, etc. 24 -Nov-2005 Copyright Declarativa 2000 -2005 35
http: //www. declarativa. com O projecto WAM – CV website Informação disponível Informação produzida 24 -Nov-2005 Copyright Declarativa 2000 -2005 36
http: //www. declarativa. com O projecto WAM – CV website Critério de pesquisa aplicado Navegação para detalhe Colunas escolhidas pelo utilizador Exportação em vários formatos 24 -Nov-2005 Copyright Declarativa 2000 -2005 37
http: //www. declarativa. com CV website - conclusões • Menos de 200 horas de concepção e desenvolvimento • Zero esforço em “burocracia infraestrutural”, ou seja as horas foram proveitosas para o cliente. Layout automático satisfez • Distância (5 h de diferença horária) e questões de segurança (dados não exportáveis) dificultaram a fase final de testes e suporte • Para saber mais: r. hopkins@xsb. com ou mc@declarativa. com 24 -Nov-2005 Copyright Declarativa 2000 -2005 38
http: //www. declarativa. com Today’s plan - Conclusion • How to replay it – www. declarativa. com/wam/UNL 24 NOV 2005. ppt – Online showroom, trial version, free developer licenses • Pushing the focus to the database layer – The Declarativa project distortion field • R&D – Trivia • X 3 D front-ends (Q 1 2006), Postgres SQL support, other – The real thing • user assertions + magic tool = IS, at all times – MSc and Ph. D candidates accepted: mc@declarativa. com 24 -Nov-2005 Copyright Declarativa 2000 -2005 39
- Slides: 39