Ideas for Google SoC » History » Version 33
Roel Standaert, 01/30/2023 11:46 AM
1 | 30 | Roel Standaert | Ideas for Google SoC |
---|---|---|---|
2 | ==================== |
||
3 | 1 | Pieter Libin | |
4 | 33 | Roel Standaert | **NOTE: This page has been ARCHIVED, and the information contained herein may no longer be up-to-date** |
5 | |||
6 | 31 | Roel Standaert | This page lists ideas for Google SoC 2010 applications for Wt, pending the approval of Emweb as a mentoring organisation. The page lists ideas that come from community members, project maintainers, in no particular order. We recommend interested students to show interest on the mailing list and discuss with the community the idea that they would like to work on before applying formally with Google SoC. |
7 | 1 | Pieter Libin | |
8 | 14 | Koen Deforche | In addition the the summary of ideas here, an interested student may also wish to look at the extensive discussion that happened on the mailing list: http://thread.gmane.org/gmane.comp.web.witty.general/4611 |
9 | |||
10 | 1 | Pieter Libin | Contact information: koen@emweb.be or the Wt interest mailinglist: witty-interest@sourceforge.net. |
11 | 5 | Koen Deforche | |
12 | 32 | Roel Standaert | ### WebKit integration |
13 | 1 | Pieter Libin | |
14 | 30 | Roel Standaert | It would be fantastic to have WebKit integrated with Wt. The level of integration may evolve over time, as are the possible applications. The combination of both a top-notch browser implementation, together with a web framework, all in C, provides a whole world of new possibilities from new application options to kludge-free automated test frameworks based on an actual browser and rendering logic. |
15 | 1 | Pieter Libin | |
16 | 13 | Koen Deforche | The first step is to combine WebKit with the built-in httpd to provide a desktop application using Wt. This could be useful for distributing an off-line version of a Wt application or during development. The webkit would be configured to act as a single application (instead of as a general purpose browser). Some preliminary work has been done and the project has been bootstrapped by Pau Garcia (contact him through the Wt interest mailinglist), which can be found at http://gitorious.org/wtdesktop. |
17 | 1 | Pieter Libin | |
18 | 3 | Koen Deforche | In a second step, some of the widgets provided by Wt could be made aware of the integration with webkit to provide improved functionality. For example, WFileUpload could use a native file open widget instead of HTML. Other features are the binding of WApplication::quit() to exit the actual application, and the ability to control and use the native menu provided by the Qt or GTK toolkit from Wt code. |
19 | 1 | Pieter Libin | |
20 | 3 | Koen Deforche | A third level of integration is to allow introspection of the DOM inside WebKit from a Wt application session. This could become the basis for an automated testing framework which verifies that the widget tree and the DOM tree are in sync. By querying the DOM for information on the location and CSS properties of widgets, it can be checked that the application works properly. By allowing for events to be simulated on the DOM tree, the application can be checked for correct event handling. |
21 | 1 | Pieter Libin | |
22 | The fourth level of integration is to by-pass the HTML/JavaScript and HTTP protocol for certain rendering steps. For example, a new WPaintDevice could be developed which paints directly instead of encoding it first as SVG or HTML Canvas5 JavaScript. This would allow significant speedups for vector graphics. |
||
23 | |||
24 | 13 | Koen Deforche | Another idea that circulated on the mailing list was to target QML for rendering certain parts of the user interface, skipping the webkit dependence and targetting directly Qt. This would result in even better performance and be more light weight. |
25 | |||
26 | 30 | Roel Standaert | Required expertise: Good C knowledge, some familiarity with GTK, Qt, and CMake will be useful. |
27 | 1 | Pieter Libin | |
28 | 4 | Koen Deforche | The scope and goals of this idea can be adapted to the skill set of the student, since for every additional level of integration, more detailed intimate knowledge of WebKit and Wt are required. Since the project has already been bootstrapped, the student will be able to more directly start actual development rather than be busy with setting up and configuring the build system. |
29 | 1 | Pieter Libin | |
30 | 30 | Roel Standaert | ### Widget set mode |
31 | 1 | Pieter Libin | |
32 | 30 | Roel Standaert | Since about a year, Wt includes a so-called widget-set mode. In this mode, a Wt application does not take responsibility to render the entire user interface, but only selected |
33 | 1 | Pieter Libin | |
34 | 30 | Roel Standaert | <div> |
35 | 14 | Koen Deforche | |
36 | 30 | Roel Standaert | 's. The Wt application is loaded as a JavaScript library, which then renders into these <div>'s, which then correspond to a set of "top-level" widgets. Any of Wt's features may be used inside such a widget, including portable vector graphics and fragment-based history management. |
37 | 1 | Pieter Libin | |
38 | 30 | Roel Standaert | This would allow a Wt application to also expose a JavaScript API, such as for example Google Maps, but this has not yet been provided. To provide support for this in the Wt library, it would require that a Wt application can extend its JavaScript object with JavaScript methods that map onto C methods, which assumes a system that helps as much as possible to convert between JavaScript objects and C data structures (for example based on maps). |
39 | 1 | Pieter Libin | |
40 | 30 | Roel Standaert | Improvements to widget set mode will allow easy development of [OpenSocial](http://docs.opensocial.org/display/OS/Home) applications in Wt. |
41 | 14 | Koen Deforche | |
42 | 30 | Roel Standaert | Required expertise: Good C knowledge, template meta programming and type traits, some JavaScript knowledge. |
43 | |||
44 | ### Wt Designer |
||
45 | |||
46 | 14 | Koen Deforche | A lot of discussion has been going on over the years on a visual designer tool for Wt. Inevitably, many directions can be taken and proponents of different ideas can be found on the mailinglist. |
47 | 15 | Koen Deforche | |
48 | 30 | Roel Standaert | ##### Wt Designer based on Qt Creator / Qt Designer |
49 | 1 | Pieter Libin | |
50 | Since Wt shares alot with Qt, in terms of API and programming model, it should be possible to adapt Qt Designer to design Wt widgets. |
||
51 | |||
52 | 30 | Roel Standaert | In a first step, the .ui format used by the Qt Designer tool and User Interface Compiler (UIC) could be adapted to so that it can be used to instantiate a custom Wt widget at runtime, or can be used to compile to a C file. |
53 | 1 | Pieter Libin | |
54 | More details (detailed steps, roadmap, possible blockers, etc) here: http://article.gmane.org/gmane.comp.web.witty.general/4293 |
||
55 | |||
56 | 30 | Roel Standaert | ##### Wt Designer based on a (XHTML-like) template language |
57 | 1 | Pieter Libin | |
58 | Another line of thought is to create a Wt application that would allow the construction of "empty" widgets, through a web application. The advantage of this approach is that contrary to t Designer, the widgets would render on the final web application as they render in the Wt. The product of this designer Wt application would be an HTML-based template. Any .ui interface etc. would mean unnecessary overhead in the development cycle etc. etc. |
||
59 | 15 | Koen Deforche | |
60 | This approach thus centers around an (improved) templating widget (current, WTemplate, is really very minimalistic, supporting only string substitutions), which has a counter-part implementation that provides an editing mode. |
||
61 | |||
62 | 1 | Pieter Libin | This would require a start from scratch. The designer application can still be a desktop application, using the Wt / WebKit integration approach as above, or one could still consider to implement the whole application in Qt |
63 | 15 | Koen Deforche | |
64 | 30 | Roel Standaert | ##### How to tackle ? |
65 | 15 | Koen Deforche | |
66 | 1 | Pieter Libin | This idea will first require some discussion on the mailing list. Both approaches seem valid and have there merits, and both are alot of work. The first approach would require getting to understand Qt Designer, the second approach requires a lot of original code. |
67 | |||
68 | 30 | Roel Standaert | Required expertise: Good C knowledge, requires functional analysis and good communication. |
69 | 1 | Pieter Libin | |
70 | 30 | Roel Standaert | #### MVC integration of Wt::Dbo models with Wt views. |
71 | 1 | Pieter Libin | |
72 | 30 | Roel Standaert | - Implement a WAbstractItemModel (e.g. WDboQueryModel) that allows iteration of query results. |
73 | - There could also be support for editing/viewing data of a single Dbo. |
||
74 | 7 | Koen Deforche | |
75 | 30 | Roel Standaert | Required expertise: Good to Expert C knowledge (template meta programming) |
76 | 12 | Omer Katz | |
77 | 30 | Roel Standaert | ### Modifications of WTemplate to provide a full grown templating system |
78 | 12 | Omer Katz | |
79 | Goals: |
||
80 | |||
81 | 30 | Roel Standaert | - Wt will create widgets based on tags in message bundles. |
82 | - Each property can be set through an attribute. |
||
83 | - Creating a declerative markup that can be generated by an IDE. |
||
84 | - Creating a templating language that can take a model and generate a display for it. |
||
85 | Possible commands are: If, Else, Foreach, While, Query |
||
86 | |||
87 | All of those features should be disabled to discard this overhead when working on thight embedded machines. |
||
88 | 16 | Koen Deforche | Instead of binding widgets like now you would just get them using resolve. |
89 | |||
90 | 17 | Koen Deforche | This idea relates also to the Wt Designer idea, the second approach. |
91 | 26 | Wim Dumon | |
92 | 30 | Roel Standaert | ### Backends for Wt::Dbo |
93 | 26 | Wim Dumon | |
94 | 18 | Omer Katz | Currently (April, 2014), Wt::Dbo supports only SQL backends (SQLite3, mysql, mariadb, postgresql, firebird, oracle). Support for more databases (MSSQL) is welcome. Additionally, we would like to support backends for NoSQL databases. |
95 | |||
96 | The API for adding a backend is quite light-weight, and an automated test suite is in place to check that the backend works well. |
||
97 | |||
98 | 30 | Roel Standaert | ### Widget (Controller) <-> Model Integration |
99 | 18 | Omer Katz | |
100 | 30 | Roel Standaert | The current situation is that only a few of Wt's widgets support models. |
101 | This situation complicated the development of widgets who have a datasource like a database, a webservice, another process ect. |
||
102 | The following code demonstrates how it should be implemented. |
||
103 | 18 | Omer Katz | Wt should have a generic model mixin which will attach itself onto a widget like this: |
104 | |||
105 | 30 | Roel Standaert | template <class Widget> |
106 | class WModel; |
||
107 | 18 | Omer Katz | |
108 | 30 | Roel Standaert | template <template class Model, class Widget> |
109 | class WModelAttacher; |
||
110 | 18 | Omer Katz | |
111 | 30 | Roel Standaert | // MyModel only applies to WLineEdit, this can be anything using a template parameter |
112 | class MyModel : public WModel<WLineEdit> |
||
113 | { |
||
114 | public: |
||
115 | MyModel(WLineEdit &widget) |
||
116 | : WModel(widget) // attaches change of value/values signals to the model to a uniform valueChanged |
||
117 | { |
||
118 | modelValueChanged.connect(SLOT(this, foo)); // if something changes in the model raise this |
||
119 | valueChanged.connect(SLOT(this, bar)); // If something changes outside the model, update the model which will update the datasource |
||
120 | } |
||
121 | }; |
||
122 | 18 | Omer Katz | |
123 | 30 | Roel Standaert | // ... |
124 | 18 | Omer Katz | |
125 | 30 | Roel Standaert | class SomeApp : public WApplication |
126 | { |
||
127 | WModelAttacher<MyModel, WLineEdit> *widget; // Creates a combined widget |
||
128 | }; |
||
129 | |||
130 | Required knowledge: Good experience with C, Extensive experience with policy based design or will to learn it and MVC |