<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>XING Devblog</title>
	
	<link>http://devblog.xing.com</link>
	<description>Programming tidbits and other insights from the developers at XING.com</description>
	<lastBuildDate>Mon, 14 May 2012 16:25:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/XingDevblog" /><feedburner:info uri="xingdevblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>How to choose the right mobile test devices</title>
		<link>http://feedproxy.google.com/~r/XingDevblog/~3/PYHpo8pQF1Y/</link>
		<comments>http://devblog.xing.com/qa/how-to-choose-the-right-mobile-test-devices/#comments</comments>
		<pubDate>Mon, 14 May 2012 15:22:13 +0000</pubDate>
		<dc:creator>Daniel Knott</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[QA]]></category>

		<guid isPermaLink="false">http://devblog.xing.com/?p=1869</guid>
		<description><![CDATA[In addition to all our mobile test automation, we also do a lot of manual and exploratory testing within our mobile team. We test devices with different hard- and software, with different browser versions, and on different carrier networks to be sure that our apps work in the way our customers will use it. Figure [...]]]></description>
			<content:encoded><![CDATA[<p>In addition to all our mobile test automation, we also do a lot of manual and exploratory testing within our mobile team. We test devices with different hard- and software, with different browser versions, and on different carrier networks to be sure that our apps work in the way our customers will use it.</p>
<p><span id="more-1869"></span>Figure 1 illustrates some of our test devices during testing on all mobile platforms. Due to the fact that the mobile market is growing, the key question for a mobile Quality Assurance person is:</p>
<p><em>Which devices are right for testing? It’s simply not possible to do testing on every device!</em></p>
<div class="img-left"><img src="http://devblog.xing.com/wp-content/uploads/mixed-300x202.jpg" alt="Figure 1: Our mobile Apps on different platforms" width="300" height="202" /><br />
Figure 1: Our mobile Apps on different platforms</div>
<h2>Fragmentation only on Android?</h2>
<p>I bet every time people hear the word mobile fragmentation, they always think this only happens in the Android world! Yes, the Android world has a really big challenge due to fragmentation of different vendors with different hardware and software installations as well as customized user interfaces. However, if you look at iOS there is some fragmentation as well. Sure, you have just one vendor, but also different software versions and devices. The range of touch devices starts with the iPod touch, the iPhone classic, the iPhone 3G/ 3GS/ 4/ 4S, the iPad/ iPad2 and the new iPad. All of the devices also have differing hardware specifications and can run different iOS versions. So as you can see, the fragmentation issue also exists in the Apple iOS world.</p>
<p>If you think about mobile websites there is another challenge that can be really painful: the various mobile browsers!</p>
<p>There are browsers likes Safari on iOS, Opera Mini for iOS and Android, Dolphin Browser for iOS and Android, the native Android browsers, Google Chrome for Android, Firefox for Android, IE 9 mobile browser on Windows Phones, the BlackBerry browsers and some other feature phone browsers.</p>
<p>So what is the right choice for testing? Just use the latest devices and browser versions? Buy every device on the market?</p>
<p>No, this can&#8217;t be the solution because not every user will upgrade their device or software every time a new version is available. The “typical” user normally buys a mobile device with a 2-year contract and will stay with that smartphone for at least that period of time.</p>
<p>So the best way to choose the right devices, operating systems and browser version is to know your customers! If you know which devices and software versions they use, you can downsize the development and testing effort required on mobile devices. Otherwise it’s very hard (impossible, actually) to test your apps on nearly every device on the market! Sure you can use external testing services like <a title="http://www.utest.com" href="http://www.utest.com" target="_blank">utest</a> or <a title="http://www.apkudo.com" href="http://www.apkudo.com" target="_blank">apkudo</a>, but maybe you’ll end up spending a lot of money to test devices your customers don&#8217;t use!</p>
<h2>User statistics – You’d better know your mobile users</h2>
<p>We at the XING mobile team know which devices and software version our users have. A good starting point when it comes to getting information about your customers is the app store of the specific vendor (Apple App Store, Google Play Store, Windows Marketplace).</p>
<p>If you already have an app in one of the stores, you will receive information about the devices, software versions, languages and carriers used by your customers. As an example, see Figure 2 below from the Google Play Store which shows statistics from our XING Android App.</p>
<div class="img-left"><img src="http://devblog.xing.com/wp-content/uploads/google-play-screenshot-300x144.png" alt="Figure 2: Statistics from Google Play" width="300" height="144" /><br />
Figure 2: Statistics from Google Play</div>
<p>For mobile web pages there is no app store to provide user data. Besides the market statistics, we also have information about the ‘user_agents’ (devices, browsers) used within the mobile website. With this data from the apps and the mobile web app we’re now able to setup a mobile test infrastructure for developing and testing purposes.</p>
<h2>Test devices</h2>
<p>We split our test devices running Android, iPhone and touch.xing.com into three different groups. Group 1 represents older phones with a less powerful CPU, memory (RAM), and a low screen resolution. The fact that we only have a few users with that kind of device group 1 is a low priority: C. Group 2 covers average devices with a good single-core CPU (1 GHz) and with memory of around 512MB. These devices mostly have a screen resolution of 480&#215;800 pixels (HDPI). This group is graded with medium priority: B. The third group represents high-end devices with at least a dual-core CPU and memory &gt;512MB. Most of these devices have also a big screen with a really good screen resolution (XHDPI). This group has the highest priority: A.</p>
<p>Besides the hardware specifications the groups also cover the software versions (operating systems, browser versions).</p>
<p><em>Overview of the group categories:</em></p>
<ul>
<li><strong>Group 1, priority C:</strong> Small devices with less CPU, RAM and low resolution. Older software versions</li>
<li><strong>Group 2, priority B:</strong> Mid-range devices with avg. CPU, RAM, good screen size and resolution. The software is not the latest.</li>
<li><strong>Group 3, priority A:</strong> High-end devices with a dual-core CPU, RAM (&gt;512MB) and a high screen resolution. Latest software versions.</li>
</ul>
<p>These three groups cover most of our users and represent other phones on the market that fit into the same group.</p>
<h3>Android</h3>
<p>For the 1st group running Android we found out that the HTC Legend with Android 2.2 fits into this category. It only has a small CPU (600MHz), just 384MB of memory, a small screen and low screen resolution (MDPI). The HTC Legend runs Android 2.2 which is the lowest Android version we support.</p>
<p><em>For the 2nd group we chose: </em></p>
<ul>
<li>HTC Desire with Android 2.2</li>
<li>Samsung Galaxy S with Android 2.3</li>
<li>Sony Ericsson Arc with Android 2.3</li>
</ul>
<p><em>For the 3rd group we chose:</em></p>
<ul>
<li>Samsung Google Nexus with Android 4.0.4</li>
<li>HTC Sensation with Android 4.0.3</li>
<li>Samsung Galaxy S2 with Android 2.3.4</li>
<li>Motorola Razr Droid with Android 2.3.5</li>
<li>Samsung Galaxy Note with Android 2.3.6</li>
<li>LG P990 with Android 2.2</li>
</ul>
<div class="img-left"><img src="http://devblog.xing.com/wp-content/uploads/android-300x185.jpg" alt="Figure 3: Some of our Android test devices" width="300" height="185" /><br />
Figure 3: Some of our Android test devices</div>
<h3>iPhone</h3>
<p>We also performed the same grouping for iPhone devices and came up with the following three groups:</p>
<p><em>Group 1, slow iPhones with iOS versions from 4.0:</em></p>
<ul>
<li>iPhone 3G iOS 4.0</li>
<li>iPhone 3G iOS 4.2.1</li>
</ul>
<p><em>Group 2, iPhone 3GS with different iOS versions:</em></p>
<ul>
<li>iPhone 3GS iOS 4.3</li>
<li>iPhone 3GS iOS 5.0</li>
</ul>
<p><em>Group 3, latest iPhones with different iOS versions:</em></p>
<ul>
<li>iPhone 4 iOS 4.3</li>
<li>iPhone 4 iOS 5.0.1</li>
<li>iPhone 4 iOS 5.1</li>
<li>iPhone 4S iOS 5.0.1</li>
<li>iPhone 4S iOS 5.1</li>
</ul>
<div class="img-left"><img src="http://devblog.xing.com/wp-content/uploads/iphone-300x281.jpg" alt="Figure 4: Some iPhone test devices" width="300" height="281" /><br />
Figure 4: Some iPhone test devices</div>
<p>We have around 10 devices we use for manual and automated testing of the native iPhone and Android apps. Each new feature we develop is tested with at least one device from group 1 with priority C. When it comes to groups 2 (B) and 3 (A), we used a lot more devices for testing. For manual testing we avoid using mobile simulators in order to have a real testing environment.</p>
<h3>touch.xing.com</h3>
<p>Based on the data we know from touch.xing.com, we also have three groups of web browsers that should be used for testing on real devices. Most of our touch.xing.com users are iPhone users, while the second most-used platform is Android.<br />
With that knowledge we created the following groups for mobile browsers:</p>
<p><em>Group 1, non-iPhone and Android Devices:</em></p>
<ul>
<li>BlackBerry Bold with Native Browser (Webkit)</li>
<li>Nokia N8 with Native Browser (Webkit)</li>
</ul>
<p><em>Group 2, a mixture of iPhone and Android Devices with different browsers:</em></p>
<ul>
<li>iPhone 3GS with Safari (Webkit)</li>
<li>Samsung Galaxy S with Native Browser (Webkit)</li>
<li>HTC HD with Dolphin Browser (Webkit)</li>
</ul>
<p><em>Group 3, latest iPhone and Android devices with latest browser versions:</em></p>
<ul>
<li>iPhone 4S with Safari (Webkit)</li>
<li>iPhone 4S with Dolphin Browser (Webkit)</li>
<li>iPhone 4 with Safari (Webkit)</li>
<li>Samsung Galaxy S2 with Native Browser (Webkit)</li>
<li>Samsung Galaxy Nexus with Google Chrome (Webkit)</li>
<li>HTC Sensation with Firefox (Gecko)</li>
</ul>
<div class="img-left"><img src="http://devblog.xing.com/wp-content/uploads/touch-300x187.jpg" alt="Figure 5: touch.xing.com on different devices." width="300" height="187" /><br />
Figure 5: touch.xing.com on different devices</div>
<p>By creating priority groups for our test devices and browsers, we have managed to downsize the effort required during developing and testing to make our daily work more efficient. All of the groups are updated from time to time with new devices, software and browser versions.</p>
<p>An overview of our mobile apps can be found <a title="https://www.xing.com/mobile" href="https://www.xing.com/mobile" target="_blank">here</a>.</p>
<p>If you want more information about our mobile test automation please read the following blog posts.</p>
<ul>
<li><a title="http://devblog.xing.com/qa/robotium-atxing/" href="http://devblog.xing.com/qa/robotium-atxing/" target="_blank">Robotium @ XING. Automated regression tests on mobile Android devices</a></li>
<li><a title="http://devblog.xing.com/qa/keep-it-functional-iphone-test-automation/" href="http://devblog.xing.com/qa/keep-it-functional-iphone-test-automation/" target="_blank">Keep It Functional – iPhone Test Automation</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/XingDevblog/~4/PYHpo8pQF1Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://devblog.xing.com/qa/how-to-choose-the-right-mobile-test-devices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://devblog.xing.com/qa/how-to-choose-the-right-mobile-test-devices/</feedburner:origLink></item>
		<item>
		<title>Switch from Prototype to jQuery – from scratch?</title>
		<link>http://feedproxy.google.com/~r/XingDevblog/~3/qtwz4AXvTn8/</link>
		<comments>http://devblog.xing.com/frontend/switch-a-library-from-scratch/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 11:11:37 +0000</pubDate>
		<dc:creator>tobias.krogh</dc:creator>
				<category><![CDATA[Frontend]]></category>

		<guid isPermaLink="false">http://devblog.xing.com/?p=1852</guid>
		<description><![CDATA[XING used to use the famous but outdated JavaScript library Prototype, but in June 2011 we decided that it was time to change to jQuery because of its faster development, larger community and support. We weren’t able to start right away as a number of things needed to be prepared and resources freed. The starting [...]]]></description>
			<content:encoded><![CDATA[<p>XING used to use the famous but outdated JavaScript library Prototype, but in June 2011 we decided that it was time to change to jQuery because of its faster development, larger community and support. We weren’t able to start right away as a number of things needed to be prepared and resources freed. The starting shot was fired in November 2011 and the grand finale took place at the end of February 2012.</p>
<h3>How it happened</h3>
<p>So how do we migrate an entire platform without any trouble? We thought about running both libraries in parallel or maybe moving everything over at once. In the end we chose the second option in order to avoid an increase in asset file size and retain good testability.</p>
<h3>The migration</h3>
<p>Since we have &gt; 2,500 unit tests we were able to port many core components to jQuery code without running into any problems. After the basic re-usable modules had been changed we worked on the section-specific code. All this happened alongside our normal work, meaning that we had to account for bug fixes and upcoming features as well.</p>
<p><span id="more-1852"></span>During the process of code adjustment we removed the Scriptaculous effect library and changed to jQuery animate calls. But this also led to a need for a drag-and-drop solution so we built our own lightweight solution. This is only an example as we encountered many more stumbling blocks along the way.</p>
<p>Luckily we were able to get rid of many browser-specific fixes that had already been implemented within the new library.</p>
<h3>The devil is in the detail</h3>
<p>As you can imagine, things often occurred that we hadn’t thought about in advance. One thing I’d like to mention in particular was where Prototype performed AJAX requests inside of a try catch statement. There we had a bug that no one had noticed for a long time, but fortunately it had no impact on functionality. After first performing integrational tests based on jQuery code we thought the problem was related to changed code so we looked at the JavaScript code for the responsible module. It took some time until we realized it was just a missing property in the JSON response.</p>
<h3>The home stretch</h3>
<p>A library replacement requires a lot of testing. Three test sessions with the whole QA department had been planned. After each session there was a time when the developers worked on the archived bugs and closely communicated the work state and updated code states for re-tests to the QA employees.</p>
<h3>50/50 opportunity</h3>
<p>The release date was set for February 29th (yep, 2012 is a leap year). A special plan was made to release the new code in an encapsulated environment. The actual code merge and upload went pretty smoothly and, after some further checks, the changes made over more than four months went live. I can tell you that it was a great feeling and, surprisingly, I slept very well that night. ;)</p>
<h3>What happened afterwards</h3>
<p>Of course not everything went to plan so we spent the next few weeks investigating the bug reports. I expected more to be honestly. :) But seriously, no major bug took more than a working day to fix.</p>
<h3>Answering the main question &#8220;from scratch?&#8221;</h3>
<p>No. The modules already had their own functionality. But in any case, some of the features may not exist anymore or have been solved some other way. Sometimes I felt more like a detective than a frontend developer.</p>
<h2>Conclusions</h2>
<ol>
<li>If you have modularized code and unit tests you can do a lot of work in advance but there is nothing comparable to a real manual test using different browsers</li>
<li>Pending developments need to be considered at an early stage so as not to be surprised by a 5,000-line project coming &#8220;out of nowhere&#8221;. A version control system like Git helped a lot with this</li>
<li>Testing cannot be done by a single person</li>
<li>Communication is imperative, e.g. with QA when performing tests and bug fixes, and with Product for freeing up resources and planning support and re-tests, and of course between all of the developers involved in the process</li>
<li>Patience and calmness shall be with you</li>
</ol>
<img src="http://feeds.feedburner.com/~r/XingDevblog/~4/qtwz4AXvTn8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://devblog.xing.com/frontend/switch-a-library-from-scratch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://devblog.xing.com/frontend/switch-a-library-from-scratch/</feedburner:origLink></item>
		<item>
		<title>Risk-based management: High-speed QA</title>
		<link>http://feedproxy.google.com/~r/XingDevblog/~3/qc39zk4r8jk/</link>
		<comments>http://devblog.xing.com/qa/risk-based-management-high-speed-qa/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 07:42:29 +0000</pubDate>
		<dc:creator>Nils Lauk</dc:creator>
				<category><![CDATA[QA]]></category>

		<guid isPermaLink="false">http://devblog.xing.com/?p=1839</guid>
		<description><![CDATA[What would you do if your team were to tell you that you&#8217;re the bottleneck? Normally someone who works in QA (quality assurance) just smiles if they hear something like that. Why? Well, the answer&#8217;s simple. People who work in QA can&#8217;t start testing a product until the developers have finished their work. So if [...]]]></description>
			<content:encoded><![CDATA[<p>What would you do if your team were to tell you that you&#8217;re the bottleneck? Normally someone who works in QA (quality assurance) just smiles if they hear something like that. Why? Well, the answer&#8217;s simple. People who work in QA can&#8217;t start testing a product until the developers have finished their work. So if you have a timeframe of two weeks where the whole team is working on tasks to be developed and tested after two weeks, it&#8217;s impossible for the developers to work right up until the last minute of the sprint as there wouldn&#8217;t be enough time to test the source code they produce. This in turn means that there&#8217;s absolutely no way that developers and the QA team can finish their work within the Scrum process at the same time, is there?<span id="more-1839"></span></p>
<p>I&#8217;ve been working at XING for more than a year now and held this opinion until just recently. My goal as someone who works in QA is, above all, to maintain an overview of everything that goes on in my team and make sure that nothing is released without me having tested it. I had no trouble with this as long as I worked in a Scrum team with four developers. But in the middle of last year we ran into trouble as a new developer came on board, meaning that we started to develop stuff much faster. That&#8217;s when we decided that we needed someone else to help out with QA tasks. The reason for this decision is easy to understand as more developers creating more source code means that I have far more to test. Four developers were already doing a good job of keeping me busy, so the hiring of a new developer meant that a new QA team member was required. For the time being we had to wait for a sidekick to join me, during which time the developers got faster and faster and I had more and more to do. But somehow it still worked.</p>
<p>At the end of last year we received the good news that someone was going to join the team to help out with QA. Unfortunately this person didn&#8217;t have any QA experience as they were moving from another department in the company and wanted to learn the QA job. So I found myself in a completely new situation as we had enough work for two QA people in the team, but there was actually just me charged with the task of training someone on top of her normal work. At the end of the day the team had just 70% of the QA resources they actually needed.</p>
<p>After a while the team got nervous because QA had become a major bottleneck, so I had to do something. After thinking about the problem for a while I created the following new goal for myself: &#8220;I want to know everything, but I don&#8217;t want to test everything.&#8221;</p>
<h2>How can I reach this goal?</h2>
<p>I talked to some colleagues about the problem and discovered two major improvements which might help me. First of all I should attend the triage meeting so I&#8217;m informed about things much earlier, and secondly I should implement risk-based management.</p>
<p>Triage?! What does that mean? Before a sprint starts, the product owner, technical lead and user experience designer sit down together and talk about any upcoming issues and their technical implementation. A lot of other QA people in my department attend this meeting in their teams to find things out much earlier and to talk about edge cases at an early stage. This helps to improve the quality right from the beginning. Whenever I thought about attending such meetings, I came to the conclusion that it wasn&#8217;t the right place for me to think about issues and contribute real input. The results of this meeting are so unspecific that I can&#8217;t add much more than the other three people, which is why I decided not to attend the meeting. But what could I do instead? My main task was to think about people who could let me know about important things and are most interested in my point of view. I consider these people to be the product owner and the user experience guy because they design the functionality and naturally want to know what they might have forgotten to think about. So after a short talk with my product owner and user experience guy we decided to create such a meeting, a kind of second triage meeting. This would take place shortly before the estimation meeting, where we talk about upcoming backlog-items from a QA perspective. At this point the backlog items were specified in much more detail, meaning that I could come up with a lot of questions and comments. From then on I was had far more information about upcoming items and my product owner and user experience designer were happy as well as they got a much better idea of backlog item edge cases early in the process and therefore had enough time to properly prepare the backlog items for the estimation.</p>
<p>And what about risk-based management? Of course I already performed risk-based management when I thought about my tasks in the sprint and to what extent I wanted to go through them. As things stood this only involved me, but now I wanted to implement risk-based management for the entire team. The goal was to create risk-based management which determines whether backlog items entail no risk, or a low, medium or high risk. So we needed to ask ourselves if an item with a high risk can break and, if so, what is the worst-case scenario for the user and/or the company. At the end the no-risk and low-risk backlog items can then be tested by the developers while I test all of the remaining items. We initially tried to discuss the risk level with the whole team during the estimation meeting, but we soon realized that the group was too big to discuss it sensibly. So I decided that my product owner and I would discuss the risk level within the new second triage meeting and then present the results in the estimation meeting after that. As a result, every team member is given an opportunity to correct the risk level if we miss something out.</p>
<h2>So far, so good</h2>
<p>I now received far more information now and had enough time to do my work. The developers were able to work on no-risk or low-risk backlog items while I tackled the medium-risk and high-risk items. That way everyone had work to do until the end of the sprint, which leads me back to my initial question. Today I can happily tell you that I found a way in which developers and QA people are able to finish their work at the same time. And that&#8217;s a great improvement for the team, isn&#8217;t it?</p>
<p>Having said that, I didn&#8217;t feel entirely comfortable with the process so far. What would the quality be like if the developers tested some backlog items without any QA assistance? Would it have any negative impact? I thought about this question and decided to help the developers become good testers. So right now you&#8217;re probably thinking that I gave big training sessions to provide the developers with the required testing skills? Sorry, but I&#8217;m going to have to disappoint you as I prefer learning by doing. I therefore created a kind of test hint for every backlog item which could be a decision table, users which they should use to test something, or just some hints as to what they should think about while testing their own source code. The feedback I&#8217;ve received so far from my developers has been very positive and I also think it&#8217;s helped them to get a feel for the work I do.</p>
<p>That&#8217;s it! Today I can proudly say that I&#8217;m no longer the team&#8217;s bottleneck and the new process works very well for my Scrum team. Our part of the product has still the same top quality as before, and my work balance has improved vastly. It&#8217;s great to see how these two small changes I made helped to boost the team&#8217;s efficiency process quality. How cool is that?</p>
<p>So if someone tells you that you&#8217;re the bottleneck of the team, think about it &#8230; and try to change it!</p>
<img src="http://feeds.feedburner.com/~r/XingDevblog/~4/qc39zk4r8jk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://devblog.xing.com/qa/risk-based-management-high-speed-qa/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://devblog.xing.com/qa/risk-based-management-high-speed-qa/</feedburner:origLink></item>
		<item>
		<title>A flexible shadow with background-size</title>
		<link>http://feedproxy.google.com/~r/XingDevblog/~3/Wj7PJmp7qgw/</link>
		<comments>http://devblog.xing.com/frontend/a-flexible-shadow-with-background-size/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 08:07:22 +0000</pubDate>
		<dc:creator>Nils Lauk</dc:creator>
				<category><![CDATA[Frontend]]></category>

		<guid isPermaLink="false">http://devblog.xing.com/?p=1794</guid>
		<description><![CDATA[When we launched the new design for our website last year, our visual designers came up with a nifty shadow element. This element was originally intended to be used below the business cards of user profiles and below group logos. The shadow being purely decorative, we decided to go with the pseudo-element :after. We knew [...]]]></description>
			<content:encoded><![CDATA[<p>When we <a href="http://devblog.xing.com/frontend/xing-revamped-from-a-front-end-perspective/" title="Read about our relaunch">launched the new design</a> for our website last year, our visual designers came up with a nifty shadow element. This element was originally intended to be used below the business cards of user profiles and below group logos. The shadow being purely decorative, we decided to go with the pseudo-element <code>:after</code>. We knew that IE6 and IE7 couldn&#8217;t handle those but decided that this was a small price to pay compared to having to add useless markup only to display a decorative element.<span id="more-1794"></span></p>
<p>This is what our old solution looked like:</p>
<h3>HTML</h3>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;card-shadow&quot;</span>&gt;</span>
  New elements now can be as width or narrow as they want.
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<h3>CSS</h3>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">.two-col-<span style="color: #000000; font-weight: bold;">content</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.card-shadow</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span>data<span style="color: #00AA00;">:</span>image/png<span style="color: #00AA00;">;</span>base64<span style="color: #00AA00;">,</span> foobar<span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-6px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;.&quot;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-indent</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-9999px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.fullsize-grid</span> <span style="color: #6666ff;">.card-shadow</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span>data<span style="color: #00AA00;">:</span>image/png<span style="color: #00AA00;">;</span>base64<span style="color: #00AA00;">,</span> foobar<span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #993333;">center</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.fullsize-grid</span> .two-col-<span style="color: #000000; font-weight: bold;">content</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span>data<span style="color: #00AA00;">:</span>image/png<span style="color: #00AA00;">;</span>base64<span style="color: #00AA00;">,</span> foobar<span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>We only had two images in the beginning, both with a white background but with different widths. We implemented each as a background image of the pseudo-element using base64 encoded images (see also: <a href="http://en.wikipedia.org/wiki/Base64" title="article about base64 on Wikipedia">base64</a> and <a href="http://en.wikipedia.org/wiki/Data_URI_scheme" title="article about Data URI scheme on Wikipedia">Data URI scheme</a>). One reason for this approach was that we simply didn&#8217;t have a sprite wide enough to host the images.</p>
<p>Over time, our visual designers increasingly expanded the use of the smaller shadow to function as a visual separator. More and more base64 encoded images had to be integrated: full-size, full-size-marketing, half-width, third-width. And with both, white and grey backgrounds. We knew it was time put our foot down and save our CSS from blowing up.</p>
<p>This simple <em>CSS3-based solution</em> came to mind:</p>
<h3>HTML</h3>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;shadow&quot;</span>&gt;</span>
  Wonderful CSS3-card-shadow. Fully flexible. But no IE ...
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;shadow-gray&quot;</span>&gt;</span>
  Same here, but this box is placed on a gray background, so the horizontal gradient should be gray as well.
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<h3>CSS</h3>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.shadow</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">,</span>
.shadow-<span style="color: #993333;">gray</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-7px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;.&quot;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-indent</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-9999px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> -webkit-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span>    -moz-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span>     -ms-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span>      -o-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
.shadow-<span style="color: #993333;">gray</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> -webkit-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span>    -moz-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span>     -ms-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span>      -o-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">205</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.shadow</span><span style="color: #3333ff;">:before</span><span style="color: #00AA00;">,</span>
.shadow-<span style="color: #993333;">gray</span><span style="color: #3333ff;">:before </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-6px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;.&quot;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-indent</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-9999px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> -webkit-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span>    -moz-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span>     -ms-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span>      -o-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">150</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<div class="img-left"><img src="/wp-content/uploads/css3-flex-shadow.png" alt="Screenshot CSS3-shadows" width="577" height="394">
<p>Fig. 1: CSS3 shadows, using :before and :after. Two classes are necessary if you want to have the shadow on an background, that isn&#8217;t white.</p>
</p>
</div>
<h2>Browser issues: The usual suspect</h2>
<p>The above solution is beautiful and elegant – but it doesn&#8217;t work on any version of the Internet Explorer. Even the IE9 can&#8217;t apply a background gradient to a pseudo-element. To deal with that, we offered our visual designers to put a filter on the parent element. However, that would only have solved part of the problem, the vertical gradient. Just like a box-shadow. So why not a box-shadow? Because we don’t have an explicit IE9.css – and we don’t want one, either. One IE filter should do.</p>
<p>Our UX guys wanted more than just a simple gradient below the parent element. That meant: back to base64. And since we could live with the fact that IE6 and IE7 don&#8217;t support <code>:after</code>, we decided to take a more universal <em>base64</em> approach. This time we chose a <em>png-24</em> because that got us half transparency. And we need that in order to be able to display the same image on grey and on white backgrounds.</p>
<p>So all we had to do now was to tell the CSS that we want the background image to inherit the width of its parent element.</p>
<h3>HTML</h3>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;shadow&quot;</span>&gt;</span>
  New elements now can be as wide or narrow as they want.
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<h3>CSS</h3>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.shadow</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">,</span>
.two-col-<span style="color: #000000; font-weight: bold;">content</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span>data<span style="color: #00AA00;">:</span>image/png<span style="color: #00AA00;">;</span>base64<span style="color: #00AA00;">,</span> longer-foobar<span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
  -webkit-background-<span style="color: #000000; font-weight: bold;">size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
     -moz-background-<span style="color: #000000; font-weight: bold;">size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
       -o-background-<span style="color: #000000; font-weight: bold;">size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
          background-<span style="color: #000000; font-weight: bold;">size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-6px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot; &quot;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>IE9 displays everything correctly. IE8 can apply the <code>:after</code>, but not the background-size. We talked with our visual designers again who reassured us that this is a purely decorative element that doesn’t need to be supported by every single browser. Therefore, IE7 and IE8 will simply show a dark line below the parent element (in an separate ie.css).</p>
<p>Our way to finding a solution for a flexible shadow showed us again that it is very well possible to achieve satisfactory results if all teams involved (frontend engineers and visual designers in this case) discuss pros and cons from both a technical and a design perspective. What we got out of it is the use of state-of-the-art technologies as well as a nifty shadow element. True, it&#8217;s not supported by all browsers, but that was a price both teams were more than willing to pay. In short: It really helps if you talk to one another.</p>
<img src="http://feeds.feedburner.com/~r/XingDevblog/~4/Wj7PJmp7qgw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://devblog.xing.com/frontend/a-flexible-shadow-with-background-size/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://devblog.xing.com/frontend/a-flexible-shadow-with-background-size/</feedburner:origLink></item>
		<item>
		<title>XING Open API: How did we do it?</title>
		<link>http://feedproxy.google.com/~r/XingDevblog/~3/no7HX8ZTyQU/</link>
		<comments>http://devblog.xing.com/qa/xing-open-api-how-did-we-do-it/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 15:11:39 +0000</pubDate>
		<dc:creator>magith.noohukhan</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[QA]]></category>

		<guid isPermaLink="false">http://devblog.xing.com/?p=1737</guid>
		<description><![CDATA[Not so long ago we had our first brainstorming session about the open API project. We carefully considered several points that would motivate the developers to stay and create awesome applications using the XING API. More importantly, however, we thought about the points which might discourage them and eventually make them leave. By the end [...]]]></description>
			<content:encoded><![CDATA[<p>Not so long ago we had our first brainstorming session about the open API project. We carefully considered several points that would motivate the developers to stay and create awesome applications using the XING API. More importantly, however, we thought about the points which might discourage them and eventually make them leave. By the end of the session we had a long list of things to do.</p>
<p><span id="more-1737"></span></p>
<h3>It all started with the vision</h3>
<p>We sorted the points down, analyzed them, studied them and within days we locked ourselves in an onsite location, dedicating all of our time to the Open API. We set the vision for our developer portal site &#8220;<em>A scalable and sophisticated developer site with a strong focus on transparency, convenience and innovation that will empower external developers to create compelling applications</em>&#8220;.</p>
<p><a style="float: left; margin: 5px 15px 2px 0;" href="http://devblog.xing.com/wp-content/uploads/DSCF1098.jpg"><img class="alignleft size-medium wp-image-1618" title="MVP Vision" src="http://devblog.xing.com/wp-content/uploads/DSCF1098-300x237.jpg"" alt="" width="300" height="237" /></a></p>
<p>The team sat together and wrote user stories fitting this vision for almost one day. We narrowed down the whole theme and focused on delivering a <a title="Minimum Viable Product" href="http://en.wikipedia.org/wiki/Minimum_viable_product" target="_blank">Minimum Viable Product</a> by setting a deadline. Then began the task of prioritizing the user stories: We were determined to deliver the minimum viable product as fast as possible to the outside world.</p>
<p>Once the user stories had been prioritized, we defined the technical specifications and narrowed down all the technical feasibilities, including interdependencies within the other standing teams which we depended on. Hence, we were able to stay focused on our target and didn&#8217;t have to worry about eventual non-feasibilities that are often detected at the last stage.</p>
<h3>Getting it done</h3>
<p>Our team consisted of only 5 people the day we started with the brainstorming a few months back. According to our roadmap, we needed for people to speed up the development and also to be prepared for the time after the launch. As we work with <a href="http://en.wikipedia.org/wiki/Kanban_%28development%29" target="_blank">Kanban</a> and consider development and testing as one phase, the development phase was very exciting. Most of the time it is QA and developers pairing and giving feedback for the user stories which have been developed then and there. As far as the transparency in this process is concerned, our kanban board says it all.</p>
<p>Since everyone was busy with a different module, we introduced a weekly review meeting for the whole team, so that everybody would stay in the loop as to where we’d stand. We went through the finished modules of the  developer portal, collected suggestions, added more user stories, removed some user stories which we found out could never be an MVP, looked into usability and constantly sought for things that could be improved. Thus, it was easy from the project management side to make a clear determination as to how long we would need to finish the rest of the stories. Immediately after the review meeting we did the backlog grooming to define the size of all the cards and bring them to the wall.</p>
<h3>A different view</h3>
<p>Once we realized that we were getting close to the final stage, we asked the QA experts working in the different project teams to do an exploratory testing session for our developer portal. The main focus of this testing was to explore the developer portal for bugs and usability issues. Fortunately, nothing critical was found during this session.</p>
<p>The plan had been conceived in such a way that a session based testing would be done within the API team, just to explore the API Explorer. Since all these API calls had been tested, we were almost sure that nothing critical would pop up. So there was a 45 minutes session to test all the calls and a 15 minutes debriefing immediately after the session, just to discuss our findings. As mentioned before, there was nothing critical, but we did have to fix some bugs real quick, since we only had another 2 days left before the release.</p>
<h3>And in the end</h3>
<p><a style="float: right; margin: 5px 15px 2px 0;" href="http://devblog.xing.com/wp-content/uploads/dev_xing_com.png"><img class="alignleft size-medium wp-image-1756" title="MVP Vision" src="http://devblog.xing.com/wp-content/uploads/dev_xing_com.png" alt="" width="320" height="211" /></a></p>
<p>Once we were sure that everything was working as expected, we released the code and tested the whole developer portal in production. Thanks to a lightning test session carried out by my team, we were fortunate enough to quickly fix some misbehavior we noticed. Now it’s open for about 1,200 developers who registered with us at the first stage via the coming soon page.</p>
<p>So now we are collecting feedback from various channels such as the <a href="https://www.xing.com/net/xingdevs" target="_blank">XING developer group</a>, Twitter, email etc. and we’re further enhancing our developer portal. It’s not too late yet, so if you are a non-beta user and would like to get notified, please register at <a href="https://dev.xing.com" target="_blank">https://dev.xing.com</a> and follow us on <a href="http://twitter.com/xingapi" target="_blank">Twitter</a> to get the latest news. To all the beta users out there, please keep sending us your feedback; it is greatly appreciated.</p>
<img src="http://feeds.feedburner.com/~r/XingDevblog/~4/no7HX8ZTyQU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://devblog.xing.com/qa/xing-open-api-how-did-we-do-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://devblog.xing.com/qa/xing-open-api-how-did-we-do-it/</feedburner:origLink></item>
	</channel>
</rss>

