Hacker Newsnew | past | comments | ask | show | jobs | submit | lagartoflojo's commentslogin

Pro-tip: Use https://www.airbnb.com.au - the site will show the real final price, by Australian law.

What do you know, such issues can be resolved via proper regulation....

(Btw, you can also change the currency by clicking on the "world icon" at the top right).


I would love to read about how you handled the "modular code" problem. I'm using Backbone and I find that there are many questions that are left for the developers to answer. With no conventions, every app starts doing things their own way, so even if I know Backbone, it might still be hard to work on someone else's code. Questions are: Where do we fetch data, in the view or in the controller? Do we keep a central "repository" of data for the whole app to use, or each widget maintains its own data? On page (re)load, do we favor one large call to the API or many small ones? How do we structure code in the filesystem? How do we handle authorization (ex. hiding links or entire modules from certain users)?


Painful truth time: We haven't. :(

It's still ugly in there, and while we've been making pretty decent strides (heyo!), it's not where I'd like it yet. To answer some of your specific questions/comments though:

- We're fetching data in the views. We don't really use the Backbone router/controller concept that heavily.

- For data, we're exposing everything through a REST-like API exposed from our Rails app. It's not versioned yet, but we'll be versioning it in the future. Every Backbone model is responsible for just its own data - collections are responsible for any extra data that might not belong on a specific model. Things like client-calculated values, etc.

- On reload, since we're shoving it out from our Rails app, we're pre-seeding with some data, but then it fires off a bunch more requests. I don't feel super strongly that this is the right way, we'll probably experiment with other options soon.

- We've got views/ and models/, and the structure's pretty flat inside. It runs through the Rails pipeline to minify and make a single file, which as of now isn't CDN'ed.

- We're not incredibly worried about secrecy for things that aren't enabled and that users can't see, since our main value prop is still server-side and under our control. We've got a global User object that we're populating with flags for what they can & can't see, and their user limitations.

Hope this helped, or if not, at least gave you some stuff to think about. If you want to chat Backbone sometime, drop me a line!


Thanks for the feedback!

Up until recently, I was a one-man dev "team", so I didn't get a chance to discuss these topics while developing our app, and I just went with what seemed right. I'll be thinking about your ideas moving forward. I especially like the bit about the global User object with flags! (In hindsight, it seems almost obvious there should be one!)

This fact that every team ends up doing things their own way, and many times re-inventing the wheel, is the reason why architectures like Marionette and Aura have appeared. Also coming from Rails, I prefer using a framework that helps with these decisions up front, so I'm seriously considering moving to, for example, Ember.js (which was still called SproutCore 2 when I started developing...). Interesting times ahead though,.. with so much exploration going on in the Single Page App "arena", it's really hard to tell how things will end up!


I also use Fedora. Mint is an Ubuntu derivative, so basically any tutorial about Ubuntu will also work for Mint, which I think is a big plus.


There is LMDE too: Linux Mint Debian Edition, which is based on Debian testing (so it's a rolling release).


The "Top 5 desktop Linux distributions" chart (the first one) shows Ubuntu declining steadily from 2005 until now. There's no dramatic drop with the introduction of Unity in 11.04.

It DOES show Linux Mint becoming very strong in the past year all of a sudden, but, at least from that graph, it doesn't look like it was Ubuntu users who "flocked" to Mint.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: