Coding on Quanta
Andras Mantia <[email protected]> Mon, 7 Dec 2009 21:44:57 +0200
| Newsgroups | gmane.comp.kde.devel.quanta |
|---|---|
| Message-ID | <[email protected]> |
--===============0311010231== Content-Type: multipart/signed; boundary="nextPart7377460.dP60ihgR2K"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart7377460.dP60ihgR2K Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, (warning: long mail ahead) I sent this mail as you responded to my call for developer help or=20 mentioned that you'd like to develop on Quanta before. I send it to you=20 personally and to the quanta-devel mailing list. Please keep the replies=20 onto the mailing list, unless it is something personal addressed to me. As you might know, development is stalled on Quanta for almost 2 years. Development of Quanta related features did not stop though, Niko Sams=20 wrote a PHP plugin and worked on some code that originated from Quanta. Anyway, first my vision, next the details. What I would like to see is=20 simple: developers who would like to work on KDE software and be famous.=20 I slightly smiled when Eric said to me many years ago that I could be=20 rich and famous by working on Quanta. Well, I'm not rich, but cannot=20 complain, and maybe I'm not that famous as a rock star, but neverthless=20 quite some people know my name. I even was asked at one conference to=20 sit near some Quanta fans to take photos and sign autographs. :) You=20 see, it is real, you can be famous by writing open source software. In=20 the 7 past years I worked almost continously on KDE and on Qt based=20 applications. I got my job due to Quanta and my involvment into KDE (and=20 I still do KDE development as part of my job). What did it take to come to this level? Lot of things, but one=20 important was that I enjoyed working on the project and I enjoyed using=20 Qt and KDE as a development platform. And I still do. When I started I=20 had about 2 month Qt "experience" (C++ and general programmin much more=20 though), so not having too much Qt knowledge shouldn't stop you working.=20 If you would like to learn something interesting, work in a nice=20 community, this is a good place. When I joined the Quanta "team", Quanta was pretty much - although in=20 one sense different - in a state as it is now. It was abandoned, the=20 original authors wanted it to die. But one person didn't wanted, and=20 that was Eric. I got the source code of a full application where I=20 started to fix bugs, and later to add new features. This was slightly=20 before Qt3 and KDE3 appeared. What was the next step? To port Quanta=20 from Qt2 to Qt3. The following months I did the port, rewrote it to use=20 KatePart as the editor, wrote at least 3 instances of a HTML and PHP=20 parser to replace the old simple, but dump one that was limiting us. And now? The last stable Quanta is KDE/Qt3 based. KDE is at version 4=20 and Quanta needs a new parser. :) The situation is different though, as now I (and Eric) don't want it to=20 die, and I even offer support as long as my time permits, to guide you=20 with the development. Quite some code is already ported to KDE4, it=20 doesn't have to be started from scratch. There is already a prototype of=20 a new parser implemented. You have a better start, then I did. :) The project management model was quite simple: Eric had most of the=20 ideas (as he was a user of Quanta as well, I wasn't a web developer), I=20 coded it. How I do it was completely up to me. What I imagine now? We=20 will tell what should be done IMO, but you choose what and how to do. As=20 long as you enjoy and brings the project forward, that's great. If you=20 don't want or can't decide what to do, we can come up with ideas, don't=20 worry. The main goal is to have a working Quanta4 port for basic functionality=20 for the next major KDE release, 4.5. That is about 6 months ahead. It=20 is an ambitious goal, I know. It depends only on the developers if they=20 could do it. It is certainly possible. Basic functionality IMO would be: =2D project management =2D HTML, XML, PHP, CSS editing in source mode (autocompletion, document=20 structure view, editing of tags in dialog boxes/in a treeview) =2D file preview in a browser (embedded and external) =2D upload (publishing) capabilities for the project In terms of development goals: =2D it should use the KDevelop platform =2D the functionality should be provided as KDevelop plugins (unless it=20 doesn't make sense). The reason is to make the Quanta core as light as=20 possible and to reuse as much code as possible. Now the details... First, remember that I didn't touch the code in the=20 past 1.5 years. KDevelop and the KDevPlatform progressed a lot meantime,=20 and my knowledge is possible very outdated. Also my memory is not as=20 good as when I was young, and of course I forgot many things from=20 Quanta, even things I did in the last months of its development. :) =46irst of all you need the trunk (development) version of KDE and the=20 KDevelop platform. Documentation about how to compile, install, set up=20 trunk KDE can be found on http://techbase.kde.org . I can give advice=20 about it, if asked, but I'd rather answer question related to Quanta,=20 then related to general KDE. Not because I don't like to help, but=20 because my free time is limited. Questions about the KDevplatform can be=20 asked on the kdevelop mailing list ([email protected] potsdam.de). I'm really off the track about the current state, so even if=20 I'd like, I mostly cannot answer. Quanta and KDevelopPlatform is now in the extragear/sdk module. Once=20 you have build KDE (kdesupport, kdelibs, kdepimlibs and kdebase is=20 enough - kdebase might even be not required) , you need to build=20 kdevplatform from extragear/sdk. Unfortunately there is some problem=20 with the configuration files in the module, so you can't build everything=20 together, but first you have to configure, build and install kdevplatform,= =20 and later you can configure, build and install the whole extragear/sdk.=20 This might be fixed soon, though. Once you have everything in place, you can take a look at the Quanta=20 code in extragear/sdk/quanta .=20 There is a DESIGN document, probably outdated in some cases, but still=20 it should give an idea. There is also a HACKING document with some=20 coding style guide, but it is not followed strictly.=20 1) One thing I mentioned is the new parser. This is in=20 quantacore/parsers.=20 The code is using Qt's SAX parser to build an internal node tree from=20 the html files.=20 The way it works is using state machines described in an xml file (these are the parsing rules). There are even nice diagrams showing how the=20 state machines work (quanta/data/statemachines/statemachine.odg). Now=20 this works, and IIRC it even builds some kind of internal tree. The first=20 idea was to use directly KHTML's or WebKit's DOM tree to store the=20 result there, but at least when we evaluated, this wasn't good, as they=20 are too strict. So the idea is similar to what Quanta3 has, store the=20 parsing result inside our own node tree. In Quanta3 this tree was the=20 heart of Quanta and I'd expect to be the same in Quanta4, after all this=20 is why we parse the document. From the tree you can get information like=20 where are you in the document (context), what you should show up when=20 autocompletion is invoked (again, based on context), automatic insertion=20 of closing tags, etc. The tree can be also used for validation. What is=20 challenging to always keep the tree up-to-date as the user types in the=20 document.=20 Quanta3 had a nice trick to rebuild only that part of the tree that=20 changed. But this resulted in an uterly complicated code in the end, but=20 I still think the idea is good and needed to have a responsive UI.=20 Parsing in a different thread might be an idea, but then some thread=20 synching and other issues might occur, sincerely I was afraid to dive=20 into it. Once there is a parser and a node tree, the most important features of=20 Quanta3 can be implemented (autocompletion, tag editing, error=20 reporting, structure tree navigation). The first step would be to do just XML parsing and skip whatever is in=20 PHP/CSS/whatever areas. The next step would be to either write state=20 machines for these other languages or try to reuse the parser e.g for=20 PHP from KDevelop. This should be coordinated with Niko Sams, who wrote=20 the PHP plugin for KDevelop, he might have other, better ideas. Just so you know, the old parser worked like this: =2D parse XML, find and mark areas that are not XML inside =2D parse again (now by going through the node tree created in the first=20 run, not through the file itself) and replace those marked areas with the=20 parse result of the specific language. 2) There is a need for a new project manager. The whole idea how the=20 information about the project files is stored needs a rethinking. Agaim,=20 AFAIK Niko had some idea about it. 3) the other functionality can be ported. Like tag editing, user=20 toolbars (uploads, loadable toolbars from disk), etc. Some of them are=20 already ported, and need just polishing, fixing. I know the user toolbars=20 worked ~2 years ago, but don't know what is the state now. 4) anything else ;) In case one of you starts to work on the parser, but doesn't like it and=20 has better idea, I won't stop him to implement the new idea. :) But I=20 have to admit, I liked the current design when we came up with it and=20 coded with Jens Herden. I hope I got your attention and you will get interested in this project.=20 You can ask me on the Quanta devel list, or even on IRC (#quanta,=20 #kdevelop, #kde channels are interesting), but give me some days to=20 respond, I might be burried in other jobs or even traveling at the time=20 you send me the mail. Communicating on mailing lists also tightens the=20 community, the links between the people involved in the project. Andras PS: I let out the sponsoring part now, as that was covered in my other=20 mail sent to the mailing lists. --nextPart7377460.dP60ihgR2K Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) iD8DBQBLHVtATQdfac6L/08RAsOkAJ9crfEnNV+/156C+0dQNhwkHPzJmACg0DC4 UyLEYUxBy5bN2GSc2mD5BWk= =fmBw -----END PGP SIGNATURE----- --nextPart7377460.dP60ihgR2K-- --===============0311010231== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ quanta-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/quanta-devel --===============0311010231==--