Quanta GSOC midterm evaluation
Midterm evaluations for GSOC are coming up and Andris Mantia, my mentor I finally met at Akademy, asked be to blog about what we already have in Quanta. Because there is a lot and most of you are not aware of that. And to be honest it’s actually too much to put into a single blog post, so I hope to do more of a series of blog posts showing off some features.
Quanta 4 is not Quanta 3
Anyhow, I fear that a disclaimer is in place, for all of you who are desperately looking forward a KDE4 version of Quanta. The thing is, I cannot, nor do I want to, port Quanta from KDE3 times as-is to KDE4. Instead I build on top of the KDevplatform that is also used for KDevelop and KTechlab. By sharing the basic code it gets much easier to maintain Quanta in the future. This decision brings two things with it:
- We get an awesome library to built new stuff on top, making things like the new PHP which is already much more advanced than anything from KDE3, actually plugin possible.
- We don’t have all features from Quanta 3 or if we have, they might look and work differently. This also means that you won’t be able to take your Quanta 3 workflow without changes over to Quanta 4.
Some examples for the last part, that also sheds some light on our (== KDevelop team) preferred way of designing the IDE:
First and foremost, dialogs are evil. There, I said it. I doubt I’m the only one here and there are actually many other KDE applications following this mantra. Afaik Aurelien from Gwenview is trying to make it the first app in KDE without any modal dialogs. Go for it dude! What does that mean for Quanta? You might remember that Quanta 3 had lots and lots of dialogs. You could change attributes of HTML tags via dialogs, you could insert code via dialogs. In Quanta 4 this wont be the case, at least I won’t write these dialogs. Instead I concentrate on kickass code completion, which should make these dialogs obsolete.
- offer context sensitive code completion, e.g. only tags that are valid at the given cursor position or attributes that fit into the given tag under the cursor
- directly insert tags with all required attributes
- make it possible to trigger a file-selection dialog in e.g.
src="..."or similar attributes from within code completion (there’d be a ‘select file…’ code completion item)
In my opinion every dialog that created or changed code can be replaced by code completion. And if you use it, it’s much faster to write and change code. You don’t have to grasp a new magic modal dialog and find the attribute you want to change. Instead you simple select it,
CTRL + Space for code completion and insert the stuff you want.
existing Quanta 4 features
So much for the design ideas in Quanta4, now lets talk about what we already have now in Quanta4. For the uninitiated, you can find the source code at http://gitorious.org/kdevelop/quanta. You will need KDevplatform, KDevelop-PG-Qt and QJSON to get all plugins built.
Also another note is in place here: Even though I have the GSOC and spent lots of time on Quanta, the features I describe below wouldn’t exist if not for the help and work of others. Most notably Niko Sams (PHP, CSS, Execute Browser, Execute Script, XDebug, Crossfire, …), Ruan Strydom (XML/SGML, PHP formatter) and all the other guys happily hacking away at KDevplatform and it’s core plugins and libraries.
For those that never heard about the work Niko and me put into the PHP language support plugin for KDevelop, you have quite a lot of catching up to do :) I’m too lazy to reiterate everything, if you are interested, read my blog posts: https://milianw.de/tag/php
But frankly, you should instead just try it out. We released PHP together with KDevelop 4.0 and most distros should package it. I still actively work on it and e.g. just brought in some PHP 5.3 features (namespaces) the other day.
To list just a few things we have:
- state of the art code completion
- inline syntax checking and error reports
- context browsing
- inline documentation and PHP.net integration
If you thought Quanta 3 was good for PHP development, try this, really :)
Ah and before I forget that: Niko also wrote a plugin that integrates XDebug: http://nikosams.blogspot.com/2010/02/kdevelop-xdebug-php-debugger.html
Here I think I can simply link to Nikos blog posts explaining and showing off his CSS language support plugin:
As you can see once again: When using and implementing the tools in KDevelop properly for a language you get insanely good code completion and context sensitive help plus some browsing utilities. Very handy indeed, and once again (imo) better than what we had in Quanta 3.
Once we have proper multi language support in a single file, expect more goodness from my side, I only added more inline previewing, e.g. for colors.
This is by far the largest surprise for me. Ruan Strydom, a South African, announced at one day - out of the blue - that he is working on a XML language support plugin for KDevelop. And he did a quite good job at it. I’ve been helping out there the last weeks and fixed bugs and added a few features, but it’s still mostly his work. It is already quite useful, as it parses the XSD or DTD that is used in your document and based on that offers you context sensitive code completion and context browsing. It also works somewhat for SGML, e.g. HTML and is quite handy.
There is still quite a few things to do here, e.g. report errors about invalid attributes, tags, etc. pp (currently only real XML syntax parse errors are reported).
Snippets and External Scripts
In Quanta 3, custom toolbars and the actions in them where apparently quite popular. In KDevelop and hence Quanta as well, this is currently handled differently, yet the features should be the same, if maybe with a different workflow. See e.g. https://milianw.de/blog/snippets-in-kdevelop-kate on how snippets work, and https://milianw.de/blog/kdevelop-externalscript-plugin for external scripts.
These should (hopefully, if not please report) give you all the features you had with user actions in Quanta 3. Putting these actions into toolbars is not there and I frankly don’t see the huge need for it that would make up for the huge time I’d had to spent on it to get that working again.
The future and call for feedback
So as you can see, Quanta is not dead, but got very much revived. I hope to get our beloved webdevelopment IDE up and running next year at latest, if possible with a few first test releases this year. Anyhow, back to GSOC:
It’s currently midterm and I already achieved a lot, in the next weeks I will definitely spent my time in getting proper multi language support in a single file up and running. That would then finally make it possible to have proper context browsing and code completion in e.g. a template that includes CSS, PHP and HTML. Also the inline HTML preview from Quanta 3 is needed to be ported / reimplemented. But I might be missing things, which makes me conclude this overlong blog post with a call to old Quanta 3 users:
What features are you missing above from Quanta 3?
Please write one comment per feature and then do “+1” kind of comments to get a basic vote here. That way I can see on what features I have to concentrate on to get Quanta 4 up and running.