<<

QConfig To a Modern Config System on Engage and Transform

Copyright 2013 - Sábia Experience. Todos os direitos reservados. Who am i

Senior software engineer graduated in computer science in 92, musician and gamer. Worked in two major distributions, Conectiva and Mandriva in their golden days, and joined KDE ranks since 2000. Nowadays set a new venture at Sábia Experience, a company with a goal and a intention to transform and engage the world in a symbiosis of soul and technology ...

Copyright 2013 - Sábia Experience. Todos os direitos reservados.

History so far from QSettings...

From a simple point of view From a not so simple point of view

• Simple and direct • Is too simple for modern days and too direct for some complex modern interactions • Served their purpose

• Served their purpose • Never questioned until recently

• People realize that are limitations • Native formats ( so far )

• Native formats • Formats by majority of developers • Literally nobody knows which formats are there anymore

Copyright 2013 - Sábia Experience. Todos os direitos reservados.

History so far from Config Systems...

And formats again What are our options for a common goal

• Windows has registry. Several other app • Text or Binary developers tried to introduce their own extensions • Centralized or per app • Apple pList is not widespread and the Unix architecture opened a huge hole for *nix tools, and people used this • XML or Json

• Linux unfortunately had their many implementations, • Native or unique in several approaches, all due the natural open source characteristics

• Qt never could play with the native game

Copyright 2013 - Sábia Experience. Todos os direitos reservados.

History so far from this initiative...

And all begins on a Switzerland village And then, we failed ...

• KDE made a sprint on RANDA in 2011 • KConfig was a monster, and try to reuse and this topic comes atop. I stepped up it was impossible

• Motivation was the fact that i worked in kconfig • A totally new library, but using same plugin and Frameworks 5 needed a overhaul on it method will provide again another monster and with a huge chance to become unmaintenable with no one able to understand ( and want to ) • Start to gather what to do and how to proceed on the rewrite • Time restrictions and deflection from a Qt related job make limited or none work on it • Plan to follow the same path

• Nobody really cared

Copyright 2013 - Sábia Experience. Todos os direitos reservados.

And then it comes QConfig

What developers want What users need

• Small loading time • Config dialog and done

• Use pure Qt resources ( paths ) What we intend to do

• Possible counter part text but binary format • Almost everything :-)

• Individual app configs • And native representations for different platforms ( long shot ) • Easy Qt Quick bindings ( of course )

Copyright 2013 - Sábia Experience. Todos os direitos reservados.

QConfig basic structure

Core library Dialog library

• JSON binary format • Generate native code for platform based on definition file • Definition file

• Multiple path loading ( Qt ) to Kiosk mode • ( In analysis ) Generate a Javascript code for Qt Quick or dynamic inside the • Dynamic bindings for Qt Quick module

• Singleton non centralized simple class • Qt Creator auto completion ?

Copyright 2013 - Sábia Experience. Todos os direitos reservados.

A possible definition file

This is a Tomaz Canabrava prototype of the schema file based on subsurface application current configs

{ "id": "org.subsurface", "divelist" : [{ "0": { “id”: “number", “visibility”: { “type”: "bool", “default: "true" }, "size" : { "type" :"int" , "default" : "10" }}, "1" : { "id" : "depth", "visibility" : { "type" : "bool", "default" : "true" }, "size" : { "type" :"int" , "default" : "10" }}, "2" : { "id" : "sac", "visibility" : { "type" : "bool", "default" : "true" }, "size" : { "type" :"int" , "default" : "10" }}, "3" : { "id" : "rate", "visibility" : { "type" : "bool", "default" : "true" }, "size" : { "type" :"int" , "default" : "10" }}, "4" : { "id" : "time", "visibility" : { "type" : "bool", "default" : "true" }, "size" : { "type" :"int" , "default" : "10" }}, "5" : { "id" : "coords", "visibility" : { "type" : "bool", "default" : "true" }, "size" : { "type" :"int" , "default" : "10" }}, "6" : { "id" : "location", "visibility" : { "type" : "bool", "default" : "true" }, "size" : { "type" :"int" , "default" : "10" }} }], "cylinderlist" : [{ "0" : { "id" : "trash", "size" : { "type" : "int", "default" : "40" }}, "1" : { "id" : "type", "size" : { "type" : "int", "default" : "40" }}, "2" : { "id" : "size", "size" : { "type" : "int", "default" : "40" }}, "3" : { "id" : "weigth", "size" : { "type" : "int", "default" : "40" }} }], "weigthlist" : [{ "0" : { "id" : "trash", "size" : { "type" : "int", "default" : "40" }}, "1" : { "id" : "type", "size" : { "type" : "int", "default" : "40" }}, "2" : { "id" : "size", "size" : { "type" : "int", "default" : "40" }} }] }

Copyright 2013 - Sábia Experience. Todos os direitos reservados.

Kiosk and the legacy from KDE for administrators

User Config • Keep large base install controlled MyAppConfig wallpaper=userWallpaper • Locked down resources color=blue prefDesktop=other Root Config potatoKind=baked MyAppConfig sauce=spicy $wallpaper=rootWallpaper lang=en_US color=red locale=pt_BR.UTF8 $prefDesktop=KDE api=5.2 gui=Qt

Copyright 2013 - Sábia Experience. Todos os direitos reservados.

Kiosk and the legacy from KDE for administrators

Read App Config MyAppConfig Dialog library affect the view $wallpaper=rootWallpaper • Configurations locked down by over config files will never been show to user, avoiding color=blue the unwanted effect user have when see a config that can't be changed in thei $prefDesktop=KDE application. User see, user change potatoKind=baked sauce=spicy lang=en_US locale=pt_BR.UTF8 api=5.2 gui=Qt

Copyright 2013 - Sábia Experience. Todos os direitos reservados.

The “Are we really want this” situations

There are several concerns about features that are “interesting” and usually are mentioned in informal discussions when it came the subject:

● Concurrent applications – live communications, who has priorities, is really a modern need, are we going to talk distributed apps with config

● How far we should go with depth in configs, and what really should be a configuration or not

● Online, or “CLOUD” concept nowadays is in the mouth of everyone, so should the config system understand how to work with distributed files by itself, through plugins, should attend SO directions ins a transparent way or just ignore it ?

Copyright 2013 - Sábia Experience. Todos os direitos reservados.

The Depth Hell example This was taken from a current ( my one ) KDE Plasma configuration

[Containments][1][Applets][6][Configuration] DefaultAppletsAdded=true Share=false ShowApplicationStatus=true ShowCommunications=true ShowHardware=true ShowSystemServices=true ShowUnknown=true alwaysShown= hidden=KGpg,,printmanager

[Containments][1][Applets][6][Configuration][Applets][1] geometry=0,0,24,24 immutability=1 plugin=updater zvalue=0

[Containments][1][Applets][6][Configuration][Applets][1][PopupApplet] DialogHeight=331 DialogWidth=392

[Containments][1][Applets][6][Configuration][Applets][10] plugin=notifications

Copyright 2013 - Sábia Experience. Todos os direitos reservados.

So, and the completion on Qt Creator ?

Based on what you saw in previous slide, how could we get into this mess without create a too complex code that is becom unmaintainable ?

● We still not define how far we go, but the whole idea is push something similar as: group = getGroupName() auto value = group.getValue() or group2 = group.getGroupName()

● As at this moment, we don't know is this will be feasible

Copyright 2013 - Sábia Experience. Todos os direitos reservados. Delivery time ? We ( as Helio and Tomaz ) expect to deliver the initial running code due Christmas

Helio Chissini de Castro helio@.org [email protected] Thanks.

Engage and Transform. www.sabiaexperience.com.br