Introducing the Behance API

On behalf of the Behance Team, I’m proud to announce the opening of our public API and developer site: http://be.net/dev. We’ve been internally using a private API for well over a year now, creating our own portfolio website builder, ProSite. With this second version, we’re making it public: the developer community can showcase Behance’s sorted, curated and appreciated work in their own experiences.

Read more →

Distributed Logging – Managing 7 Production Apps across 200+ Servers with Gearman

History

 

Be DLA - Log View

Behance Distributed Logging Application - Log View

What do you do when there is an error across 7 different web applications running in production and load balanced across roughly 200+ servers? Good luck logging into each and grepping some logs. No, crying won’t help; we tried that. Instead, why not build a tool to log all of those errors into a centralized location? After evaluating the many (fantastic) pre-built options like: Loggly, Splunk, even Syslog… we found none of them provided all the capabilities we wanted. The job to build our own solution was then tasked to Matt LeBrun and me, and here is our awesome journey.

Read more →

Compass and Slicy Will Make Your Sprites and Write Your CSS

Making sprites sucks. They’re incredibly useful for web development since they keep assets minimal and HTTP requests (and thus loading times) low, but they are a huge time sink: somebody has to Tetris together a bunch of tiny images into one file so that they fit in as little space as possible, then figure out all the dimensions and coordinates of every little icon, make up class names for every single one, then write a bunch of verbose CSS so you can actually use the individual icons in the sprite. What a pain.

I used to argue with our designers about who should build sprites. But even if I escaped the burden of creating one, writing the related CSS was painful too. Adding a new icon to a sprite was regularly a source of mental anguish. Our main sprites can easily have over 50 different images and icons in it — when you run a huge website like the Behance Network or a complex web application like Action Method, it’s not unusual to be dealing with that many different icons. So we changed our spriting process completely.

Read more →

Custom PHPUnit Annotations

Here’s a trick that I just implemented on our own testing framework to handle custom annotations. Annotations are comments written in a standard format that are used to declare properties for tests, such as dependencies and grouping. You can read more about the standard PHPUnit annotations here: http://www.phpunit.de/manual/current/en/appendixes.annotations.html

There are only a handful of annotations available natively to the PHPUnit framework. I’ve written some code that allows you to create additional rules you might need, and trigger them with your own custom annotations. You’ll need to instantiate a ReflectionMethod and then parse the doc block for the proper data.

In the sample code provided below, I look for the annotation “@browser” to determine what type of browser to launch (Firefox, Chrome, Internet Explorer, etc.) If the browser is not found, then setUp() does not launch a browser. I create a user through the web app using Selenium, and then test that user with curl requests against our API. The curl requests did not require a Selenium browser, which saved about 10 seconds of setup per test.

Read more →

Developer’s Toolkit: John Refano

This post is part of a series where Behance developers talk about the various tools they use to get things done and make ideas happen.

1. Who are you, and what do you do at Behance?

My name is John Refano.  I’m a professional contrarian, noise-maker, perfectionist and coffee drinker.  Oh yeah, and I’ve been known to make websites.  I was born in New York, but lived in Philadelphia for the majority of the past 10 years.  I currently live in Brooklyn, and wouldn’t want to live anywhere else.  I also have a degree in Design, strangely enough.

I am a developer at Behance where my focus and interest lies primarily on the front end.  I use Sass, Javascript (thank Resig for jQuery) and PHP to build pretty things (About BehanceAbout Prosite) and style up stuff you just might use every day on the Behance Network.  I built most of the 99% Conference site, and put in a teensy bit of work styling the new Action Method Online.  I also helped on a big restructure of the Sass on our Served sites and CCN‘s with the rest of our awesome front end team (JFTW… our names all start with the letter J), finding ways to make things more efficient in terms of customization and reusability. I try to add cool stuff to our private little Sass framework when I can.  I guess in some capacity, I touch the part you see of everything we build here.

Read more →

Testers Wanted, Experience Required

Testing is in a strange state right now. Both large corporations and small start-ups absolutely require testers. The problem is what kind of tester.

If you fall into the trap of thinking that anybody can be a tester, you’ll see the impact in your choices. Similar outcomes would occur if you had the same thoughts about developers. You wouldn’t hire a developer without any experience, why would you do the same for a tester? (The exception to the rule are fresh upstarts who are looking to get their feet wet in the programming world.) Testing is not trivial and should not be treated as such. In this day and age, testers need to know how to program.

Read more →

JenkinsConf NYC 2012

I spent time yesterday with Kohsuke Kawaguchi (@kohsukekawa) and many other Jenkins CI enthusiasts in NYC, discussing the state of Jenkins and observing how different teams are utilizing the tool. For those not in the know, Jenkins is a continuous integration software that allows you to handle build deployments and run tests against them. Seeing the other dev shops and the way they use Jenkins to the extent they do, it really still blows my mind. It almost feels like magic. I wanted to share a few gems of knowledge that I gleaned throughout the day.

Read more →

On-Site FTW!!!1!

Among IT professionals and software developers, the debate over the merits of working on site has raged since the dawn of time. The Behance team has always advocated that being on site is the best way to build up a finely tuned team. Building great products requires constant collaboration, balancing of opinions, and being able to work with the girl with the right set of skills to solve your problem.

Read more →

SEO: There Are No Tricks

I lost count of how many times I’ve been followed by an SEO/SEM expert, consultant, or programmer on Twitter. All these people claiming to be experts on something anyone can learn to do from a single-page leaflet. Because really, if everyone is claiming to be an expert in something, are there any experts at all?

If I had just one piece of SEO advice to give, it would be to stop paying for SEO advice. You can find it ALL online! Here are probably the most common ones you will read about:

  • Domain Name
    If you own “foobar.com” you can make a great bet you’ll be on the first page when someone searches “foobar”
  • URL Structure
    If you’re not lucky enough to own “foobar.com”, or any variation thereof, make sure your URLs segments can throw it in. “somethingelse.com/foobar” is better than nothing. Search “Typography” in Google and take a look.
  • Title
    In today’s multi-tabbed browsers it becomes harder and harder for users to read your full title. Search engines don’t have that problem so don’t forget to make each page title relevant to that page.
  • META tags
    Your description and keywords should be as relevant and unique as possible on each page. Yes I know Google doesn’t care about keywords anymore, but there are still other search engines.
  • Linkbacks
    Having other sites link to your site is key. If you want people finding you for “foobar” you want people linking to you with “foobar” being the text. Even if people link back with different text, it will at least increase your PageRank.

Read more →

Testing Simplified: Page Objects

Testing is hard. Maintaining tests is even harder.

When we first started using Selenium WebDriver, writing a test meant creating a one-off function that performed the given task, but duplicated a bunch of code, and used hard-coded elements if any HTML/CSS got involved. Trying to get coverage on something as large as the Behance Network (be.net) became bloated and unmaintainable.

Without an easy way to create and improve tests as features changed, QA + testing became the last priority in development.

Read more →