Photographer.io is now open source
blog.photographer.io
blog.photographer.io
It should inspire me to polish up the test suite too; it's very lacking right now!
Was just going through the Gemfile, and I love how he broke out the gems in the various categories - from debugging, to databases, to search, to caching to everything else.
It just makes the code so much easier to read and understand.
As a result of this repo, I looked into Slim - but the official docs are awful, so I won't be adopting that any time soon.
But this app is very interesting to read through.
You can tell a lot of work was put into this.
I've only recently started organising my Gemfile like this as I was really struggling with redundant gems lying around. I'm glad you like it :D
So I guess my first question about Slim is how does it work?
For instance, I am trying to figure out how on your home page, you have the following copy:
Upload, organise, and share your photographs alongside others, like Robert May did with this superb image.
Where 'Robert May' and 'superb image' are dynamic links - that correspond to the image below it (although maybe you may want to change the copy to "the superb image below" or something of the sort, because it took me a while to realize that image showing on the page is the same image you were talking about and linked. I thought they were 2 different images).
So, I guess just to start off...where is the actual copy of "Upload, organise, and share your photographs...." actually stored. I don't see that copy in the .slim file at all. It seems to be abstracted to 'home.blurb' - https://github.com/afternoonrobot/photographer-io/blob/maste...
But I have no idea where that is.
Sorry if this changes the topic a bit, but I am curious.
I'm not sure my way's the best, but I'm passing two generated links into that t() call which are then interpolated into the string in the YAML file.
If you've not used I18n before then it can make the views really confusing to read through without the text to reference! :)
I haven't used it much...but that's an interesting take on it.
I've seen it used for date & time localization - not for such heavy copy usage like this.
Do you profile the site - with say Rack-Mini-Profiler to see what the performance hit of using I18n like that would be? I don't see it in the Gemfile, but maybe you are using something else to see what the hit of all those choices are on your performance?
It seems that it may be an extra tax - even though it is clever and I like it...just curious what the cost is...and would love to know other non-I18n ways to achieve that, with say ERB.
One benefit of using Slim here is that it's a bit faster than ERB/HAML (as you can see in my token biased benchmarks: https://speakerdeck.com/robotmay/a-simple-introduction-to-ef...) so it probably negates any extra time that might be added by using locales.
There's two main reasons I use locales so heavily:
1. I like my views to be small and largely free of logic
2. I'd like to translate the site into other languages, and using locales from the start makes it much simpler!
Have been urgently needing an alternate to Flickr/Picasaweb/500px lately and really haven't liked most the other options out there.
I've signed up for a proper play.
I'm always keen to hear any feedback you have, and obviously now you can also help contribute to making it the site you want too :D
What is the minimum to get this up and running locally for test/dev? I know this isn't exactly meant for ruby/rails newbies -- but according to a few searches, (and the readme) it looks like I need:
* postgresql 9+
* redis
* memcached
* solr (is it needed for test/dev?)
* ruby 2.0 and rails 4.0
It looks like a sane way to get a rails 4 dev environment for the local user (on a recent Debian system) is: \curl -L https://get.rvm.io | bash -s stable --rails
So, with the various servers installed, should the line above, paired with a checkout of the repo allow me to do: rails serve
And have a look at a local install of this thing?I've just pushed up what are hopefully some useful instructions on getting it running, so the README should now be a little more helpful: https://github.com/afternoonrobot/photographer-io#developmen...
It's not entirely straightforward to set up, and I must confess that it has been a while since I did it from scratch. Assuming you already have Ruby installed, then you would definitely need the following: PostgreSQL 9+ (probably 9.2+), Redis, Memcached. Solr probably won't break anything if it doesn't exist, except for the search.
If you have any trouble getting it going or need a hand, give me a shout on Twitter (@robotmay) and I'll open up an IRC channel to help you through it. I might need to do that anyway actually, as I suspect there'll be a few people with issues :D
Thanks!
Edit: One other thing - right now, invites get you more uploads. Depending on how heavy-handed you want to be about good contributions, it might help to require the invitee to upload at least one picture or recommend at least 3 pictures before the inviter gets their additional uploads. That might slow the growth too much though. It's definitely a balance.