Weblogs

By Gregory Gerhardt 30th Juli 2012 Drupal, Events, Team

3 more weeks and the Amazee dozen will dislocate to the yearly European Drupal Conference, which is taking place in Munich. For the first time, it's all of us, and believe it or not, even le Chef will make it for the first time! Yes, I'm excited, like a boy scout waiting for summer camp.

(Team waiting for Drupalcon)

Excited because it's the get-together of one of the biggest, most successful and fun communities to meet up with. - And we've got some missions planned. Firstly, we (proud Gold Sponsors) are going to have an extraordinary simplistic stand with 100 legendary give-aways. If you're a Drupalista you will fight for them. Secondly, we've all got our sessions noted and are ready to learn and contribute with our Drupal fellows. Thirdly, we're eager to meet the exceptional performers and inspiring geeks of the Drupal community. To network, and who knows - join forces at Amazee Labs? Three, two, one, go!

Dear reader, before the Essence of a web week series will take a fortnight's summer break, - here is this week's selection. Enjoy!

Food for thought

App Cubby: The Sparrow Problem
David Barnard tries to shed some light into the current state of app development and coining the term the "Sparrow Problem" in the process.

Forbes: Can You Judge A Company By Its Homepage?
To keep an open mind the idiom "Don't judge a book by its cover" is certainly a great reminder but does this also apply for websites? This article takes a look at popular news sites and how their company's mission statements are reflected on their homepage.

Drupal

Drupalize.Me: New series: Display Suite for Drupal 7
One module we love to bits when developing a new site is Display Suite. If you want to control the fields of your entities in a reusable way this module is an absolute must have! Over on Drupalize.me they are starting a new video tutorial series on this module and if you don't use it yet - take the time a dive in to this amazing Drupal resource. 

Olympic Games

Guardian: Could you be a medallist?
With the Olympic games starting today so some content following that theme seems appropriate. The British newspaper the Guardian has created a nice way to get an understanding what it takes to win a gold medal at the games.

Little Helper

Ligature Symbols
Kyoto based web designer Kazuyuki Motoyama has created a neat symbol web font which might be handy if you need common web symbols as a character someday.

By Boris Baldinger 23rd Juli 2012 Drupal

This is the third and final part of my Sublime Text 2 (ST2) blog series. After giving an introduction and looking installation and configura- tion of ST2, I will talk about the key bindings and snippets.

Key Bindings

One of the biggest advantages of ST2 is that you have full control over most of its settings. It is really easy to configure ST2 to your personal needs.

Preferences

As you can see, there are two major parts of the settings. The first being the general configuration and the second one for the key bindings. This is the feature you should be really excited about. Imagine you can configure a text-editor exactly to your needs. ST2 let your dreams come true. To start, just open the "Key Bindings - Default" settings. There you can see all the predefined key bindings like:

{ "keys": ["super+c"], "command": "copy" },
{ "keys": ["super+k", "super+b"], "command": "toggle_side_bar" },

These are simple definitions of key bindings. As you can see it contains a key-definition and a command (here you can find a full list of available commands). You also can chain key strokes to start an action. But this isn't where the customization ends. There are more complex key bindings, where you can pass arguments and contexts like:

{ "keys": ["shift+enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
        [
                { "key": "setting.auto_indent", "operator": "equal", "operand": true },
                { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
                { "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
                { "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
        ]
}

If you want to create new key bindings or overwrite existing ones just open the "Key Bindings - User" file and create your own bindings there. After saving the new bindings will be active.

For a detailed documentation of customizing your key bindings please visit the unofficial documentation of ST2. There is a part for the customization and a reference for the more complex configs.

The last item I have left to share on this matter is a free tool availabled for Mac users called Cheat Sheet (AppStore Link). Once installed, it shows you all available key bindings for your currently active application.

My most used keyboard commands

Keyboard Command Description
CMD + SHIFT + P Open the command palette
CMD + P
CMD + T
Goto anything...

CMD + R
CMD + P followed by @

Goto symbol... (in php goto function)
CTRL + G
CMD + P followed by :
Goto line...
ALT + . Reveal actual file in sidebar
CMD + SHIFT + F Find in files...
CMD + F Find in actual file...

Snippets (for Drupal)

Another great feature of ST2 are the snippets. Snippets are intelligent templates that will convert some short codes into a predefined text block with placeholders. 

To create a snippet, simply go to Tools -> New Snippet... you will get a some lines of code which you can adapt easily. Let's say you write PHP code and you need a lot of functions. You can create a snippet for exactly this purpose

<snippet>
  <content><![CDATA[
// ${1: description}
// ${2: variable}
function ${3:functionname}() {
  // ${4:some comment}
}
]]></content>
  <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
  <tabTrigger>fct</tabTrigger>

  <!-- Optional: Set a scope to limit where the snippet will trigger -->
  <scope>source.php</scope>
</snippet>
In this snippet you have to write "fct" and hit the "tab" key on your keyboard. ST2 will fill in the content-part of your snippet. While you are "tabbing through" all the defined placeholders, ST2 will automatically create the selection, so that you can overwrite them.
And also this snippet is only available if the source syntax is PHP. Snippets can be saved under any package folder. The extension for a ST2 snippet will be ".sublime-snippet".

Full credit to Márton Juhász who has done some great work for the Drupal community. He created a package for ST2 which contains a lot of nice snippets for the use with Drupal.
You can install it by pressing "cmd+shift+p" type "install" and search for "Drupal Snippets". Hit the "return" key and you're all set up.

But there is one problem... you don't know all the tab triggers of these Drupal snippets yet. I can help you with that: Just hit "cmd+shif+p" and type "sn hoo" or "sn h_" and you will get a list with all available tab triggers for the Drupal snippets. It's that easy.

There is a more in depth documentation of snippets available.

Conclusion

As you can see, there is a lot of community love around ST2. And if you take your time, you will love all the features and configuration possibilities. I am still getting used to the editor, but my addiction to this piece of software is growing from day to day.

During silly season an announcement like Marissa Meyer's appointment as the new CEO of Yahoo! certainly gets more attention than it would during the rest of the year. Anyway here are this week's five items that made us take note. Inevitability one of them is related to just that story.

Drupal

OSTraining: What You Need to Know About Drupal 8
Steve Burge has taken time to compile an one-stop overview where the development of Drupal 8 stands at the moment.

Druplical
If the appearance of the Events, Meetups, Camps & Training page on Drupal Groups isn't to your liking then this site might be for you.

Mobile First

.net magazine: Luke Wroblewski on mobile first
Since the subjects mobile first and Responsive web design, ideally, go hand in hand. This article provides some good insight and a reminder on both subjects.

Technology

Dear Marissa Mayer & Dear Internet
The announcement that Marissa Mayer was appointed as the new CEO of Yahoo! lead the internet community to this plead. Yahoo's reaction clearly gives the impression that the patient got the message regarding its photo service.

Food for thought

Mashable: Google Maps: Tree Density Tells the Story of Income Inequality
We bet you never looked at a satellite view on Google Maps with this in mind and that this fact will stick in the back of your head every time you use the service in the future.

By Daniel Truninger 16th Juli 2012 Business, Drupal

If you need help with your Drupal project get in touch with us.

Inspired by our lastest Amazee Labs t-shirt colour variant.

This week's Essence of a web week features a great variety of subjects. A Ted talk, an inspired "don't-limit-Drupal-to-a-CMS" blog post and a great service, if you are considering using a QR code, managed to cut through the noise of the internet. Enjoy!

Food for thought

TED: Don Tapscott: Four principles for the open world

Author Don Tapscott talks about how collaboration, transparency, sharing & empowerment are the four corner stones an open world is built on.
Spoiler alert: This astonishing video of starlings murmurating can be seen at the end of the talk. Breathtaking.

Drupal

Palantir: Drupal is not a CMS
Larry Garfield, Palantir’s Senior Architect and Consultant, makes a point that Drupal shouldn't be considered as a Content Management System but as a Content Management Framework with which you can build the former.

Little Helper

Qrafti
Looking to implement a QR code in your next campaign? We can highly recommend Qrafti. This service will set you up to communicate with your customers in the most efficient way.

Events

Frontend Conference 2012
The second installment of the Frontend Conference Zurich will take place on the 6th & 7th September 2012. The first speakers have been announced and if you want to secure one of the early bird tickets you should hurry up.

Technology

Webmonkey: Firefox Developer: ‘Everybody Hates Firefox Updates’
Clearly the proverb "A fault confessed is half redressed." sums this story up nicely.

By Daniel Truninger 11th Juli 2012 Team

Making our Texan team members Kathryn and Andrew participate in a Skype call at 3 am (CST) and opening a bottle of bubbly in the process isn't something we normally do. On red-letter days we make an exception. Here is our explanation why today was one:

Imagine being told by your partner that your work has been featured on a web site and you wanted her to take a look. That is exactly what Andrew made Kathryn do earlier today.

Until now it might sound like nothing extraordinary but if you suddenly see a wedding proposal featuring your name you could get an idea that something might be going on.

And when clicking on the link leads to this website you will understand that this "take a look" request breaks the pattern of the looks you took before.

Followed by a proposal in the traditional way we are happy to clarify that Kathryn said YES!

Our wholehearted congratulations to the team's favourite American couple. We are absolutely chuffed for you guys.

But on a more serious note: Andrew you could have waited for DrupalCon Munich. What would have been more romantic than a Drupal themed proposal?
Just kidding!

Time flies and you and us are heading for Christmas. Five items that got our attention this week. Enjoy.

Little Helper

mir.aculo.us: How to retinafy your website
Uncertain what retina means for the different types of content on your site? This flowchart might be a good starting point to get idea what you have to consider.

Drupal

Drupal.org: DrupalCon Munich Session Schedule Announced!
If you are going to the Bavarian capital for this year's European DupalCon you can start planning the sessions you want to attend.

Switzerland

SWISS Blog: Anytime – SWISS on Facebook and Twitter (24/7)
Despite Switzerland being named one of the most innovative countries of the world some changes take a while until they are embraced by the general public. This weeks announcement that our national airline SWISS will provide a 24/7 support service via its social media channels. This is a safe indication that Twitter and Facebook are probably more than a fad in the eye of their executives.

Technology

The Evolution of the Web
Have you got some time to kill? Then kill by visiting this great site.

Twitter Developers: Delivering a consistent Twitter experience
Mastering the user experience of a product in all aspects is something that Apple has championed for years. Now Twitter wants to expand its control of their users experience. The third-party application community isn't amused.

By Boris Baldinger 6th Juli 2012 Drupal

Welcome to the second part of my blog post series about Sublime Text 2.

In this post will explain how to configure Sublime Text for the needs of a Drupal developer.

Installation

It is very simple to install Sublime Text 2 (ST2). Just go to the Sublime Text Website, download the editor and install it like you'll do it with every other program.

Configuration

Now we are talking about the really exciting things in ST2. As mentioned in the previous blog post, out of the box the editor comes with some neat features like:

  • A small map on the right side, like a thumbnail of the code
  • A distraction free mode
  • Go-To anything
  • Split panels

But ST2's real powers are unleashed through its plugin architecture. There are tons of high quality plugins and packages already available out there.

As a Drupal developer RJ. Pittman's (phase:II) script provides an automatic and hassle free setup for your developing needs. This means running the script won't require any other further configurations but for a better understanding I recommend reading my entire post.

At this point I also want to mention his blog post about this sophisticated editor.

Configuring the text editor

To meet the requirements of Drupal coding standards, we need to configure the text formatting (Please note that my shortcuts are refer to Mac OS X). To do so go to Sublime Text 2 - Preferences - Settings User ( cmd + ) and add the lines below.

{
  "rulers": [80],
  "tab_size": 2,
  "translate_tabs_to_spaces": true,
  "use_tab_stops": true,
  "trim_automatic_white_space": true,
  "trim_trailing_white_space_on_save": true,
  "ensure_newline_at_eof_on_save": true,
  "fallback_encoding": "UTF-8",
  "default_line_ending": "unix",
  "shift_tab_unindent": true,
  "word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?"
}

Save the file and restart ST2. (Source: Drupal.org)

Installing Package Control

Will Bond has created the very easy to install Package Control for ST2.

Start ST2 and go to View - Show console in the menubar (ctrl+`).

Copy and paste this command and hit the return key on your keyboard.

import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'

If everything worked out, and you restarted your ST2, you should be able to use the package control to install new and awesome plugins for your editor.

Press command+shift+p on your keyboard to open the command palette and type install​ followed by the return key.

Now you can search all available packages/plugins just by start typing.

Type git and you'll get a list with all packages related to Git.

Select the package you want to install, in our case just Git and hit the return key.

The plugin is now being installed for you. In this case please note that you need to have Git installed locally in order for the plugin to work.

After the installation is finished you can open the command palette by pressing cmd + shift + p and type git for a list of all available commands.

It is also possible to just type pull, push or quick in the command palette to find the command you are searching for.

In my case I had troubles to get the plugin to work. Following error message appeared.

I had to adapt the git_command configuration in the Git.sublime-settings file.

Go to Sublime Text 2 - Preferences - Browse Packages in the menubar. Search for the Git folder and open the Git.sublime.settings file by double-clicking it.

Change the git_command value from true to the path your git executable is located.

If you don't know where your git executable is stored, just open a console and type which git and you'll get the answer. In my case it was /usr/local/git/bin.

Proposed packages to install

In the short time I have been using Sublime Text 2 I the following packages have proven their use to me. You can find the list in our Wiki.

The installation of these packages works in the same way as in my example of the Git package.

Conclusion

As you can see, Sublime Text 2 is not a fully featured editor from the beginning. But the power behind the scenes is tremendous and only limited by the imagination of the plugin-developers. I will keep my eyes open for new plugins that are useful together with Drupal development. If you know about a must-have plugin that I missed, let me know and I will check it out.

In the next part of this blog series about Sublime Text 2 I will write about the very useful keyboard commands.

By Boris Baldinger 3rd Juli 2012 Drupal

This post is the first in a series about the cunning text editor Sublime Text which was recently released in Version 2.

At one point every software developer has to answer the question:
"Which development environment software will I use to write my code?"

As a former Java developer I was used to Eclipse or Eclipse derivatives. As a newbie in the Drupal world I had the chance to go for a fully new take. Tools that I assessed:

Most colleagues advised me to use Sublime Text 2. However, I started to use Netbeans because of two reasons.

  • It is free
  • It is the closest to what I know so far

Now guess what, Sublime Text 2 kept crossing my way, almost everyday, in a very positive way. So I decided to give it a chance and make it my text editor of choice.

In the next part of this series I will explain how to install and configure Sublime Text 2 for the best use with Drupal.

Statements from Sublime Text Users

Karin Christen, Interaction Designer Mobile at 20 Minuten Online
Distraction Free Mode, Goto Anything, Multiple Selections, Customize Anything And in short: "It's nerdy but user friendly enough for me as a visual affine coding person"

Michael Schmid, Head Technology at Amazee Labs
Textmate had no updates, extreme speed (searching in a lot of files), that's why I switched. I stayed because of: speed, extensibility, lightness

Seiten

Amazee Labs Blog abonnieren

Neue Kommentare

  • Bild des Benutzers Daniel

    By the way, by "no documentation" I´m referring to Views Autorefresh. It is either not complete or conflicting.

    Daniel
  • Bild des Benutzers Daniel

    Thanks for this info, but can't get it working with Statuses view. There is just about no documentation or it's conflicting, even from module maintainer (on Drupal vs. Blog). I'm using the default Statuses block, which only autorefreshes the current user's status updates, does not autorefresh friends' status updates (that is how it normally works). So I added Views Autorefresh. I have tried using the maintainer's instructions, but don't get a Secondary Display on the original view unless I have a Page display within that same view. Have you tried with Statuses? Just to confirm your steps:
    1. First, I clone the original view and ADD a Contextual filter. In mine it is Statuses Comments: Created time (with operator).
    2. ADD to the cloned view the Global: Text Area, PHP. Nothing else in the Header. Have also tried it with a simple Global: Autorefresh.
    2. In the ORIGINAL view, I ADD the same Global: Text Area, PHP code. Nothing else in the Header or contextual filters?

    I've tried just about every variation and nothing works. Can you offer any advice?
    Thanks
    Daniel

    Daniel
  • Bild des Benutzers katalog

    Excellent way of explaining, and pleasant post
    to obtain data on the topic of my presentation topic, which i am going to deliver
    in college.

    katalog