SlideShare uma empresa Scribd logo
1 de 23
Baixar para ler offline
IBM Innovate 2012
IBM Rational Rhapsody and Qt Integration for
Model-Based GUI Development
Giulio Santoli
Client Technical Professional, IBM Rational
giulio_santoli@it.ibm.com
Session RG-1258
The Premier Event for Software and Systems Innovation

Agenda

1 Model-Driven Development with IBM Rational Rhapsody
Nokia Qt Framework Overview

2
3
4
5
6

2

Rhapsody and Qt Integration Issues
Rhapsody Qt Profile Overview

Demo

Summary

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

System and Software Engineering with IBM Rational Rhapsody
Capabilities
Requirements-driven analysis and design for technical,
embedded or real-time solutions, including those based on
multi-core architectures
Rapid design validation and verification with frequent
simulation and testing
Development and deployment of complete C, C++, C#,
Java and Ada applications

Benefits
"Using Rhapsody software improves the quality
of the application software that is integral to the
series hydraulic hybrid system development

Build the right product through non-ambiguous
communication and frequent collaboration
Eliminate defects early and increase quality by continually
testing the design

process."

Reduce development time by automatically generating
applications and documentation

Steve Zielinski, Eaton chief engineer for

Re-use and adapt existing technology through reverse
engineering and product line engineering

software

3

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

Model-Driven Development with IBM Rational Rhapsody
Build efficient software that exactly matches the design intent
– Develop C, C++, C#, Java, and Ada applications

Maintain automated synchronization between model and code
– Work simultaneously with architecture, software and target
– All changes in one area reflected in the others

Support Domain-Specific Languages, including:
– UML, SysML, DoDAF, MoDAF, UDPM, DDS, Autosar, NetCentric, etc..
Generate
new code

Visualize
existing

Model Code
Synchronization

4

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

Software Model Execution in Animation Mode

Requirements test
through execution

Model execution enables
iterative development

Correct specification
hand-off to software

5

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

Nokia Qt Framework Overview
Nokia Qt is a cross-platform application and UI framework with APIs for C++ programming
and for rapid UI creation of:
– mobile applications (Symbian phones and the Nokia N9 smartphone)
– desktop applications (Microsoft Windows, Mac OS X, and Linux)

The Qt Framework is based on modular C++ class library, including UI, Multithreading,
Networking, Multimedia, XML, Database connection and so on.
The Qt SDK combines the Qt framework with tools such as an IDE, an UI Designer, a
Simulator and some other tools.

http://qt.nokia.com/

6

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

Rhapsody and Qt Integration: Technical Issues (1/2)
Qt extends the C++ syntax by introducing some keywords and macros (such as “signal”,
“slot”, “Q_OBJECT”) that are handled by the Qt pre-processor at compilation time.
By default, these keywords are not compatible with the Rhapsody C++ parser and prevents
Rhapsody round-trip feature.
Here follows an example that shows these Qt keywords:
The Object class must be the first in the base classes
list.
The Q_OBJECT macro is used to enable Qt metaobject features, such as dynamic properties, signals,
and slots.
Signals are emitted by an object when its internal
state has changed in some way that might be
interesting to the object's client or owner.
Signal implementation is generated by the Qt
preprocessor must not be implemented in the .cpp file.
Slots are normal C++ functions and can be called
normally; their only special feature is that signals can
be connected to them.
A slot is automatically called when a signal connected
to it is emitted.

7

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

Rhapsody and Qt Integration: Technical Issues (2/2)
Qt requires the main thread to be the primary "GUI thread“ as Qt widgets and several
related classes don't work in secondary threads. This usually conflicts with the standard
Rhapsody configuration, as the main thread is automatically generated as an OXF thread.

To cope Rhapsody with the Qt meta-object system, it is needed:
– Update Rhapsody code generator though Rhapsody Simplifiers APIs
– Customize Rhapsody properties to handle Qt-specific keywords
– Customize Rhapsody autogenerated Main to correctly the Qt main thread
– Customize Rhapsody autogenerated Makefile to invoke Qt command line utilities

8

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

Solution: Rhapsody Qt Profile
Rhapsody Qt Profile is a custom profile for Rhapsody in C++ based on stereotype
customization and a Java plug-in invoked at code generation time.
This profile is not part of the official Rhapsody installation package.
It allows you to develop Qt-compatible code that also takes advantage of Rhapsody
capabilities, such as state-machines with either synchronous or asynchronous events.
The profile automatically generates the Qt project file and customize it accordingly.
The current implementation supports the following:
– Qt 4.7.3 for Windows (VS 2008 only) and Linux, with and without Animation (no Tracing).
– All the .ui files are supposed to be stored in the “gui” directory in the Rhapsody project.
– No support for Qt message catalogs and resources yet.
– Only base Qt classes are defined in the profile (QApplication, QObject and QWidget).
– All the slots are public, regardless their visibility in the model.
– Qt Mobile Framework is not supported.

9

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

Rhapsody Qt Profile Stereotypes
<<QTObject>>
You can use this stereotype to flag those Classes that needs to be Qt-compliant, with the Q_OBJECT
macro, signals and slots.

<<QTSignal>>
You can use this stereotype to flag those Operations that are Qt Signals. They will be declared in the
specification file (.h). Use it only for operations belonging to classes stereotyped as <<OTObject>>.

<<QTSlot>>
You can use this stereotype to flag those Operations, Triggered Operations or Receptions that are
Qt Slots. Use it only for operations belonging to classes stereotyped as <<OTObject>>.

<<QTConfiguration>>
You can use this stereotype to flag those Configurations that you want to generate Qt-related
programs. The default Makefile and Main are generated accordingly.

10

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

Custom Simplifiers in Rhapsody Qt Profile
Rhapsody Qt Profile uses Custom Simplifiers to “hook” predefined extension points at code generation time.
Custom simplifiers manipulate the code model using standard
Rhapsody APIs.
For each element the simplify property can specify:
– Default: follow out-of-the-box simplification
– None: suppress the simplification
– Copy: copy the application element to the code model as is
– User: replace out of the box one with a new user defined one
– User Post Default: invoke a custom simplifier after the out of the box one

Properties

Writer Rules
11

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

Rhapsody Qt Profile Usage Overview
To create you classes and set the <<QTObject>> stereotype to those of them you want to be
Qt-enabled.
When you stereotype a class with <<QTObject>> do the following:
– Create a generalization dependency to QObject or QWidget classes provided by the profile. If you want to
generalize a different class, copy one of the above ones in your project and rename at your will.
– Create a constructor that initializes the parent Qt class, i.e. MyWindget(QWidget*parent)
– Specify the includes you need in the Properties, i.e. <QWidget> or just <QtGui>
– Apply the <<QTSignal>> and <<QTSlot>> stereotypes accordingly

Apply the <<QTConfiguration>> stereotype to the Rhapsdody configuration you want to
generate the Qt-enabled program.
If you need user interface files (.ui) generated with Qt Designer, put them in the “gui” directory
in your project: they will be automatically included in the build. Just Remember to include their
correspondent header file names, as they are supposed to be generated during the Qt buil
process.

12

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

Code Example for a simple Reactive Class
Generated code example with the Rhapsody Qt Profile:

Rhapsody base class for classes with state machines

QTProfile generated slots and macros

This method starts the Rhapsody state machine
implementation

13

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

Asynchronous or Synchronous Slots in Rhapsody State Machine (1/2)
Synchronous State Machines
In the Synchronous implementation, if the Class in Rhapsody is not Active, the Main Thread is the Qt GUI
Thread, it’s not possible to use Rhapsody Asynchronous Events e and no OXF Threads are running.
In this configuration, it’s not possible to use the Rhapsody timer but it’s needed to use the Qt one. Here
follows a simple example:

Asynchronous State Machines
If the Class in Rhapsody is Active, it runs its own OXF Thread and it’s possible to use Asynchronous
Events (Receptions) and the Rhapsody timeout.

14

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

Asynchronous or Synchronous Slots in Rhapsody State Machine (2/2)

onous
Synchr le
Examp

In synchronous mode, only
Triggered Operations can be
used.
In synchronous mode, it is needed
to use Qt timeout.

ronous
Asynch le
Examp

In asynchronous mode, both
Receptions and Triggered
Operations can be used.
In asynchronous mode, it possible
to use OXF timeout.

15

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

QTProfile Main Class v.s. Default Main Class (1/2)
The QTProfile introduces some differences to the generated main class, to make it
compatible with Qt and make the main thread the primary GUI thread.
Here follows the differences with the default standard main class:
– It automatically creates a QApplication object and starts it: this makes the main thread the Qt GUI thread
too.
– It does not start the OXF main loop: if you want to use Rhapsody asynchronous events you need at least
an active class in your model.

16

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

QTProfile Main Class v.s. Default Main Class (2/2)

e
With th
ile
Qt Prof

17

Without
the
le
Qt Profi

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

www.ibm.com/software/rational

18

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

Summary
IBM Rational Rhapsody is a great tool for Model-Drive Development of C, C++, C#, Java
and Ada applications.
Nokia Qt is a well known and adopted C++ Framework to build cross-platform GUI
applications.
Thanks to Rhapsody flexibility, it has been possible to develop a custom Rhapsody profile
to benefit of both Rhapsody and Qt and leverage Model-Driven Development for GUI
Applications development.

19

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

www.ibm.com/software/rational

20

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

Daily iPod Touch giveaway
Complete your session surveys online each day at a conference kiosk or on your
Innovate 2012 Portal!
Each day that you complete all of that day’s session surveys, your name will be entered
to win the daily IPOD touch!

On Wednesday be sure to complete your full conference evaluation to receive your
free conference t-shirt!

21

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

Acknowledgements and disclaimers
Availability: References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries
in which IBM operates.
The workshops, sessions and materials have been prepared by IBM or the session speakers and reflect their own views. They are provided for
informational purposes only, and are neither intended to, nor shall have the effect of being, legal or other guidance or advice to any participant.
While efforts were made to verify the completeness and accuracy of the information contained in this presentation, it is provided AS-IS without
warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this
presentation or any other materials. Nothing contained in this presentation is intended to, nor shall have the effect of, creating any warranties or
representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of
IBM software.
All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have
achieved. Actual environmental costs and performance characteristics may vary by customer. Nothing contained in these materials is intended to,
nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.
© Copyright IBM Corporation 2012. All rights reserved.

– U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
IBM, the IBM logo, ibm.com, Rational, the Rational logo, Telelogic, the Telelogic logo, Green Hat, the Green Hat logo, and other IBM products and
services are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If
these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol (® or ™), these symbols
indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered
or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” at
www.ibm.com/legal/copytrade.shtml
Nokia QT is a trademark of Nokia Corporation
Other company, product, or service names may be trademarks or service marks of others.

22

© 2012 IBM Corporation
The Premier Event for Software and Systems Innovation

www.ibm.com/software/rational
© Copyright IBM Corporation 2012. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind,
express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have
the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM
software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities
referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature
availability in any way. IBM, the IBM logo, Rational, the Rational logo, Telelogic, the Telelogic logo, and other IBM products and services are trademarks of the International Business Machines
Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others.

23

© 2012 IBM Corporation

Mais conteúdo relacionado

Mais procurados

IBM Rhapsody and MATLAB/Simulink
IBM Rhapsody and MATLAB/SimulinkIBM Rhapsody and MATLAB/Simulink
IBM Rhapsody and MATLAB/Simulink
gjuljo
 
Prfc rhapsody simulation_1.0
Prfc rhapsody simulation_1.0Prfc rhapsody simulation_1.0
Prfc rhapsody simulation_1.0
Pascal Roques
 

Mais procurados (20)

Fundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CDFundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CD
 
Rhapsody and mechatronics, multi-domain simulation
Rhapsody and mechatronics, multi-domain simulationRhapsody and mechatronics, multi-domain simulation
Rhapsody and mechatronics, multi-domain simulation
 
The story of SonarQube told to a DevOps Engineer
The story of SonarQube told to a DevOps EngineerThe story of SonarQube told to a DevOps Engineer
The story of SonarQube told to a DevOps Engineer
 
Introduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker CaptainIntroduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker Captain
 
02.[참고]오픈소스sw라이선스가이드라인
02.[참고]오픈소스sw라이선스가이드라인02.[참고]오픈소스sw라이선스가이드라인
02.[참고]오픈소스sw라이선스가이드라인
 
Move SysML models from Rhapsody to MagicDraw with the Publisher for Rhapsody
Move SysML models from Rhapsody to MagicDraw with the Publisher for Rhapsody Move SysML models from Rhapsody to MagicDraw with the Publisher for Rhapsody
Move SysML models from Rhapsody to MagicDraw with the Publisher for Rhapsody
 
Webinar Cloud Native Community.pptx
Webinar Cloud Native Community.pptxWebinar Cloud Native Community.pptx
Webinar Cloud Native Community.pptx
 
What is Flutter
What is FlutterWhat is Flutter
What is Flutter
 
Intro to Azure DevOps
Intro to Azure DevOpsIntro to Azure DevOps
Intro to Azure DevOps
 
Managing the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS LambdaManaging the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS Lambda
 
CICD Pipelines for Microservices Best Practices
CICD Pipelines for Microservices Best Practices CICD Pipelines for Microservices Best Practices
CICD Pipelines for Microservices Best Practices
 
Flutter
FlutterFlutter
Flutter
 
Saltstack with Zabbix
Saltstack with ZabbixSaltstack with Zabbix
Saltstack with Zabbix
 
IBM Rhapsody and MATLAB/Simulink
IBM Rhapsody and MATLAB/SimulinkIBM Rhapsody and MATLAB/Simulink
IBM Rhapsody and MATLAB/Simulink
 
Prfc rhapsody simulation_1.0
Prfc rhapsody simulation_1.0Prfc rhapsody simulation_1.0
Prfc rhapsody simulation_1.0
 
Rational Rhapsody Workflow Integration with Visual Studio
Rational Rhapsody Workflow Integration with Visual Studio Rational Rhapsody Workflow Integration with Visual Studio
Rational Rhapsody Workflow Integration with Visual Studio
 
Getting started with flutter
Getting started with flutterGetting started with flutter
Getting started with flutter
 
[ Capella Day 2019 ] Capella integration with Teamcenter
[ Capella Day 2019 ] Capella integration with Teamcenter[ Capella Day 2019 ] Capella integration with Teamcenter
[ Capella Day 2019 ] Capella integration with Teamcenter
 
Gitlab, GitOps & ArgoCD
Gitlab, GitOps & ArgoCDGitlab, GitOps & ArgoCD
Gitlab, GitOps & ArgoCD
 
GraalVm and Quarkus
GraalVm and QuarkusGraalVm and Quarkus
GraalVm and Quarkus
 

Destaque

Model Based Systems and Software Engineering an overview of the IBM Rational ...
Model Based Systems and Software Engineering an overview of the IBM Rational ...Model Based Systems and Software Engineering an overview of the IBM Rational ...
Model Based Systems and Software Engineering an overview of the IBM Rational ...
Real-Time Innovations (RTI)
 

Destaque (8)

Installing Installing IBM Rational Rhapsody Designer and Architect for MBSE
Installing Installing IBM Rational Rhapsody Designer and Architect for MBSEInstalling Installing IBM Rational Rhapsody Designer and Architect for MBSE
Installing Installing IBM Rational Rhapsody Designer and Architect for MBSE
 
IBM Rhapsody Code Generation Customization
IBM Rhapsody Code Generation CustomizationIBM Rhapsody Code Generation Customization
IBM Rhapsody Code Generation Customization
 
Sys ml helperprofile-rhapsody813-obtainandinstall-v1
Sys ml helperprofile-rhapsody813-obtainandinstall-v1Sys ml helperprofile-rhapsody813-obtainandinstall-v1
Sys ml helperprofile-rhapsody813-obtainandinstall-v1
 
Rhapsody Overview
Rhapsody OverviewRhapsody Overview
Rhapsody Overview
 
System Architect and Rhapsody
System Architect and RhapsodySystem Architect and Rhapsody
System Architect and Rhapsody
 
Getting started with IBM Rational Rhapsody in Ada
Getting started with IBM Rational Rhapsody in AdaGetting started with IBM Rational Rhapsody in Ada
Getting started with IBM Rational Rhapsody in Ada
 
Model Based Systems and Software Engineering an overview of the IBM Rational ...
Model Based Systems and Software Engineering an overview of the IBM Rational ...Model Based Systems and Software Engineering an overview of the IBM Rational ...
Model Based Systems and Software Engineering an overview of the IBM Rational ...
 
SSE Practices Overview
SSE Practices OverviewSSE Practices Overview
SSE Practices Overview
 

Semelhante a IBM Rational Rhapsody and Qt Integration

Add the power of the Web to your embedded devices with WPE WebKit
Add the power of the Web to your embedded devices with WPE WebKitAdd the power of the Web to your embedded devices with WPE WebKit
Add the power of the Web to your embedded devices with WPE WebKit
Igalia
 
tybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notestybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notes
WE-IT TUTORIALS
 

Semelhante a IBM Rational Rhapsody and Qt Integration (20)

Qt Technical Presentation
Qt Technical PresentationQt Technical Presentation
Qt Technical Presentation
 
Qt S60 Technical Presentation Fn Stripped
Qt S60 Technical Presentation Fn StrippedQt S60 Technical Presentation Fn Stripped
Qt S60 Technical Presentation Fn Stripped
 
Add the power of the Web to your embedded devices with WPE WebKit
Add the power of the Web to your embedded devices with WPE WebKitAdd the power of the Web to your embedded devices with WPE WebKit
Add the power of the Web to your embedded devices with WPE WebKit
 
Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017
 
PyQt Application Development On Maemo
PyQt Application Development On MaemoPyQt Application Development On Maemo
PyQt Application Development On Maemo
 
MSalah_20161010
MSalah_20161010MSalah_20161010
MSalah_20161010
 
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfDeveloping and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
 
Programming IoT Gateways with macchina.io
Programming IoT Gateways with macchina.ioProgramming IoT Gateways with macchina.io
Programming IoT Gateways with macchina.io
 
Light-up-your-out-of-the-box LightSwitch Application
Light-up-your-out-of-the-box LightSwitch ApplicationLight-up-your-out-of-the-box LightSwitch Application
Light-up-your-out-of-the-box LightSwitch Application
 
Android
Android Android
Android
 
tybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notestybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notes
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
Spring Cloud Services with Pivotal Cloud Foundry- Gokhan Goksu
Spring Cloud Services with Pivotal Cloud Foundry- Gokhan GoksuSpring Cloud Services with Pivotal Cloud Foundry- Gokhan Goksu
Spring Cloud Services with Pivotal Cloud Foundry- Gokhan Goksu
 
Qt
QtQt
Qt
 
The next step from Microsoft - Vnext (Srdjan Poznic)
The next step from Microsoft - Vnext (Srdjan Poznic)The next step from Microsoft - Vnext (Srdjan Poznic)
The next step from Microsoft - Vnext (Srdjan Poznic)
 
.Net introduction by Quontra Solutions
.Net introduction by Quontra Solutions.Net introduction by Quontra Solutions
.Net introduction by Quontra Solutions
 
Qt for Python
Qt for PythonQt for Python
Qt for Python
 
ASP.NET Core: The best of the new bits
ASP.NET Core: The best of the new bitsASP.NET Core: The best of the new bits
ASP.NET Core: The best of the new bits
 
Introduction and hacking OpenStack, Pycon India
Introduction and hacking OpenStack,  Pycon IndiaIntroduction and hacking OpenStack,  Pycon India
Introduction and hacking OpenStack, Pycon India
 
Introduction to .net
Introduction to .netIntroduction to .net
Introduction to .net
 

Mais de gjuljo

InterConnect2015 ICP3222 A MDD Approach to Agile Development of IoT Applications
InterConnect2015 ICP3222 A MDD Approach to Agile Development of IoT ApplicationsInterConnect2015 ICP3222 A MDD Approach to Agile Development of IoT Applications
InterConnect2015 ICP3222 A MDD Approach to Agile Development of IoT Applications
gjuljo
 

Mais de gjuljo (20)

Azure deployments and ARM templates
Azure deployments and ARM templatesAzure deployments and ARM templates
Azure deployments and ARM templates
 
Azure Monitoring Overview
Azure Monitoring OverviewAzure Monitoring Overview
Azure Monitoring Overview
 
Going serverless with azure functions
Going serverless with azure functionsGoing serverless with azure functions
Going serverless with azure functions
 
Microsoft Azure Technical Overview
Microsoft Azure Technical OverviewMicrosoft Azure Technical Overview
Microsoft Azure Technical Overview
 
Chatbot development workshop with the Microsoft Bot Framework
Chatbot development workshop with the Microsoft Bot FrameworkChatbot development workshop with the Microsoft Bot Framework
Chatbot development workshop with the Microsoft Bot Framework
 
Bot Revolution lab at Codemotion Milan 2016
Bot Revolution lab at Codemotion Milan 2016Bot Revolution lab at Codemotion Milan 2016
Bot Revolution lab at Codemotion Milan 2016
 
DevOps in the Cloud with Microsoft Azure
DevOps in the Cloud with Microsoft AzureDevOps in the Cloud with Microsoft Azure
DevOps in the Cloud with Microsoft Azure
 
Microservices Architecture: Labs
Microservices Architecture: LabsMicroservices Architecture: Labs
Microservices Architecture: Labs
 
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and HailoMicroservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
 
IBM Business Connect 2015 - Bluemix Overview
IBM Business Connect 2015 - Bluemix OverviewIBM Business Connect 2015 - Bluemix Overview
IBM Business Connect 2015 - Bluemix Overview
 
FORUM PA 2015 - Microservices with IBM Bluemix
FORUM PA 2015 - Microservices with IBM BluemixFORUM PA 2015 - Microservices with IBM Bluemix
FORUM PA 2015 - Microservices with IBM Bluemix
 
IBM Bluemix Introdution for Hackathons
IBM Bluemix Introdution for HackathonsIBM Bluemix Introdution for Hackathons
IBM Bluemix Introdution for Hackathons
 
IBM Bluemix Hackathon Accelerator
IBM Bluemix Hackathon AcceleratorIBM Bluemix Hackathon Accelerator
IBM Bluemix Hackathon Accelerator
 
IBM Bluemix and the Internet of Things - Workshop
IBM Bluemix and the Internet of Things - WorkshopIBM Bluemix and the Internet of Things - Workshop
IBM Bluemix and the Internet of Things - Workshop
 
Codemotion Rome 2015 IBM Bluemix and Docker
Codemotion Rome 2015 IBM Bluemix and DockerCodemotion Rome 2015 IBM Bluemix and Docker
Codemotion Rome 2015 IBM Bluemix and Docker
 
Codemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab TutorialCodemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab Tutorial
 
Codemotion Rome 2015 - Microservices with IBM Bluemix and DevOps Services
Codemotion Rome 2015 - Microservices with IBM Bluemix and DevOps ServicesCodemotion Rome 2015 - Microservices with IBM Bluemix and DevOps Services
Codemotion Rome 2015 - Microservices with IBM Bluemix and DevOps Services
 
Hybrid Cloud with IBM Bluemix, Docker and Open Stack
Hybrid Cloud with IBM Bluemix, Docker and Open StackHybrid Cloud with IBM Bluemix, Docker and Open Stack
Hybrid Cloud with IBM Bluemix, Docker and Open Stack
 
InterConnect2015 ICP3222 A MDD Approach to Agile Development of IoT Applications
InterConnect2015 ICP3222 A MDD Approach to Agile Development of IoT ApplicationsInterConnect2015 ICP3222 A MDD Approach to Agile Development of IoT Applications
InterConnect2015 ICP3222 A MDD Approach to Agile Development of IoT Applications
 
IBM Bluemix Tech Meetup 18-02-2015
IBM Bluemix Tech Meetup 18-02-2015IBM Bluemix Tech Meetup 18-02-2015
IBM Bluemix Tech Meetup 18-02-2015
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

IBM Rational Rhapsody and Qt Integration

  • 1. IBM Innovate 2012 IBM Rational Rhapsody and Qt Integration for Model-Based GUI Development Giulio Santoli Client Technical Professional, IBM Rational giulio_santoli@it.ibm.com Session RG-1258
  • 2. The Premier Event for Software and Systems Innovation Agenda 1 Model-Driven Development with IBM Rational Rhapsody Nokia Qt Framework Overview 2 3 4 5 6 2 Rhapsody and Qt Integration Issues Rhapsody Qt Profile Overview Demo Summary © 2012 IBM Corporation
  • 3. The Premier Event for Software and Systems Innovation System and Software Engineering with IBM Rational Rhapsody Capabilities Requirements-driven analysis and design for technical, embedded or real-time solutions, including those based on multi-core architectures Rapid design validation and verification with frequent simulation and testing Development and deployment of complete C, C++, C#, Java and Ada applications Benefits "Using Rhapsody software improves the quality of the application software that is integral to the series hydraulic hybrid system development Build the right product through non-ambiguous communication and frequent collaboration Eliminate defects early and increase quality by continually testing the design process." Reduce development time by automatically generating applications and documentation Steve Zielinski, Eaton chief engineer for Re-use and adapt existing technology through reverse engineering and product line engineering software 3 © 2012 IBM Corporation
  • 4. The Premier Event for Software and Systems Innovation Model-Driven Development with IBM Rational Rhapsody Build efficient software that exactly matches the design intent – Develop C, C++, C#, Java, and Ada applications Maintain automated synchronization between model and code – Work simultaneously with architecture, software and target – All changes in one area reflected in the others Support Domain-Specific Languages, including: – UML, SysML, DoDAF, MoDAF, UDPM, DDS, Autosar, NetCentric, etc.. Generate new code Visualize existing Model Code Synchronization 4 © 2012 IBM Corporation
  • 5. The Premier Event for Software and Systems Innovation Software Model Execution in Animation Mode Requirements test through execution Model execution enables iterative development Correct specification hand-off to software 5 © 2012 IBM Corporation
  • 6. The Premier Event for Software and Systems Innovation Nokia Qt Framework Overview Nokia Qt is a cross-platform application and UI framework with APIs for C++ programming and for rapid UI creation of: – mobile applications (Symbian phones and the Nokia N9 smartphone) – desktop applications (Microsoft Windows, Mac OS X, and Linux) The Qt Framework is based on modular C++ class library, including UI, Multithreading, Networking, Multimedia, XML, Database connection and so on. The Qt SDK combines the Qt framework with tools such as an IDE, an UI Designer, a Simulator and some other tools. http://qt.nokia.com/ 6 © 2012 IBM Corporation
  • 7. The Premier Event for Software and Systems Innovation Rhapsody and Qt Integration: Technical Issues (1/2) Qt extends the C++ syntax by introducing some keywords and macros (such as “signal”, “slot”, “Q_OBJECT”) that are handled by the Qt pre-processor at compilation time. By default, these keywords are not compatible with the Rhapsody C++ parser and prevents Rhapsody round-trip feature. Here follows an example that shows these Qt keywords: The Object class must be the first in the base classes list. The Q_OBJECT macro is used to enable Qt metaobject features, such as dynamic properties, signals, and slots. Signals are emitted by an object when its internal state has changed in some way that might be interesting to the object's client or owner. Signal implementation is generated by the Qt preprocessor must not be implemented in the .cpp file. Slots are normal C++ functions and can be called normally; their only special feature is that signals can be connected to them. A slot is automatically called when a signal connected to it is emitted. 7 © 2012 IBM Corporation
  • 8. The Premier Event for Software and Systems Innovation Rhapsody and Qt Integration: Technical Issues (2/2) Qt requires the main thread to be the primary "GUI thread“ as Qt widgets and several related classes don't work in secondary threads. This usually conflicts with the standard Rhapsody configuration, as the main thread is automatically generated as an OXF thread. To cope Rhapsody with the Qt meta-object system, it is needed: – Update Rhapsody code generator though Rhapsody Simplifiers APIs – Customize Rhapsody properties to handle Qt-specific keywords – Customize Rhapsody autogenerated Main to correctly the Qt main thread – Customize Rhapsody autogenerated Makefile to invoke Qt command line utilities 8 © 2012 IBM Corporation
  • 9. The Premier Event for Software and Systems Innovation Solution: Rhapsody Qt Profile Rhapsody Qt Profile is a custom profile for Rhapsody in C++ based on stereotype customization and a Java plug-in invoked at code generation time. This profile is not part of the official Rhapsody installation package. It allows you to develop Qt-compatible code that also takes advantage of Rhapsody capabilities, such as state-machines with either synchronous or asynchronous events. The profile automatically generates the Qt project file and customize it accordingly. The current implementation supports the following: – Qt 4.7.3 for Windows (VS 2008 only) and Linux, with and without Animation (no Tracing). – All the .ui files are supposed to be stored in the “gui” directory in the Rhapsody project. – No support for Qt message catalogs and resources yet. – Only base Qt classes are defined in the profile (QApplication, QObject and QWidget). – All the slots are public, regardless their visibility in the model. – Qt Mobile Framework is not supported. 9 © 2012 IBM Corporation
  • 10. The Premier Event for Software and Systems Innovation Rhapsody Qt Profile Stereotypes <<QTObject>> You can use this stereotype to flag those Classes that needs to be Qt-compliant, with the Q_OBJECT macro, signals and slots. <<QTSignal>> You can use this stereotype to flag those Operations that are Qt Signals. They will be declared in the specification file (.h). Use it only for operations belonging to classes stereotyped as <<OTObject>>. <<QTSlot>> You can use this stereotype to flag those Operations, Triggered Operations or Receptions that are Qt Slots. Use it only for operations belonging to classes stereotyped as <<OTObject>>. <<QTConfiguration>> You can use this stereotype to flag those Configurations that you want to generate Qt-related programs. The default Makefile and Main are generated accordingly. 10 © 2012 IBM Corporation
  • 11. The Premier Event for Software and Systems Innovation Custom Simplifiers in Rhapsody Qt Profile Rhapsody Qt Profile uses Custom Simplifiers to “hook” predefined extension points at code generation time. Custom simplifiers manipulate the code model using standard Rhapsody APIs. For each element the simplify property can specify: – Default: follow out-of-the-box simplification – None: suppress the simplification – Copy: copy the application element to the code model as is – User: replace out of the box one with a new user defined one – User Post Default: invoke a custom simplifier after the out of the box one Properties Writer Rules 11 © 2012 IBM Corporation
  • 12. The Premier Event for Software and Systems Innovation Rhapsody Qt Profile Usage Overview To create you classes and set the <<QTObject>> stereotype to those of them you want to be Qt-enabled. When you stereotype a class with <<QTObject>> do the following: – Create a generalization dependency to QObject or QWidget classes provided by the profile. If you want to generalize a different class, copy one of the above ones in your project and rename at your will. – Create a constructor that initializes the parent Qt class, i.e. MyWindget(QWidget*parent) – Specify the includes you need in the Properties, i.e. <QWidget> or just <QtGui> – Apply the <<QTSignal>> and <<QTSlot>> stereotypes accordingly Apply the <<QTConfiguration>> stereotype to the Rhapsdody configuration you want to generate the Qt-enabled program. If you need user interface files (.ui) generated with Qt Designer, put them in the “gui” directory in your project: they will be automatically included in the build. Just Remember to include their correspondent header file names, as they are supposed to be generated during the Qt buil process. 12 © 2012 IBM Corporation
  • 13. The Premier Event for Software and Systems Innovation Code Example for a simple Reactive Class Generated code example with the Rhapsody Qt Profile: Rhapsody base class for classes with state machines QTProfile generated slots and macros This method starts the Rhapsody state machine implementation 13 © 2012 IBM Corporation
  • 14. The Premier Event for Software and Systems Innovation Asynchronous or Synchronous Slots in Rhapsody State Machine (1/2) Synchronous State Machines In the Synchronous implementation, if the Class in Rhapsody is not Active, the Main Thread is the Qt GUI Thread, it’s not possible to use Rhapsody Asynchronous Events e and no OXF Threads are running. In this configuration, it’s not possible to use the Rhapsody timer but it’s needed to use the Qt one. Here follows a simple example: Asynchronous State Machines If the Class in Rhapsody is Active, it runs its own OXF Thread and it’s possible to use Asynchronous Events (Receptions) and the Rhapsody timeout. 14 © 2012 IBM Corporation
  • 15. The Premier Event for Software and Systems Innovation Asynchronous or Synchronous Slots in Rhapsody State Machine (2/2) onous Synchr le Examp In synchronous mode, only Triggered Operations can be used. In synchronous mode, it is needed to use Qt timeout. ronous Asynch le Examp In asynchronous mode, both Receptions and Triggered Operations can be used. In asynchronous mode, it possible to use OXF timeout. 15 © 2012 IBM Corporation
  • 16. The Premier Event for Software and Systems Innovation QTProfile Main Class v.s. Default Main Class (1/2) The QTProfile introduces some differences to the generated main class, to make it compatible with Qt and make the main thread the primary GUI thread. Here follows the differences with the default standard main class: – It automatically creates a QApplication object and starts it: this makes the main thread the Qt GUI thread too. – It does not start the OXF main loop: if you want to use Rhapsody asynchronous events you need at least an active class in your model. 16 © 2012 IBM Corporation
  • 17. The Premier Event for Software and Systems Innovation QTProfile Main Class v.s. Default Main Class (2/2) e With th ile Qt Prof 17 Without the le Qt Profi © 2012 IBM Corporation
  • 18. The Premier Event for Software and Systems Innovation www.ibm.com/software/rational 18 © 2012 IBM Corporation
  • 19. The Premier Event for Software and Systems Innovation Summary IBM Rational Rhapsody is a great tool for Model-Drive Development of C, C++, C#, Java and Ada applications. Nokia Qt is a well known and adopted C++ Framework to build cross-platform GUI applications. Thanks to Rhapsody flexibility, it has been possible to develop a custom Rhapsody profile to benefit of both Rhapsody and Qt and leverage Model-Driven Development for GUI Applications development. 19 © 2012 IBM Corporation
  • 20. The Premier Event for Software and Systems Innovation www.ibm.com/software/rational 20 © 2012 IBM Corporation
  • 21. The Premier Event for Software and Systems Innovation Daily iPod Touch giveaway Complete your session surveys online each day at a conference kiosk or on your Innovate 2012 Portal! Each day that you complete all of that day’s session surveys, your name will be entered to win the daily IPOD touch! On Wednesday be sure to complete your full conference evaluation to receive your free conference t-shirt! 21 © 2012 IBM Corporation
  • 22. The Premier Event for Software and Systems Innovation Acknowledgements and disclaimers Availability: References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. The workshops, sessions and materials have been prepared by IBM or the session speakers and reflect their own views. They are provided for informational purposes only, and are neither intended to, nor shall have the effect of being, legal or other guidance or advice to any participant. While efforts were made to verify the completeness and accuracy of the information contained in this presentation, it is provided AS-IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this presentation or any other materials. Nothing contained in this presentation is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results. © Copyright IBM Corporation 2012. All rights reserved. – U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. IBM, the IBM logo, ibm.com, Rational, the Rational logo, Telelogic, the Telelogic logo, Green Hat, the Green Hat logo, and other IBM products and services are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol (® or ™), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml Nokia QT is a trademark of Nokia Corporation Other company, product, or service names may be trademarks or service marks of others. 22 © 2012 IBM Corporation
  • 23. The Premier Event for Software and Systems Innovation www.ibm.com/software/rational © Copyright IBM Corporation 2012. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. IBM, the IBM logo, Rational, the Rational logo, Telelogic, the Telelogic logo, and other IBM products and services are trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others. 23 © 2012 IBM Corporation