I’m retracting myself from the ownCloud contributors

As the header says I will no longer be part of the ownCloud contributors. It has been a major - not to say the main - part of of life for the past 2½ years; they do roll by, don't they...
When I started it was as most hobby-programmers just to scratch my own itch, but it has been a great joy and pleasure to work with the many enthusiatic people.
When Frank started his company around the project I was just as happy and gladly signed a contributors agreement for my few contributions to ownCloud core.

The ownCloud project was for me both as mentioned to scratch my own itch regarding many points, but also a way for me to heal my own mind with some brainwork that I hadn't been able to do elsewhere. For personal reasons I'd been out of a job - unable to perform it - but after I had my disability pension I could have some peace and let me try to build some strength.
It helped a lot to work with these great people.

Lately - for the better part of 1½ year - this hasn't been my feeling. I may be wrong but it is my strong feeling that ownCloud Inc. has become the priority, and the community a workbench for improving and taking over the apps.
If this is not so, keep doing your awesome work.
For those having the same feeling as me, I urge you to form an ownCloud Foundation. I don't have the strength myself, but I will gladly join and support it.
Frank, I'd wished you'd seen and supported it

Sorry for all errors in this text; this is for me a very emotional departure.

Edit: I'll explain my reasons for leaving and my wishes for the future of the ownCloud community further soon. At this moment I just need to gather my thoughts first.

Below a redacted excerpt of what triggered it. It may not seem important, but if you know your github-foo your can find find it all

 karlitschek commented 2 days ago

Sorry but we don´t want to dumb more libraries in the ownCloud core only because they might be useful. Apps are free to ship components like that if they want to use it. At the later stage if 4-5 apps ship the same component in the exact same version then we might consider to add the to the ownCloud core, or not.

 karlitschek commented 2 days ago

I'm not saying this is not useful, secure, good code or in other ways helpful. But this doesn't mean that we should dump all useful code into the core. The design goal of the owncloud core is to be as small as possible. In fact it is already too big. So if this is useful then we should use it for the news app API first and perhaps other apps. This doesn't mean that we have to dump it into the core to make it heavier, difficult to maintain and to keep stable

 tanghus commented 21 hours ago

As it has been - wisely - decided to move the AppFramework to core, I am interested in having it both lean, but more importantly usable and secure. Therefore I prefer to have great implementations which are closely scrutinized for security issues.
A security issue that would be present in at least 3 apps has already been detected. I think that speaks for itself for including it in core.

 tanghus commented 9 hours ago

In case my point didn't come clearly thru, as I may sometimes try to soften my views when putting them into words.

    The design goal of the owncloud core is to be as small as possible. In fact it is already too big.

Recommendable, but what does that exactly mean? What is not needed in core? archive, migration, memcache, ocs, vobject, activitymanager, api, avatar, backgroundjob, cache, contactsmanager, tags, eventsource or files for that matter? Plus everything else under /apps. Fine, lets scrap it and start from scratch. I can actually mention a few that I wouldn't be missed (including some of my contributions), but that's another matter.

Design-wise it would probably be good, but we would be left with basically nothing.

Some of the good decisions that have been made during the past ~1½ year - from my PoV - are

    The strict adherence to interfaces in new contributions
    The introduction of the Server "container"
    The (partly) inclusion of the AppFramework.

Those - and other - changes can make it possible to actually move towards a mature, trustworthy codebase.
I have no special attachments to including CORS middleware, but I understand from several parties, that I trust, that it is a small, yet important part to include, and rejecting it as bloat is both disrespectful and counter-productive. So my rant is not about CORS - it's about the culture and attitude that I sometimes see in this community. What I seen is community members reluctant to voice their opinions for improvements.
To say it straight out: The community should have priority over both "The Inc." and "The Founder". Otherwise it's not a community anymore, and I don't see a place for myself in it.
Alternatively the two quoted nouns could find better ways for making compromises - without compromising the project - pun intended ;)
If none of those objects are met I frighten for the future culture of this project, but so be it; I find another place to try to keep my mind sound, because quite honestly recently it has done quite the opposite[*]

[*] With exceptions of course. No one mentioned, no one forgotten.

PS: I've tried to keep this rant in a sober tone, although my state might not be so (otherwise I probably wouldn't have written it) and I expect any responses to it to be made in public.

Frank Karlitschek
karlitschek commented 2 hours ago

@tanghus Thanks a lot. I don´t think this has anything to do with Inc. or anything else.
This is purely about the long term maintainability of the core. And this is something anything who wants that ownCloud still exists in 5-10 years should care about.
We all know several other projects where this framework/libraries bloat went wrong.
Frank Karlitschek
karlitschek commented 2 hours ago

O.K. Let´s put this into core under this conditions:

    Full documentation how this should be used by app developers is available on doc.owncloud.org at the same time.
    At least two independent apps are fully ported to use this.
    @Raydiation maintains this for the time being exactly as the rest of the app framework.

    Someone actively

    Someone starts to port other pieces of ownCloud to use this so that we don´t have code duplication.

Additionally we should also regularly check which code, frameworks or dependencies in core can be removed. Otherwise we run into a long term problem.

 tanghus commented an hour ago

    Full documentation how this should be used by app developers is available on doc.owncloud.org
    at the same time.

Reasonable and preferable.

    At least two independent apps are fully ported to use this.

I believe that should be the case for oC7 or oC8. Longterm dev is of essence.

    @Raydiation maintains this for the time being exactly as the rest of the app framework.

I think this should be rephrased to "there must always be an active, responsible maintainer." which is documented in the source file. I don't know if there's a @maintainer tag in http://www.phpdoc.org/ ?
That it should always be @Raydiation counts out the bus-factor ;)
Also where would that that place all other core developers including you Frank? We have git blame and I've been personally hit by that recently ;)

    Someone actively

Meaning what? If it's correct it doesn't have to change. This correlates with the maintainer or other developers related to this.

    Someone starts to port other pieces of ownCloud to use this so that we don´t have code duplication.


    Additionally we should also regularly check which code, frameworks or dependencies in core can be removed. Otherwise we run into a long term problem.

This should be addressed in a separate issue and I'm sorry @XXX that I kinda hijacked this issue for that.

 tanghus commented 19 minutes ago

    This is purely about the long term maintainability of the core. And this is something anything who wants that ownCloud still exists in 5-10 years should care about.

To be very forthright I'm not not sure which ownCloud you mean here? Is it to be sure independent developers can produce efficient and secure code, or is it to secure that the Inc. have less dependencies when they use their paid work force to make solid apps for paying customers?
The arguments and motives have become too opaque for me, and after 2½ years of mostly enjoying this project, I'll have to retract myself from it.

@XXX sorry for misusing this PR.
Frank Karlitschek
karlitschek commented 11 minutes ago

@tanghus I´m not really sure what you mean here. Like I said this has nothing to do with Inc. or anything else.
We all have invested a lot of time and energy into ownCloud. So it is in our all interested that the ownCloud core and the apps will be maintainable and stable and working and mostly bugfree for as long as possible. Because of that we have to do some quality check when architectural changes are done in the core. I think this is good maintainership in general.

Flattr this!

Installing Ruby RVM on Ubuntu 12.10

I've never used Ruby even though it's apparently the language of the hour (or maybe some hours ago - I'm often late on such stuff), but had to use it today to run some scripts. I didn't know what RVM was until a couple of hours ago, but when I had to use it, I found out that the package doesn't exist on 12.10 :-/

There's probably some PPA out there with updated packages, but a quick search didn't reveal any, so I decided to install it manually. As the packaged Ruby is kinda outdated, and doesn't match with some of the gems, I also installed a fresh version of that. To avoid clashing with anything that might need the packaged version, I installed it in my home directory. Luckily the RVM packagers made it very simple to do.


sudo apt-get install libxslt1.1 libxslt-dev xvfb build-essential git-core curl
Maybe they're not all needed for ruby/rvm, but I followed an instruction on how to run Cumbumber tests for ownCloud. Install RVM (from the RVM install page):
\curl -L https://get.rvm.io | bash -s stable --ruby
Add code to source some init code to your .bashrc (no idea what it does):
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
Add the bin directory to your PATH:
echo 'export PATH=$HOME/.rvm/bin:$PATH' >> ~/.bashrc
And source it:
. .bashrc
Install necessary dependencies:
bundle install

That's it. Feel free to comment, but I most likely can't answer any questions, because all I did was to collect some snippets from various sources and boil them down to some easy steps :-)

Flattr this!

Posted in Ruby, Ubuntu. Tags: , , . 4 Comments »

Tales of a Metal Cloud – Part 2

Metal Cloud
Photo by dedalusj

This article is looong overdue. I started it in July 2012 and never got any further, but now ownCloud 5 is released, and I have just released version 0.2 of TAL Page Templates for ownCloud so here it goes 😉 (Some of the examples for "current" ownCloud templates are a bit outdated, but I hope you get the gist of it)

In last episode of...

In the previous post about TAL Page Templates for ownCloud I gave my reasons for wanting to implement PHPTAL in ownCloud, and gave a short example of the benefits it will give for the developer. I wrote I "...will dig deeper into how to use it to render a full page, how to access variables, how to make use of the powerfull METAL.." which I have later decided not to do, as many have described that better than I could do, so if you're not familiar with TAL and METAL, there's plenty to read in the resources section in that post. I also wrote that I would show "...how I’ve plugged it all in to use ownClouds built-in authentication, template discovery and internationalization system", but thinking about it, there is no reason for showing how it's implemented, but rather I should show more of how to use the ownCloud specific parts. So this will mostly be a manual-like listing of how to use TAL page templates compared to the current use of inline PHP code.

What's next

With ownCloud 5 comes the new App Framework with another template engine - Twig. Personally I'm not very fond of the Twig markup, so hopefully from ownCloud 6 it will be possible to choose which engine to use. The App Framework is still very new, and I haven't explored it properly, but I'm sure it will be a great adition to ownCloud - especially if you can use TAL to write your templates 😉

Links and images

A lot of the scripting used in ownClouds page templates is for linking to apps, pages, services and images. There are several convenience methods for this. PHPTAL implements the standard set of TALES expressions, but also allows you to create custom expression modifiers. I have utilized this to substitute the direct PHP calls.

Linking to an image

<img class="svg" src="<?php echo image_path('', 'logo-wide.svg'); ?>" alt="ownCloud" />
<img class="svg" src="<?php echo image_path('app', 'someimage.png'); ?>" alt="ownCloud" />
<img class="svg" tal:attributes="src image:string:logo-wide.svg" alt="ownCloud" />
<img class="svg" tal:attributes="src image:string:app/someimage.png" alt="ownCloud" />

Constructing a link

<a href="<?php echo link_to('', 'index.php'); ?>">Home</a>
<a href="<?php echo link_to('app', 'index.php'); ?>">Some app</a>
<a tal:attributes="href linkto:string:index.php">Home</a>
<a tal:attributes="href linkto:string:app/index.php">Some app</a>

Link to remote service

<link rel="stylesheet" href="<?php echo OC_Helper::linkToRemote('core.css') ?>" type="text/css" media="screen" />
<a href="<?php echo OC_Helper::linkToRemote('webdav') ?>">WebDAV</a>
<link rel="stylesheet" type="text/css" media="screen" tal:attributes="href remote:string:core.css" />
<a tal:attributes="href remote:string:webdav">WebDAV</a>

Accessing configuration

ownCloud version: <?php echo OCP\Config::getSystemValue('version'); ?>
Default quota: <?php echo OCP\Config::getAppValue('files', 'default_quota'); ?>
Calendar time zone: <?php echo OCP\Config::getUserValue(OCP\User::getUser(), 'calendar', 'timezone'); ?>
ownCloud version: ${config:string:sys/version}
Default quota: ${config:string:app/files/default_quota}
Calendar time zone: ${config:string:user/calendar/timezone}

Translating content

<p><?php echo $l->t('This will be translated.'); ?><p>
<p i18n:translate="">This will be translated.<p>

Translating content with variables


There is no standardized way to do this currently. I have seen both translation keys using printf formatting and custom interpolation using e.g. curly brackets.

<tal:block i18n:name="username" tal:content="user" />
<p i18n:translate="">Your user name is ${username}.</p>

Your user name is ${username}.

Or you can wrap it in some markup:

<p i18n:translate="">
Welcome back <span i18n:name="username" tal:replace="user"/>.

Welcome back .


Translating attributes.

<img alt="<?php echo $l->t('Log out');?>" title="<?php echo $l->t('Log out');?>" src="<?php echo image_path('', 'actions/logout.svg'); ?>" />
<img tal:attributes="src image:string:/actions/logout.svg" i18n:attributes="alt;title" alt="Log out" title="Log out" />
See more...


$arr = array('color' => 'red',
            'taste' => 'sweet',
            'shape' => 'round',
            'name'  => 'apple');
<select size="4">
<?php foreach($$arr as $key=>$value) { ?>
<option value="<php echo $key; >" ><php echo $value; ></option>
<?php } ?>
<select size="4">
<option tal:repeat="item arr" tal:attributes="value repeat/item/key" tal:content="item"></option>

If you want to try it out, you will need ownCloud 5.x where you can enable the "TAL Page Templates for ownCloud" app from Settings/Apps. If you prefer to install from git, it's available at Github.

Flattr this!

Posted in ownCloud, PHP. Tags: , , . No Comments »

Tales of a Metal Cloud – Part 1

About reaching the goal and beautifying the path or Usability is also about the code (usability in the code?).
Metal Cloud

Many moons ago, when I unintentionally had ended up as a web developer, I had the pleasure of working for two small companies that both used Plone and hence ZPT - Zope Page Templates. After messing around with all kinds of ugly, inconsistent web coding, it was a relief to be able to use the clean markup that TAL provides, and seamlessly assemble pages using METAL.

Using Zope also had the benefit of having Python as it's backend scripting language. I don't want to dive into how much I prefer Python over PHP - enough has been said about that already - and I fully acknowledge that the ubiquity of PHP makes it the perfect choice for a project like ownCloud. Nor do I want to question the strength of the template class used in ownCloud; you can do practically everything. But the strength of OC_Template is IMHO also it's weakness.

During the few months I've been coding for ownCloud, ideas for it's usage have spawned, new apps pop up, code is being tweaked to do amazing stuff and soon the app repository will be "there's an app for that" also for ownCloud.

Being at the point where everyone can create and publish an app for ownCloud sets up some requirements:

  • Maintainability: If the app is ever abandoned, it has to be easy for a new maintainer to take over. This leads to:
  • Readability: No-one wants to maintain an app with poorly structured code and markup, or with none or insufficient documentation.
  • Validity: This is very broad and covers e.g. packaging, cross browser usability and that the markup adheres to common standards.
Maintain the beauty of the markup.

With the Template Attribute Language (TAL) we can achieve having beautifully structured markup, and the interpreter will let us know of any missing end tags or wrongly nested markup, as a matter of fact the page won't render if we mess it up.

The good thing is that some good people have made a PHP library that implements TAL, TALES and METAL, so I've made a proof of concept ownCloud integration using it, which actually works pretty well, if I may say so 😉

Time to show what this will mean for the template author. As example I use the form for editing the structured name data in the ownCloud Contacts app.
Below is how the currently used markup looks.

< ?php
$name = isset($_['name'])?$_['name']:'';
<div id="edit_name_dialog" title="Edit name">
	<dl class="form">
		<dt><label for="pre">< ?php echo $l->t('Hon. prefixes'); ?></label></dt>
			<input name="pre" id="pre" value="<?php echo isset($name[3]) ? $name[3] : ''; ?/>" type="text" list="prefixes" />
			<datalist id="prefixes">
				<option value="<?php echo $l->t('Mrs.'); ?>">
				</option><option value="<?php echo $l->t('Mr.'); ?>">
				</option><option value="<?php echo $l->t('Sir'); ?>">
				</option><option value="<?php echo $l->t('Dr.'); ?>">
		<dt><label for="giv">< ?php echo $l->t('Given name'); ?></label></dt>
		<dd><input name="giv" id="giv" value="<?php echo isset($name[1]) ? $name[1] : ''; ?/>" type="text" /></dd>
		<dt><label for="add">< ?php echo $l->t('Additional names'); ?></label></dt>
		<dd><input name="add" id="add" value="<?php echo isset($name[2]) ? $name[2] : ''; ?/>" type="text" /></dd>
		<dt><label for="fam">< ?php echo $l->t('Family name'); ?></label></dt>
		<dd><input name="fam" id="fam" value="<?php echo isset($name[0]) ? $name[0] : ''; ?/>" type="text" /></dd>
		<dt><label for="suf">< ?php echo $l->t('Hon. suffixes'); ?></label></dt>
			<input name="suf" id="suf" value="<?php echo isset($name[4]) ? $name[4] : ''; ?/>" type="text" list="suffixes" />
			<datalist id="suffixes">
				<option value="<?php echo $l->t('M.D.'); ?>">
				</option><option value="<?php echo $l->t('Ph.D.'); ?>">
				</option><option value="<?php echo $l->t('Jr.'); ?>">
				</option><option value="<?php echo $l->t('Sn.'); ?>">

This isn't exactly pretty, and if you want to use a visual HTML editor, it won't look good there either. And believe me, this isn't the worst looking example 😉
Let's see the same snippet edited for using TAL and TALES

<div id="edit_name_dialog" i18n:domain="contacts" i18n:attributes="title" title="Edit name">
	<fieldset tal:condition="name">
	<dl class="form">
		<dt><label for="pre">Hon. prefixes</label></dt>
			<input name="pre" id="pre" tal:attributes="value name/3|nothing" value="" type="text" list="prefixes" />
			<datalist id="prefixes">
				<option i18n:attributes="value" value="Mrs." />
				<option i18n:attributes="value" value="Mr." />
				<option i18n:attributes="value" value="Sir" />
				<option i18n:attributes="value" value="Dr" />
		<dt><label for="giv" i18n:translate="">Given name</label></dt>
		<dd><input name="giv" id="giv" tal:attributes="value name/1|nothing" value="" type="text" /></dd>
		<dt><label for="add" i18n:translate="">Additional names</label></dt>
		<dd><input name="add" id="add" tal:attributes="value name/2|nothing" value="" type="text" /></dd>
		<dt><label for="fam" i18n:translate="">Family name</label></dt>
		<dd><input name="fam" id="fam" tal:attributes="value name/0|nothing" value="" type="text" /></dd>
		<dt><label for="suf" i18n:translate="">Hon. suffixes</label></dt>
			<input name="suf" id="suf" tal:attributes="value name/4|nothing" value="" type="text" list="suffixes" />
			<datalist id="suffixes">
				<option i18n:attributes="value" value="M.D." />
				<option i18n:attributes="value" value="Ph.D." />
				<option i18n:attributes="value" value="Jr." />
				<option i18n:attributes="value" value="Sn." />

In part 1 I've shown the basics of using TAL, but this is only a foretaste of how PHPTAL can be used in ownCloud. In the next part - hopefully comming shortly - I will dig deeper into how to use it to render a full page, how to access variables, how to make use of the powerfull METAL macros and how I've plugged it all in to use ownClouds built-in authentication, template discovery and internationalization system.

In the meanwhile have a look at the resources below for information about TAL, TALES and METAL

Update: I wrote this article quite a while ago, but never got around to publishing it. In the mean time I've made my implementation available at https://github.com/tanghus/tal/ and made a Journal/Notes app utilizing it which is available at https://github.com/tanghus/journal/. I will publish both soon at the ownCloud app repository.
Update 2: The TAL Page Templates only works on current git master which will be released as ownCloud 5 in some time within the next couple of months 😉 Update 3: I have released TAL Page Templates for ownCloud 4.5 and it is available from the app repository, or from Settings/Apps when you have installed/upgraded to 4.5. At the same time I have released a small Journal/Notes app which uses the TAL templates.

Flattr this!

Posted in ownCloud, Programming. Tags: , , . 7 Comments »

Multiple variable assignment in Javascript

I've been searching for a way to assign values to multiple variables from an array. This is very easy to achieve on Python where you can do something like: fam, giv, add, pre, suf = 'Swanson;Graham;Rudolf;Dr.;MD'.split(';') But I haven't found a solution in Javascript. I've tried: var [fam, giv, add, pre, suf] = 'Swanson;Graham;Rudolf;Dr.;MD'.split(';'); Which works in Firefox but not in Chrome var (fam, giv, add, pre, suf) = 'Swanson;Graham;Rudolf;Dr.;MD'.split(';'); Which doesn't work in Firefox. So I give in and try with two-liners instead: var fam, giv, add, pre, suf; (fam, giv, add, pre, suf) = 'Swanson;Graham;Rudolf;Dr.;MD'.split(';'); or var fam, giv, add, pre, suf; fam, giv, add, pre, suf = 'Swanson;Graham;Rudolf;Dr.;MD'.split(';'); But none if them works. Finally I tried: var tmpnam = 'Swanson;Graham;Rudolf;Dr.;MD'.split(';'); var fam=tmpnam[0], giv=tmpnam[1], add=tmpnam[2], pre=tmpnam[3], suf = tmpnam[4]; Which works in Firefox, Chrome and rekonq (KDE WebKit based browser). Is it really not possible to do one-line variable assignment like that in Javascript?

Flattr this!

Are you experienced?

Well I'm not, but I'm having a lot of fun :-)

My first two Plasmoids are very simple but gave me a brief look into the possibilities of the Plasma Workspace, and I had to ask a lot of newbie questions on plasma-devel which is a very responsive mailing list. I cannot remember any of my questions that have gone unanswered and most of them with very good solutions and/or answers.

My latest endeavor is a bit more challenging. Plasma doesn't have a simple ListView so you'll have to use a Plasma.ScrollWidget and implement the methods yourself. For me that was somewhat annoying primarily because I'm still fighting a stale battle with the Qt layouts :-)

Now I have to figure out how I'm gonna the cache Last.fm feed and all the pics that I'm downloading. For 3 reasons, the most important is of course performance, followed by the fact that the tests I've run on my crappy HW results in X pixmaps getting corrupted [*], and lastly that it's a part of the Last.fm ToS...

For now I use job = KIO.get(KUrl(url), KIO.NoReload, KIO.HideProgressInfo) and connect to job's signals to get the the feed and to download the thumbnail pics of the events I use KIO.file_copy(from, to). This basically works but how can I get the HTTP Headers? I need to know if I should reuse the data I already have or if I should download it again.

Regarding the actual caching I was considering using a combination of:


KIconLoader::KIconLoader(const QString &appname = QString(), KStandardDirs *dirs = 0, QObject *parent = 0)

KIcon (const QString &iconName, KIconLoader *iconLoader)

But I'm uncertain how to use them.

Comments are very welcome as I'm a bit stuck here.

[*] I have no idea what I'm talking about here, but I get black icons after running X number of tests :-/

And are no screen shots in this post as the work has mostly been "under the hood".

Powered by Blogilo

Flattr this!

Posted in KDE, Plasma, Python. Tags: , , . 2 Comments »

Google Translator 0.4.2 released

Finally I got to update my Google Translator Plasmoid to version 0.4.2.

Changes since I last updated this blog includes:

  • 0.4.2
    Much improved error handling when no network connection using Solid. The Plasmoid is now disabled until a connection is established instead of just giving up and dying 😉
    The Plasmoid is now installed under the "Language" section.
  • 0.4.1
    Improved KIO handling to be able to handle longer text while at the same time limit text to 1200 characters to avoid errors on too long queries.
  • 0.4
    Added a "Swap languages" button.
    TransferJobs are no longer shown in KDE Notifier.
  • 0.3.2
    Languages weren't sorted after change to KLocale.
  • 0.3.1
    Quick fix for layout error when adding Plasmoid.
  • 0.3
    Use KLocale for getting languages. This cuts down on code lines and it will i18n the language names. Also I don't have to keep up with the number of Google translations. It's now a race between Google and KDE 😉
    Act on no network connection.
    Added nice little Google attribution logo :-)

Flattr this!

2 new Plasmoids

For the last 2-3 weeks I have been working on a couple of scripted Plasmoids for KDE4.x written in Python. First I started with the Currency Converter which uses data from Yahoo! Finance. When it was sorta working I figured out that I could create a Google Translator Plasmoid using almost the same code, so now I'm maintaining them concurrently. Well - 'nuff said. Here ther are:

Flattr this!