getting started with qcmagritte

22
Getting Started with QCMagritte Diego Lont & Stephan Eggermont Download a QCMagritte image from http://ci.inria.org/pharo-contribution/QCMagritte Download a pharo vm from http://get.pharo.org Download a QCMagritte demo from http://smalltalkhub.com/mc/DiegoLont/QCMagritteDemo dinsdag 19 augustus 14

Upload: esug

Post on 20-May-2015

216 views

Category:

Software


2 download

DESCRIPTION

Title: Getting Started with QCMagritte Speaker: Stefan Eggermont Tue, August 19, 12:00pm – 12:30pm Video Part1: https://www.youtube.com/watch?v=mKZUhPNWFyI Video Part2: https://www.youtube.com/watch?v=vBPplUyDYyU Description Abstract: Magritte provides a nice way to describe your domain model and quickly build web components for your web application. QCMagritte offers you a.o. integration of Ajax, Bootstrap, user registration and dynamic support for multiple languages. Bring a laptop and see how to build a well-structured working web application in an hour. Bio: Stefan Eggermont is an independent consultant and software developer. He is interested in ways to make software development better and (even) more fun. He likes helping teams in becoming more able to add value to their organizations. After programming for 15 years, he discovered Seaside and Smalltalk and found out that there was a reasonable way to develop web applications after all. He also does Technology Roadmapping to help organizations realize and visualize their future(s).

TRANSCRIPT

Page 1: Getting Started with QCMagritte

Getting Started with QCMagritte

Diego Lont & Stephan Eggermont

• Download a QCMagritte image fromhttp://ci.inria.org/pharo-contribution/QCMagritte

• Download a pharo vm fromhttp://get.pharo.org

• Download a QCMagritte demo fromhttp://smalltalkhub.com/mc/DiegoLont/QCMagritteDemo

dinsdag 19 augustus 14

Page 2: Getting Started with QCMagritte

What is QC-Magritte

• Application level framework

• On top of Seaside and Magritte

• Provides re-usable parts for common tasks

dinsdag 19 augustus 14

Page 3: Getting Started with QCMagritte

QCMagritte supports ...

Influences(AJAX)

ApplicationTemplate

Search (Queries)

Table support

Multi-language

Application navigation

User management

Menu structure

Hierarchical domain

structure

Commands

dinsdag 19 augustus 14

Page 4: Getting Started with QCMagritte

Example: CI• Continuous Integration Server

• Not focus of the talk

• Predefined with Magritte definitions

dinsdag 19 augustus 14

Page 5: Getting Started with QCMagritte

CI Model

Configuration

Build Definition

CI-Model TriggerProjectProjectProject

BuildBuildBuild

BuildStepBuildStepBuildStep

Trigger

dinsdag 19 augustus 14

Page 6: Getting Started with QCMagritte

Demo

• View magritte descriptions in model

dinsdag 19 augustus 14

Page 7: Getting Started with QCMagritte

Template• Application

• Seaside application, registering itself

• Points to model

• Creates menu

• Model

• Describes entry points for entire domain

• Defines builders used to generate components

dinsdag 19 augustus 14

Page 8: Getting Started with QCMagritte

Bootstrap template

QCBootstrapApplicationModel subclass: #CIBuildServerModel

QCBootstrapApplication subclass: #CIBuildServerApplication

CIBuildServerApplication>>title^'Demo CI'

CIBuildServerApplication>>model ^CIBuildServerModel default

CIBuildServerApplication class>>applicationName ^'Demo CI'

dinsdag 19 augustus 14

Page 9: Getting Started with QCMagritte

Demo• Show code

• Run tutorial:1

• Show application

• Add 2 projects

• 1 project defines steps and triggers

dinsdag 19 augustus 14

Page 10: Getting Started with QCMagritte

Default commands• CRUD

• User rights

• Domain constraints

CIProject>>canRemove^self builds isEmpty

dinsdag 19 augustus 14

Page 11: Getting Started with QCMagritte

Custom commands• Domain object has containerActions

• Label

• Condition

• ActionCIProject>>containerActions: aContainer<magritteContainer>^aContainer

addCommand: 'build' condition: #canBuild action: #startBuild;yourself

dinsdag 19 augustus 14

Page 12: Getting Started with QCMagritte

Custom components

• Easy extend model with custom components

• Demo: add status description + component

dinsdag 19 augustus 14

Page 13: Getting Started with QCMagritte

User Management• Only allow changes by logged in users

• Restrict access to views/actions

• Controlled by “hasUserManagent”

• Defaults to true if there is an admin user

• (CRUD) Rights and roles model.

dinsdag 19 augustus 14

Page 14: Getting Started with QCMagritte

Demo

• Add user management

dinsdag 19 augustus 14

Page 15: Getting Started with QCMagritte

QCMagritte supports ...

Influences(AJAX)

ApplicationTemplate

Search (Queries)

TableSupport

Multi-language

Application navigation

User management

Menu structure

Hierarchical domain

structure

Commands

dinsdag 19 augustus 14

Page 16: Getting Started with QCMagritte

Influences

• disable timeout

• user first, last name

• How to avoid cycles

dinsdag 19 augustus 14

Page 17: Getting Started with QCMagritte

Application navigation

• Mostly announcement based (still some call’s left, slowly being replaced)

• QCPageChoice shows how

dinsdag 19 augustus 14

Page 18: Getting Started with QCMagritte

Parent Object• Hierarchical ownership model for the domain

• Only one owner: parent

• Backlink to model = parent model

• QCQueriedToManyComponent

• search support

• newInstance sets parent if needed

dinsdag 19 augustus 14

Page 19: Getting Started with QCMagritte

Multilanguage• In-application support for multiple languages

• Each user can have own language preference

• Application has default language

• Keep default values for untranslated

• Default translation of labels, groups, comments, error messages. Others: asMultilanguageString

dinsdag 19 augustus 14

Page 20: Getting Started with QCMagritte

Search

• Model-wide search, from a starting point

• Description-type specific

• everything transformed to string representation

dinsdag 19 augustus 14

Page 21: Getting Started with QCMagritte

Table support• Select on field values, smart filter

• Sorting

• Export CSV

• Select columns

• Add calculated columns

dinsdag 19 augustus 14

Page 22: Getting Started with QCMagritte

Menu structure

• Tree based, announcements

• Autocollapse: expand current selection

dinsdag 19 augustus 14