59
I Use This!
Very High Activity

News

Analyzed 40 minutes ago. based on code collected 1 day ago.
Posted about 11 years ago by Frank Karlitschek
With the release of ownCloud 7 just a little more than a week away, I thought I'd discuss just how much faster and easier it is.
Posted about 11 years ago
Posted about 11 years ago
This week, while working on the upload-to-ownCloud app I'm making through my OPW internship, I learned to use the $q service, a promise/deferred library built into Angular. The $q service is fairly straightfoward, but integrating it with another ... [More] asynchronous API — the API that accesses the Firefox OS file system — was more difficult than I expected. Generally, promises are pretty straightforward. When you call a function that returns a promise, it gives you a mysterious box that you can't peek into (yet). The mysterious box doesn't yet have anything in it, but at some point, the asynchronous things happening somewhere out in the aether of your application will put a value in that box, and then callback you've attached (via "then") to it will be fired. var mysteriousBox = functionReturningPromise(); mysteriousBox.then(function(contents) { alert('Surprise! The contents of the box is' + contents); }); That's not so bad. But how do we structure functionReturningPromise? Unfortunately, many of the existing examples for using promises assume that you're working with APIs that automatically return a promise (like Angular's $http service). If your API does automatically return a promise, lucky you! However, different JavaScript APIs deal with asynchronicity in a variety of ways, so it's not uncommon to have to adapt an asynchronous API that's not promise based to work with a promise-based API. For example, Firefox OS's Device Storage API doesn't pair with Angular's $q in a particularly obvious way. The enumerate() function returns a cursor object that allows asynchronous iteration through the files in a device storage object. Here's an example similar to the one given in the MDN documentation: var pics = navigator.getDeviceStorage('pictures'); var cursor = pics.enumerate() cursor.onsuccess = function () { console.log(this.result.name); if (!this.done) { this.continue(); } } The cursor object allows the programmer to move through a list of results asynchronously. (I often think of cursors as iterators, but they're not totally analogous.) When the cursor is called — initially, or with continue() — it attempts to retrieve the next item, and then calls either its "onerror" or "onsuccess" method, depending on the result of that attempt. In the example, the "onsuccess" function checks for a picture, logs the name of the picture, and then continues if the cursor's "ready state" is "done." Calling continue() begins the pseudo-recursive cycle again by attempting to retrieve the next item. To make this work with $q, I needed to create a deferred object, and then add points in the code where the deferred object could either resolve or reject the promise. Since a check to see if the cursor wasn't done didn't give me a natural place to resolve the request, I reversed the logic check and resolved the promise when the "done" check passed. :::javascript var deferred = $q.defer(); // make an array to send back with the promise var photos = []; // access the file system and make a cursor to page through the files var files = navigator.getDeviceStorage('pictures'); var cursor = files.enumerate(); cursor.onsuccess = function() { if (this.done) { // populate the mysterious box with "photos" deferred.resolve(photos); } else { photos.push(this.result.name); this.continue(); } }; // In real life, we'd need more error checking than just // checking to see if we accessed the file system, but for now... cursor.onerror = function() { deferred.reject("Error browsing the file system."); }; // send the promise to whomever has // requested it by calling this function return deferred.promise; Here, I push photo names onto the "photos" array as the cursor iterates through file storage, and then resolve the promise by sending the "photos" object only when the cursor's list of files has been exhausted. Likewise, the promise is rejected when the cursor encounters an error. The most important thing to note here, though, is that the return of the actual promise object occurs outside of the asynchronous code that interacts with Mozilla's API. The mysterious box is sent to the code that "catches" the promise instantaneously, regardless of whether the asynchronous code above that's interacting with the filesystem is finished running. The beauty of promises is that it's okay to send the empty box, as long as you can ensure that one of your callbacks will either populate that box or reject the promise later. [Less]
Posted about 11 years ago
oC 7 in action!This is the weekly ownCloud community update for the week of June 16 to June 29. These updates pull together activities from development mailing lists, blogs, coding work and everything else community members share with us. Tips are ... [More] very much welcome! Ping Jos with your input. Most development is now aimed at testing the upcoming ownCloud 7. A beta was made available for testing and minor releases for ownCloud and the desktop client were released. There was much activity on apps.owncloud.com with six updated and two brand new apps. You can read the report from last two weeks here. Development As noted last week, development is in feature freeze for the release of ownCloud 7 and we focus on polish and stability. There is thus relatively little news from the front line, other than of course our call for testing! Core and apps There’s work going on to adapt apps to the new API and UI in ownCloud 7, like the Video viewer app, the Music app, the News app and the Documents app The Android app can now show what files have been shared with you by others ownCloud desktop client 1.6.1 was released, read this blog by Klaas for some background on the hard work the team put in. While feature work took a backseat, more than 150 commits were merged in core alone! Get your ownCloud apps! While ownCloud core development was looking at polishing the upcoming release apps.owncloud.com saw plenty of activity: The ocDashboard app got to version 1.2, adding widget search, a new ‘open weather’ widget and new tasks in the task widget as well as some other improvements. Probably not surprising anybody, this app provides an overview dashboard with configurable widgets for ownCloud Roundcube integration in ownCloud received some love, updating to 2.4.0 which according to the changelog delivers a code cleanup and a refresh error fix to its users The Storage Charts app also was updated but it isn’t clear what changed. Perhaps it works with ownCloud 7? Working Together, a app that allows you to ‘lock’ files so you can ensure that no two people are concurrently editing a file, has been updated and is confirmed to work with the ownCloud 7 Beta The Popup app, still wet behind the ears, got an update to 0.2 – fixing a bug in the forgot password section. Its developer has even defined a TODO item so I think we can soon expect another update! The Antivirus app has been updated to 0.4.1 New is the ownCloud Collaboration app released as 1.0. This tool is a project management app for ownCloud and has been developed by three students from the Sona College of Technology under guidance of Professor Dr. Akilandeswari Another brand new app was introduced, with the name APK Info. It does what the name suggests: show information about APK (android software package) files Other development updates The development mailing list had discussions about ownCloud 7 changes like the new layout, JS context objects and the new shared folder model ownCloud 7 Alpha 2 was released ownCloud 7 beta was made available for testing ownCloud client 1.6.1 RC1 was released (final is out too) Other ownCloud happenings On Planet ownCloud we have been missing the blogs by Raghu Nayyar, as we couldn’t get him added to our blog roll properly. And missing is the right word, as Raghu has been working on the ownCloud Calendar, and is doing great work. Those who wish to read up on what he has been up to can find his blog here. We’ve got a new website up! If you haven’t seen it yet, visit owncloud.org and check it out! On the devel mailing list, Chris asked people to help answer questions on the forum. There are unanswered questions and any help is welcome! There are meetups being organized around ownCloud! For those of you living in or close to Berlin or Münich, there will be a meetup every third Wednesday of the month. And Tuesday July the 8th, there will be a meetup in the ownCloud headquarters in Lexingtontalk, close to Boston, Massachusetts. All ownCloud meetup groups are gathered on owncloud.meetup.com. Last but not least in meeting news, ownCloud will have a contributor conference at the end of August in Berlin, Germany. Check it out if you want to help make ownCloud even more awesome! ownCloud meetups are a chance to learn more about ownCloud or even to get coding work done. If you know of other (regular or not) meetups or are interested in organizing one yourself, let me know so I can help you out! [Less]
Posted about 11 years ago by Frank Karlitschek
ownCloud is getting ready to release ownCloud 7 Community Edition and what better way to celebrate than with a Meetup?
Posted about 11 years ago
Posted about 11 years ago by Frank Karlitschek
I wrote about our new Server-to-Server sharing feature earlier this week, but I wanted to go into more detail on the other sharing improvements in ownCloud 7.
Posted about 11 years ago
Posted about 11 years ago
With the release of ownCloud 7 Community Edition just a few weeks away, I started a series of posts about what is coming in this release. I published a blog about the new server to server sharing feature in ownCloud and today, I will cover ... [More] improvements in other aspects of sharing. More flexibility The server-to-server sharing simplifies working with data others have shared with you from other ownCloud servers. But we have also simplified sharing on a single server. Previous versions had a shared folder that would show up when files or folders were shared with you. All these files would be in that folder. No more: Shared files and folders now appear in the your root directory with the overlay icon representing “shared with me.” This means they are no longer confined to a specific location but you can move these files to where it makes most sense. Keep all your study files in a study folder, your work files in a work folder and so on. Of course, if you wish to have a shared folder, you can simply create one and move all of the shared folders and files into the shared directory. And if you are upgrading, you can continue to use the Shared folder you already have. So, ownCloud 7 gives you more flexibility in how you deal with data shared with you, both from within your ownCloud instance and from other servers! More control Of course, with the ability to have shared files in many places, things can get a little more complicated. And control over your data means knowing who has access to it. ownCloud 7 provides a clear overview of what you’re sharing with others – and what they share with you – by introducing shared files overviews in the Files app. It features a side bar with the selections files shared with me, files I shared and files shared with link. This provides a clear view on the files you are sharing with others and what they are sharing with you. And while browsing your entire file selection, you can see the name of the file owner displayed on the files so you never loose track of who owns what. Sharing is a primary function of ownCloud, and ownCloud 7 brings massive improvements in this area. With the Beta out last week, extensive testing and debugging is taking place and home and small office users will soon have access to this release. Users with large enterprise-scale deployments should wait for the extensive verification, certification and hardening process to be finished for the enterprise release of ownCloud 7, expected in September. [Less]
Posted about 11 years ago by Frank Karlitschek
We sometimes get cautioned by commenters on this blog to not be too hard on our competition. That's why, after seeing this announcement in TechCrunch, I wanted to congratulate Dropbox.