<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
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:series="http://organizeseries.com/"
> <channel><title>SitePoint &#187; Open source</title> <atom:link href="http://www.sitepoint.com/category/open-source/feed/" rel="self" type="application/rss+xml" /><link>http://www.sitepoint.com</link> <description>Learn CSS &#124; HTML5 &#124; JavaScript &#124; Wordpress &#124; Tutorials-Web Development &#124; Reference &#124; Books and More</description> <lastBuildDate>Mon, 13 May 2013 13:12:07 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.5.1</generator> <item><title>Unheap.com: a Better jQuery Plugin Repository?</title><link>http://www.sitepoint.com/unheap-jquery-plugin-repository/</link> <comments>http://www.sitepoint.com/unheap-jquery-plugin-repository/#comments</comments> <pubDate>Fri, 03 May 2013 16:36:48 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[JavaScript]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[Tools and Libraries]]></category> <category><![CDATA[HTML5 Dev Center]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[plugins]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=65656</guid> <description><![CDATA[Do you need a jQuery plugin? Are you finding it difficult to locate one on the official repository? Craig suggests Unheap.com may be a better alternative...]]></description> <content:encoded><![CDATA[<p></p><p>I&#8217;ve never been <a
href="http://www.sitepoint.com/jquery-plugins-registry/">particularly complimentary</a> about the <a
href="http://plugins.jquery.com/">official jQuery Plugin Registry</a>. The team are working on it, but perhaps the kindest observation is that it&#8217;s <em>&#8220;ctional&#8221;</em> &#8212; functional with all the &#8220;fun&#8221; removed. The system lacks an easy interface, good search facilities, online demonstrations, developer ratings and reviews.</p><p>As an alternative, why not try <a
href="http://www.unheap.com/"><strong>unheap.com</strong></a> &#8212; a new independent jQuery plugin repository&hellip;</p><p><a
href="http://www.unheap.com/"><img
src="http://blogs.sitepointstatic.com/images/tech/821-unheap-jquery-plugins.jpg" alt="Unheap.com" class="center" /></a></p><p>The benefits of <a
href="http://www.unheap.com/"><strong>unheap.com</strong></a> become apparent the moment you use it:</p><ul><li>The site has a gorgeous dynamic and responsive interface &#8212; it&#8217;s a pleasure to use</li><li>Plugins are categorized in sections and sub-sections for interface, inputs, media, navigation and miscellaneous code.</li><li>The search facility works well.</li><li>Plugin lists have direct links to demonstration pages and videos.</li><li>Related plugins are listed.</li><li>User views, votes and bug reports are recorded.</li><li>Social media sharing facilities are provided.</li><li>An RSS feed of new and updated plugins is available for you to check in <a
href="http://www.sitepoint.com/goodbye-google-reader/"><s>Google Reader</s></a>, erm, a compatible RSS Reader.</li><li>The <a
href="http://www.unheap.com/submit">plugin submission process</a> is easy and straight-forward.</li><li>Almost 700 plugins are available at the time of writing.</li></ul><p>I&#8217;m impressed. Unless the jQuery team can produce a system as nice as <a
href="http://www.unheap.com/">unheap.com</a>, perhaps they should give up now and adopt it as the &#8220;official&#8221; repository?</p><p>Unless you&#8217;ve found something better?&hellip;</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/unheap-jquery-plugin-repository/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Browser Trends May 2013: IE8 Drops Below 10%</title><link>http://www.sitepoint.com/browser-trends-may-2013/</link> <comments>http://www.sitepoint.com/browser-trends-may-2013/#comments</comments> <pubDate>Wed, 01 May 2013 10:38:12 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[Browsers]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[Operating systems]]></category> <category><![CDATA[chrome]]></category> <category><![CDATA[firefox]]></category> <category><![CDATA[HTML5 Dev Center]]></category> <category><![CDATA[ie]]></category> <category><![CDATA[opera]]></category> <category><![CDATA[safari]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=65969</guid> <description><![CDATA[Craig takes his regular look at the desktop and mobile browser usage charts. While IE8 dropped below 10%, only Internet Explorer escaped unscathed from Chrome's regular rise.]]></description> <content:encoded><![CDATA[<p></p><p>We&#8217;re <a
href="/browser-trends-april-2013/">one third of the way through 2013</a> and an interesting battle has commenced between the two leading vendors. These are the <a
href="http://gs.statcounter.com/#browser_version_partially_combined-ww-monthly-201304-201304-bar">latest figures according to StatCounter</a>&hellip;</p><h2>Worldwide Browser Statistics March 2013 to April 2013</h2><p>The following table shows browser usage movements during the past month.</p><table
id="stats" summary="worldwide browser market share statistics, February 2013" width="80%" style="text-align:right !important;margin:20px auto"><tr><th
width="20%">Browser</th><th
width="20%">March</th><th
width="20%">April</th><th
width="20%">change</th><th
width="20%">relative</th></tr><tr><th>IE (all)</th><td>29.29%</td><td>29.69%</td><td
class="up">+0.40%</td><td
class="up">+1.40%</td></tr><tr><th>IE10</th><td>2.26%</td><td>6.19%</td><td
class="up">+3.93%</td><td
class="up">+173.90%</td></tr><tr><th>IE 9</th><td>15.81%</td><td>13.35%</td><td
class="dn">-2.46%</td><td
class="dn">-15.60%</td></tr><tr><th>IE8</th><td>10.29%</td><td>9.30%</td><td
class="dn">-0.99%</td><td
class="dn">-9.60%</td></tr><tr><th>IE7</th><td>0.64%</td><td>0.59%</td><td
class="dn">-0.05%</td><td
class="dn">-7.80%</td></tr><tr><th>IE6</th><td>0.29%</td><td>0.26%</td><td
class="dn">-0.03%</td><td
class="dn">-10.30%</td></tr><tr><th>Chrome</th><td>38.13%</td><td>39.21%</td><td
class="up">+1.08%</td><td
class="up">+2.80%</td></tr><tr><th>Firefox</th><td>20.85%</td><td>20.05%</td><td
class="dn">-0.80%</td><td
class="dn">-3.80%</td></tr><tr><th>Safari</th><td>8.48%</td><td>7.99%</td><td
class="dn">-0.49%</td><td
class="dn">-5.80%</td></tr><tr><th>Opera</th><td>1.16%</td><td>1.00%</td><td
class="dn">-0.16%</td><td
class="dn">-13.80%</td></tr><tr><th>Others</th><td>2.09%</td><td>2.06%</td><td
class="dn">-0.03%</td><td
class="dn">-1.40%</td></tr></table><h2>Worldwide Browser Statistics April 2012 to April 2013</h2><p>The following table shows browser usage movements during the past twelve months:<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><table
id="stats" summary="worldwide browser market share statistics, past 12 months" width="80%" style="text-align:right !important;margin:20px auto"><tr><th
width="20%">Browser</th><th
width="20%">April 2012</th><th
width="20%">April 2013</th><th
width="20%">change</th><th
width="20%">relative</th></tr><tr><th>IE (all)</th><td>34.07%</td><td>29.69%</td><td
class="dn">-4.38%</td><td
class="dn">-12.90%</td></tr><tr><th>IE10</th><td>0.00%</td><td>6.19%</td><td
class="up">+6.19%</td><td>n/a</td></tr><tr><th>IE 9</th><td>15.67%</td><td>13.35%</td><td
class="dn">-2.32%</td><td
class="dn">-14.80%</td></tr><tr><th>IE8</th><td>14.69%</td><td>9.30%</td><td
class="dn">-5.39%</td><td
class="dn">-36.70%</td></tr><tr><th>IE7</th><td>2.54%</td><td>0.59%</td><td
class="dn">-1.95%</td><td
class="dn">-76.80%</td></tr><tr><th>IE6</th><td>1.17%</td><td>0.26%</td><td
class="dn">-0.91%</td><td
class="dn">-77.80%</td></tr><tr><th>Chrome</th><td>31.29%</td><td>39.21%</td><td
class="up">+7.92%</td><td
class="up">+25.30%</td></tr><tr><th>Firefox</th><td>24.86%</td><td>20.05%</td><td
class="dn">-4.81%</td><td
class="dn">-19.30%</td></tr><tr><th>Safari</th><td>7.14%</td><td>7.99%</td><td
class="up">+0.85%</td><td
class="up">+11.90%</td></tr><tr><th>Opera</th><td>1.70%</td><td>1.00%</td><td
class="dn">-0.70%</td><td
class="dn">-41.20%</td></tr><tr><th>Others</th><td>0.94%</td><td>2.06%</td><td
class="up">+1.12%</td><td
class="up">+119.10%</td></tr></table><p>The tables show market share estimates for desktop browsers. The &#8216;change&#8217; column is the absolute increase or decrease in market share. The &#8216;relative&#8217; column indicates the proportional change, i.e. another 10.3% of IE6 users abandoned the browser last month. There are several caveats so I recommend you read <a
href="/how-browser-market-share-is-calculated">How Browser Market Share is Calculated</a>.</p><p>Chrome jumped another 1% during April. That growth can&#8217;t continue, but there&#8217;s no sign of it stopping yet. Only one application managed to put up a fight: IE10. Microsoft&#8217;s browser grew an impressive 4% in one month following the <a
href="/microsoft-ie10-windows7-update/">automated update for Windows 7</a>. While the other versions all dropped, IE10 more than made up the difference.</p><p>Talking of which, IE8 had a 1% drop and has fallen below 10%! While the browser did much to rectify the issues in IE6 and IE7, development will be far easier when we can depend on widespread HTML5 support without shims. It still has a healthy percentage but many businesses will be forced to consider alternatives when Microsoft drops Windows XP support next year.</p><p>IE6 and IE7 have become mostly irrelevant. I&#8217;m tempted to remove them from the chart, but&hellip;</p><ol><li>some developers use the figures as justification for dropping the decrepit browsers, and</li><li>it gives me a smug sense of satisfaction to watch the numbers tumble.</li></ol><p>However, I&#8217;m relieved Microsoft can take on Google because the others are struggling.</p><p>Firefox holds just over 20% of users but is likely to fall below that threshold next month.</p><p>Safari didn&#8217;t have a great month and fell 0.5%. It&#8217;s a reasonable browser but would it be so popular if Apple didn&#8217;t enforce usage on iOS? Users could fall further if <a
href="/blink-rendering-engine-google-chrome/">Webkit development falls significantly behind Blink</a>.</p><p>Finally, 14% of Opera users switched last month and it&#8217;s dropped to 1%. Perhaps that&#8217;s understandable; <a
href="/opera-switches-to-webkit-rendering-engine/">Presto has been abandoned for Blink</a> so is there any point sticking with a browser which will soon be superseded?</p><h2 id="mobile">Mobile Browser Usage</h2><p>Mobile usage decreased slightly to <a
href="http://gs.statcounter.com/#mobile_vs_desktop-ww-monthly-201304-201304-bar">13.9% of all web activity</a> in April 2013.</p><p>The primary mobile browsing applications:</p><ol><li>Android &#8212; 30.96% (up 0.18%)</li><li>iPhone &#8212; 23.94% (down 0.50%)</li><li>Opera Mini/Mobile &#8211; 15.35% (down 0.19%)</li><li>UC Browser &#8212; 8.74% (up 0.47%)</li><li>Nokia browser &#8212; 7.03% (up 0.07%)</li></ol><p>In comparison to the desktop market, there&#8217;s very little to report. I guess it&#8217;s a quiet time of year with no significant releases or disruptive technologies. Nothing to see here. Please move along and return next month!</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/browser-trends-may-2013/feed/</wfw:commentRss> <slash:comments>24</slash:comments> </item> <item><title>We&#8217;re Putting the (MySQL) Band Back Together</title><link>http://www.sitepoint.com/mysql-band-back-together/</link> <comments>http://www.sitepoint.com/mysql-band-back-together/#comments</comments> <pubDate>Mon, 29 Apr 2013 13:45:05 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[News]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[mariaDB]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[oracle]]></category> <category><![CDATA[SkySQL]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=65659</guid> <description><![CDATA[The original MySQL developers are back together to work on a rival to Oracle's open source database.]]></description> <content:encoded><![CDATA[<p></p><p>MySQL &#8212; the world&#8217;s most-used relational database &#8212; will be 18 next month. The first version was developed by Michael Widenius and David Axmark and released by MySQL AB on May 23, 1995. The open source product rapidly gained traction alongside PHP to become an integral part of the LAMP stack.</p><p>Sun Microsystems obtained MySQL for $1 billion in January 2008. 15 months later, Oracle acquired Sun for $7.4 billion and became the owner of Java, VirtualBox, OpenOffice and <a
href="http://www.sitepoint.com/oracle-sun-mysql/">MySQL</a>. The takeover caused significant controversy since the world&#8217;s biggest commercial database provider now controlled a major open source competitor.</p><p>Michael Widenius was particularly critical and released his own MySQL fork under the GNU General Public License from his own company, Monty Program AB. MariaDB is designed to maintain compatibility and be a drop-in replacement for MySQL.</p><p>Here&#8217;s where it gets interesting: Monty Program AB has <a
href="http://www.skysql.com/news-and-events/press-releases/skysql-merges-with-mariadb-developers">signed a merger agreement with SkySQL</a>. SkySQL was formed by former MySQL executives &#8212; including David Axmark &#8212; when Oracle acquired the database from Sun. The MySQL band are back together!</p><p>The new company will continue to use the SkySQL name to support and develop MariaDB. Michael Widenius stated:</p><blockquote><p> The MySQL database is named after my first daughter, My. The MariaDB database is named after my second daughter, Maria. With this merger and my own role in the MariaDB Foundation, I&#8217;m ensuring that the MariaDB project will remain &#8216;open source forever&#8217;, while knowing that enterprise and community users of both the MySQL and MariaDB databases will benefit from best-in-breed products, services and support provided by SkySQL. And who doesn&#8217;t want the best for their children?</p></blockquote><p>MySQL has a stronger rival. It&#8217;s reassuring news especially for those with any concerns regarding Oracle&#8217;s plans for the open source database.</p><p>See also:</p><ul><li><a
href="http://www.skysql.com/news-and-events/press-releases/skysql-merges-with-mariadb-developers">SkySQL Merges With MariaDB Developers To Create &#8216;Next Generation Open Source&#8217; Database Company</a></li><li><a
href="https://mariadb.org/">MariaDB.org</a></li><li><a
href="http://www.skysql.com/">SkySQL.com</a></li><li><a
href="https://kb.askmonty.org/en/mariadb-vs-mysql-compatibility/">MariaDB vs MySQL &#8212; compatibility</a></li></ul><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/mysql-band-back-together/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>MySQL Views</title><link>http://www.sitepoint.com/mysql-views/</link> <comments>http://www.sitepoint.com/mysql-views/#comments</comments> <pubDate>Tue, 23 Apr 2013 02:41:17 +0000</pubDate> <dc:creator>Richard Kotze</dc:creator> <category><![CDATA[Databases]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[RMDBS]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=65554</guid> <description><![CDATA[Richard Kotze takes a look at the advantages and disadvantages of using MySQL views to manage database tables.]]></description> <content:encoded><![CDATA[<p></p><p>You have just written a new feature for your awesome application that searches through your database to find &#8216;x&#8217; and you run some tests to check that the returned result is correct.</p><p>Unfortunately, your test fails because it returns more results than expected. At first this is not obvious because it&#8217;s been a while since you worked on the application, but eventually you realise that every search should be automatically filtered out by a boolean field.</p><p>You may have run into a similar situation where you or someone has forgotten to filter by a value in field x and it&#8217;s now potentially showing incorrect data, thereby damaging business. Fortunately, there are some tests in place to catch this.</p><p>Let&#8217;s work through an example. You have a user table and, with good reason, you are utilizing a boolean field to represent what the state of the user is, perhaps to determine if it is disabled. You could copy data from a “live table” to a “disabled table” but you feel the complexity and overhead to implement this is too high, because of other user related tables.</p><p>With the above scenario in mind, I think <i>MySQL Views</i> can improve on this solution. Views are quite simple things. They present a table based on the defined SELECT query. We can create a view that will only return users that are enabled in the system and which will prevent future features from including disabled users.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>I&#8217;ll explain how to create this view and how to use it in your application. Something to note is MySQL views are only available from version 5.</p><p>Here is the basic user table the view will be based on:</p><pre>CREATE  TABLE `users` (
`user_id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
`first_name` VARCHAR(100) NULL ,
`last_name` VARCHAR(100) NULL ,
`username` VARCHAR(100) NULL ,
`dob` DATETIME NULL ,
`disabled` BIT NULL DEFAULT 0 ,
PRIMARY KEY (`user_id`) );</pre><p>Below is the query that will<i> create a MySQL view </i>for the above user table.</p><pre>CREATE OR REPLACE ALGORITHM = MERGE VIEW `v_users_enabled`
(`firstName`, `lastName`, `username`, `dob`)
AS
SELECT `first_name`, `last_name`, `username`, `dob`
FROM `users`
WHERE `disabled` = 1;</pre><h2>How does it work?</h2><p>Here is a breakdown of the keywords used to create a view.</p><h3>CREATE OR REPLACE</h3><p>This creates a new view and is required. Optionally you can add OR REPLACE if you want to make certain it is created but if you know the view exists already you can use ALTER to make changes to an existing view.</p><h3>ALGORITHM = MERGE</h3><p>This is an optional statement and by not defining one or explicitly stating ALGORITHM = UNDEFINED, MySQL will choose between two options that best fit the SELECT statement, i.e. MERGE or TEMPTABLE. MySQL will try to choose MERGE over TEMPTABLE where possible because it is more efficient. I will discuss more about the algorithm after going through these core points.</p><h3>VIEW</h3><p>Is a required statement and is used to give a name to the view. Crucially a view <b>cannot </b>have the same name as a table because they share the same name space.</p><p>The column list part is optional and by default the column names in the SELECT statement are used. If you choose to define column names they are comma separated, must be unique and match the number of columns in the SELECT.</p><h3>AS</h3><p>Is required and where you define the SELECT query.</p><p>Querying a view is the same as when querying a table. Here&#8217;s a simple example:</p><pre>SELECT * FROM v_users_enabled</pre><h2>More about the algorithm</h2><p>When defining the algorithm, you have three options to choose from: MERGE, TEMPTABLE or UNDEFINED.</p><p>We now know that UNDEFINED lets MySQL choose the appropriate option, but what do the other two options mean?</p><p><b>MERGE </b>is the fastest out of the two options. The view column list replaces what is in the SELECT statement, essentially merging faster than <b>TEMPTABLE</b> as that generates a new temporary table that is queried upon and which has <b>no indexes</b>. MySQL will warn you if you try to use MERGE when a TEMPTABLE should be used and will change it to TEMPTABLE.</p><p>When will the <b>TEMPTABLE </b>option be used? If you use any aggregation function, DISTINCT, LIMIT, GROUP BY, HAVING, sub query or literal values (i.e. no table).</p><h2>Minor performance trade off</h2><p>Unfortunately, MySQL views will hinder performance rather than improve it. It is important to think about your views and to use MERGE where possible to minimise performance reduction.</p><p>Provided your performance budgets can take the hit to better manage complexity and create a useful separation this, in my view, is a worthy trade off because you are taking a query with certain where clauses that may need to be applied to other queries. This is nicely contained within a view and database level users can query against this returning them the correct results, without them having to remember they need these additional where clauses.</p><p>The downside of this containment is that it would be possible to write a complex query within the view which is now hidden. Queries with more where clauses on this view will make the overall query a monster and potentially inefficient. A judgement call will need to be made on how complex the view SELECT query can be without compromising performance.</p><p>To better optimize for performance when using a view, use the MERGE algorithm and when creating your index add the fields in your WHERE clauses that exist in the view first. It is important they are put in the correct order, as usual when creating indexes for expected queries. You can use EXPLAIN to check your query and make sure its behaving as you expect.</p><h2>Benefits and Negatives</h2><p>The <b>benefits </b>of using a view:</p><ul><li>Provide a useful data separation from application by containing the need to remember specific fields the query needs to filter by for all SELECT statements within the database.</li><li>Tables can change over time and you need to add some new fields that you intend to filter by for most SELECT queries. All that needs to change is the SELECT statement with the new fields after altering the tables. Then updating the application will be easier as you may only need to remember to change it in a few places.</li><li>They can make your SELECT queries more readable.</li></ul><p>The <b>negatives </b>of using a view:</p><ul><li>When the TEMPTABLE algorithm is used no index is used.</li><li>They could hide a complex query and with querying the view could turn it into a sluggish query.</li><li>Using the MERGE algorithm limits your view SELECT statement to basic querying only.</li><li>You may choose the MERGE algorithm but if MySQL thinks it should use TEMPTABLE then it will change it.</li><li>If your view does not have a one-to-one relationship with the table then it is not updatable.</li><li>When you do add or change a table you will still need to update the CUD statements in your application.</li><li>You <b>cannot </b>associate a trigger with a view.</li></ul><h2>Noteworthy quirks</h2><p>If you want to use ORDER BY in your view SELECT statement it is worth noting that this cannot be overridden when you query the view using a different order.</p><p>If you decide to put a LIMIT in your view and then use another LIMIT when you query the view it is undefined which LIMIT applies.</p><p>If you are interested in making a view updatable see <a
href="http://dev.mysql.com/doc/refman/5.6/en/view-updatability.html">MySQL</a><a
href="http://dev.mysql.com/doc/refman/5.6/en/view-updatability.html">website</a>.</p><h2>Conclusion</h2><p>MySQL views are a useful tool and provide a good solution in particular scenarios. It is clear that views have their limits and it is important to be aware of them. Used in the right way your next app can benefit from flexible containment and control over how the data is accessed.</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/mysql-views/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Blink: Chrome&#8217;s New Rendering Engine</title><link>http://www.sitepoint.com/blink-rendering-engine-google-chrome/</link> <comments>http://www.sitepoint.com/blink-rendering-engine-google-chrome/#comments</comments> <pubDate>Mon, 08 Apr 2013 15:39:54 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[Browsers]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[News]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[Web standards]]></category> <category><![CDATA[apple]]></category> <category><![CDATA[chrome]]></category> <category><![CDATA[Google Tutorials & Articles]]></category> <category><![CDATA[HTML5 Dev Center]]></category> <category><![CDATA[webkit]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=65201</guid> <description><![CDATA[Google is forking Webkit to create their own independent rendering engine named Blink. Is this a good thing or a disaster of biblical proportions for the web? Craig discusses Blink further.]]></description> <content:encoded><![CDATA[<p></p><p>In a surprise statement released last week <a
href="http://blog.chromium.org/2013/04/blink-rendering-engine-for-chromium.html">Google announced</a> that Chrome and Chromium are to adopt a new rendering engine named &#8216;Blink&#8217;. Blink is a fork of Webkit introduced because:</p><ul><li>Chrome uses a different multi-process architecture to other Webkit browsers</li><li>It provides Google with further performance improvement opportunities.</li></ul><p><a
href="http://www.chromium.org/blink">Google stated</a>:</p><blockquote><p> Blink&#8217;s mission is to improve the open web through technical innovation and good citizenship.</p><p>We believe that having multiple rendering engines &#8212; similar to having multiple browsers &#8212; will spur innovation and over time improve the health of the entire open web ecosystem.</p></blockquote><p>All very noble. But was Google&#8217;s decision politically motivated? Webkit is open source; there are no technical reasons why Google couldn&#8217;t implement improvements. However, Webkit is largely controlled by Apple &#8212; a competitor. At best, Safari would have the same technologies. At worst, Apple could block features which offered Google a competitive advantage (such as Dart).</p><p>Regardless of the reasons, <em>Blink is good for the web</em>.</p><p>Webkit has never been <a
href="/5-reasons-to-reject-webkit-monoculture/">a single rendering engine</a> so another fork will have little immediate impact. Over time, Blink will proceed along a different path unencumbered by Webkit stakeholders. The engine will be one of Google&#8217;s top priorities and should evolve rapidly.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>Blink will appear in Chrome 28 and also be adopted by other browsers based on Chromium &#8212; including the new version of <a
href="/opera-switches-to-webkit-rendering-engine/">Opera</a> and RockMelt. We may have lost Presto, but Blink goes some way to redress the balance. The web has four major rendering engines once more &#8212; even if two will be mostly identical for a few months.</p><h2>Will There be a New Vendor Prefix?</h2><p>No. Blink will continue to support some -webkit prefixes for legacy compatibility but all prefixes will eventually disappear. Experimental DOM, CSS and JavaScript features will be available without a prefix but the developer must enable those facilities with a single setting in about:flags.</p><p>I&#8217;m not wholly convinced it&#8217;s a major improvement. Unless other vendors embrace the policy, developers will have the same number of prefixes to manage and remember (<a
href="/w3c-css-webkit-prefix-crisis/">or forget</a>).</p><h2>Other Downsides?</h2><p>Apple has most to lose. Webkit&#8217;s development team has been cut by 50% and the engine has just lost <a
href="/browser-trends-april-2013-is-chrome-unstoppable">almost 40% market share</a>. The web is everything to Google but a distraction for Apple; Safari could fall behind other browsers.</p><p>Testing has also become a little more difficult for web developers. While you could never rely on Chrome-compatible code working in Safari, differences were rare. That&#8217;s no longer the case.</p><p>The situation was complicated further when <a
href="/safari-6-whats-new-windows-version/">Apple dropped Safari on Windows</a>. Windows developers must either buy a Mac, hope other Webkit browsers are close (<a
href="http://dooble.sourceforge.net/">Dooble</a>, <a
href="http://www.qupzilla.com/">QupZilla</a>, <a
href="http://www.slimboat.com/">SlimBoat</a>) or rely on Apple providing test facilities like <a
href="/microsoft-windows8-ie10-mac-giveaway/">Microsoft did for OS X users</a>.</p><p>Finally, while Blink is <em>technically</em> open source, it&#8217;s Google&#8217;s baby. Chrome&#8217;s dominance means Google can change Blink in ways that were not possible before. The company could be dictating web standards before we know it &#8212; especially if they enable non-prefixed features which operate differently in other browsers.</p><p>Despite the pitfalls, Blink seems an appropriate name &#8212; the web&#8217;s future just became a little brighter.</p><p><em>Unless you think otherwise?&hellip;</em></p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/blink-rendering-engine-google-chrome/feed/</wfw:commentRss> <slash:comments>19</slash:comments> </item> <item><title>Browser Trends April 2013: is Chrome Unstoppable?</title><link>http://www.sitepoint.com/browser-trends-april-2013-is-chrome-unstoppable/</link> <comments>http://www.sitepoint.com/browser-trends-april-2013-is-chrome-unstoppable/#comments</comments> <pubDate>Sun, 07 Apr 2013 09:12:37 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[Browsers]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[Operating systems]]></category> <category><![CDATA[chrome]]></category> <category><![CDATA[firefox]]></category> <category><![CDATA[HTML5 Dev Center]]></category> <category><![CDATA[ie]]></category> <category><![CDATA[opera]]></category> <category><![CDATA[safari]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=65039</guid> <description><![CDATA[We take another look at the desktop and mobile browser usage charts. As Chrome takes another bite from all other browsers, Craig asks whether anyone can compete with Google's browser.]]></description> <content:encoded><![CDATA[<p></p><p><a
href="/browser-trends-march-2013/">March ended one week ago</a> but, just as you think the browser market is stabilizing, Google puts another spring in its step. Here are the <a
href="http://gs.statcounter.com/#browser_version_partially_combined-ww-monthly-201303-201303-bar">latest figures according to StatCounter</a>&hellip;</p><h2>Worldwide Browser Statistics February 2013 to March 2013</h2><p>The following table shows browser usage movements during the past month.</p><table
id="stats" summary="worldwide browser market share statistics, February 2013" width="80%" style="text-align:right !important;margin:20px auto"><tr><th
width="20%">Browser</th><th
width="20%">February</th><th
width="20%">March</th><th
width="20%">change</th><th
width="20%">relative</th></tr><tr><th>IE (all)</th><td>29.82%</td><td>29.29%</td><td
class="dn">-0.53%</td><td
class="dn">-1.80%</td></tr><tr><th>IE 9.0+</th><td>18.08%</td><td>18.07%</td><td
class="dn">-0.01%</td><td
class="dn">-0.10%</td></tr><tr><th>IE 8.0</th><td>10.76%</td><td>10.29%</td><td
class="dn">-0.47%</td><td
class="dn">-4.40%</td></tr><tr><th>IE 7.0</th><td>0.68%</td><td>0.64%</td><td
class="dn">-0.04%</td><td
class="dn">-5.90%</td></tr><tr><th>IE 6.0</th><td>0.30%</td><td>0.29%</td><td
class="dn">-0.01%</td><td
class="dn">-3.30%</td></tr><tr><th>Firefox</th><td>21.34%</td><td>20.85%</td><td
class="dn">-0.49%</td><td
class="dn">-2.30%</td></tr><tr><th>Chrome</th><td>37.11%</td><td>38.13%</td><td
class="up">+1.02%</td><td
class="up">+2.70%</td></tr><tr><th>Safari</th><td>8.58%</td><td>8.48%</td><td
class="dn">-0.10%</td><td
class="dn">-1.20%</td></tr><tr><th>Opera</th><td>1.23%</td><td>1.16%</td><td
class="dn">-0.07%</td><td
class="dn">-5.70%</td></tr><tr><th>Others</th><td>1.92%</td><td>2.09%</td><td
class="up">+0.17%</td><td
class="up">+8.90%</td></tr></table><h2>Worldwide Browser Statistics March 2012 to March 2013</h2><p>The following table shows browser usage movements during the past twelve months:<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><table
id="stats" summary="worldwide browser market share statistics, past 12 months" width="80%" style="text-align:right !important;margin:20px auto"><tr><th
width="20%">Browser</th><th
width="20%">March 2012</th><th
width="20%">March 2013</th><th
width="20%">change</th><th
width="20%">relative</th></tr><tr><th>IE (all)</th><td>34.81%</td><td>29.29%</td><td
class="dn">-5.52%</td><td
class="dn">-15.90%</td></tr><tr><th>IE 9.0+</th><td>14.56%</td><td>18.07%</td><td
class="up">+3.51%</td><td
class="up">+24.10%</td></tr><tr><th>IE 8.0</th><td>16.00%</td><td>10.29%</td><td
class="dn">-5.71%</td><td
class="dn">-35.70%</td></tr><tr><th>IE 7.0</th><td>2.91%</td><td>0.64%</td><td
class="dn">-2.27%</td><td
class="dn">-78.00%</td></tr><tr><th>IE 6.0</th><td>1.34%</td><td>0.29%</td><td
class="dn">-1.05%</td><td
class="dn">-78.40%</td></tr><tr><th>Firefox</th><td>24.99%</td><td>20.85%</td><td
class="dn">-4.14%</td><td
class="dn">-16.60%</td></tr><tr><th>Chrome</th><td>30.92%</td><td>38.13%</td><td
class="up">+7.21%</td><td
class="up">+23.30%</td></tr><tr><th>Safari</th><td>6.71%</td><td>8.48%</td><td
class="up">+1.77%</td><td
class="up">+26.40%</td></tr><tr><th>Opera</th><td>1.76%</td><td>1.16%</td><td
class="dn">-0.60%</td><td
class="dn">-34.10%</td></tr><tr><th>Others</th><td>0.81%</td><td>2.09%</td><td
class="up">+1.28%</td><td
class="up">+158.00%</td></tr></table><p>The tables show market share estimates for desktop browsers. The &#8216;change&#8217; column is the absolute increase or decrease in market share. The &#8216;relative&#8217; column indicates the proportional change, i.e. another 5.9% of IE7 users abandoned the browser last month. There are several caveats so I recommend you read <a
href="http://blogs.sitepoint.com/how-browser-market-share-is-calculated">How Browser Market Share is Calculated</a>.</p><p>Just as I think Google cannot possibly increase their share further, Chrome takes another 1% bite of the browser market. The last time this occurred was <a
href="/browser-trends-august-2012/">July 2012</a>. To put it into context, that&#8217;s the equivalent of every Opera user or all combined IE6 and IE7 users abandoning their browser in a single month.</p><p>Chrome was the only mainstream browser with positive growth last month and it&#8217;s clear other vendors are struggling to compete. Does Google have an unfair commercial advantage? Few users pass a day without using the search engine, GMail, Analytics, <a
href="/goodbye-google-reader/">Reader</a> or another vital service which politely suggests they switch to Chrome. Google also has the cash reserves to promote their browser on prime-time television, at the movies, in newspapers and magazines. And let&#8217;s not forget Google controls the world&#8217;s most-used smartphone platform and Chrome OS.</p><p>That said, advertising would be worthless without a good application. Developers like Chrome. Users like Chrome. Even the most ardent IE, Firefox, Safari and Opera fanboys have little bad to say about the browser. It may no longer enjoy significant technical advantages but other vendors must either produce more competitive software or hope Google becomes complacent.</p><p>IE9 has been hovering around 18% for six months but IE10 has begun to cannibalize its share following the <a
href="/microsoft-ie10-windows7-update/">recent Windows 7 update</a>. At the end of March, IE9 had 15.81% and IE10 2.26%. IE8 dropped more than any other browser and looks likely to fall below 10% this month. IE6 and IE7 barely changed but they&#8217;ve become mostly insignificant.</p><p>Firefox fell another 0.5% and it&#8217;s starting to look like a monthly trend. The browser works well on Windows and is more than a match for Chrome but I suspect it&#8217;s lost most ground on Mac, Linux and mobile platforms. Unless Mozilla can convince users to stay, Firefox could drop below 20% by the end of May 2013.</p><p>Safari had a better month than most but almost 6% of Opera users abandoned the desktop browser. That could be a statistical anomaly or perhaps users are unimpressed with the company&#8217;s <a
href="/opera-switches-to-webkit-rendering-engine/">switch to Webkit</a>? Let&#8217;s see how they fare on mobile devices&hellip;</p><h2 id="mobile">Mobile Browser Usage</h2><p>Mobile usage increased a fraction to <a
href="http://gs.statcounter.com/#mobile_vs_desktop-ww-monthly-201303-201303-bar">14.44% of all web activity</a> during March 2013.</p><p>The primary mobile browsing applications:</p><ol><li>Android &#8212; 30.78% (down 0.76%)</li><li>iPhone &#8212; 24.44% (up 0.08%)</li><li>Opera Mini/Mobile &#8211; 15.54% (up 0.14%)</li><li>UC Browser &#8212; 8.27% (down 0.07%)</li><li>Nokia browser &#8212; 6.96% (up 0.05%)</li></ol><p>It&#8217;s difficult to spot trends because the mobile market is erratic and influenced by local factors. For example, the iPhone is massively popular in western countries, but less so in Asia, Africa and South America where Android and Opera compete for the top spot.</p><p>There&#8217;s been a slightly unusual fall for Android but I wouldn&#8217;t read too much into that. The Chrome mobile browser has a 2.02% market share and is starting to increase as rapidly as its desktop cousin. Google is everywhere.</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/browser-trends-april-2013-is-chrome-unstoppable/feed/</wfw:commentRss> <slash:comments>11</slash:comments> </item> <item><title>What&#8217;s New in Firefox 20</title><link>http://www.sitepoint.com/firefox-20-whats-new/</link> <comments>http://www.sitepoint.com/firefox-20-whats-new/#comments</comments> <pubDate>Fri, 05 Apr 2013 11:26:27 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[Browsers]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[News]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[firefox]]></category> <category><![CDATA[HTML5 Dev Center]]></category> <category><![CDATA[Mozilla]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=65105</guid> <description><![CDATA[Craig looks at a number of great new features for developers and users in the latest release of Mozilla's flagship browser.]]></description> <content:encoded><![CDATA[<p></p><p>Version numbers may be meaningless but Firefox 20 marks a milestone for Mozilla&#8217;s flagship browser. The new release appeared on April 2 exactly <a
href="http://www.sitepoint.com/firefox-19-whats-new/">six weeks after version 19</a>. If you don&#8217;t have it, open Help &gt; About Firefox or download the browser from <a
href="http://getfirefox.com/">getfirefox.com</a>.</p><p>Firefox 20 has a surprising number of new features &#8212; let&#8217;s look at the best&hellip;</p><h2>Developer Tool Updates</h2><p>Firefox has received an incredible number of tools within the past few releases. The Developer menu has been reorganized to order them more effectively and a new <strong>Toggle Tools</strong> option provides quick access to the Web Console. The Console can also be viewed within its own panel as well as docked.</p><p>A new JavaScript Profiler had been promised for version 20 but the feature has been delayed for a later release.</p><h2>New Download Manager</h2><p>If I recall correctly, this is the first major update to the Download Manager since it appeared in Phoenix back in 2002. The dedicated panel has been replaced by a drop-down list accessed by a new toolbar icon which highlights the time remaining:<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p><img
src="https://support.cdn.mozilla.net/media/uploads/gallery/images/2013-03-13-22-24-02-13abf7.png" width="600" height="424" alt="Firefox download manager" class="center" /></p><p>It&#8217;s a nice touch. Previous downloads are still logged in bookmarks and history panel.</p><h2>getUserMedia Support</h2><p>Firefox now provides the <a
href="https://developer.mozilla.org/en-US/docs/WebRTC/navigator.getUserMedia">getUserMedia HTML5 API</a> which has been available in Chrome and Opera for several months. With the user&#8217;s permission, you can capture audio and video from a microphone or camera. <a
href="http://shinydemos.com/photo-booth/">Opera&#8217;s Photo Booth</a> provides an excellent demonstration of the technology.</p><h2>canvas Blend Modes</h2><p>When you draw on a canvas element any existing pixels are normally replaced. However, the new <code>globalCompositeOperation</code> property permits Photoshop-like overlay effects including multiply, screen, darken, lighten, color-dodge, color-burn and difference. Refer to <a
href="https://hacks.mozilla.org/2012/12/firefox-development-highlights-per-window-private-browsing-canvas-globalcompositeoperation-new-values/">this Mozilla article</a> for more information.</p><h2>Audio and Video playbackRate Support</h2><p>Have you ever wanted to watch a tedious movie at double-speed? The <code>playbackRate</code> property permits just that (apologies for the inline code):</p><pre><code>&lt;video id=&quot;v&quot; src=&quot;video.webm&quot; controls autoplay&gt;&lt;/video&gt;
&lt;a href=&quot;#&quot; onclick=&quot;document.getElementById(&quot;v&quot;).playbackRate=2;return false;&quot;&gt;fast foward&lt;/a&gt;</code></pre><p><a
href="http://jsbin.com/videoPlaybackRate/4">View a demonstration movie&hellip;</a></p><h2>Improved Private Browsing</h2><p>Private browsing prevents Firefox updating your history, caching pages, saving passwords and storing cookies.</p><p>While it&#8217;s been available for some time, clicking &#8220;Start Private Browsing&#8221; from the menu would close your current window and start a new session. From version 20, Firefox permits you to have any number of private and non-private windows open at a time.</p><h2>Better Plugin Stability</h2><p>Browser stability is largely irrelevant if your plugins cause chaos. Fortunately, the new version of Firefox detects hanging plugins and allows you to close them without restarting the browser. I doubt it will end plugin problems but it&#8217;s a step in the right direction.</p><h2>Want More?</h2><p>Firefox developers had a busy six weeks&hellip;</p><ul><li>CSS and JavaScript now load with a higher priority than images to improve response times.</li><li>various ECMAScript 6 additions</li><li>performance improvements</li><li>a dozen <a
href="https://www.mozilla.org/security/known-vulnerabilities/firefox.html">security fixes</a>.</li></ul><p>I&#8217;m not sure how long Mozilla can keep up the pace of development, but other vendors should take note <em>(seriously Google, could you only manage a spell checker in Chrome 26?!)</em></p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/firefox-20-whats-new/feed/</wfw:commentRss> <slash:comments>13</slash:comments> </item> <item><title>How to Build a Better Tag Cloud in WordPress</title><link>http://www.sitepoint.com/better-wordpress-tag-cloud/</link> <comments>http://www.sitepoint.com/better-wordpress-tag-cloud/#comments</comments> <pubDate>Mon, 25 Mar 2013 13:51:39 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[CSS3]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[HTML5 Dev Center]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[tag]]></category> <category><![CDATA[tag cloud]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=64744</guid> <description><![CDATA[Craig isn't happy with the HTML produced by WordPress's wp_tag_cloud() function. In this tutorial he provides a customizable tag cloud generator which can be styled using CSS.]]></description> <content:encoded><![CDATA[<p></p><p>Once you&#8217;ve defined a great set of tags for your WordPress posts (<a
href="http://www.sitepoint.com/wordpress-pages-use-tags/">or pages</a>), you&#8217;ll want to display a tag cloud from somewhere in your template. This is normally achieved using the <a
href="http://codex.wordpress.org/Function_Reference/wp_tag_cloud" class="broken_link">wp_tag_cloud()</a> or <a
href="http://codex.wordpress.org/Function_Reference/wp_generate_tag_cloud" class="broken_link">wp_generate_tag_cloud()</a> functions which do the hard work for you:</p><pre><code>&lt;a href=&quot;http://www.mysite.com/tag/word&quot; class=&quot;tag-link-7&quot; title=&quot;1 topic&quot; style=&quot;font-size: 8pt;&quot;&gt;word&lt;/a&gt;
&lt;a href=&quot;http://www.mysite.com/tag/tag&quot; class=&quot;tag-link-5&quot; title=&quot;2 topics&quot; style=&quot;font-size: 14.3pt;&quot;&gt;tag&lt;/a&gt;
&lt;a href=&quot;http://www.mysite.com/tag/phrase&quot; class=&quot;tag-link-6&quot; title=&quot;4 topics&quot; style=&quot;font-size: 22pt;&quot;&gt;phrase&lt;/a&gt;
&lt;a href=&quot;http://www.mysite.com/tag/subject&quot; class=&quot;tag-link-4&quot; title=&quot;1 topic&quot; style=&quot;font-size: 8pt;&quot;&gt;subject&lt;/a&gt;
</code></pre><p>Perhaps you&#8217;re happy with that. I&#8217;m not&hellip;<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><ol><li>Inline styles? Didn&#8217;t we abandon those in 1998?</li><li>The classes are pointless. I&#8217;ll probably never need to style an individual tag and, even if I do, referencing it by ID is fragile.</li><li>I don&#8217;t need the fully-qualified URL.</li></ol><p><code>wp_tag_cloud()</code> offers several options but I want more control! As well as addressing the points above, I&#8217;d like to assign five or six classes to tags depending on their popularity, e.g. &#8216;tagged1&#8242; for the least-used tag through to &#8216;tagged5&#8242; for the most used.</p><p>Let&#8217;s write a PHP function which returns a customized tag cloud. It can be placed in your theme&#8217;s functions.php file (wp-content/themes/&lt;themename&gt;/functions.php) or a plugin.</p><p>First, we have our function name which accepts an array of named arguments and sets defaults:</p><pre><code>// generate tag cloud
function My_TagCloud($params = array()) {
	extract(shortcode_atts(array(
		'orderby' =&gt; 'name',		// sort by name or count
		'order' =&gt; 'ASC',		// in ASCending or DESCending order
		'number' =&gt; '',			// limit the number of tags
		'wrapper' =&gt; '',		// a tag wrapped around tag links, e.g. li
		'sizeclass' =&gt; 'tagged',	// the tag class name
		'sizemin' =&gt; 1,			// the smallest number applied to the tag class
		'sizemax' =&gt; 5			// the largest number applied to the tab class
	), $params));
</code></pre><p>We now initialize <code>$ret</code>, our returned HTML, and <code>$min</code> and <code>$max</code> &#8212; the minimum and maximum number of times a tag is used:</p><pre><code>	// initialize
	$ret = '';
	$min = 9999999; $max = 0;
</code></pre><p>The WordPress <a
href="http://codex.wordpress.org/Function_Reference/get_tags" class="broken_link">get_tags()</a> function is now called. It returns an array of tag objects:</p><pre><code>	// fetch all WordPress tags
	$tags = get_tags(array('orderby' =&gt; $orderby, 'order' =&gt; $order, 'number' =&gt; $number));
</code></pre><p>We now need to determine the the minimum and maximum number of times a tag is used in our site. The following loop sets <code>$min</code> and <code>$max</code> accordingly:</p><pre><code>	// get minimum and maximum number tag counts
	foreach ($tags as $tag) {
		$min = min($min, $tag-&gt;count);
		$max = max($max, $tag-&gt;count);
	}
</code></pre><p>We can now create our custom tag cloud HTML. We need to loop through all tags a second time and fetch the URL and the link title &#8212; a message indicating how many articles use that tag:</p><pre><code>	// generate tag list
	foreach ($tags as $tag) {
		$url = get_tag_link($tag-&gt;term_id);
		$title = $tag-&gt;count . ' article' . ($tag-&gt;count == 1 ? '' : 's');
</code></pre><p>Now for the tricky bit. By default, we want to assign a class &#8216;tagged1&#8242; for the least-used tag through to &#8216;tagged5&#8242; for the most used (the class name and numbers can be overridden by setting <code>sizeclass</code>, <code>sizemin</code> and <code>sizemax</code> parameters when calling the function).</p><p>We know the minimum and maximum number of times a tag can be used so a little math can determine the class name for us. However, the equation would cause a divide by zero error if each tag was used, say, only once. In that situation, we set the class to just <code>$sizeclass</code>:</p><pre><code>		if ($max &gt; $min) {
			$class = $sizeclass . floor((($tag-&gt;count - $min) / ($max - $min)) * ($sizemax - $sizemin) + $sizemin);
		}
		else {
			$class = $sizeclass;
		}
</code></pre><p>We now have enough information to create the HTML for our single tag and end the loop:</p><pre><code>		$ret .=
			($wrapper ? &quot;&lt;$wrapper&gt;&quot; : '') .
			&quot;&lt;a href=\&quot;$url\&quot; class=\&quot;$class\&quot; title=\&quot;$title\&quot;&gt;{$tag-&gt;name}&lt;/a&gt;&quot; .
			($wrapper ? &quot;&lt;/$wrapper&gt;&quot; : '');
	}
</code></pre><p>Finally, we remove the blog domain URL from <code>$ret</code>, return the value and complete the function block:</p><pre><code>	return str_replace(get_bloginfo('url'), '', $ret);
}
</code></pre><p>The function can be called in any theme file using <code>My_TagCloud();</code>. Arguments can be passed as an associative array, e.g. <code>My_TagCloud(array('orderby'=&gt;'count','order'=&gt;'DESC'));</code>. However, we could also permit content editors to add a tag cloud using a WordPress shortcode, e.g.</p><pre><code>// enable [tagcloud] shortcode
add_shortcode('tagcloud', 'My_TagCloud');
</code></pre><p>In the following example we&#8217;ll create a tag cloud within an unordered list:</p><pre><code>$tags = OW_Tags(array('wrapper' =&gt; 'li'));
if ($tags) {
	echo &quot;&lt;h2&gt;Tags&lt;/h2&gt;\n&lt;ul class=\&quot;tagcloud\&quot;&gt;$tags&lt;/ul&gt;\n&quot;;
}
</code></pre><p>This produces far tidier HTML code:</p><pre><code>&lt;h2&gt;Tags&lt;/h2&gt;
&lt;ul class=&quot;tagcloud&quot;&gt;
&lt;li&gt;&lt;a href=&quot;/tag/word&quot; class=&quot;tagged1&quot; title=&quot;1 article&quot;&gt;word&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/tag/tag&quot; class=&quot;tagged2&quot; title=&quot;2 articles&quot;&gt;tag&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/tag/phrase&quot; class=&quot;tagged5&quot; title=&quot;4 articles&quot;&gt;phrase&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/tag/subject&quot; class=&quot;tagged1&quot; title=&quot;1 article&quot;&gt;subject&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre><p>which is easier to style and maintain CSS:</p><pre><code>ul.tagcloud, ul.tagcloud li
{
	font-size: 1em;
	list-style-type: none;
	padding: 0;
	margin: 0;
}
ul.tagcloud li
{
	display: inline;
}
ul.tagcloud a
{
	text-decoration: none;
	padding: 3px 4px;
}
a.tagged1 { font-size: 0.60em; }
a.tagged2 { font-size: 0.80em; }
a.tagged3 { font-size: 1.00em; }
a.tagged4 { font-size: 1.20em; }
a.tagged5 { font-size: 1.40em; }
</code></pre><p>I hope you find it useful. Please use and adapt the code however you like in your own WordPress projects.</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/better-wordpress-tag-cloud/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>How to Enable Tags in WordPress Pages</title><link>http://www.sitepoint.com/wordpress-pages-use-tags/</link> <comments>http://www.sitepoint.com/wordpress-pages-use-tags/#comments</comments> <pubDate>Wed, 20 Mar 2013 16:56:09 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[Content management]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[plugin]]></category> <category><![CDATA[tags]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=64639</guid> <description><![CDATA[Why doesn't WordPress permit tags on Pages? Craig never understood the reason so he's provided a few lines of code which enables them.]]></description> <content:encoded><![CDATA[<p></p><p>Tags have been supported in WordPress since version 2.3 was released in 2007. When used well, they can be a more effective form of navigation than categories or menus. <em>But why has it never been possible to tag WordPress pages?</em></p><p>Fortunately, WordPress provides the tools to help us enable tags in pages and any other type of post. Beneath the surface, WordPress treats pages, posts and other content in much the same way; a page is just a custom post type. Therefore, enabling tags is simply a matter of saying <em>&#8220;hey WordPress, I&#8217;d like to use tags on my pages and don&#8217;t forget to include them in the tag cloud!&#8221;</em></p><p>Let&#8217;s convert that to code you can insert into your theme&#8217;s functions.php file (wp-content/themes/&lt;themename&gt;/functions.php):</p><pre><code>// add tag support to pages
function tags_support_all() {
	register_taxonomy_for_object_type('post_tag', 'page');
}
// ensure all tags are included in queries
function tags_support_query($wp_query) {
	if ($wp_query-&gt;get('tag')) $wp_query-&gt;set('post_type', 'any');
}
// tag hooks
add_action('init', 'tags_support_all');
add_action('pre_get_posts', 'tags_support_query');
</code></pre><p>Simple. If you have further custom post types which require tags, you&#8217;ll need to add <code>register_taxonomy_for_object_type</code> calls for each &#8212; the second argument is the type name.</p><p>Those running several WordPress sites or a network may find it easier to convert the code to a plugin so it can be enabled and disabled accordingly. In essence, that&#8217;s a matter of adding the code above to a suitably-named plugin file, i.e. wp-content/plugins/enable-tags.php, and placing comments at the top:</p><pre><code>&lt;?php
/*
Plugin Name: Enable Tags in WordPress Pages
Plugin URI: http://www.sitepoint.com/
Description: Enables tags in all content
Version: 1.0
Author: Craig Buckler
Author URI: http://twitter.com/craigbuckler
License: Free to use and adapt
*/
// add tag support to pages
// ... rest of code ...
</code></pre><p>I hope you find it useful. Please use and adapt the code as you like in your own projects &#8212; a link back to this article is appreciated.</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/wordpress-pages-use-tags/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>What&#8217;s New in NetBeans 7.3: HTML5!</title><link>http://www.sitepoint.com/netbeans-73-html5-support/</link> <comments>http://www.sitepoint.com/netbeans-73-html5-support/#comments</comments> <pubDate>Mon, 11 Mar 2013 18:58:35 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[Browsers]]></category> <category><![CDATA[CSS3]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[News]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[editor]]></category> <category><![CDATA[HTML5 Dev Center]]></category> <category><![CDATA[HTML5 Tutorials & Articles]]></category> <category><![CDATA[IDE]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[software]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=63562</guid> <description><![CDATA[Craig looks at the new HTML5, CSS3 and JavaScript editing features in the latest edition of the ever-popular NetBeans IDE.]]></description> <content:encoded><![CDATA[<p></p><p>Owing to my rapidly increasing age I&#8217;ve used many, many IDEs and text editors over the years. Visual Studio, Aptana, Eclipse, HomeSite, CoffeeCup, Bluefish, Komodo, Vim, Crimson, jEdit, TextPad, PSPad, ConTEXT, PHPEdit, ScITE &#8212; I&#8217;ve probably forgotten more than I remember. Most annoy me. They often miss features I want or add bloat I don&#8217;t need. My current editor of choice is <a
href="http://www.notepad-plus-plus.org/">Notepad++</a>: it&#8217;s simple, lightweight and very configurable.</p><p>Historically, HTML editors have been fairly awful. Many IDEs forced you to create dumb projects, insisted on particular doctypes, or favored deprecated tags. JavaScript editing could be worse: the editor programmers didn&#8217;t understand the language so even basic features such as function lists could fail.</p><p>Fortunately, the situation has improved and <a
href="http://netbeans.org/">NetBeans 7.3 has been released</a> with full support for HTML5, CSS and JavaScript. The cross-platform IDE now includes an HTML project wizard which allows you to select popular boilerplate templates and JavaScript frameworks:</p><p><a
href="http://wiki.netbeans.org/wiki/images/9/9b/Html5project-a2.png"><img
src="http://wiki.netbeans.org/wiki/images/9/9b/Html5project-a2.png" alt="NetBeans HTML5 project" width="600" class="center" /></a><div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>There&#8217;s a lightweight internal server, embedded WebKit browser, Chrome integration and responsive web design facilities:</p><p><a
href="http://wiki.netbeans.org/wiki/images/6/6d/Chrome-ext-resize-01.png"><img
src="http://wiki.netbeans.org/wiki/images/6/6d/Chrome-ext-resize-01.png" alt="NetBeans Chrome integration" width="390" class="center" /></a></p><p>CSS styles can be edited directly or changed within the Inspector-like rule editor:</p><p><a
href="http://wiki.netbeans.org/wiki/images/f/f6/RuleEditor.png"><img
src="http://wiki.netbeans.org/wiki/images/f/f6/RuleEditor.png" alt="NetBeans CSS editing" width="287" class="center" /></a></p><p>The JavaScript editor has been rewritten to include better code completion, jQuery support and pattern recognition:</p><p><a
href="http://wiki.netbeans.org/wiki/images/2/2e/Nb72_JS_comment_generation_after.png"><img
src="http://wiki.netbeans.org/wiki/images/2/2e/Nb72_JS_comment_generation_after.png" alt="NetBeans JavaScript editing" width="434" class="center" /></a></p><p>There&#8217;s also a new debugger which can analyze code running in the internal browser or Chrome. You can apply breakpoints on lines, when a DOM element changes, when events are raised and when Ajax requests are called. Very useful:</p><p><a
href="http://wiki.netbeans.org/wiki/images/a/a0/LineBreakpoints.png"><img
src="http://wiki.netbeans.org/wiki/images/a/a0/LineBreakpoints.png" alt="NetBeans JavaScript debugger" width="600" class="center" /></a></p><p>Finally, there&#8217;s a great browser log which displays exceptions, errors and warnings as they occur:</p><p><a
href="http://wiki.netbeans.org/wiki/images/2/2e/Browserlog.png"><img
src="http://wiki.netbeans.org/wiki/images/2/2e/Browserlog.png" alt="NetBeans JavaScript log" width="600" class="center" /></a></p><p>Don&#8217;t forget that NetBeans also provides first-class development facilities for PHP, Java and C/C++. If you&#8217;re into that sort of thing.</p><p>It&#8217;s great to see client side browser technologies finally receiving the tools they deserve. I&#8217;m going to give NetBeans another look &hellip; <em>will you?</em></p><p>NetBeans is available for free from <a
href="http://netbeans.org/"><strong>netbeans.org</strong></a>.</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/netbeans-73-html5-support/feed/</wfw:commentRss> <slash:comments>11</slash:comments> </item> <item><title>5 Reasons to Reject the WebKit Monoculture</title><link>http://www.sitepoint.com/5-reasons-to-reject-webkit-monoculture/</link> <comments>http://www.sitepoint.com/5-reasons-to-reject-webkit-monoculture/#comments</comments> <pubDate>Fri, 08 Mar 2013 15:43:07 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[Browsers]]></category> <category><![CDATA[CSS3]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[News]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[AApple]]></category> <category><![CDATA[browsers]]></category> <category><![CDATA[chrome]]></category> <category><![CDATA[firefox]]></category> <category><![CDATA[Google Tutorials & Articles]]></category> <category><![CDATA[ie]]></category> <category><![CDATA[opera]]></category> <category><![CDATA[safari]]></category> <category><![CDATA[webkit]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=63486</guid> <description><![CDATA[Could Microsoft and Mozilla follow Opera and adopt WebKit? Would this provide a single, universal platform which ends cross-browser compatibility woes? Craig thinks not...]]></description> <content:encoded><![CDATA[<p></p><p><a
href="http://www.sitepoint.com/opera-switches-to-webkit-rendering-engine/">Opera&#8217;s WebKit announcement</a> has divided developer opinion. Some are pleased there are fewer rendering engines to support <em>(not that many developers actively tested Opera)</em>. Others state this is the beginning of the WebKit monoculture and IE6-like doom is upon us. The truth is somewhere in between but there are several reasons for concern.</p><h2>1. WebKit != IE6, but&hellip;</h2><p>WebKit is an open source rendering engine. It is not owned or controlled by a single organisation; anyone can use and modify the code. In comparison, IE (and its Trident engine) is owned by Microsoft and only available on Windows. Microsoft decision to abandon browser development could not occur in the WebKit world.</p><p>However, it&#8217;s important to remember that Apple and Google &#8212; two of the most powerful global IT companies &#8212; are in control of the most popular WebKit browsers. Apple is also responsible for handling WebKit developer agreements and either company can accept, reject or modify WebKit features to their commercial advantage. While you may be able to update the core engine, it won&#8217;t matter unless those changes eventually reach Chrome and Safari.</p><h2>2. WebKit is not one engine</h2><p>Some developers believe cross-browser compatibility issues will disappear if all vendors use the same engine. It would certainly make development easier, but it&#8217;s naive to think all problems would be eradicated. Test a reasonably complex design in Chrome and Safari today and you will encounter differences.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>WebKit is forked and evolves along different paths. Vendors have different devices, deployment schedules and requirements. For example, Apple regularly add proprietary iOS-specific properties which may never reach the W3C or appear as recommendations.</p><h2>3. WebKit is not the best engine</h2><p>Those who support the monoculture argue that WebKit has won; it&#8217;s beaten Gecko and Trident. They are wrong. No engine is perfect, but you learn to forgive or avoid issues when you concentrate on a single browser.</p><p>WebKit is excellent and it was certainly the first to hit the CSS3 animation headlines. But if you think it&#8217;s ahead of all others, try using SVGs. Attempt animating pseudo elements. Use an unprefixed transform, animation or calc() function. Code using newer HTML5 form elements. Try persuading Firebug fans to abandon their favorite development tool. Don&#8217;t take my word for it &#8212; Dave Methvin of the jQuery core team and president of the jQuery Foundation <a
href="http://blog.methvin.com/2013/02/tragedy-of-webkit-commons.html">states</a>:</p><blockquote><p>Each release of Chrome or Safari generates excitement about new bleeding-edge features; nobody seems to worry about the stuff that&#8217;s already (still!) broken. jQuery Core has more lines of fixes and patches for WebKit than any other browser. In general these are not recent regressions, but long-standing problems that have yet to be addressed.</p><p>When we started our jQuery 2.0 cleanup to remove IE 6/7/8 hacks, we were optimistic that we would also be able to remove some bloat from lingering patches needed for really old browsers like Safari 2. But several of those WebKit hacks still remain. It&#8217;s starting to feel like oldIE all over again, but with a different set of excuses for why nothing can be fixed.</p></blockquote><p>WebKit, Gecko, Presto and Trident are all good rendering engines. They have strengths, they have weaknesses, but none is an outright winner in all areas.</p><h2>4. A monoculture means and end to standards</h2><p>One group of people was wholly responsible for the IE6 debacle&hellip;</p><p><em>web developers</em></p><p>IE6&#8242;s longevity was not the fault of system administrators, slow-moving organizations or an evil Microsoft. Ten years ago, developers targeted IE &#8212; not web standards. IE6 was the standard born from a monoculture; few considered a future where IE did not exist.</p><p>While there may never be a single WebKit engine, developers will choose it over W3C standards. If something works in WebKit browsers, it won&#8217;t matter whether that feature is proprietary, implemented incorrectly or fails elsewhere: <em>it becomes the standard</em>. At that point, you have to hope WebKit is never superseded by a better alternative &#8212; a horrible thought.</p><h2>5. Competition is good</h2><p>I&#8217;m saddened to see the demise of Presto but Opera made a logical business decision. Their primary market is mobile devices and Apple control the only HTML engine permitted on the iPhone and iPad. However, those restrictions do not apply to Microsoft and Mozilla. They have nothing to gain from switching to WebKit:</p><ul><li>If Microsoft scrapped Trident, it would affect every Windows application using web integration. It would cause chaos. I&#8217;m sure it would be technically possible to implement an API translation bridge, but how long would that take and what commercial benefit would it offer?</li><li>Mozilla is not a commercial operation; there are no stakeholders or profit targets. The organization exists because it has Gecko, XUL and a range of related technologies. While they could switch to WebKit, it would end major projects such as Firefox OS.</li></ul><p>Competition has been good for the web industry. A WebKit monoculture brings short-term development ease at the expense of long-term evolution and growth. Be careful what you wish for.</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/5-reasons-to-reject-webkit-monoculture/feed/</wfw:commentRss> <slash:comments>19</slash:comments> </item> <item><title>Browser Trends March 2013: IE Drops Below 30%</title><link>http://www.sitepoint.com/browser-trends-march-2013/</link> <comments>http://www.sitepoint.com/browser-trends-march-2013/#comments</comments> <pubDate>Fri, 01 Mar 2013 08:46:58 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[Browsers]]></category> <category><![CDATA[News]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[Operating systems]]></category> <category><![CDATA[chrome]]></category> <category><![CDATA[firefox]]></category> <category><![CDATA[HTML5 Dev Center]]></category> <category><![CDATA[ie]]></category> <category><![CDATA[opera]]></category> <category><![CDATA[safari]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=63733</guid> <description><![CDATA[Craig takes his monthly look at the winners and losers in the desktop and mobile browser usage charts. IE's total market share has dipped under 30% and the combined total for IE6 and 7 has fallen below 1%.]]></description> <content:encoded><![CDATA[<p></p><p>It may have been a short <a
href="http://www.sitepoint.com/browser-trends-february-2013/">28 days since our last look</a>, but there have been some interesting movements in the browser chart. Here are the <a
href="http://gs.statcounter.com/#browser_version_partially_combined-ww-monthly-201302-201302-bar">latest figures according to StatCounter</a>&hellip;</p><h2>Worldwide Browser Statistics January 2013 to February 2013</h2><p>The following table shows browser usage movements during the past month.</p><table
id="stats" summary="worldwide browser market share statistics, February 2013" width="80%" style="text-align:right !important;margin:20px auto"><tr><th
width="20%">Browser</th><th
width="20%">January</th><th
width="20%">February</th><th
width="20%">change</th><th
width="20%">relative</th></tr><tr><th>IE (all)</th><td>30.70%</td><td>29.82%</td><td
class="dn">-0.88%</td><td
class="dn">-2.90%</td></tr><tr><th>IE 9.0+</th><td>18.52%</td><td>18.08%</td><td
class="dn">-0.44%</td><td
class="dn">-2.40%</td></tr><tr><th>IE 8.0</th><td>11.12%</td><td>10.76%</td><td
class="dn">-0.36%</td><td
class="dn">-3.20%</td></tr><tr><th>IE 7.0</th><td>0.73%</td><td>0.68%</td><td
class="dn">-0.05%</td><td
class="dn">-6.80%</td></tr><tr><th>IE 6.0</th><td>0.33%</td><td>0.30%</td><td
class="dn">-0.03%</td><td
class="dn">-9.10%</td></tr><tr><th>Firefox</th><td>21.43%</td><td>21.34%</td><td
class="dn">-0.09%</td><td
class="dn">-0.40%</td></tr><tr><th>Chrome</th><td>36.55%</td><td>37.11%</td><td
class="up">+0.56%</td><td
class="up">+1.50%</td></tr><tr><th>Safari</th><td>8.27%</td><td>8.58%</td><td
class="up">+0.31%</td><td
class="up">+3.70%</td></tr><tr><th>Opera</th><td>1.19%</td><td>1.23%</td><td
class="up">+0.04%</td><td
class="up">+3.40%</td></tr><tr><th>Others</th><td>1.86%</td><td>1.92%</td><td
class="up">+0.06%</td><td
class="up">+3.20%</td></tr></table><h2>Worldwide Browser Statistics February 2012 to February 2013</h2><p>The following table shows browser usage movements during the past twelve months:<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><table
id="stats" summary="worldwide browser market share statistics, past 12 months" width="80%" style="text-align:right !important;margin:20px auto"><tr><th
width="20%">Browser</th><th
width="20%">February 2012</th><th
width="20%">February 2013</th><th
width="20%">change</th><th
width="20%">relative</th></tr><tr><th>IE (all)</th><td>35.75%</td><td>29.82%</td><td
class="dn">-5.93%</td><td
class="dn">-16.60%</td></tr><tr><th>IE 9.0+</th><td>12.09%</td><td>18.08%</td><td
class="up">+5.99%</td><td
class="up">+49.50%</td></tr><tr><th>IE 8.0</th><td>18.86%</td><td>10.76%</td><td
class="dn">-8.10%</td><td
class="dn">-42.90%</td></tr><tr><th>IE 7.0</th><td>3.32%</td><td>0.68%</td><td
class="dn">-2.64%</td><td
class="dn">-79.50%</td></tr><tr><th>IE 6.0</th><td>1.48%</td><td>0.30%</td><td
class="dn">-1.18%</td><td
class="dn">-79.70%</td></tr><tr><th>Firefox</th><td>24.88%</td><td>21.34%</td><td
class="dn">-3.54%</td><td
class="dn">-14.20%</td></tr><tr><th>Chrome</th><td>29.88%</td><td>37.11%</td><td
class="up">+7.23%</td><td
class="up">+24.20%</td></tr><tr><th>Safari</th><td>6.76%</td><td>8.58%</td><td
class="up">+1.82%</td><td
class="up">+26.90%</td></tr><tr><th>Opera</th><td>2.02%</td><td>1.23%</td><td
class="dn">-0.79%</td><td
class="dn">-39.10%</td></tr><tr><th>Others</th><td>0.71%</td><td>1.92%</td><td
class="up">+1.21%</td><td
class="up">+170.40%</td></tr></table><p>The tables show market share estimates for desktop browsers. The &#8216;change&#8217; column is the absolute increase or decrease in market share. The &#8216;relative&#8217; column indicates the proportional change, i.e. another 9.1% of IE6 users abandoned the browser last month. There are several caveats so I recommend you read <a
href="http://blogs.sitepoint.com/how-browser-market-share-is-calculated">How Browser Market Share is Calculated</a>.</p><p>Internet Explorer has fallen below 30%. Prehistoric browser usage statistics are a little hazy, but I suspect it had that total during the early days of IE4 back in 1997.</p><p>Some news which will make web developers rejoice: the combined total for IE6 and 7 has fallen below 1%. The biggest drop occurred in China where the browsers held more than 30% twelve months ago, but now hold 6%. Admittedly, 1% of the worldwide market is still a lot of people, but the figures are dropping fast and &#8212; unless you&#8217;re very unlucky &#8212; they&#8217;re no longer of any concern for you or your clients.</p><p>It&#8217;s not all gloom for Microsoft; IE10 grew by 20%. It remains the fastest growing browser but, at 1.21%, any movements are exaggerated. Interestingly, Windows 8 holds 3.16% of the OS market; we can therefore deduce that 38% of Windows 8 users have IE10 as their default. Usage trends are more complex and early adopters are likely to be predominant users of Microsoft software but <a
href="http://www.sitepoint.com/internet-explorer-10-review-ie10/">IE10 is a solid browser</a>. The <a
href="http://www.sitepoint.com/ie10-final-windows-7/">recent release on Windows 7</a> and automated updates should increase its market share rapidly.</p><p>February&#8217;s biggest winner was Chrome. It&#8217;s growth has been relatively sedate recently so a jump of 0.56% is striking for a browser which holds almost 40% of the market.</p><p>Firefox barely moved, Safari enjoyed a small rise, and Opera also increased &#8212; its first rise in many months. Perhaps the news that <a
href="http://www.sitepoint.com/opera-switches-to-webkit-rendering-engine/">Opera is switching to WebKit</a> raised its profile.</p><p>WebKit is starting to dominate. It&#8217;s approaching a 50% share on desktops, has 56% of the mobile market and a near monopoly on smartphones and tablets. That makes me a little nervous &#8212; look out for <em>5 Reasons to Reject the WebKit Monoculture</em> on SitePoint next week.</p><h2 id="mobile">Mobile Browser Usage</h2><p>Mobile usage increased a fraction to <a
href="http://gs.statcounter.com/#mobile_vs_desktop-ww-monthly-201301-201301-bar">14.35% of all web activity</a> during February 2013.</p><p>The primary mobile browsing applications:</p><ol><li>Android &#8212; 31.54% (up 0.69%)</li><li>iPhone &#8212; 24.36% (up 1.28%)</li><li>Opera Mini/Mobile &#8211; 15.40% (up 0.05%)</li><li>UC Browser &#8212; 8.34% (down 1.41%)</li><li>Nokia browser &#8212; 6.91% 7.46% (down 0.55%)</li></ol><p>Apple&#8217;s iPhone appears has enjoyed a recent resurgence; it&#8217;s amazing that a single company holds 25% of the mobile market (well, a quarter of those using a phone to access the web). Android also continues to do well.</p><p>It&#8217;s difficult to see anyone breaking the Android/iPhone stranglehold, but perhaps Mozilla has a chance with their recently-released Firefox OS. The organization is targeting more affordable devices with lower hardware requirements and has almost 20 manufacturers on board. Firefox OS seems capable and is HTML5-based &#8212; you can even change OS styles and colors with a quick CSS update. The phones could become popular in developing countries, with school children and those unwilling to pay bloated prices.</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/browser-trends-march-2013/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>What&#8217;s New in Chrome 25</title><link>http://www.sitepoint.com/chrome-25-whats-new/</link> <comments>http://www.sitepoint.com/chrome-25-whats-new/#comments</comments> <pubDate>Mon, 25 Feb 2013 10:22:33 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[Browsers]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[News]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[chrome]]></category> <category><![CDATA[Google Tutorials & Articles]]></category> <category><![CDATA[HTML5 Dev Center]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=63566</guid> <description><![CDATA[Chrome has reached a quarter century -- in version numbers. Craig looks at a number of new features over and above the usual bug and security fixes.]]></description> <content:encoded><![CDATA[<p></p><p>The six-weekly Chrome and <a
href="http://www.sitepoint.com/firefox-19-whats-new/">Firefox updates</a> appear to have become synchronized to within a few days of each other. But you&#8217;d be forgiven for not noticing. That said, as well as the 22 plugged security holes, there are a number of new features in Chrome 25 which will stir the juices of developers everywhere&hellip;</p><h2>The web speech API</h2><p>Do you have a feeling of d&eacute;j&agrave; vu? I&#8217;m not surprised &#8212; <a
href="http://www.sitepoint.com/html5-speech-input-fields/">Webkit added speech recognition almost two years ago</a> and it appeared in Chrome 11. However, it was fairly basic and did not implement the <a
href="https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html">W3C speech API</a>. This provides far more control so you can react to speech events and process the phrases accordingly, e.g.</p><pre><code>if (webkitSpeechRecognition) {
	var recognition = new webkitSpeechRecognition();
	recognition.continuous = true;
	recognition.interimResults = true;
	// speech events
	recognition.onstart = function() { ... };
	recognition.onresult = function(event) { ... };
	recognition.onerror = function(event) { ... };
	recognition.onend = function() { ... };
}
</code></pre><p>Google has created a <a
href="https://www.google.com/intl/en/chrome/demos/speech.html">demonstration page</a> which illustrates a basic text entry box, but expect to see voice-driven techniques used to control web applications and games soon. For more information, refer to the <a
href="https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html">W3C speech API specification</a> and an <a
href="http://updates.html5rocks.com/2013/01/Voice-Driven-Web-Apps-Introduction-to-the-Web-Speech-API">introduction tutorial at HTML5Rocks</a>.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><h2>Evil Extension Eradication</h2><p>Do you have Chrome extensions you don&#8217;t remember installing? Google <em>helpfully</em> provides <a
href="http://developer.chrome.com/extensions/external_extensions.html">facilities and documentation</a> which allowed anyone to silently install an extension without your consent. This nasty behavior has been removed in Chrome 25 and the browser now implements Firefox-like add-on detection.</p><h2>CSS Media Override</h2><p>You can now emulate different media devices in Developer Tools &#8212; click the Settings cog, followed by Overrides. The facility allows you to test print and other stylesheets without needing to change code, using Print Preview or other convoluted methods:</p><p><img
src="http://blogs.sitepointstatic.com/images/tech/793-chrome-25-overrides.png" width="519" height="698" alt="Chrome Overrides" class="center" /></p><p>While you&#8217;re in developer tools, try using the new <code>console.clear()</code> method to clean the log.</p><h2>Windows App Launcher</h2><p>Google has ported this Chrome OS feature to Windows. The launcher is experimental and must be enabled by setting <strong>Show Chrome Apps Launcher</strong> in <a
href="//flags/" class="broken_link">chrome://flags/</a>. Restart Chrome and you&#8217;ll have a new &#8212; and fairly ugly &#8212; icon in the taskbar:</p><p><img
src="http://blogs.sitepointstatic.com/images/tech/793-chrome-25-launcher.png" width="431" height="594" alt="Chrome App Launcher" class="center" /></p><p>I&#8217;m not totally convinced by the App Launcher; it&#8217;s just as easy to start Chrome and select an icon from the apps screen. Someone, somewhere will like it, though.</p><h2>Full History Sync</h2><p>It&#8217;s now possible to synchronize your entire browsing history between devices rather than just the URLs entered in the address bar. It&#8217;s another experimental feature &#8212; set <strong>Enable full history</strong> sync in <a
href="//flags/" class="broken_link">chrome://flags/</a>.</p><p>Chrome&#8217;s come a long way and it&#8217;s difficult to believe the browser is less than five years old. There are some nice new features in version 25, but a number of dubious additions have sneaked in. Keep it clean, Google!</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/chrome-25-whats-new/feed/</wfw:commentRss> <slash:comments>9</slash:comments> </item> <item><title>What&#8217;s New in Firefox 19</title><link>http://www.sitepoint.com/firefox-19-whats-new/</link> <comments>http://www.sitepoint.com/firefox-19-whats-new/#comments</comments> <pubDate>Wed, 20 Feb 2013 14:03:11 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[Browsers]]></category> <category><![CDATA[CSS3]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[News]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[firefox]]></category> <category><![CDATA[HTML5 Dev Center]]></category> <category><![CDATA[Mozilla]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=63525</guid> <description><![CDATA[Craig takes a look at the new features for users and developers in the latest version of Mozilla's flagship browser.]]></description> <content:encoded><![CDATA[<p></p><p>Another <a
href="http://www.sitepoint.com/firefox-18-whats-new/">six weeks has passed</a> so it&#8217;s time for a new Firefox release. Version 19 appeared on February 19, 2013. If it hasn&#8217;t automagically installed, look at Help &gt; About Firefox or head over to <a
href="http://getfirefox.com/">getfirefox.com</a>. Let&#8217;s take a journey through the new features&hellip;</p><h2>Native PDF Viewer</h2><p>I never quite understood the necessity for native PDF viewing. Plugins can be slow, unstable and unavailable on some platforms, but I generally download or avoid PDF documents where possible. That said, Mozilla has made a great job of the built-in viewer. It&#8217;s faster than Adobe&#8217;s rendering and converts documents to HTML5 which you can inspect <em>(not that you&#8217;ll want to &#8212; it&#8217;s a mess)</em>.</p><h2>CSS3 Viewport Percentage Support</h2><p>Firefox 19 now supports the new vh, vw, vmin and vmax elements. Refer to <a
href="http://www.sitepoint.com/new-css3-relative-font-size/">The New CSS3 Relative Font Sizing Units</a> for more details.</p><p>The units now have full support in Firefox, Chrome, Safari and IE10 with partial support in IE9. Opera&#8217;s <a
href="http://www.sitepoint.com/opera-switches-to-webkit-rendering-engine/">recent switch to WebKit</a> will inevitably include the feature.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><h2>@page Support for Printed Documents</h2><p>@page allows you to target the margins or page breaks of printed pages, e.g.</p><pre><code>@page
{
	margin: 30mm 50mm;
}
</code></pre><p>Note that @page can be followed by :first, :left or :right to target specific pages, but that has not been implemented in Firefox yet.</p><h2>Export canvas Content to an Image</h2><p>The generated graphical content of a canvas element can now be exported to an image blob using the toBlob method:</p><pre><code>toBlob(callback [, imagetype]);</code></pre><p>The export occurs asynchronously so it requires a callback function to handle the resulting image. By default, images are exported to lossless 24-bit PNG but you can specify JPG if necessary, e.g.</p><pre><code>// JPEG at 90% quality
toBlob(callback, "image/jpeg", 0.9);</code></pre><p>This simple example copies the canvas to a new image element on the page:</p><pre><code>var canvas = document.getElementById(&quot;canvas&quot;);
canvas.toBlob(function(blob) {
	var newImg = document.createElement(&quot;img&quot;),
		url = URL.createObjectURL(blob);
	newImg.onload = function() {
		// revoke blob after use
		URL.revokeObjectURL(url);
	};
	newImg.src = url;
	document.body.appendChild(newImg);
});
</code></pre><h2>Updated Developer Tools</h2><p>While it&#8217;s difficult to out-do Firebug, Mozilla has added a range of great developer tools to Firefox. The JavaScript debugger now permits pausing on exceptions and you can hide non-enumerable properties. In addition, CSS links in the Web Console now open in the Style Editor.</p><p>An experimental remote web console has also been added which can connect to Firefox Mobile on Android or Firefox OS. It must be enabled in <a
href="config">about:config</a> &#8212; set <strong>devtools.debugger.remote-enabled</strong> to true.</p><h2>Miscellaneous Improvements</h2><p>There are a number of smaller updates under the hood:</p><ul><li>faster start-up performance</li><li><a
href="https://addons.mozilla.org/en-US/firefox/themes/">theme support</a> is back</li><li>the <a
href="http://www.sitepoint.com/css3-calc-function/">CSS calc() function</a> can now be used in gradient color-stops.</li><li>support for <a
href="https://developer.mozilla.org/en-US/docs/CSS/text-transform">text-transform: full-width</a> which is mainly of use for Asian character sets</li><li>The canvas <code>isPointInStroke</code> method tests whether a point lies inside the filled and stroked area of a path.</li><li>CSS <a
href="https://developer.mozilla.org/en-US/docs/CSS/page-break-inside">page-break-inside</a> support to control breaks in printed documents</li><li>CSS Flexbox has been unprefixed but remains disabled by default</li><li><a
href="https://developer.mozilla.org/en-US/docs/XForms">XForms</a> has been removed, but you weren&#8217;t using it anyway.</li><li>the minimum CPU requirement has been lowered to 600MHz, and</li><li><a
href="http://www.mozilla.org/en-US/firefox/19.0/releasenotes/buglist.html">several hundred bugs have been eliminated</a></li></ul><p><a
href="http://www.sitepoint.com/browser-trends-february-2013/">Firefox has been losing ground to Chrome</a> but the browser is more than a match for Google&#8217;s offering. It certainly works well on Windows but is anyone still having trouble on Mac or Linux?</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/firefox-19-whats-new/feed/</wfw:commentRss> <slash:comments>15</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 41/62 queries in 0.075 seconds using memcached
Object Caching 2052/2195 objects using memcached

Served from: www.sitepoint.com @ 2013-05-13 15:04:49 --