Shomeya

Two web artists. One amazing company.

Articles tagged: Drupal Planet

A cheat sheet for hook_entity_api()

from Michael Prasuhn on March 26, 2015 11:10am

Article_large_cheat-sheet-preview

The worst time to read software documentation is when you're trying to fix something that is broken and you have no idea why. I'd say it's like shopping when you're hungry, but it's actually the opposite. When stuff breaks for no apparent reason and you're on edge it's easy to notice every little issue with the docs, and you instantly form a very strong opinion on documentation.

The good news is that as a Drupal developer, you have tons of awesome documentation just a click away on api.drupal.org or drupal.org/documentation/develop and contributed module documentation is better than ever. Even though almost everything you could ever want to know about Drupal internals is available on api.drupal.org (even the source code!) sometimes you need to combine that with contributed docs, or dig in a little deeper.

That's exactly what I had to do while working on the first few chapters of Model Your Data with Drupal. Hooks like hook_entity_info() are well documented on api.drupal.org, but the Entity API module adds it's own options to the mix. Entity API has great docs on it's options as well, but there isn't a lot out there that thoroughly documents them together, or the interaction of their options.

Read more

All about that trace, 'bout that trace

from Michael Prasuhn on March 19, 2015 09:25am

Article_large_1di8senro6bk8c9xq5cw_italia_ferris

No one likes debugging code when it breaks and you can't figure out why it's broken. That piece of code might have been hard enough to write in the first place, or maybe it's a snippet that "should work" from a coworker, or maybe the documentation is missing, or maybe.... But what if you've checked, double and triple checked, and it's still not your code, it's something else in the system – code you're calling out to, or something that is calling your code – what do you do then?

Enter the backtrace, (also known as stack trace, or just trace). A powerful weapon in any software developers toolkit, it is more and more useful as the software you develop grows in complexity (Drupal 8 anyone?)

Read more

When Success Starts to Feel like Failure

from Sarah Prasuhn on March 2, 2015 01:55pm

Article_large_water

Last week was awesome, sort of. I hit all the numbers on my guide launch I was hoping for, and then promptly got the stomach flu. After two years (lots of running in circles) of working through this process of launching I did it!

Now it could have just been being sick, but I ended the launch wanting something more. And the reality is this isn't the first time I've been down after a success.

Does that ever happen to you? You get so excited about something and launch it? Then the next day you wonder if you could have done better, or you aren't sure where to go next. It's happened with our clients, we work so hard, we push the code, we launch on time, and then the question of "Now what?" lingers.

Read more

3 Pro-Theming Tips for Drupal 7

from Sarah Prasuhn on February 26, 2015 10:00am

Article_large_photo-1414490929659-9a12b7e31907

Most developers know how to do these, but a lot of people follow the temptation and skip them in the rush to go live.

These simple steps reassure future developers and clients that you know what you are doing, subsequently increasing your value with just a few minutes of work.

All which means you can charge more and book more clients, both of which lead to the ability to do more of the things you love that are just for fun!

Read more

The Incredible Power of Failure

from Sarah Prasuhn on February 20, 2015 02:30pm

Article_large_photo-1414438992182-69e404046f80

"I really thought it would look...different.." the client on the other end bemoans. "And users really seem confused by where we put the login..."

This was ALL per their request. The login, the layout, everything they HAD TO HAVE. You protested gently, but hey you have to eat and it's their funeral..er website.

But you knew that they didn't know what they were asking for, you knew people aren't born knowing what their website needs, and everyone tells them they have to be. Unfortunately User Interface decisions are not fake it until you make it for most people.

And when their website failed, you became the scapegoat..er code monkey. Because of the precious EXPENSIVE project hours they spent on making, and remaking, decisions that really bring very little value to anyone in the long haul.

Read more

Why you should ALWAYS have a troubleshooting guide

from Sarah Prasuhn on February 11, 2015 04:40pm

Article_large_img_6727

Your demo is in 4hrs. 4 hours! The issues you have left could take that much time, not even counting pushing the changes and hoping it doesn't break the dev site.

Oh, and did I mention...your design changes aren't showing up. So you can't fix anything right now. ANYTHING! You haven't changed an issue to DONE in over an hour.

You've tried everything.

Save. Reload. Save. RELOAD AGAIN. What could it be?

Read more

7 Things for Troubleshooting Drupal 7 Theming

from Sarah Prasuhn on January 28, 2015 11:05am

Article_large_irish-hands

When I worked in Reality TV Post Production I always had a troubleshooting guide. Most of the time I was working the night shift, and trust me no matter how many times you've done something sometimes your brain just breaks at 2am.

In case you haven't done this before a troubleshooting guide is basically just a list of the steps you take when things break, it helps you avoid that moment of exasperation 3 hours later when you realize how simple the solution really was.

Read more

Model Your Data with Drupal and Domain-driven Design

from Michael Prasuhn on January 20, 2015 09:00am

Article_large_photo-1415889678233-eb900aeee9e1

On of the things I've blogged about recently when talking about my upcoming book Model Your Data with Drupal is domain-driven design. While domain-driven design is important and something that I hope to touch on in the future, I've decided it's too much to cover in one book, and I'm refocusing Model Your Data with Drupal on basic object oriented principles.

If you want to know more about this decision and what will be covered in Model Your Data with Drupal, read on.

Read more

Subscribe via RSS