20 January, 2016

Get Started With ownCloud App Development in Six Steps - the Quick and Dirty Way!

ownCloud Mail, a great newcomer
What's simpler than downloading a zip file, extracting it and running a command in the resulting folder to get an ownCloud server up on localhost?

Yes, it can be that simple, though it might require a few minor tweaks and you have to make sure to have all ownCloud dependencies installed.

Note that this is useful if you want to develop an ownCloud app. If you want to develop on the ownCloud core, a git checkout is the way to go, get started here. Feedback on this process is highly appreciated, especially if it comes with a pull request for our documentation of course ;-)

Step 1 and Two: Dependencies

  • Install PHP and the modules mentioned here
    Your distro should make the installation easy. Try these:
    • openSUSE: zypper in php5 php5-ctype php5-curl php5-dom php5-fileinfo php5-gd php5-iconv php5-json php5-ldap php5-mbstring php5-openssl php5-pdo php5-pear php5-posix php5-sqlite php5-tokenizer php5-xmlreader php5-xmlwriter php5-zip php5-zlib
    • Debian: apt-get install php5 php5-json php5-gd php5-sqlite curl libcurl3 libcurl3-dev php5-curl php5-common php-xml-parser php5-ldap bzip2
  • Make ownCloud session management work under your own user account.
    Either change the path of php session files or chmod 777 the folder they are in, usually something like /var/lib/php (debian/SUSE) or /var/lib/php/session (Red Hat).

The Final Four Steps


ownCloud should present you with its installation steps! Give your username and password and you're up and running with SQLite.

Alternative with OCDev

An alternative is to use OCDev which you can grab here. After installation, you run
ocdev setup core

See the app development tutorial here.

Start with the app

Now you create a subfolder in the owncloud/apps with the name of your app and put in a skeleton. With OCDev:
ocdev startapp MyApp

By hand, you can copy an existing app and hack that up ;-)

It's probably wise to now get going with the app development tutorial here. Be sure to check out the changelog, we try to make sure the latest changes are noted there so even if we didn't manage to fully update the tutorial, you can find out what will and won't work in the changelog. Also, be sure to update the links to get the latest dev doc - this all links to 9.0, once that is out it is probably better to directly target 9.1 and so on.

Your input is very much welcome! If you run through these steps and get stuck somewhere, let me know and I'll update the documentation. Or, of course better still, do a pull request on the documentation right in github. You don't even have to do a full checkout, smaller fixes can easily be done in the web interface on github.

Thanks, good luck, and have fun building ownCloud apps!

No comments:

Post a Comment

Say something smart and be polite please!