[Qt-creator] Text editor architecture similar to Chrome browser
Szyk Cech
szykcech at spoko.pl
Sun Aug 26 20:38:53 CEST 2018
Hi
I have an idea to write new version of my text editor (not published -
only for my personal usage). Now it is monolithic app. But new version I
want to write in modular way.
I want:
+ edition in 2 modes: text and hex (they can be plugins like in Qt Creator)
+ plugins for every editor aspects: highlighting, spell checking, user
actions in context menu and in main menu (like text speech and search
phrase in the Internet, check word translation in the internet
dictionary), search and replace
+ should be resistant to editors or plugins failure
Two first points can be easily achieved by mimicry of the Qt Creator
architecture (in true I don't need every Qt Creator features). But I am
afraid that it is not true for third point.
Today I get some info about Chrome browser architecture from fairy old
document:
https://seclab.stanford.edu/websec/chromium/chromium-security-architecture.pdf
, but I like that it is secure and fault resistant. I know I don't need
such high security, but crash resistant architecture seems attractive to me.
I also know that in forthcoming Qt 5.12 Qt Remote Objects will be
officially released. So maybe my simply text editor project will be
great opportunity to use this state of the art module?!?
I think that maybe it is not so crazy idea to design text editor like
multi process application?!? I mean to write thin kernel (like your core
plugin) and implement editors (text and hex) in separate processes and
design plugin system where each plugin resides in separate process. They
can be load on demand (not every at start). And I think that it is
possible to implement internal state diagnostic in order to detect
failures in editors or in plugins.
Main problems what I see is:
1) to design suitable Api for every part of my text editor (like you do
for Qt Creator)
2) efficient implementation of the editor text rendering
@1) I think I can study Qt Creator more carefully to understand every
nuances - so this require work on my site
@2) I have questions to you:
a) Do you have any advice how should I rendering text in separate
process and display it in main process (which displays Qt Gui)?
b) Is there some Qt solution for this case or I need to write my own
layer to cover Os specific shared memory Api?
c) Is Qt prepared for such cases like render QPlainText widget to the
buffer instead to the screen?
I know this question is not directly related to Qt Creator, but I think
it is advanced enough to ask experienced Qt Creators developers as Qt
user forums probably can't answer to such details.
thanks and best regards
Szyk Cech
More information about the Qt-creator
mailing list