[Owncloud] adopting CoffeeScript in ownCloud

Victor Dubiniuk victor.dubiniuk at gmail.com
Mon Nov 26 14:19:02 UTC 2012


Hi,

It totally makes sense to me. Another good CS feature is a jslint
validation. It produces valid JS out of a box.
Write less, Do more :)

---
Victor

On Mon, Nov 26, 2012 at 3:03 AM, Bernhard Posselt <nukeawhale at gmail.com>wrote:

> To clarify some things: I use it in the news app and im not planning on
> pushing anything coffeescript like into core.
>
> The selling points for me were:
>
> * I needed a buildscript to make sure that a certain js part was
> included before others (i use a cakefile for this)
> * I have 30 javascript files (coffee files atm) so listing all of them
> in my code before each controller method is not feasible, its also
> cumbersome to add new things
> * It shrinks down the lines of code from 2000 lines to 800
> * It provides nice patterns like easy inheritance which I need :) (class
> X extends Y is also easier to read than the whole prototype stuff to
> achieve the same things)
> * You can learn it fast, these are all features http://coffeescript.org/
>
> So basically the use is limited to the news app.
>
> On 11/26/2012 12:37 AM, Robin Appelman wrote:
> > On Sunday 25 November 2012 18:19:41 Alessandro Cosentino wrote:
> >> Hi,
> >>
> >> In the last month, Bernhard (Raydiation) has created a branch of the
> apps
> >> repository, which he has used as a laboratory for introducing new
> >> technologies in the News app. The name of the branch is news_angularjs
> and
> >> CoffeScript (CS) is one of the technologies that he has tried out.
> Before
> >> merging the branch to master, I want to discuss with the rest of the
> list
> >> the adoption of CS in ownCloud.
> >>
> >> CS (http://coffeescript.org) is an alternative syntax for javascript
> (js),
> >> which is becoming widely used. CS code is trans-compiled into
> javascript,
> >> so this doesn't add dependencies for ownCloud users. CS code is
> supposed to
> >> be more readable than js and the compiled code is supposed to run faster
> >> than hand-written js. Bernhard can tell you more about the success of
> his
> >> experiments with CS in the news_angularjs branch.
> >>
> >> I don't want the News app to be the only ownCloud app to use CS. Many oC
> >> developers might already be comfortable with CS. If this is not the
> case, I
> >> don't want the app to be hard to maintain in the future because of
> this. I
> >> believe that people are willing to learn new things only if it's worth
> it
> >> and I am afraid that if the News app is the only app to use some
> >> technologies, people will just decide to work on other apps.
> >>
> >> What do you think about using CoffeScript in ownCloud? In the Getting
> >> Started section (http://owncloud.org/dev/apps/getting-started/), I read
> >> that jquery and torch are the libraries that we use, but I don't see a
> >> general policy about using different js things.
> >>
> >> Alessandro (zimba12)
> > I don't think it's a good idea to mix CS (or any complile-to-js
> language) with
> > vanilla js. It splits the code base in 2 and makes it more difficult for
> some of
> > the people to work on some of the code
> >
> > (Personally I prefer TypeScript over CS but that's beside the point)
> >
> >  - Robin Appelman
> > _______________________________________________
> > Owncloud mailing list
> > Owncloud at kde.org
> > https://mail.kde.org/mailman/listinfo/owncloud
>
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20121126/d32845b9/attachment.html>


More information about the Owncloud mailing list