How to turn MySQL into blazing fast NoSQL
This is an interesting read originally appeared on O'Reilly Radar. Here Edd Dumbill explains how to Bypass the SQL parser to use MySQL's raw speed.The trend for NoSQL stores such as memcache for fast key-value storage should give us pause for thought: what have regular database vendors been doing all this time? An important new project, HandlerSocket, seeks to leverage MySQL's raw speed for key-value storage.
NoSQL databases offer fast key-value storage for use in backing web applications, but years of work on regular relational databases has hardly ignored performance. The main performance hit with regular databases is in interpreting queries.
HandlerSocket is a MySQL server plugin that interfaces directly with the InnoDB storage engine. Yoshinori Matsunobu, one of HandlerSocket's creators at Japanese internet and gaming company Dena, reports over 750,000 queries per second performance on commodity server hardware: compared with 420,000 using memcache, and 105,000 using regular SQL access to MySQL. Furthermore, since the underlying InnoDB storage is used, HandlerSocket offers a NoSQL-type interface that doesn't have to trade away ACID compliance...read more
We thank all our readers for the incredible support and valuable feedback you've provided over the years to make us better at what we do and hope it will continue the next year as well.
Wish you all a Happy & Prosperous 2011!
December 2010
PHP Quiz
You've been learning PHP for a while, and want to know the progress you've made. You've come to the right place!
Take our PHP Quiz to test your skills. The Quiz has 10 questions. You'll will be shown full results once you finish the Quiz. The pass percentage is 75 or above.Good Luck!December 2010
Static analysis of Silverlight XAML: Basic concepts
photo © 2008 Microsoft Sweden | more info (via: Wylio)
Wolf Schmidt explains how to make static analysis of Silverlight XAML.
Silverlight has APIs that support quite a variety of client-side APIs. But one area where the API is rather thin in Silverlight is interacting with XAML as a format, and discovering or changing how the Silverlight XAML parser works in the client runtime. Without such API, it is not really practical to use the Silverlight client API for many XAML-related tasks, and in particular static analysis of XAML with a Silverlight client-centric application is difficult and limited.
However, with some of the architectural improvements in the Silverlight XAML parser that were made in version 4, combined with some. NET Framework APIs (the full framework, not the Silverlight subset), static analysis of Silverlight XAML is definitely possible. To do this, you'll be writing a .NET Framework executable that runs on a Windows desktop, not a Silverlight application, but your .NET app will have the necessary information to treat the XAML very similar to how the Silverlight XAML parser and the overall Silverlight development environment would treat that XAML... read more
Looking for a trusted development partner to build your custom web applications using Silverlight? Visit us at: www.amt.in
December 2010
HTML Quiz
Are you interested in HTML? Answer these 10 Simple questions to test your knowledge in HTML.
December 2010
AMT Wishes You a Merry Christmas & Happy New Year 2011!
AMT Family wishes all our readers a Merry Christmas & a Prosperous New Year. We take this opportunity to thank all our partners, clients and well wishers for the overwhelming support and trust.
May Peace be your gift at Christmas and your blessing all year through!
December 2010
Open Discussion | Best Practices PHP, HTML & JavaScript
This is an interesting open discussion (originally appeared on Programmers StackExchange) on best practices while working with HTML, JavaScript and PHP in general.
I realized I have to write down a convention specification about HTML, JavaScript and PHP coding for me and my team.
In web development, just like in C++, I'm definitely a fan of indentation and comments.
Nonetheless, often in my work I encounter HTML+JavaScript+PHP code which suddenly brings up the headache.
I'm trying to make my code readable, but what seems to be better to me (to indent & comment) seems not to fascinate my teammates, so I was wondering if there is a best or at least shared good practice when writing "hybrid" documents just like today's web pages, which day by day become more and more complex.
I'm aware of the fact that probably it is in the nature of today's web pages' code to be a little bit intricated, but I wonder if a good convention concerning these aspects already exists.
Some general rules I follow:
General
- Indents are 4 spaces.
- Indent new levels
- Comments are < ~80 chars from the indent level. If I'm in two levels (8 spaces) that means the cursor stop will be around 88 characters.
- Use multi-line comments. I prefer the look, however this is a subjective point.
- Comment now rather then later when you have no idea what's going on.
- Allman style braces. It's cleaner and is more readable. Subjective.
JavaScript
- Use a library. jQuery in particular is very good. It eliminates all cross browser headaches.
- Understand that ID's are for particular elements, classes are for styles. ID's shouldn't be used more then once per page and they will have particular hooks attached to them. Use classes for things like navigation.
- Out source into methods. It's tempting to put all the code into the
bindcall, however putting it in it's own function will increase the flexibility of your code. - Use functions instead of evals. That means
setTimeout(function(){ /* Do something */ }, 1000);instead ofsetTimeout('doSomething', 1000); - Use local variables with
var.
HTML
- Semantic markup. Use appropriate tags. Don't put
<br />'s in there to add space, adjust margins and CSS rules. - All tags are lowercase.
- All tags should end with a closing tag or be self closing.
- Make use of classes for layout that is similar. Have a couple of predefined classes like
hide,clear,error, etc. - Everything (scripts included) should go in
<head>. Worry about optimizing (moving stuff around) when it presents a problem. - External stylesheets and JavaScript source is a must unless it is page specific.
PHP
- Frameworks are good, I recommend CodeIgniter.
- If you don't want to use a framework, try to use the latest version of PHP possible. (That means 5.3).
- Use
includesto your advantage. - Clear injections or use prepared statements.
-
Perform if checks on preconceived fail-secure values.
$logged_in = false;if(check_user($user)){ $logged_in = true; $user = load_user($_SESSION);} - Know the difference between single and double quotes. Use single quotes when possible.
- Don't echo HTML.
Do let us know about the best practices you follow in the comments section below.
December 2010
AIR for AppUp: What Developers Need to Know
Intel Atom Developer Program now supports Adobe AIR apps and provides resources and a strong community of developers familiar with Atom and AppUp. The Adobe AIR run time supports a wide range of platforms and is widely adopted for delivering rich applications outside the browser.
December 2010
AMT Staff's Favorite Picks of the Week
photo © 2008 Cal Evans | more info (via: Wylio)
PHP
Implementing the Singleton Pattern in PHP 5 As you probably know, in software engineering there is a set of design patterns that are universally tested, approved and accepted as advanced recipes for programming. One of these patterns is the Singleton design pattern, which is based on the mathematical concept of a singleton (a set with a single element)...read more A Nice PHP image resizer class For the longest time I had been using a function I wrote some time ago to handle resizing of images through PHP. I decided it was time to convert it into a class and give it it's own special place in my application workspace. It works so well I figured the least I could do is share with the world....read more Everyone Loves PHP This isn't an article about HipHop and how awesome it is, though. What I'm trying to convey is our love affair with PHP. Take a look at the top hundred sites by traffic, size, or whatever other metric you fancy, and there is a high chance that they're using PHP....read more Building Mobile Apps with PHP we now have a convergence of new technology that makes building web apps-mobile and otherwise-much easier. jQTouch, Sencha Touch, and more recently, jQuery Mobile take a lot of the pain out of writing cross-browser JavaScript for mobile browsers....read more Mobile Web 5 Pitfalls to Avoid When Developing a Successful Mobile App The way that people choose, buy, access and use mobile apps is, in many ways, fundamentally different from the way they behave on the traditional web, and so the rules have to change. The issue is that there isn't yet the same level of widespread understanding about apps that there is about web design...read more Programming Apple Push Notification Services One of the key limitations of the iPhone is its constraint on running applications in the background. Because of this, applications cannot keep running in the background when the user switches to another application. So, applications that require a constant state of connectivity (such as social networking applications) will not be able to receive timely updates...read more SEO Landing Page Optimization Tips (Study) After having analysed 50+ sites to find out what increases sales and conversions, A SEO Expert shares with us his thoughts on the four most common issues that affect conversion rate and sales...read more Solving 6 Common Ecommerce Problems in Google Analytics If you use Google Analytics for your ecommerce business, Google Analytics: Understanding Visitor Behavior by Justin Cutroni (blog) is a great resource (provided you already have a general understanding of basic web analytics). It covers a broad range of applications including creating an implementation plan, how to use profiles and filters, marketing campaign tracking, CRM integration and enterprise implementation...read moreDecember 2010
Which is Your favorite Open Source Graphics Software?
Blender
GIMPGIMP (short for the GNU Image Manipulation Program) is a free software raster graphics editor. It is primarily employed as an image retouching and editing tool.[3] and is freely available in versions tailored for most popular operating systems, including but not limited to Microsoft Corporation's Windows platform, Apple's Mac OS X, and Linux.InkscapeInkscape is a vector graphics editor application.It is distributed under a free software license, the GNU GPL. Its stated goal is to become a powerful graphics tool while being fully compliant with the XML, SVG, and CSS standards.Open Source Graphics Software - Every Graphic Application Software that is based on one of the Open Source licenses is can be included in this category.Have we missed any of your favorite Open Source Graphics Software? Feel Free to put them in the comments section below.
December 2010
How To Optimize Your Web Application Development Strategies
This is an Interesting Resource for Web Application Developers which originally appeared on Stack Overflow. It’s an excellent response for an open ended query:
Many web apps out there these days are using APIs or code that they've not worked with themselves, and quite often are using it inefficiently. Some Google maps mashups come to mind. With php/asp backends, HTML, javascript (especially with all the AJAX these days) - there are so many potential bottlenecks, problems, inefficiencies and double-ups. What strategies can you suggest to investigating, identifying and resolving slow-downs, redundant code, leaks and other issues in web-apps - both server-side and in the browsers on client-side?
photo © 2007 Jeremy Tarling | more info (via: Wylio)
A very open ended and expansive question- it may be more productive to compartmentalise each area as opposed to looking at the bigger picture, which can be overwhelming. One very important aspect which has an impact on everything you mention is correctly auditing, analysing and debugging your code, some of the tools below can help with this:
[...]investigating, identifying and resolving slow-downs, redundant code, leaks and other issues in web-apps - both server-side[...]
For PHP specific development,Look at:
[...]and in the browsesr on client-side?
For client side debugging, look at:
WebKit (Safari / Chrome Browsers) - Web Inspector
IE - Microsoft script Debugger
For help with 'slow downs' look into caching, either using
ob_start (eg. ob_start('ob_gzhandler'); ) and ob_end_flush
.htaccess Gzipping, also here
You can also use:
Leaving these tools aside, It is VERY important to note that your ability to produce great code is dependent on what third party APIs you rely on, and what you yourself require (your code). More often than not you will always be constricted by your choice of APIs (you have a limited ability to change their source) and notably the combination of APIs you choose. Your core focus should be on the analysis of your own coding layer, adhering to as much of the guidelines for each API as you can...easier said than done.

