Programmers rejoice: QML makes business people understand. Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 1



Similar documents
Integrate your tools to help integrate your stakeholders

Model-Driven Development - From Frontend to Code

Textual Modeling Languages

VICCI. The Eclipse Modeling Framework (EMF) A Practical Introduction and Technology Overview. Dipl.-Inf. Christoph Seidl

Organization of DSLE part. Overview of DSLE. Model driven software engineering. Engineering. Tooling. Topics:

How to Build Successful DSL s. Jos Warmer Leendert Versluijs

Embedded Software Development with MPS

[PRAKTISCHE ASPEKTE DER INFORMATIK SS 2014]

Syntax Check of Embedded SQL in C++ with Proto

Improving Software Quality with the Continuous Integration Server Hudson. Dr. Ullrich Hafner Avaloq Evolution AG 8911

Jos Warmer, Independent

Qt Signals and Slots. Olivier Goffart. October 2013

Give a Push to Your Qt Application with Qt Cloud Services and WebSockets

WHITE PAPER. Peter Drucker. intentsoft.com 2014, Intentional Software Corporation

Xtext Documentation. September 26, 2014

Principles of integrated software development environments. Learning Objectives. Context: Software Process (e.g. USDP or RUP)

Implementation and Integration of a Domain Specific Language with oaw and Xtext

Beginning Nokia Apps. Development. Qt and HTIVIL5 for Symbian and MeeGo. Ray Rischpater. Apress. Daniel Zucker

QML and JavaScript for Native App Development

Amit Sheth & Ajith Ranabahu, Presented by Mohammad Hossein Danesh

CommentTemplate: A Lightweight Code Generator for Java built with Eclipse Modeling Technology

Cedalion A Language Oriented Programming Language (Extended Abstract)

Modern PL/SQL Code Checking and Dependency Analysis

today 1,700 special programming languages used to communicate in over 700 application areas.

A Model-Driven Approach for the Development of an IDE for Spacecraft On-Board Software

New Qt APIs for Mobile Development. Mobility I Alex Blasche

VClipse Xtext-based IDE for the SAP Variant Configurator

An Approach for the Systematic Development of Domain-Specific Languages

YouTrack MPS case study

Developing Mapping Applications with ArcGIS Runtime SDK for Windows Mobile. Jay Chen Justin Colville

Using EDA Databases: Milkyway & OpenAccess

Static Analyzers. Context. Learning Objectives

Comparing Application Security Tools

Meister Going Beyond Maven

Modeling Turnpike: a Model-Driven Framework for Domain-Specific Software Development *

Java Generation from UML Models specified with Alf Annotations

Sonatype CLM Enforcement Points - Continuous Integration (CI) Sonatype CLM Enforcement Points - Continuous Integration (CI)

JastEMF: Reference Attribute Grammars for EMF-based DSLs

Architecture Rules Enforcement and Governance Using Aspects

A Common Metamodel for Code Generation

Programming with the Microsoft.NET Framework Using Microsoft Visual Studio 2005 (VB)

Mobile Development with Qt

CSCI 3136 Principles of Programming Languages

SAP's Integrated Development Environment for Java. Karl Kessler, SAP AG

Embedded/Real-Time Software Development with PathMATE and IBM Rational Systems Developer

Implementing reusable software components for SNOMED CT diagram and expression concept representations

JAVA DSLs MIT VOLLER BANDBREITE. Sebastian Zarnekow itemis AG

Leveraging Rational Team Concert's build capabilities for Continuous Integration

Introduction to CASA: An Open Source Composite Application Editor

ArcGIS Web Mapping. Sam Berg, esri

vs. Web Site: Blog: blog.soebes.com Dipl.Ing.(FH) Karl Heinz Marbaise

today 1,700 special programming languages used to communicate in over 700 application areas.

Continuous Delivery for Alfresco Solutions. Satisfied customers and happy developers with!! Continuous Delivery!

Today. Generic Language g Technology (2IS15)

Integration of Application Business Logic and Business Rules with DSL and AOP

Federation Computing: A pragmatic approach for the Future Internet

IBM InfoSphere MDM Server v9.0. Version: Demo. Page <<1/11>>

COCOVILA Compiler-Compiler for Visual Languages

The ADOxx Metamodelling Platform Workshop "Methods as Plug-Ins for Meta-Modelling" in conjunction with "Modellierung 2010", Klagenfurt

Building Applications with ArcGIS Runtime SDK for ios Part II. Eric Ito and Scott Sirowy

How To Understand And Understand Common Lisp

Content. Introduction to IPO.Plan s software Data model concept Worker Gantt View Material Zone Editor View Rack Planogram - View Live implementing

Building Web Applications, Servlets, JSP and JDBC

Chapter 6: Programming Languages

PULP Scription: A DSL for Mobile HTML5 Game Applications

The Most Popular UI/Apps Framework For IVI on Linux

Functional Programming

Exam Name: IBM InfoSphere MDM Server v9.0

OpenEmbeDD basic demo

mbeddr: an Extensible MPS-based Programming Language and IDE for Embedded Systems

An approach for the systematic development of domain-specific languages

Unit Testing for Domain-Specific Languages

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces

An IT Pro Guide for Deploying and Managing SharePoint 2013 Apps. Randy

Lecture 1 Introduction to Android

Migration Eclipse 3 to Eclipse 4

Model-driven Development for a Treasure Hunt Android application

Structure of Presentation. The Role of Programming in Informatics Curricula. Concepts of Informatics 2. Concepts of Informatics 1

FUSE-ESB4 An open-source OSGi based platform for EAI and SOA

Enterprise Service Bus

Research Topics MDD & PL 2009 Stefan Tilkov stefan.tilkov@innoq.com

Compiler I: Syntax Analysis Human Thought

Collaborative Open Market to Place Objects at your Service

Tool Suite for Virtual Service Platform Engineering (Final)

Project VIDE Challenges of Executable Modelling of Business Applications

Sonatype CLM for Maven. Sonatype CLM for Maven

Welcome to the Force.com Developer Day

Eindhoven University of Technology

Lecture 9. Semantic Analysis Scoping and Symbol Table

Continuous Integration For Fusion Middleware

Policy Driven Practices for SOA

Braindumps.C questions

Visualization of C++ Template Metaprograms

Comparison of Model-Driven Architecture and Software Factories in the Context of Model-Driven Development

Semester Review. CSC 301, Fall 2015

Using DSLs for Developing Enterprise Systems

Challenges and Pains in Mobile Apps Testing

Stas Levin Advanced Software Tools Seminar, Tel Aviv University March 28, 2011

Overview of Generative Software Development

First Java Programs. V. Paúl Pauca. CSC 111D Fall, Department of Computer Science Wake Forest University. Introduction to Computer Science

Transcription:

Programmers rejoice: QML makes business people understand Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 1

About me My company What I do at work Where I live

What is it all about? Agenda Motivation A real life example The hurdles of DSL creation What Qt has to offer PresentationSystem demo Extending Qml s type system When to use Qml for DSL creation and when not Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 3

A common problem in software development You mean If(obj!= NULL) { name= Qt }? #?=&f\ (%) Qt Developer Days 2014 Hinrich Specht 25. September 2014 Folie 4

What if Stakeholders and developers could share a common language? changes to the software could be made in that language, too? Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 5

A real life example Qt Developer Days 2014 Hinirch Specht 2. September 2014 Folie 6

The heating system example. Before. Implementation Build & Deploy Adjust requirements Up to 4 weeks, only in winter Rollout to test site Gather data Qt Developer Days 2014 Hinrich Specht 25. September 2014 Folie 7

The heating system example. After. Adjust software via DSL Cont.Integration Adjust requirements < 1 week Rollout to test site Gather data Qt Developer Days 2014 Hinrich Specht 25. September 2014 Folie 8

Why... isn t there a DSL in every software project? Qt Developer Days 2014 Hinrich Specht 25. September 2014 Folie 9

DSLs are hard to develop Formal definition Grammar Schema Metamodel Abstract Syntax Tooling Parser Validator Compiler Editor / IDE Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 10

DSL creation with XText XText is a powerful, DSL-based language development framework Steps to create a DSL using Xtext: Textual definition of syntax and semantic model for your DSL. Language: Grammar Configure generator that creates java packages and editor for your DSL. Language: MWE2 Set up Maven builds for CI of your DSL Update Eclipse Use your DSL Not targeting Java? Use Xtend for code generation Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 11

Programming languages compared Comes with an extensible type system! QML, WPF, Silverlight Object oriented, declarative, special purpose, Model driven C++, Java, C# Object oriented, imperative,general purpose C, COBOL Procedure oriented, imperative Assembler Code Processor instruction set, no abstraction at all Qt Developer Days 2014 Hinrich Specht 25. September 2014 Folie 12

DSL creation with Qml what Qt has to offer Custom types can be made available in Qml Types used are backed by C++ classes CodeCompletion for custom types immediately available in Creator Easy to learn Effort needed to create a (simple) DSL is low No other programming languages needed! Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 13

Extending the Qml type system Any custom types can be registered with QML s type system (but must inherit from QObject) Different forms of registration are available to define the runtime behaviour of your types: Creatable types Uncreatable types Interfaces Singletons Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 14

The QmlPresentationSystem is a DSL for creating slide decks makes use of QML s extensible type system is easy to use (compared to programming a slide deck with C++ or any other general purpose language) Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 15

How to use your own custom types in Qml 1. Derive from QObject Public class YourType : public Qobject { } 2. Define Properties Q_PROPERTY(DataElementIds::EnDataElementIds identifier READ getidentifier MEMBER m_id) 3. Register type in Qml qmlregistertype<yourtype>("com.your.namespace", 1, 0, QmlTypeName"); Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 16

How to use your own custom types in Qml 5. Run qmake 4. Import custom namespace in Qml file import com.your.namespace 1.0 6. Ready to use custom type in Qml YourType{ displayname: YourInstanceName" value: false identifier: YourId } Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 17

Using singleton types QObject and QJSValue types can be registered as singleton types. Registering types that are defined in C++: int qmlregistersingletontype(const char * uri, int versionmajor, int versionminor, const char * typename, QJSValue(* ) ( QQmlEngine *, QJSEngine * ) callback) int qmlregistersingletontype(const char * uri, int versionmajor, int versionminor, const char * typename, QObject *(* ) ( QQmlEngine *, QJSEngine * ) callback) Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 18

Using singleton types Registering types that are defined in Qml: int qmlregistersingletontype(const QUrl & url, const char * uri, int versionmajor, intversionminor, const char * qmlname) Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 19

Using uncreatable types int qmlregisteruncreatabletype(const char * uri, int versionmajor, int versionminor, const char * qmlname, const QString & message) Note: To use enums in Qml, they must be wrapped in a class. Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 20

Drawbacks you have to deal with Mingling with QtQuick types and QObject properties No integrated code generator for creation of non-qt-code Editor is not always as smart as it could be Fixed syntax Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 21

See how it works Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 22

The sample application DataLayer DataElements DataSwitch GpioMappings HardwareLayer GPIOs Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 23

When is a Qml based DSL the right choice? Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 24

What is a domain? Stakeholders domains Your domains Heating system System composition Drive control StateMachines Accounting UIs Routing Data layer Simply said: Everything is a domain Qt Developer Days 2014 Hinrich Specht 25. September 2014 Folie 25

Think about a QML based DSL, when other tools would require too much effort simple DSL features are needed no code generation is required the DSL will mainly be used to define static aspects Qt Developer Days 2014 Hinrich Specht 25. September 2014 Folie 26

Think about using other tools when you want your own syntax / semantics code generation for different languages is required when you want to have a clean DSL (without artifacts from QObject) Qt Developer Days 2014 Hinrich Specht 25. September 2014 Folie 27

Q&A / Discussion Qt Developer Days 2014 Hinrich Specht 2. September 2014 Folie 28