-- phpMyAdmin SQL Dump
-- version 4.5.4.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 18, 2016 at 02:16 PM
-- Server version: 10.1.8-MariaDB
-- PHP Version: 5.5.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `cms`
--
-- --------------------------------------------------------
--
-- Table structure for table `article`
--
CREATE TABLE `article` (
`article_id` int(11) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `article`
--
INSERT INTO `article` (`article_id`, `user_id`) VALUES
(9, 1),
(10, 1),
(11, 1),
(12, 1),
(13, 1),
(14, 1),
(15, 1),
(16, 1),
(17, 1),
(18, 1);
-- --------------------------------------------------------
--
-- Table structure for table `articles`
--
CREATE TABLE `articles` (
`article_id` int(11) NOT NULL,
`article_name` varchar(255) NOT NULL,
`article_content` text NOT NULL,
`category_id` int(11) NOT NULL,
`img` varchar(50) NOT NULL,
`url` varchar(255) NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `articles`
--
INSERT INTO `articles` (`article_id`, `article_name`, `article_content`, `category_id`, `img`, `url`, `date`) VALUES
(9, 'Internal Blog: MySQL Data Typess', '\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\\r\\n \\r\\n <div class=\\"flare-horizontal flare-backgroundcolor-light enablecounters enabletotal flare-hidden countloaded countloadfinished\\" data-humbleflarecount=\\"2\\"><span class=\\"loading\\"><span></span></span><span class=\\"flare-total first\\"><strong></strong></span></div><p>In the previous post, we learned how you can <a href=\\"http://www.cloudways.com/blog/connect-mysql-with-php/\\" target=\\"_blank\\">connect your MySQL Database with PHP</a> website. In this post, I am going to share with you knowledge about data types and how they are used.</p>\\r\\n<p><img class=\\"aligncenter wp-image-15697 size-full\\" src=\\"http://www.cloudways.com/blog/wp-content/uploads/banner-mysql.jpg\\" alt=\\"mysql data types\\" width=\\"636\\" height=\\"334\\"></p>\\r\\n<p>Data types are the most important part in creating columns in tables.\\r\\n It define which type of value a column can contain and how long this \\r\\nvalue can be. Data type varies from column to column. Let??s get started:</p>\\r\\n<h2>What is Data Type?</h2>\\r\\n<p>A data type is a particular kind of an item that you store in a \\r\\nvariable, whether it is returned from a function or you have defined it \\r\\nin your code. Data types are of different types, including numbers, \\r\\nstrings, dates and characters.</p>\\r\\n<p>MySQL also define different data types which you can get benefit from\\r\\n while creating columns of your table. Columns in a table can be of \\r\\ndifferent types, it can be a number, string, you can store your whole \\r\\nimage in bytes, or can define a column specifically for date and time. \\r\\nMySQL datatypes can be divided into different categories. I will define \\r\\nthree main, mostly used categories in this blog:</p>\\r\\n<ol><li>Number Type</li><li>String Type</li><li>JSON Type</li></ol>\\r\\n<h2>Number Type</h2>\\r\\n<p>MySQL uses all the numeric data types that you use mostly in your \\r\\nprogramming. Following are the list of commonly used numeric data types \\r\\nalong with their short description.</p>\\r\\n<ol><li>INT: It stores real numbers which can be signed or unsigned. Its range is -2147483648 to 2147483647.</li><li>FLOAT(M,D): It stores floating-point numbers which can??t be \\r\\nunsigned. You can define the display length (M) and the number of \\r\\ndecimals (D). Default value for M and D is 10 and 2. Decimal precision \\r\\ncan go to 24 places</li><li>DOUBLE(M,D): It stores double floating-point numbers which can??t be \\r\\nunsigned. You can define the display length (M) and the number of \\r\\ndecimals (D). Default value for M and D is 16 and 4. Decimal precision \\r\\ncan go to 53 places</li></ol>\\r\\n<h2>String Type</h2>\\r\\n<p>Most of your data will be stored in string formats. For this, MySQL \\r\\nhas provided the string data type. You can choose from them according to\\r\\n your needs. Commonly used string types are:</p>\\r\\n<ol><li>Char(M): It is a fixed length string whose range is between 1-255. Its default value is 1.</li><li>VARCHAR(M): It is variable length string whose range is between 1 ?? \\r\\n255. Its value must be defined when creating a VARCHAR column.</li><li>TEXT: It stores large amount of data. You don??t have to define a length for this when defining it. Its maximum length is 65535.</li><li>BLOB: These are Binary large objects, it stores the large amount of \\r\\nbinary data such images. You don??t have to define a length for this when\\r\\n defining it. Its maximum length is 65535.</li></ol>\\r\\n<h2>JSON Type</h2>\\r\\n<p>In MySQL 5.7.7 they have introduced a <a href=\\"http://dev.mysql.com/doc/refman/5.7/en/json.html\\" target=\\"_blank\\">new datatype JSON</a>.\\r\\n It used to store data which is in the form of JSON. Before this you can\\r\\n store your JSON format data in TEXT or VARCHAR fields but you have to \\r\\nwrite your own verification function before storing it on your database.\\r\\n However, after you have chooses this datatype for column it \\r\\nautomatically validates that the data which is being entered is in JSON \\r\\nformat or not. Its maximum length is 1073741824.</p>\\r\\n<h2>Conclusion:</h2>\\r\\n<p>Datatypes are the most necessary part of your database. It shows what\\r\\n the values of your columns really are. For example, if you are saving \\r\\nthe driving license of a person you can use VARCHAR and can set a limit \\r\\nof of 17 with hyphens, and a limit of 14 if you are not using hyphens. \\r\\nBy this way your database will automatically generate error if the limit\\r\\n crosses.</p>\\r\\n<p>Optimized MySQL Hosting with combined powers of Nginx, Apache web \\r\\nservers, PHP, and Varnish HTTP Accelrator along with Memcached and Redis\\r\\n cache, Cloudways ensures that load time of your website improves by \\r\\n100% on the Cloudways Platform.</p>\\r\\n<p>Sign up now with XMAS30 code enjoy the seamless <a href=\\"http://www.cloudways.com/en/mysql-hosting.php\\">Cloudways MySQL Hosting Platform</a> now.\\r\\n</p>', 2, '46.jpg', 'Internal-Blog-MySQL-Data-Typess/', '2016-01-14 17:34:00'),
(10, 'What is New in PHP', 'asdsadsa sa dsa das das sad sa', 2, '76.png', 'what-is-new-in-php/', '2016-01-23 15:26:26'),
(11, '5 Questions That Will Kickstart Your Social Media Plan', '<div class=\\"ArticleCopy language-\\" style=\\"margin: 0px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); font-size: 16px; line-height: 1.8; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif;\\"><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">No matter what type of business activity you??re engaged in, social media is crucial if you want to stay ahead of the competition and generate more leads and customers. Businesses are starting to understand the value in social media marketing. Instead of going to search engines, a growing number of users prefer to make queries on social networks such as Facebook when searching for products or services.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">But there??s more to using social media than setting up accounts on Twitter and Facebook and putting up posts and composing tweets. You need to be active and engaging, and offer information people are looking for. Without a definite plan, social media activities can be a waste of time ?? or worse, a recipe for disaster.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">Therefore, in order to make an impact, you must first formulate and commit to a long-term strategy that includes a content and social media plan, and an effective means for management and performance monitoring.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">The planning phase can be the most difficult part of your social media campaign and will be largely responsible for its success or failure. Here are five questions you need to answer to kick your social media campaign into gear.</p><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">What Do You Want to Achieve with Social Media?</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">Social media networks are versatile and variant in nature, so it??s important to have a clear vision of the goals you wish to achieve before starting your social media campaign. These goals need to be measurable, so you can track the progress of your campaign and shift your focus if things aren??t going well.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">This will be crucial in determining which platforms you will sign up to and target, how frequently you will post on them, how many resources and staff you will allocate to the task, and the metrics and KPIs you will use to quantify the results of your postings.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">The most obvious goal of a social media strategy is to increase your company and brand presence and extend your reach. But there is much more you can achieve. Here are a few examples:</p><ul style=\\"margin-right: 0px; margin-bottom: 1.25em; margin-left: 25px; padding: 0px; direction: ltr; font-size: 1em; line-height: 1.6; list-style: none; font-family: inherit; counter-reset: ol-counter 0;\\"><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\"><span style=\\"font-weight: 700; line-height: inherit;\\">Increase traffic to your website:</span> By sharing links to your site??s content on your social media accounts, you??re giving users new channels to refer to your website. If you have specific product and landing pages in mind, make sure you??ve set up proper analytics tools and search streams to later track progress.</li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\"><span style=\\"font-weight: 700; line-height: inherit;\\">Improve company credibility:</span> Companies that have a strong social media presence are more likely to be considered by media outlets and reporters. You will need to interact with relevant accounts and hashtags and engage in conversations after you setup your accounts.</li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\"><span style=\\"font-weight: 700; line-height: inherit;\\">Offer extra customer service and create new lead generation channels:</span> Many customers prefer to make queries and ask questions through social networks instead of sending an email or picking up the phone. Social media can offer you an opportunity to reach new people.</li></ul><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Who Are You Going After?</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">Before starting your social journey, you need to define your target audience, because it will have a direct impact on the content and tone of your posts, which naturally have to be tailored to the people who will be viewing them.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">There are many factors that can help you identify your audience, including interests, age, gender, income, and area of residence. When using social media advertising services such as Facebook Ads, knowing the characteristics of your target audience will help make your campaign far more effective.</p><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Which Platforms Should You Use?</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">You have to decide in advance where you??re going to focus your attention and choose the platforms you??ll be using for your campaign.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">With the social media landscape more fragmented than ever before and dozens of multi-million-user platforms available for sign up, it??s easy to get confused when choosing your target channel. Choosing the wrong platforms can turn your social media campaign into a disaster, while picking the right channel can go a long way toward achieving your business goals.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">To a large extent, you??ll have to let the demographics and preferences of your target audience choose the social media networks you??ll be using for your campaign.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">Another way to find out which social networks you should spend time on is to look at which networks you??ve already been finding success on. This can be easily achieved if you??re already using an analytics tools such as Google Analytics to gather traffic data about your website. Dlvr.it blogger Debra Garber explains how to do so <a href=\\"https://blog.dlvrit.com/2015/09/create-an-editorial-calendar-to-save-time/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">here</a>.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">Pew Research Center has gathered <a href=\\"http://www.pewinternet.org/2015/08/19/the-demographics-of-social-media-users/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">demographics information</a> for top social media platforms which can also be helpful in choosing your starting point.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">It is best to start with a few platforms that are most relevant to your business, and then gradually expand your network as you perfect your presence on each one. Every social media platform has its own unique advantages and can help your business grow in one way or another.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">For instance, if you??re running a restaurant or a café, you might consider allocating some extra energy on setting up your Instagram account, where photos ?? especially photos of food ?? are shared more widely.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">Meanwhile, a recruitment agency will find more success spearheading its campaign on LinkedIn, where finding professionals looking for a job is easier.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">Also take note that the platform you choose will define the required activity and responsiveness. For example, Twitter users usually expect spontaneous and near-immediate responses when they mention your handle, and if you don??t reply to their tweets, they??ll end up choosing a competitor. So if you don??t have the resources to answer quickly, signing up on platforms like Twitter might have a negative impact on your business goals.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">Before you get started with each of the platforms, make sure you understand its dynamics. Rebekah Radice has a <a href=\\"http://rebekahradice.com/kickstart-a-social-media-strategy/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">post</a> which will help you get familiar with the major social media platforms and the types of material that should be posted on each.</p><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">What Content Should You Post and How Often?</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">The best content strategy is one that involves mixed content. There need to be posts that showcase your products, but others need to address the specific needs and interests of your target audience. If you??re only posting bland messages about your latest offers and prices, people will likely tune out and avoid you in the future. Curate posts that are interesting, like news stories, how-to articles, videos and picture lists that are relevant to your industry and to your products and services.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">One guideline that can help you plan your content is <a href=\\"http://www.marketo.com/_assets/uploads/Your-Sample-Social-Editorial-Calendar.pdf\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Marketo??s 411 rule</a>, which means post four educational or entertaining post for every soft promotion (e.g. events) and hard promotion (e.g. demos, products, etc). Basically, it means gain the trust of your audience by providing value.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">Also talk directly to your audience and encourage people to interact with your brand continuously.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">This is often the forgotten aspect of social media marketing. Many businesses post on their accounts a couple of times a week and leave it at that. You need to show your customers that you care about what each person has to say about your business.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">In fact much of what you post and how often you do it will depend on the activities that your customers perform. If they ask you a question, answer it (even if it??s just a simple thank you), if they post a photo of your products, re-post it (or retweet it or share it). Making positive connections sharply increases the likelihood of a follower converting and making a purchase.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">These simple gestures go a long way to managing relationships with your followers and creating a stable base of loyal customers, if that is what you wish to attain through your campaign. Do not underestimate the strength of emotions in selling a product or service.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">Instead of diving headlong into posting updates on your social media accounts, consider first creating a high-level view of the content you??re planning to put up on each platform. This will help you ensure you cover all the topics and areas involved in your business industry. It will also help you better plan user engagement on each network. You can use the following plan as a guide to scheduling your content posts.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\"><span style=\\"font-weight: 700; line-height: inherit;\\">Example: High level social plan (for an event decoration company)</span></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\"><a href=\\"http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2016/02/14544032351.png\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\"><img src=\\"http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2016/02/14544032351.png\\" alt=\\"High level social plan for an event decoration company\\" width=\\"975\\" height=\\"260\\" class=\\"aligncenter size-full wp-image-123905\\" style=\\"border-style: none; border-width: initial; max-width: 100%; height: auto; display: block; margin: 30px auto;\\"></a></p><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">What Should I Post Tomorrow, Next Week or Next Month?</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">No campaign should start without a schedule. Lay out the broad outline of your campaign for at least four to six months ahead. Start by setting up milestones and deadlines for your campaign??s iterations, and define the goals of each phase. Also be on the lookout for occasions, holidays, and events on your calendar and mark them. Every one of these can be opportunities to boost your campaign and you should plan for them in advance.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\"><span style=\\"font-weight: 700; line-height: inherit;\\">Example: Key business events planned for year ahead (for an event decoration company)</span></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\"><a href=\\"http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2016/02/14544033502.png\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\"><img src=\\"http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2016/02/14544033502.png\\" alt=\\"Key business events planned for year ahead (for an event decoration company)\\" width=\\"975\\" height=\\"223\\" class=\\"aligncenter size-full wp-image-123907\\" style=\\"border-style: none; border-width: initial; max-width: 100%; height: auto; display: block; margin: 30px auto;\\"></a></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">Planning in advance will help you mitigate risks and predict campaign success. It also offers flexibility: Once you get the wheels of your campaign rolling, you??ll be able to compare your performance with your campaign??s goals and deadlines, and make the correct adjustments and corrections for each phase. Whether a daily, weekly or monthly calendar will suit your needs is up to you. The key here is to be ready for what lies ahead and be able to respond to unexpected turns and twists.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">Editorial calendars can save you a lot of time and help you schedule your social content posting. It is highly recommended to create and maintain one. Ideally, you should be able to look at the month or week ahead (depending on your business and particular social strategy) and have a clear view of when certain pieces of content will be shared on social media.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\"><span style=\\"font-weight: 700; line-height: inherit;\\">Example: Editorial calendars (for an event decoration company)</span></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\"><em style=\\"line-height: inherit;\\">Day View</em></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\"><a href=\\"http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2016/02/14544034333.png\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\"><img src=\\"http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2016/02/14544034333.png\\" alt=\\"Day View Calendar\\" width=\\"975\\" height=\\"227\\" class=\\"aligncenter size-full wp-image-123908\\" style=\\"border-style: none; border-width: initial; max-width: 100%; height: auto; display: block; margin: 30px auto;\\"></a></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\"><em style=\\"line-height: inherit;\\">Week View</em></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\"><a href=\\"http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2016/02/14544034524.png\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\"><img src=\\"http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2016/02/14544034524.png\\" alt=\\"Week View Calendar\\" width=\\"975\\" height=\\"208\\" class=\\"aligncenter size-full wp-image-123909\\" style=\\"border-style: none; border-width: initial; max-width: 100%; height: auto; display: block; margin: 30px auto;\\"></a></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">Note: Particular tasks have been highlighted in the week view as they are specific to that week, and not generic tasks rolled over from the week before.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: inherit; line-height: 1.8; text-rendering: optimizeLegibility;\\">Social media is a powerful tool that should be included in the arsenal of every business. Learn to plan for it and harness its power, and you??re in for success.</p></div><div style=\\"margin: 0px; padding: 0px; direction: ltr; color: rgb(38, 38, 38); font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 16px;\\">Tags: <a href=\\"http://www.sitepoint.com/tag/business-planning/\\" style=\\"color: rgb(28, 148, 198); line-height: inherit;\\">business planning</a>, <a href=\\"http://www.sitepoint.com/tag/digital-marketing/\\" style=\\"color: rgb(28, 148, 198); line-height: inherit;\\">digital marketing</a>, <a href=\\"http://www.sitepoint.com/tag/marketing-strategy/\\" style=\\"color: rgb(28, 148, 198); line-height: inherit;\\">marketing strategy</a>, <a href=\\"http://www.sitepoint.com/tag/online-marketing/\\" style=\\"color: rgb(28, 148, 198); line-height: inherit;\\">online marketing</a>, <a href=\\"http://www.sitepoint.com/tag/social-media-2/\\" style=\\"color: rgb(28, 148, 198); line-height: inherit;\\">social media</a>, <a href=\\"http://www.sitepoint.com/tag/social-media-marketing/\\" style=\\"color: rgb(28, 148, 198); line-height: inherit;\\">social media marketing</a>, <a href=\\"http://www.sitepoint.com/tag/social-media-plan/\\" style=\\"color: rgb(25, 131, 176); line-height: inherit; outline: 0px; cursor: pointer;\\">social media plan</a></div>', 5, '55.png', '5-questions-that-will-kickstart-your-social-media-plan/', '2016-02-03 12:48:35');
INSERT INTO `articles` (`article_id`, `article_name`, `article_content`, `category_id`, `img`, `url`, `date`) VALUES
(12, 'Browser Trends February 2016: Mobile Market Decline?', '<p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">We??re already one-twelfth of the way into the year, so let??s examine the <a href=\\"http://gs.statcounter.com/#browser-ww-monthly-201602-201601\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">latest StatCounter statistics</a> to discover the winners and losers in the browser market ?</p><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Worldwide Desktop & Tablet Browser Statistics, December 2015 to January 2016</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">The following table shows browser usage movements during the past month.</p><table summary=\\"worldwide browser market share statistics, January 2016\\" width=\\"80%\\" style=\\"margin: 20px auto; border: 0px solid rgb(233, 233, 233); width: 750px; color: rgb(74, 74, 74); font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-align: right !important; background: none rgb(255, 255, 255);\\"><tbody><tr><th width=\\"20%\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Browser</th><th width=\\"20%\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">December</th><th width=\\"20%\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">January</th><th width=\\"20%\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">change</th><th width=\\"20%\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">relative</th></tr><tr style=\\"background: none;\\"><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">IE (all)</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">15.16%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">14.62%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-0.54%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-3.60%</td></tr><tr><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">IE11</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">10.26%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">10.19%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-0.07%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-0.70%</td></tr><tr style=\\"background: none;\\"><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">IE10</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">1.37%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">1.29%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-0.08%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-5.80%</td></tr><tr><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">IE9</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">1.44%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">1.29%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-0.15%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-10.40%</td></tr><tr style=\\"background: none;\\"><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">IE6/7/8</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">2.09%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">1.85%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-0.24%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-11.50%</td></tr><tr><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Edge</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">1.46%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">1.69%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+0.23%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+15.80%</td></tr><tr style=\\"background: none;\\"><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Chrome</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">53.71%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">54.33%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+0.62%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+1.20%</td></tr><tr><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Firefox</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">14.29%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">14.58%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+0.29%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+2.00%</td></tr><tr style=\\"background: none;\\"><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Safari</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">4.85%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">4.17%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-0.68%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-14.00%</td></tr><tr><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">iPad Safari</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">5.08%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">5.27%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+0.19%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+3.70%</td></tr><tr style=\\"background: none;\\"><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Opera</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">2.07%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">1.92%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-0.15%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-7.20%</td></tr><tr><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Others</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">3.38%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">3.42%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+0.04%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+1.20%</td></tr></tbody></table><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Worldwide Desktop & Tablet Browser Statistics, January 2015 to January 2016</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">The following table shows browser usage movements during the past twelve months:</p><table summary=\\"worldwide browser market share statistics, past 12 months\\" width=\\"80%\\" style=\\"margin: 20px auto; border: 0px solid rgb(233, 233, 233); width: 750px; color: rgb(74, 74, 74); font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-align: right !important; background: none rgb(255, 255, 255);\\"><tbody><tr><th width=\\"20%\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Browser</th><th width=\\"20%\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">January 2015</th><th width=\\"20%\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">January 2016</th><th width=\\"20%\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">change</th><th width=\\"20%\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">relative</th></tr><tr style=\\"background: none;\\"><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">IE (all)</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">19.26%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">14.62%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-4.64%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-24.10%</td></tr><tr><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">IE11</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">10.74%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">10.19%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-0.55%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-5.10%</td></tr><tr style=\\"background: none;\\"><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">IE10</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">1.94%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">1.29%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-0.65%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-33.50%</td></tr><tr><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">IE9</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">2.53%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">1.29%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-1.24%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-49.00%</td></tr><tr style=\\"background: none;\\"><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">IE6/7/8</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">4.05%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">1.85%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-2.20%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-54.30%</td></tr><tr><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Chrome</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">48.26%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">54.33%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+6.07%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+12.60%</td></tr><tr style=\\"background: none;\\"><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Firefox</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">16.96%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">14.58%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-2.38%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-14.00%</td></tr><tr><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Safari</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">10.27%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">9.44%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-0.83%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-8.10%</td></tr><tr style=\\"background: none;\\"><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Opera</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">1.52%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">1.92%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+0.40%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+26.30%</td></tr><tr><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Others</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">3.73%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">5.11%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+1.38%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+37.00%</td></tr></tbody></table><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><em style=\\"line-height: inherit;\\">(The tables show market share estimates for desktop browsers. The ??change?? column is the absolute increase or decrease in market share. The ??relative?? column indicates the proportional change, i.e. Edge??s user base grew 15.8% last month. There are several caveats so I recommend you read <a href=\\"http://www.sitepoint.com/how-browser-market-share-is-calculated\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">How Browser Market Share is Calculated</a> and <a href=\\"http://www.sitepoint.com/browser-trends-January-2016-statcounter-vs-netmarketshare/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">StatCounter vs NetMarketShare</a>.)</em></p><div class=\\"ArticleBox u-inline\\" style=\\"margin: 0px 0px 20px 20px; padding: 0px; direction: ltr; position: relative; z-index: 1; width: 350px; float: right; color: rgb(74, 74, 74); font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><h3 class=\\"ArticleBox_header t-bg\\" style=\\"margin: 0px; padding: 10px 20px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(255, 255, 255); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em; background: rgb(28, 148, 198);\\"><span class=\\"ArticleBox_icon fa fa-pencil\\" style=\\"display: inline-block; font-stretch: normal; line-height: 1; font-family: FontAwesome; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; transform: translate(0px, 0px); margin-right: 5px;\\"></span> More from this author</h3><div class=\\"ArticleBox_content\\" style=\\"margin: 0px; padding: 10px 20px 20px; direction: ltr; position: relative; border-width: 0px 1px 1px; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-right-color: rgb(239, 239, 239); border-bottom-color: rgb(239, 239, 239); border-left-color: rgb(239, 239, 239);\\"><ul class=\\"ArticleBox_list t-list\\" style=\\"margin-right: 0px; margin-bottom: 0px; margin-left: 25px; padding: 0px; direction: ltr; font-size: 1em; line-height: 1.6; list-style: none; font-family: inherit; counter-reset: ol-counter 0;\\"><li style=\\"margin: 4px 0px; padding: 0px; direction: ltr; position: relative;\\"><a href=\\"http://www.sitepoint.com/whats-best-programming-language-learn-2016/?utm_source=sitepoint&utm_medium=relatedinline&utm_term=web&utm_campaign=relatedauthor\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease; padding: 5px 0px 1px;\\">What\\\'s the Best Programming Language to Learn in 2016?</a></li><li style=\\"margin: 4px 0px; padding: 0px; direction: ltr; position: relative;\\"><a href=\\"http://www.sitepoint.com/browser-trends-january-2016-12-month-review/?utm_source=sitepoint&utm_medium=relatedinline&utm_term=web&utm_campaign=relatedauthor\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease; padding: 5px 0px 1px;\\">Browser Trends January 2016: 12 Month Review</a></li></ul></div></div><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Another month, another Chrome increase. 0.62% is nothing special, but other vendors can only dream such delights. Firefox and Edge enjoyed a small jump, but it was fairly depressing news for others.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Google doesn??t get everything right with Chrome, but they don??t do much wrong, either. It??s not the fastest or most stable browser but, for typical web users, Chrome is an easy option. It smoothly integrates with Google services and synchronizes with mobile devices.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Talking of mobile ?</p><h2 id=\\"mobile\\" style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Worldwide Mobile Browser Statistics, December 2015 to January 2016</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">January??s mobile usage increased 0.4% to reach <a href=\\"http://gs.statcounter.com/#desktop+mobile-comparison-ww-monthly-201601-201601-bar\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">41.04% of all web activity</a>. The predicted 50:50 desktop/mobile ratio is approaching. However, it??s increasingly difficult to distinguish between devices. Is a phablet or tablet truly mobile? How do you classify a hybrid device such as a Microsoft Surface Pro? Perhaps the metric will become meaningless; they??re all connected computing devices.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">The top mobile browsing applications for January 2016 were:</p><table summary=\\"worldwide mobile browser market share statistics, January 2016\\" width=\\"80%\\" style=\\"margin: 20px auto; border: 0px solid rgb(233, 233, 233); width: 750px; color: rgb(74, 74, 74); font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-align: right !important; background: none rgb(255, 255, 255);\\"><tbody><tr><th width=\\"20%\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Mobile Browser</th><th width=\\"20%\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">December</th><th width=\\"20%\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">January</th><th width=\\"20%\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">change</th><th width=\\"20%\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">relative</th></tr><tr style=\\"background: none;\\"><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Chrome</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">36.94%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">37.69%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+0.75%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+2.00%</td></tr><tr><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">UC Browser</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">18.57%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">18.63%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+0.06%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+0.30%</td></tr><tr style=\\"background: none;\\"><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">iPhone</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">17.90%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">18.31%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+0.41%</td><td class=\\"up\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">+2.30%</td></tr><tr><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Opera Mini/Mobile</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">11.17%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">10.91%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-0.26%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-2.30%</td></tr><tr style=\\"background: none;\\"><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Android</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">10.87%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">10.24%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-0.63%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-5.80%</td></tr><tr><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">IEMobile</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">2.04%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">1.90%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-0.14%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-6.90%</td></tr><tr style=\\"background: none;\\"><th style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); border: 1px solid rgb(204, 204, 204); line-height: 1.5; text-align: center;\\">Others</th><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">2.51%</td><td style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">2.32%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-0.19%</td><td class=\\"dn\\" style=\\"margin: 0px; padding: 10px; direction: ltr; font-size: 0.875em; color: rgb(38, 38, 38); line-height: 1.5; border: 1px solid rgb(204, 204, 204); text-align: center;\\">-7.60%</td></tr></tbody></table><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Chrome, UC Browser and Safari on the iPhone all made modest gains, but remember these figures report mobile web browsing usage ?? not handset purchases.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">January??s business news was dominated by stories of <a href=\\"http://www.bbc.co.uk/news/business-35412892\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Apple??s flat-lining iPhone numbers</a>. 74.8 million sales in three months hardly constitutes an economic crisis, but mobile manufacturers have reason to be cautious about the long-term future of the smartphone market:</p><ul style=\\"margin-right: 0px; margin-bottom: 1.25em; margin-left: 25px; padding: 0px; direction: ltr; font-size: 16px; line-height: 1.6; list-style: none; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; counter-reset: ol-counter 0; color: rgb(74, 74, 74);\\"><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\">Competition has improved and devices are less expensive. A cheap handset can be one-tenth the cost of an iPhone yet offer 90% of the functionality ?? <em style=\\"line-height: inherit;\\">if not more</em>.</li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\">The rate of technical development has slowed. Devices become faster and displays get better, but new features are less essential and more gimmicky.</li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\">Everyone who wants a smartphone almost certainly has one.</li></ul><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Neither Apple or Samsung are experiencing the exponential growth they once enjoyed.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">An early casualty was <a href=\\"http://techcrunch.com/2015/12/08/mozilla-will-stop-developing-and-selling-firefox-os-smartphones/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Firefox OS</a>, and there have been recent rumors about the <a href=\\"http://www.theverge.com/2016/1/28/10864034/windows-phone-is-dead\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">death</a> <a href=\\"http://www.forbes.com/sites/ewanspence/2016/01/30/microsoft-windows-phone-lumia-sales-crash/#cfca12f1d3f4\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">of</a> <a href=\\"http://www.windows10update.com/2015/12/the-reason-a-surface-phone-wont-fix-microsofts-mobile-problem/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Microsoft</a><a href=\\"http://www.techtimes.com/articles/129021/20160130/is-windows-phone-really-dead-microsoft-keeps-dropping-hints-of-a-surface-phone.htm\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Windows</a> <a href=\\"http://www.makeuseof.com/tag/windows-phone-dead-amazon-spotify-killer-tech-news-digest/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Phone</a>. The devices are generally good and sold at reasonable prices (Microsoft makes a loss on the hardware), but the platform has struggled against Android and Apple owing to a lack of software. Few developers bother to create Windows Phone apps because usage is low. And usage remains low because there are so few apps.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Microsoft is yet to make an official statement. Windows Phone will continue to be sold, but don??t expect to be able to upgrade to the next version of the platform (possibly the Surface Phone). Presuming there <em style=\\"line-height: inherit;\\">is</em>a next version ?</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">I suspect the smartphone market has reached saturation point ?? much like it did for PCs. Handsets last several years, and there??s less urgency to upgrade when improvements are more marginal. Manufacturers continue to experiment with companion devices such as tablets and watches, but these have niche appeal.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><em style=\\"line-height: inherit;\\">Should native app developers be concerned about a market slow-down?</em></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Those targeting low-use OSs may be worried. Android and iOS development are safer bets, but all mobile platforms evolve rapidly compared to their desktop cousins. Native apps never have a long-term future without continual upgrades.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">If only there were a device-agnostic platform which offered baked-in durability and continued to operate even after technical advances were implemented! I won??t pretend the web is a magic solution but, if we are seeing the first signs of a mobile market decline, the economic and technical justification for web applications just became greater.</p>', 3, '31.png', 'browser-trends-february-2016-mobile-market-decline/', '2016-02-03 12:49:47');
INSERT INTO `articles` (`article_id`, `article_name`, `article_content`, `category_id`, `img`, `url`, `date`) VALUES
(13, 'Getting Past Hello World in Angular 2', '<p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><em style=\\"line-height: inherit;\\">This article is part of a web development series from Microsoft. Thank you for supporting the partners who make SitePoint possible.</em></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">So you??ve been through the basic Angular 2 application and now you want a bit more. If you??ve been reading about Angular 2 you??ve undoubtedly seen what might look like really odd syntax in templates. You may have heard something about an overhaul to dependency injection. Or maybe some of the features of ES7 (or ES2016, the version of JavaScript planned to come out next year) such as Decorators and Observables.<br><br>This post will give you a quick introduction to these concepts and how they apply to your Angular 2 applications. We won??t dive deep into these topics yet, but look for later posts that cover each area in more detail.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">So, let??s begin at the beginning??setting up an environment.</p><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Environment Setup</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Angular2 source is written in TypeScript, a superset of JavaScript that allows for type definitions to be applied to your JavaScript code (you can find more information about TypeScript at<a href=\\"http://www.typescriptlang.org/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">www.typescriptlang.org</a>).</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">In order to use TypeScript, we need to install the compiler which runs on top of Node.js. I??m using Node 0.12.6 and NPM 2.9.1. TypeScript should be installed automatically by NPM, but you can also install TypeScript globally using:</p><pre style=\\"font-family: monospace, serif; font-size: 16px; white-space: pre-wrap; margin-bottom: 32px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); line-height: 28.8px; background-color: rgb(255, 255, 255);\\"><code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">\\r\\nnpm install ??g typescript\\r\\n# Test using\\r\\ntsc -v\\r\\n</code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">We are also using Gulp to build the project. If you don??t have Gulp installed globally, use this command:</p><pre style=\\"font-family: monospace, serif; font-size: 16px; white-space: pre-wrap; margin-bottom: 32px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); line-height: 28.8px; background-color: rgb(255, 255, 255);\\"><code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">npm install -g gulp-cli</code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Once you have Node installed, use these instructions to set up and start your simple application:</p><pre style=\\"font-family: monospace, serif; font-size: 16px; white-space: pre-wrap; margin-bottom: 32px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); line-height: 28.8px; background-color: rgb(255, 255, 255);\\"><code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">\\r\\ngit clone https://github.com/DevelopIntelligenceBoulder/second-angular-app\\r\\ncd second-angular-app\\r\\nnpm install\\r\\ngulp go\\r\\n</code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">In a browser, navigate to <a href=\\"http://localhost:8080/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">http://localhost:8080</a> (or the deployed version at<a href=\\"http://secondangular2.azurewebsites.net/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">http://secondangular2.azurewebsites.net/</a>). You should see an extremely basic application like this:</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><img src=\\"http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2016/02/1454387274getting-past-hello-world-angular-2-01-basic-angular-2-application.jpg\\" alt=\\"Basic Angular 2 application\\" width=\\"613\\" height=\\"498\\" class=\\"aligncenter size-full wp-image-123858\\" style=\\"max-width: 100%; height: auto; display: block; margin: 30px auto;\\"></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">This is a simple application that takes comma-separated ticker symbols as input and retrieves data including price and the stock name, displaying them in a simple list. This lacks styling, but we can use it to demonstrate a few ways to think about Angular 2 applications.</p><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Components</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Angular 2 applications are built using components. But what is a component? How do we set up a component in Angular 2?</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">At a high level, a component is a set of functionalities grouped together including a view, styles (if applicable) and a controller class that manages the functionality of the component. If you??re familiar with Angular 1, a component is basically a directive with a template and a controller. In fact, in Angular 2 a component is just a special type of directive encapsulating a reusable UI building block (minimally a controller class and a view).</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">We will look at the pieces that make up a component by examining the StockSearch component. In our simple application, the StockSearch component displays the input box and includes a child component called StockList that renders the data returned from the API.</p><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Decorators</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Decorators are a new feature in ES7 and you will see them identified in source code by a leading ??@? symbol. Decorators are used to provide Angular with metadata about a class (and sometimes methods or properties) to they can be wired into the Angular framework. Decorators always come before the class or property they are decorating, so you will see a codeblock like this:</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><img src=\\"http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2016/02/1454387278getting-past-hello-world-angular-2-02-decorators.jpg\\" alt=\\"Decorators\\" width=\\"683\\" height=\\"126\\" class=\\"aligncenter size-full wp-image-123859\\" style=\\"max-width: 100%; height: auto; display: block; margin: 30px auto;\\"></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">This block uses the component decorator to tell Angular that <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">MyClass</code> is an Angular component.</p><blockquote style=\\"margin-right: auto; margin-bottom: 1.25em; margin-left: auto; padding: 13px 21px; direction: ltr; border-left-width: 3px; border-left-color: rgb(233, 233, 233); line-height: 1.8em; color: rgb(74, 74, 74); font-size: 18px; border-radius: 3px; position: relative; font-style: italic; text-align: center; clear: both; width: 600px; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; background: rgb(232, 232, 232);\\"><p style=\\"padding: 0px; direction: ltr; font-family: inherit; font-size: 16px; line-height: 1.8; text-rendering: optimizeLegibility; color: rgb(38, 38, 38);\\">Note: For an in-depth discussion of decorators and annotations (a special type of decorator used in Angular 2) see <a href=\\"https://twitter.com/PascalPrecht\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Pascal Precht</a>??s post on <a href=\\"http://blog.thoughtram.io/angular/2015/05/03/the-difference-between-annotations-and-decorators.html\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">the difference between annotations and decorators</a>.</p></blockquote><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Examining a Component</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Let??s get into some code. Below is the StockSearch component, responsible for taking user input, calling a service to find stock data, and passing the data to the child StockList component. We will use this sample to talk about key parts of building an Angular 2 application:</p><pre style=\\"font-family: monospace, serif; font-size: 16px; white-space: pre-wrap; margin-bottom: 32px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); line-height: 28.8px; background-color: rgb(255, 255, 255);\\"><code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">\\r\\nimport {Component, View} from \\\'angular2/core\\\'\\r\\nimport {StockList} from \\\'./stockList\\\'\\r\\nimport {StocksService} from \\\'../services/stocks\\\'\\r\\n\\r\\n@Component({\\r\\n selector: \\\'StockSearch\\\',\\r\\n providers: [StocksService]\\r\\n})\\r\\n@View({\\r\\ntemplate: `\\r\\n <section>\\r\\n <h3>Stock Price & Name Lookup:</h3>\\r\\n <form (submit)=\\"doSearch()\\">\\r\\n <input [(ngModel)]=\\"searchText\\"/>\\r\\n </form>\\r\\n <StockList [stocks]=\\"stocks\\"></StockList>\\r\\n </section>\\r\\n `,\\r\\n directives: [StockList]\\r\\n})\\r\\nexport class StockSearch {\\r\\n searchText: string;\\r\\n stocks: Object[];\\r\\n\\r\\n constructor(public stockService:StocksService) {}\\r\\n\\r\\n doSearch() {\\r\\n this.stockService.snapshot(this.searchText).subscribe(\\r\\n (data) => {this.stocks= data},\\r\\n (err) => {console.log(\\\'error!\\\', err)}\\r\\n );\\r\\n }\\r\\n}\\r\\n</code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">(Screenshots in this post are from <a href=\\"https://code.visualstudio.com/Download/?WT.mc_id=16548-DEV-sitepoint-article84\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Visual Studio Code in Mac</a>.)</p><blockquote style=\\"margin-right: auto; margin-bottom: 1.25em; margin-left: auto; padding: 13px 21px; direction: ltr; border-left-width: 3px; border-left-color: rgb(233, 233, 233); line-height: 1.8em; color: rgb(74, 74, 74); font-size: 18px; border-radius: 3px; position: relative; font-style: italic; text-align: center; clear: both; width: 600px; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; background: rgb(232, 232, 232);\\"><p style=\\"margin-bottom: 0px; padding: 0px; direction: ltr; font-family: inherit; font-size: 16px; line-height: 1.8; text-rendering: optimizeLegibility; color: rgb(38, 38, 38);\\">While I??m relatively new to TypeScript, I??ve been enjoying it while writing Angular2 applications. TypeScript??s ability to present type information in your IDE or text editor is extremely helpful, especially when working with something new like Angular2.</p><p style=\\"padding: 0px; direction: ltr; font-family: inherit; font-size: 16px; line-height: 1.8; text-rendering: optimizeLegibility; color: rgb(38, 38, 38);\\">I??ve been pleasantly surprised with how well Visual Studio Code integrates with TypeScript. In fact, it??s written in TypeScript and can parse it by default (no plugins required). When coding in Angular2 I found myself referring to the documentation frequently until I found the ??Peek Definition? feature. This feature allows you to highlight any variable and use a keyboard shortcut (Opt-F12 on Mac) to look at the source of that variable. Since Angular2??s documentation exists in the source, I find I rarely need to go to the online documentation. Using Peek Definition on the Component decorator looks like this:</p></blockquote><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><img src=\\"http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2016/02/1454387283getting-past-hello-world-angular-2-03-peek-definition-component-decorator.jpg\\" alt=\\"Peek Definition on the Component decorator\\" width=\\"721\\" height=\\"470\\" class=\\"aligncenter size-full wp-image-123860\\" style=\\"max-width: 100%; height: auto; display: block; margin: 30px auto;\\"></p><h3 style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em;\\">import statements</h3><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">The import statements at the top of the file bring in dependencies used by this component. When you create a component, you will almost always use <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">import {Component, View} from \\\'angular2/core</code>at the top. This line brings in the component and view decorators.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Angular 2 also requires that you explicitly tell the framework about any children components (or directives) you want to use. So the next line <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">(import {StockList} from \\\'./stockList\\\')</code> pulls in the StockList component.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Similarly, we identify any services we will need. In this case we want to be able to request data using the StockService, so the last import pulls it in.</p><h3 style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em;\\">selector and template</h3><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">The <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">selector</code> and <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">template</code> properties passed to the component and view decorators are the only two configuration options required to build an Angular 2 component. Selector tells Angular how to find this component in HTML and it understands CSS selector syntax.<br>Unlike regular HTML, Angular 2 templates are case sensitive. So where in Angular 1 we used hyphens to make camelCase into kebab-case, we don??t need to do this in Angular 2. This means we can now use uppercase letters to start our component selectors, which distinguishes them from standard HTML. So:</p><pre style=\\"font-family: monospace, serif; font-size: 16px; white-space: pre-wrap; margin-bottom: 32px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); line-height: 28.8px; background-color: rgb(255, 255, 255);\\"><code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">\\r\\nselector: \\\'StockSearch\\\' // matches <StockSearch></StockSearch>\\r\\nselector: \\\'.stockSearch\\\' // matches <div class=\\"stockSearch\\">\\r\\nselector: \\\'[stockSearch]\\\' // matches <div stockSearch>\\r\\n</code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">When the Angular compiler comes across HTML that matches one of these selectors, it creates an instance of the component class and renders the contents of the template property. You can use either<code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">template</code> to create an inline template, or <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">templateUrl</code> to pass a URL, which contains the HTML template.</p><h3 style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em;\\">Dependency Injection (??providers? and ??directives?)</h3><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">If you??re familiar with Angular 1 you know it uses dependency injection to pass things like services, factories and values into other services, factories and controllers. Angular 2 also has dependency injection, but this version is a bit more robust.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">In the case of the component above, the class (controller) is called StockSearch. StockSearch needs to use StockService to make a call to get stock data. Consider the following abbreviated code snippet:</p><pre style=\\"font-family: monospace, serif; font-size: 16px; white-space: pre-wrap; margin-bottom: 32px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); line-height: 28.8px; background-color: rgb(255, 255, 255);\\"><code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">\\r\\nimport{StocksService} from \\\'../services/stocks\\\'\\r\\n\\r\\n@Component({\\r\\n selector: \\\'StockSearch\\\',\\r\\n providers: [StocksService]\\r\\n})\\r\\nexport class StockSearch {\\r\\n constructor(public stockService:StocksService) {}\\r\\n}\\r\\n</code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">As with other classes, the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">import</code> statement makes the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">StocksService</code> class available. We then pass it into the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">providers</code> property passed to the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">Component</code> decorator, which alerts Angular that we want to use dependency injection to create an instance of the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">StocksService</code> when it??s passed to the StockSearch constructor.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">The constructor looks pretty bare-bones, but there??s actually quite a bit happening in this single line.</p><h3 style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em;\\">public keyword</h3><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">The public keyword tells TypeScript to put the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">stockService</code>(<em style=\\"line-height: inherit;\\">camelCase</em>, as opposed to the class name which is <em style=\\"line-height: inherit;\\">PascalCase</em>) variable onto the instance of the StockSearch component. StockSearch??s methods will reference it as <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">this.stockService</code>.</p><h3 style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em;\\">Type declaration</h3><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">After <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">public stockService</code> we have <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">:StocksService</code>, which tells the compiler that the variable<code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">stockService</code> will be an instance of the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">StockService</code> class. Because we used the component decorator, type declarations on the constructor cause Angular??s dependency injection module to create an instance of the StocksService class and pass it to the StockSearch constructor. If you??re familiar with Angular 1, an analogous line of code would look like this:</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><img src=\\"http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2016/02/1454387288getting-past-hello-world-angular-2-04-type-declaration.jpg\\" alt=\\"Type declaration\\" width=\\"638\\" height=\\"116\\" class=\\"aligncenter size-full wp-image-123861\\" style=\\"max-width: 100%; height: auto; display: block; margin: 30px auto;\\"></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">One key difference between the Angular 1 and Angular 2 dependency injection systems is that in Angular 1 there??s just one large global namespace for all dependencies in your app. If you register a controller by calling <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">app.controller(\\\'MyController\\\', ?)</code> in two different places in your code, the second one loaded will overwrite the first. (Note that this overwrite issue doesn??t apply to directives in Angular 1. Registering a directive by calling <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">app.directive(\\\'myDirective\\\', ?)</code> in multiple places will add to the behavior of the earlier definition, not overwrite it.)</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">In Angular 2 the confusion is resolved by explicitly defining which directives are used in each view. So<code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">directives: [StockList]</code> tells Angular to look for the StockList component inside our view. Without that property defined, Angular wouldn??t do anything with the ??<code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\"><StockList></code>? HTML tag.</p><h3 style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em;\\">Properties and Events</h3><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Looking at the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">template</code> passed to the View decorator, we see a new syntax where some attributes are surrounded by parentheses, some by brackets, and some by both.</p><h4 style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 16px; letter-spacing: -0.02em;\\">Parentheses</h4><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Surrounding an attribute with parentheses tells Angular to listen for an event by the attribute name. So<code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\"><form (submit) = \\"doSearch()\\"></code> tells Angular to listen for the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">submit</code> event on the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">form</code>component, and when a submit occurs the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">doSearch</code> method of the current component should be run (in this case, <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">StockSearch</code> is the current component).</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><img src=\\"http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2016/02/1454387293getting-past-hello-world-angular-2-05-properties-events-parentheses.jpg\\" alt=\\"Properties and Events (Parentheses)\\" width=\\"650\\" height=\\"190\\" class=\\"aligncenter size-full wp-image-123862\\" style=\\"max-width: 100%; height: auto; display: block; margin: 30px auto;\\"></p><h4 style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 16px; letter-spacing: -0.02em;\\">Square Brackets</h4><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Surrounding an attribute with square brackets tells Angular to parse the attribute value as an expression and assign the result of the expression to a property on the target component. So <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\"><StockList [stocks] = \\"stocks\\"></StockList></code> will look for a stocks variable on the current component (StockSearch) and pass its value to the StockList component in a property also named ??stocks.? In Angular 1 this required configuration using the Directive Definition Object, but looking just at the HTML there was no indication of how the attribute would be used.</p><pre style=\\"font-family: monospace, serif; font-size: 16px; white-space: pre-wrap; margin-bottom: 32px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); line-height: 28.8px; background-color: rgb(255, 255, 255);\\"><code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">\\r\\n<!-- Angular 2 we know [stocks] causes \\"stocks\\" to \\r\\n parsed and passed to StockList component -->\\r\\n<StockList[stocks] = \\"stocks\\"></StockList>\\r\\n\\r\\n<!-- Angular 1 doesn\\\'t use brakcets. Looking just at \\r\\n the HTML we don\\\'t know how the directive is using \\r\\n the stocks attribute -->\\r\\n<stock-list stocks = \\"stocks\\"></stock-list>\\r\\n</code></pre><h4 style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 16px; letter-spacing: -0.02em;\\">Square Brackets and Parentheses</h4><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">This is a special syntax available to the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">ngModel</code> directive. It tells Angular to create a two-way binding. So<code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\"><input [(ngModel)] = \\"searchText\\"></code> wires up an input element where text entered into the input gets applied to the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">searchText</code> property of the StockSearch component. Similarly, changes to<code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">this.searchText</code> inside the StockSearch instance cause an update to the value of the input.</p><pre style=\\"font-family: monospace, serif; font-size: 16px; white-space: pre-wrap; margin-bottom: 32px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); line-height: 28.8px; background-color: rgb(255, 255, 255);\\"><code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">\\r\\n<!-- Angular 2 requires both event and attribute\\r\\n bindings to be explicitly clear we want 2-way binding -->\\r\\n<input [(ngModel)] = \\"searchText\\">\\r\\n\\r\\n<!-- Angular 1 looks simpler without the [(...)]. -->\\r\\n<input ng-model = \\"searchText\\">\\r\\n</code></pre><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Services</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">A more in-depth explanation of services will be the subject of a future post, but our application defines a StockService that??s used to make an HTTP call to retrieve data. So let??s take a look at the service and walk through the pieces:</p><pre style=\\"font-family: monospace, serif; font-size: 16px; white-space: pre-wrap; margin-bottom: 32px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); line-height: 28.8px; background-color: rgb(255, 255, 255);\\"><code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">\\r\\n//a simple service\\r\\nimport {Injectable} from \\\'angular2/core\\\';\\r\\nimport {Http, URLSearchParams} from \\\'angular2/http\\\';\\r\\n\\r\\n@Injectable()\\r\\nexport class StocksService {\\r\\n // TS shortcut \\"public\\" to put http on this\\r\\n constructor(public http:Http) {}\\r\\n\\r\\n snapshot(symbols:string): any {\\r\\n let params = new URLSearchParams();\\r\\n params.set(\\\'symbols\\\', symbols);\\r\\n\\r\\n return this.http.get(\\"/api/snapshot\\", {search: params})\\r\\n .map(res => res.json()) // convert to JSON\\r\\n .map(x => x.filter(y => y.name)); // Remove stocks w/no name\\r\\n }\\r\\n}\\r\\n</code></pre><h3 style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em;\\">@Injectable() decorator</h3><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">In Angular 2 we use the Injectable decorator to let Angular know a class should be registered with dependency injection. Without this, the providers property we used in the StockSearch component wouldn??t have worked, and dependency injection wouldn??t have created an instance of the service to pass into the controller. Therefore, if you want a class to be registered with dependency injection, use the Injectable decorator.</p><h3 style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em;\\">HTTP service</h3><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">We??ll deep-dive into Angular 2??s HTTP library in the future, but the high-level summary is that it lets you call all your basic HTTP methods. Similar to the way we made StockService available to the StockSearch constructor, we are adding ??http? on the ??this? object using <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">public http:Http</code>.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">If you take a look at the ??snapshot? method, you??ll see we call <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">/api/snapshot</code>, then pass a configuration object with the search params. This is pretty straightforward, but at the bottom pay attention to<code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">.map(...)</code>. In Angular 1 (as in most modern HTTP libraries), an HTTP call returns a ??promise.? But in Angular 2 we get an Observable.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">An observable is like a promise but it can be resolved multiple times. There??s a lot to know about observables and we??ll cover them in upcoming posts, but for more information on observables, set aside some time to go through <a href=\\"https://gist.github.com/staltz/868e7e9bc2a7b8c1f754\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">this post</a> and exercises in order to get up to speed.</p><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Tree of Components</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">We??ve looked at one component and a service it accesses. Angular 2 applications are built by constructing a tree of components, starting with a root application component. The application component should contain very little logic, as the primary purpose is to lay out the top-level pieces of your application.</p><pre style=\\"font-family: monospace, serif; font-size: 16px; white-space: pre-wrap; margin-bottom: 32px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); line-height: 28.8px; background-color: rgb(255, 255, 255);\\"><code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">\\r\\n//our root app component\\r\\nimport {Component, View} from \\\'angular2/core\\\'\\r\\nimport {StockSearch} from \\\'./components/stockSearch\\\';\\r\\n\\r\\n@Component({\\r\\n selector: \\\'App\\\'\\r\\n})\\r\\n@View({\\r\\ntemplate: \\\'\\r\\n <header>\\r\\n <h2>Second Angular 2 App</h2>\\r\\n </header>\\r\\n <StockSearch></StockSearch>\\\',\\r\\n directives: [StockSearch]\\r\\n})\\r\\nexport class AppComponent {}\\r\\n</code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Now that we are familiar with the syntax of wiring up a component, we can see that the template outputs the header, followed by the StockSearch component. StockSearch is in the directive list, so Angular renders the component when it comes across the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\"><StockSearch></code> tag.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">That??s about all there is to an application component; it is simply the root of our application. There can be only a single root in any Angular 2 application, and the final piece of the puzzle is telling Angular to look for it.</p><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Bootstrapping our Application</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">In an Angular 2 application, we need to tell Angular when to start up. This is done using the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">bootstrap</code>method, passing in our <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">AppComponent</code> along with other module dependencies. For those familiar with Angular 1, this is similar to the main <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">angular.module(name, [dependencies...])</code> construct.</p><pre style=\\"font-family: monospace, serif; font-size: 16px; white-space: pre-wrap; margin-bottom: 32px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); line-height: 28.8px; background-color: rgb(255, 255, 255);\\"><code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">\\r\\n//our root app component\\r\\nimport {bootstrap} from \\\'angular2/platform/browser\\\';\\r\\nimport {HTTP_PROVIDERS} from \\\'angular2/http\\\';\\r\\nimport \\\'rxjs/Rx\\\';\\r\\nimport {AppComponent} from \\\'./app\\\';\\r\\n\\r\\nbootstrap(AppComponent, [HTTP_PROVIDERS])\\r\\n.catch(err =>console.error(err));\\r\\n</code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Notice the second argument is <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">[HTTP_PROVIDERS]</code>. This is a special variable that references the classes defining Angular 2??s HTTP functionality, and it??s needed to let Angular know we can use the HTTP classes in our application. The Angular 1 equivalent looks something like this:</p><pre style=\\"font-family: monospace, serif; font-size: 16px; white-space: pre-wrap; margin-bottom: 32px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); line-height: 28.8px; background-color: rgb(255, 255, 255);\\"><code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">\\r\\n// JavaScript code to set up the app\\r\\nangular.module(\\\'App\\\', [\\\'ngResource\\\']);\\r\\n\\r\\n<!-- Corresponding HTML tag pointing to \\"App\\" module -->\\r\\n<div ng-app=\\"App\\"></div>\\r\\n</code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Also notice we have <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">import \\\'rxjs/Rx\\\'</code> at the top. This pulls in the RxJs library so we get access to methods on Observables. Without adding this line we wouldn??t be able to run <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">.map()</code> on the return from<code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">http.get()</code> method since the returned Observable wouldn??t have the map method available.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Once the application is bootstrapped, Angular looks for our root component in our markup. Looking back at the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">AppComponent</code>, the selector is set to app, so Angular will be looking for an element <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\"><app></code> and will render the <code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">AppComponent</code> there:</p><pre style=\\"font-family: monospace, serif; font-size: 16px; white-space: pre-wrap; margin-bottom: 32px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); line-height: 28.8px; background-color: rgb(255, 255, 255);\\"><code style=\\"font-family: Consolas, \\\'Liberation Mono\\\', Courier, monospace; font-size: 1em; color: rgb(51, 51, 51); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">\\r\\n<!DOCTYPE html>\\r\\n<html>\\r\\n <head>\\r\\n <title>Basic Angular 2 Application Demonstration</title>\\r\\n </head>\\r\\n <body>\\r\\n <App>\\r\\n loading...\\r\\n </App>\\r\\n <script src=\\"/lib/angular2-polyfills.js\\"></script>\\r\\n <script src=\\"/lib/system.js\\"></script>\\r\\n <script src=\\"/lib/Rx.js\\"></script>\\r\\n <script src=\\"/lib/angular2.dev.js\\"></script>\\r\\n <script src=\\"/lib/http.dev.js\\"></script>\\r\\n <script>\\r\\n System.config({\\r\\n //packages defines our app package\\r\\n packages: {\\\'app\\\': {defaultExtension: \\\'js\\\'}}\\r\\n });\\r\\n\\r\\n System.import(\\\'app/bootstrap\\\')\\r\\n .catch(console.error.bind(console));\\r\\n </script>\\r\\n\\r\\n </body>\\r\\n</html>\\r\\n</code></pre><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Summary</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">When considering Angular 2 applications, think about components and their children. At any point in the application you are examining some component, and that component knows what its children are. It??s a top-down approach where at each level you define compartmentalized functionality that eventually leads to a complete application.</p><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">More Hands-on with Web Development</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">This article is part of the web development series from Microsoft and <a href=\\"http://www.developintelligence.com/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">DevelopIntelligence</a> on practical JavaScript learning, open source projects, and interoperability best practices including <a href=\\"http://blogs.windows.com/msedgedev/2015/05/06/a-break-from-the-past-part-2-saying-goodbye-to-activex-vbscript-attachevent/?WT.mc_id=16548-DEV-sitepoint-article84\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Microsoft Edge</a>browser and the new <a href=\\"http://blogs.windows.com/msedgedev/2015/02/26/a-break-from-the-past-the-birth-of-microsofts-new-web-rendering-engine/?WT.mc_id=16548-DEV-sitepoint-article84\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">EdgeHTML rendering engine</a>.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><a href=\\"http://www.developintelligence.com/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">DevelopIntelligence</a> offers instructor-led <a href=\\"http://www.developintelligence.com/catalog/javascript-training\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">JavaScript Training</a>, <a href=\\"http://www.developintelligence.com/catalog/web-development-training/angularjs\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">AngularJS Training</a> and other <a href=\\"http://www.developintelligence.com/catalog/web-development-training\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Web Development Training</a> for technical teams and organizations.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">We encourage you to test across browsers and devices including Microsoft Edge ?? the default browser for Windows 10 ?? with free tools on <a href=\\"https://dev.windows.com/en-us/microsoft-edge/?utm_source=SitePoint&utm_medium=article84&utm_campaign=SitePoint\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">dev.microsoftedge.com</a>:</p><ul style=\\"margin-right: 0px; margin-bottom: 1.25em; margin-left: 25px; padding: 0px; direction: ltr; font-size: 16px; line-height: 1.6; list-style: none; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; counter-reset: ol-counter 0; color: rgb(74, 74, 74);\\"><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\"><a href=\\"http://dev.modern.ie/tools/staticscan/?utm_source=SitePoint&utm_medium=article84&utm_campaign=SitePoint\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Scan your site for out-of-date libraries, layout issues, and accessibility</a></li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\"><a href=\\"http://dev.modern.ie/tools/vms/windows/?utm_source=SitePoint&utm_medium=article84&utm_campaign=SitePoint\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Download free virtual machines for Mac, Linux, and Windows</a></li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\"><a href=\\"https://dev.modern.ie/platform/status/?utm_source=SitePoint&utm_medium=article84&utm_campaign=SitePoint\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Check Web Platform status across browsers including the Microsoft Edge roadmap</a></li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\"><a href=\\"https://remote.modern.ie/?utm_source=SitePoint&utm_medium=article84&utm_campaign=SitePoint\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Remotely test for Microsoft Edge on your own device</a></li></ul><p style=\\"margin-bottom: 32px; pa', 3, '46.png', 'getting-past-hello-world-in-angular-2/', '2016-02-03 12:50:39');
INSERT INTO `articles` (`article_id`, `article_name`, `article_content`, `category_id`, `img`, `url`, `date`) VALUES
(14, 'Displaying Collections of Items on Windows Phone', '<p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Mobile apps often need to display long lists of items to users. These could contain images, text or other custom components. Every mobile platform has it??s unique set of components and concepts for displaying such lists and Windows Phone is no exception. In this tutorial I will show you how to make your own customized list of items, changing order of these lists, display options and adding items programmatically.</p><div class=\\"ArticleBox u-inline\\" style=\\"margin: 0px 0px 20px 20px; padding: 0px; direction: ltr; position: relative; z-index: 1; width: 350px; float: right; color: rgb(74, 74, 74); font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><h3 class=\\"ArticleBox_header t-bg\\" style=\\"margin: 0px; padding: 10px 20px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(255, 255, 255); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em; background: rgb(44, 87, 115);\\"><span class=\\"ArticleBox_icon fa fa-pencil\\" style=\\"display: inline-block; font-stretch: normal; line-height: 1; font-family: FontAwesome; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; transform: translate(0px, 0px); margin-right: 5px;\\"></span> More from this author</h3><div class=\\"ArticleBox_content\\" style=\\"margin: 0px; padding: 10px 20px 20px; direction: ltr; position: relative; border-width: 0px 1px 1px; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-right-color: rgb(239, 239, 239); border-bottom-color: rgb(239, 239, 239); border-left-color: rgb(239, 239, 239);\\"><ul class=\\"ArticleBox_list t-list\\" style=\\"margin-right: 0px; margin-bottom: 0px; margin-left: 25px; padding: 0px; direction: ltr; font-size: 1em; line-height: 1.6; list-style: none; font-family: inherit; counter-reset: ol-counter 0;\\"><li style=\\"margin: 4px 0px; padding: 0px; direction: ltr; position: relative;\\"><a href=\\"http://www.sitepoint.com/updating-users-with-notifications-in-windows-phone-apps/?utm_source=sitepoint&utm_medium=relatedinline&utm_term=mobile&utm_campaign=relatedauthor\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease; padding: 5px 0px 1px;\\">Updating Users with Notifications in Windows Phone Apps</a></li><li style=\\"margin: 4px 0px; padding: 0px; direction: ltr; position: relative;\\"><a href=\\"http://www.sitepoint.com/adding-geolocation-and-maps-to-windows-phone-apps/?utm_source=sitepoint&utm_medium=relatedinline&utm_term=mobile&utm_campaign=relatedauthor\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease; padding: 5px 0px 1px;\\">Adding GeoLocation and Maps to Windows Phone Apps</a></li></ul></div></div><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">You can download the full project from <a href=\\"https://github.com/sitepoint-editors/Item-Collectors\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">GitHub</a>.</p><h2 id=\\"toc_1\\" style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Getting Started</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Create a project in Visual Studio and add a <em style=\\"line-height: inherit;\\">MainPage</em>to switch between our <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">ListView</code> and <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">GridView</code>views by adding two buttons to the <em style=\\"line-height: inherit;\\">.xaml</em> file that will take us to the corresponding pages.</p><div style=\\"margin: 0px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px;\\"><pre class=\\"line-numbers language-markup\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-markup\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token tag\\" style=\\"color: rgb(153, 0, 85);\\"><span class=\\"token tag\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\"><</span>Button</span> <span class=\\"token attr-name\\" style=\\"color: rgb(102, 153, 0);\\"><span class=\\"token namespace\\" style=\\"opacity: 0.7;\\">x:</span>Name</span><span class=\\"token attr-value\\" style=\\"color: rgb(0, 119, 170);\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">=</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span>listViewButton<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span></span> <span class=\\"token attr-name\\" style=\\"color: rgb(102, 153, 0);\\">Content</span><span class=\\"token attr-value\\" style=\\"color: rgb(0, 119, 170);\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">=</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span>List View<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span></span> <span class=\\"token attr-name\\" style=\\"color: rgb(102, 153, 0);\\">Grid.Row</span><span class=\\"token attr-value\\" style=\\"color: rgb(0, 119, 170);\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">=</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span>0<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span></span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">/></span></span>\\r\\n\\r\\n<span class=\\"token tag\\" style=\\"color: rgb(153, 0, 85);\\"><span class=\\"token tag\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\"><</span>Button</span> <span class=\\"token attr-name\\" style=\\"color: rgb(102, 153, 0);\\"><span class=\\"token namespace\\" style=\\"opacity: 0.7;\\">x:</span>Name</span><span class=\\"token attr-value\\" style=\\"color: rgb(0, 119, 170);\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">=</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span>gridViewButton<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span></span> <span class=\\"token attr-name\\" style=\\"color: rgb(102, 153, 0);\\">Content</span><span class=\\"token attr-value\\" style=\\"color: rgb(0, 119, 170);\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">=</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span>Grid View<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span></span> <span class=\\"token attr-name\\" style=\\"color: rgb(102, 153, 0);\\">Grid.Row</span><span class=\\"token attr-value\\" style=\\"color: rgb(0, 119, 170);\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">=</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span>1<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span></span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">/></span></span></code></pre></div><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Now create these two pages and name them <em style=\\"line-height: inherit;\\">GridViewPage</em> and <em style=\\"line-height: inherit;\\">ListViewPage</em>. Next we need to create the connections between the pages and buttons.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">In the <em style=\\"line-height: inherit;\\">design view</em> of the <em style=\\"line-height: inherit;\\">MainPage</em>, double clicking the buttons will generate the <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">onClick</code> events and the xaml and C# code will be added automatically.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">The code for the buttons should be the following.</p><div style=\\"margin: 0px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px;\\"><pre class=\\"line-numbers language-markup\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-markup\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token tag\\" style=\\"color: rgb(153, 0, 85);\\"><span class=\\"token tag\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\"><</span>Button</span> <span class=\\"token attr-name\\" style=\\"color: rgb(102, 153, 0);\\"><span class=\\"token namespace\\" style=\\"opacity: 0.7;\\">x:</span>Name</span><span class=\\"token attr-value\\" style=\\"color: rgb(0, 119, 170);\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">=</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span>listViewButton<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span></span> <span class=\\"token attr-name\\" style=\\"color: rgb(102, 153, 0);\\">Content</span><span class=\\"token attr-value\\" style=\\"color: rgb(0, 119, 170);\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">=</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span>List View<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span></span> <span class=\\"token attr-name\\" style=\\"color: rgb(102, 153, 0);\\">Grid.Row</span><span class=\\"token attr-value\\" style=\\"color: rgb(0, 119, 170);\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">=</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span>0<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span></span> <span class=\\"token attr-name\\" style=\\"color: rgb(102, 153, 0);\\">Click</span><span class=\\"token attr-value\\" style=\\"color: rgb(0, 119, 170);\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">=</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span>listViewButton_Click<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span></span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">/></span></span>\\r\\n\\r\\n<span class=\\"token tag\\" style=\\"color: rgb(153, 0, 85);\\"><span class=\\"token tag\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\"><</span>Button</span> <span class=\\"token attr-name\\" style=\\"color: rgb(102, 153, 0);\\"><span class=\\"token namespace\\" style=\\"opacity: 0.7;\\">x:</span>Name</span><span class=\\"token attr-value\\" style=\\"color: rgb(0, 119, 170);\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">=</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span>gridViewButton<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span></span> <span class=\\"token attr-name\\" style=\\"color: rgb(102, 153, 0);\\">Content</span><span class=\\"token attr-value\\" style=\\"color: rgb(0, 119, 170);\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">=</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span>Grid View<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span></span> <span class=\\"token attr-name\\" style=\\"color: rgb(102, 153, 0);\\">Grid.Row</span><span class=\\"token attr-value\\" style=\\"color: rgb(0, 119, 170);\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">=</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span>1<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span></span> <span class=\\"token attr-name\\" style=\\"color: rgb(102, 153, 0);\\">Click</span><span class=\\"token attr-value\\" style=\\"color: rgb(0, 119, 170);\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">=</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span>gridViewButton_Click<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">\\"</span></span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">/></span></span></code></pre></div><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">If you open <em style=\\"line-height: inherit;\\">MainPage.xaml.cs</em> you will see the two methods generated above. Inside these we need to call<em style=\\"line-height: inherit;\\">Frame.Navigate</em> to change pages.</p><div style=\\"margin: 0px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px;\\"><pre class=\\"line-numbers language-csharp\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-csharp\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">private</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">void</span> <span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">listViewButton_Click</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">object</span> sender<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> RoutedEventArgs e<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n Frame<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">Navigate</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">typeof</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>ListViewPage<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n\\r\\n<span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">private</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">void</span> <span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">gridViewButton_Click</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">object</span> sender<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> RoutedEventArgs e<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n Frame<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">Navigate</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">typeof</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>GridViewPage<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span></code></pre></div><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><em style=\\"line-height: inherit;\\">MainPage</em> is now complete and should look like the below, allowing you to switch between pages.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><img src=\\"http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2016/01/1453672628mainpage.png\\" alt=\\"MainPage\\" style=\\"max-width: 100%; height: auto; display: block; margin: 0px auto;\\"></p><h2 id=\\"toc_2\\" style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Items</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Behind every list layout are the items that constitute an entry in the list. For example, in a contacts list there might be the name of a contact, a phone number, a picture, email, etc.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">For our <em style=\\"line-height: inherit;\\">ListView</em> I will add the following items to create a contact entry.</p><div style=\\"margin: 0px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px;\\"><pre class=\\"line-numbers language-csharp\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-csharp\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">class</span> <span class=\\"token class-name\\">ListViewItem</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">public</span> SolidColorBrush color <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">get</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">set</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">public</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">string</span> firstName <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">get</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">set</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">public</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">string</span> lastName <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">get</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">set</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">public</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">string</span> mobileNumber <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">get</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">set</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span></code></pre></div><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">For the <em style=\\"line-height: inherit;\\">GridView</em> we will create a clone of the Windows store. It??s a perfect example of displaying items inside a grid.</p><div style=\\"margin: 0px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px;\\"><pre class=\\"line-numbers language-csharp\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-csharp\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">class</span> <span class=\\"token class-name\\">GridViewItem</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">public</span> SolidColorBrush color <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">get</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">set</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">public</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">string</span> name <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">get</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">set</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">public</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">string</span> price <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">get</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">set</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">public</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">string</span> rate <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">get</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">set</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span></code></pre></div><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">I have used colors instead of pictures and hopefully this is clear enough. Make sure you add<code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">using Windows.UI.Xaml.Media;</code> as a dependency for the <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">SolidColorBrush</code> in both classes. <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">get</code>and <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">set</code> can be thought of as <q style=\\"quotes: "??" "?" "??" "??";\\">read/write</q> permissions for each of the parameters.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Move <em style=\\"line-height: inherit;\\">ListViewItem.cs</em> and <em style=\\"line-height: inherit;\\">GridViewItem.cs</em> into a new <em style=\\"line-height: inherit;\\">Items</em> folder for a cleaner project structure.</p><h2 id=\\"toc_3\\" style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Models</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">To control our list of items we are going to use models, which are the bridge between code and design. If we want to make changes to the items displayed, we shouldn??t change the <em style=\\"line-height: inherit;\\">.xaml</em> file but instead change the item in our model and the rest will be handled at run-time.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Create <em style=\\"line-height: inherit;\\">ListViewModel.cs</em> and <em style=\\"line-height: inherit;\\">GridViewModel.cs</em> and move them into a folder called <em style=\\"line-height: inherit;\\">Models</em>.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">To create a list of items, we need an <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">ObservableCollection</code> from<code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">System.Collections.ObjectModel</code> to hold the items. It??s the same as a simple list, but binds the items. This type of collection is the key to changing elements dynamically as it inherits from<code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">INotifyCollectionChanged</code>, and <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">INotifyPropertyChanged</code>.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">In <em style=\\"line-height: inherit;\\">ListViewModel.cs</em> add:</p><div style=\\"margin: 0px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px;\\"><pre class=\\"line-numbers language-csharp\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-csharp\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">public</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">static</span> ObservableCollection<span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\"><</span>ListViewItem<span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">></span> ListViewItems <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">get</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">set</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n<span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">private</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">static</span> Random random<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span></code></pre></div><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Random is a data type to generate random values for color, mobile number, and rate. In the constructor we initialize both <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">ListViewItems</code> and <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">random</code>.</p><div style=\\"margin: 0px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px;\\"><pre class=\\"line-numbers language-csharp\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-csharp\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">public</span> <span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">ListViewModel</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n ListViewItems <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">new</span> <span class=\\"token class-name\\">ObservableCollection</span><span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\"><</span>ListViewItem<span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">></span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n random <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">new</span> <span class=\\"token class-name\\">Random</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span></code></pre></div><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">To add items we need a method that will create an item of type <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">ListViewItem</code> and add it to the collection.</p><div style=\\"margin: 0px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px;\\"><pre class=\\"line-numbers language-csharp\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-csharp\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">public</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">static</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">void</span> <span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">AddItem</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n ListViewItems<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">Add</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">new</span> <span class=\\"token class-name\\">ListViewItem</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n firstName <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"Contact\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n lastName <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>ListViewItems<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span>Count <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">+</span> <span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">1</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">ToString</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n mobileNumber <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"+355-\\"</span> <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">+</span> random<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">Next</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">10</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> <span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">100</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span> <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">+</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"-\\"</span> <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">+</span> random<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">Next</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">10</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">100</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span> <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">+</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"-\\"</span> <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">+</span> random<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">Next</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">10</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">100</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span> <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">+</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"-\\"</span> <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">+</span> <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">+</span>random<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">Next</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">100</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> <span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">1000</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n color <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">new</span> <span class=\\"token class-name\\">SolidColorBrush</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">new</span> <span class=\\"token class-name\\">Color</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n A <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">255</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n R <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">byte</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span>random<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">Next</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">255</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n G <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">byte</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span>random<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">Next</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">255</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n B <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">byte</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span>random<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">Next</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">255</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span></code></pre></div><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">The values above are intentionally kept simple for demonstration purposes. You can see that all contacts have the same first name, have a number as <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">lastname</code>, a random <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">mobileNumber</code> and color value.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><span style=\\"font-weight: 700; line-height: inherit;\\">Note</span>: This method is static because when binding the elements of the container to a <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">ListView</code>, an instance of the class is created, so to add elements to this instance we don??t need to create a new object.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">In the same way we define the model for <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">GridView</code>:</p><div style=\\"margin: 0px; padding: 0px; direction: ltr; color: rgb(74, 74, 74); font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px;\\"><pre class=\\"line-numbers language-csharp\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-csharp\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">class</span> <span class=\\"token class-name\\">GridViewModel</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">public</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">static</span> ObservableCollection<span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\"><</span>GridViewItem<span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">></span> GridViewItems <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">get</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">set</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">private</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">static</span> Random random<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">public</span> <span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">GridViewModel</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n GridViewItems <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">new</span> <span class=\\"token class-name\\">ObservableCollection</span><span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\"><</span>GridViewItem<span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">></span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n random <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">new</span> <span class=\\"token class-name\\">Random</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">public</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">static</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">void</span> <span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">AddItem</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n GridViewItems<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">Add</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">new</span> <span class=\\"token class-name\\">GridViewItem</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n name <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"APP NAME \\"</span> <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">+</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>GridViewItems<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span>Count <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">+</span> <span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">1</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n price <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token string\\" style=\\"color: r', 4, '81.png', 'displaying-collections-of-items-on-windows-phone/', '2016-02-03 12:51:33');
INSERT INTO `articles` (`article_id`, `article_name`, `article_content`, `category_id`, `img`, `url`, `date`) VALUES
(15, 'Hocus-Pocus: Building a Design-Free Sass Framework', '<p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Hocus-Pocus is a design-free Sass framework that I??m working on in my free time. The main idea behind Hocus-Pocus is to make a universal and lightweight stylesheet starter kit that focuses on the most common features. In this article, I??ll cover why I decided to build my own Sass framework and the approach I??ve taken when doing so.</p><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Why Have I Started Working on a Sass Framework?</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">In short, I would say I??ve started working on a Sass framework because I wanted to save time when starting new web projects. I??ve noticed that even when I work on really custom designs, I always add the same set of tools, include the same standard packages, and implement a similar collection of basic CSS components.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">The second question that follows then is ?? <em style=\\"line-height: inherit;\\">Why you don??t you use an existing, well-known and proven framework like Bootstrap?</em></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">My response to this comes down to preferences and my approach to CSS. I think libraries like Bootstrap or Foundation are great and have greatly changed how people think about CSS. However, in most cases within my own project work, I just don??t need all these features and UI components like progress bars or breadcrumbs. Instead, I prefer to have something more universal. I prefer something that I can use in any project, without needing to override framework CSS classes.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Due to the reasons above, in Hocus-Pocus you can change the look of every single component with variables. You can even disable some features or define a range of helpers. The downside of this approach is that I can??t provide a compiled CSS version of the framework as there is no reasonable way to use Hocus-Pocus without an ability to update variables.</p><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Pre-requirements and principles</h2><h3 style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em;\\">Installation</h3><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">The framework is available and easy to install with two different package managers: Bower and npm. It requires Sass (minimum required version is 3.3.0) and <a href=\\"https://github.com/postcss/autoprefixer\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Autoprefixer</a> to run. Autoprefixer is used to add necessary vendor prefixes to the final compiled CSS file. I don??t worry too much about compatibility between various browsers nowadays as I personally find autoprefixing to be sufficient. Additionally, I use sass linter (<a href=\\"https://github.com/brigade/scss-lint\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">scss-lint</a>), but this is not required for running Hocus-Pocus and doing things the right way. Hocus-Pocus will work without it.</p><h3 style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em;\\">Naming Convention</h3><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">The next principle is an important one for every framework ?? the naming convention. I prefer regular, dash style class names without BEM. I won??t complain if you are a fan of BEM and prefer to use the BEM naming convention, if it works for you ?? go for it. From my perspective, BEM doesn??t fix all of the responsibility problems in CSS. I also find that I approach my CSS using less class-level elements when I use BEM. Adding a new element to an existing block is just too easy.</p><h3 style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em;\\">Documentation</h3><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Last but not least, I pay close attention to writing documentation and keeping the Hocus-Pocus changelog up to date. Documentation doesn??t have to be perfect, especially at the beginning, but I always try to find time to improve it. This helps newcomers learn how the tool works and allows me to keep track of framework features.</p><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Framework Features</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">The following framework features are the most characteristic to Hocus-Pocus in my opinion and give the best overview of what its focus really is.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Most of the framework classes are inspired from existing projects that I??ve worked on in the past. You may also spot some similarities to other CSS frameworks that have inspired me, especially my favorites ??<a href=\\"http://primercss.io/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Primer</a> and <a href=\\"https://github.com/inuitcss\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">InuitCSS</a>.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Framework features in Hocus-Pocus include:</p><ol style=\\"margin-right: 0px; margin-bottom: 1.25em; margin-left: 25px; padding: 0px; direction: ltr; font-size: 16px; line-height: 1.6; list-style: none; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; counter-reset: ol-counter 0; color: rgb(74, 74, 74);\\"><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\"><a href=\\"https://necolas.github.io/normalize.css/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Normalize</a> with some enhancements like global <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">box-sizing</code> set to <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">border-box</code> or text elements without top margin.</li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\">A new default color palette based on <a href=\\"http://clrs.cc/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">clrs.cc</a>.</li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\">A fluid grid based on flexbox with width helpers that use fractions as class names (<code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">.1/2</code>, <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">.1/3</code> and so on).</li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\">Wide support for responsive web design. There is an option to choose either ??mobile first? or ??desktop first? as your preferred approach. You are also able to define breakpoints for each and each of them gets their own set of helpers for spacing, grid, visibility, and an individual Sass mixin.</li></ol><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">For example:</p><pre class=\\" language-css\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 16px; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-css\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">$<span class=\\"token property\\" style=\\"color: rgb(153, 0, 85);\\">rwd-type</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> desktop-first<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n$<span class=\\"token property\\" style=\\"color: rgb(153, 0, 85);\\">rwd-map</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>\\r\\n <span class=\\"token string\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">\\\'mobile\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">680</span>px\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> \\r\\n$<span class=\\"token property\\" style=\\"color: rgb(153, 0, 85);\\">spacing-map</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>\\r\\n <span class=\\"token string\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">\\\'double\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">double</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>$spacing-unit<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span></code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Then in compiled CSS you??ll have access to classes like <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">.mobile-1/2</code>, <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">.mobile-hidden</code> and<code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">.mobile-padding-double</code>.</p><ol style=\\"margin-right: 0px; margin-bottom: 1.25em; margin-left: 25px; padding: 0px; direction: ltr; font-size: 16px; line-height: 1.6; list-style: none; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; counter-reset: ol-counter 0; color: rgb(74, 74, 74);\\"><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\">Generic default styles for text elements with vertical rhythm based on <a href=\\"http://www.gridlover.net/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Gridlover</a>.</li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\">Extra modifiers for other HTML elements like an inline list, a menu list, a circle image or a zebra table.</li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\">Various button types and three versions of forms: inline, stacked and horizontal.</li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\">Essential UI components like the media object, box object, navbar, a hero element for landing pages and a sticky footer. Nothing more.</li></ol><h2 style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Future Hopes for Hocus-Pocus</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">My goal is to make Hocus-Pocus an ideal Sass starter kit no matter how complex your projects are. This way, you can focus on writing project specific UI components and defining your theme.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">I don??t plan to implement any major new features. I think the features included are a reasonable amount of features and are likely to be the final ones. I??ll probably improve syntax for some components or change some single class names, but I don??t predict any compatibility breaking changes from the current version. For now, I??m more committed to fixing bugs that occur as more people give Hocus-Pocus a try.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">If you think the Hocus-Pocus framework might be helpful for you in an upcoming project, you can find full documentation at <a href=\\"http://hocus-pocus.io/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">hocus-pocus.io</a>. The Hocus-Pocus code is open source and <a href=\\"https://github.com/bkzl/hocus-pocus\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">all available on GitHub</a>. I appreciate any comments, feedback, and information about potential issues.</p>', 2, '19.png', 'hocus-pocus-building-as-design-free-sass-framework/', '2016-02-03 12:52:00');
INSERT INTO `articles` (`article_id`, `article_name`, `article_content`, `category_id`, `img`, `url`, `date`) VALUES
(16, 'Using MySQL with Node.js & the node-mysql JavaScript Client', '<p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">NoSQL databases are all the rage these days and probably the preferred back-end for Node.js applications. But you shouldn??t architect your next project based on what??s hip and trendy, rather the type of database to be used should depend on the project??s requirements. If your project involves dynamic table creation, real time inserts etc. then NoSQL is the way to go, but on the other hand, if your project deals with complex queries and transactions, then a SQL make much more sense.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">In this tutorial, we??ll have a look at getting started with the <a href=\\"https://github.com/felixge/node-mysql\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">node-mysql module</a> ?? a Node.js driver for MySQL, written in JavaScript. I??ll explain how to use the module to connect to a MySQL database, perform the usual CRUD operations, before examining stored procedures and escaping user input.</p><h2 id=\\"installing-node-mysql\\" style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Installing node-mysql</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">node-mysql</code> can be installed via npm. We can get up and running like so:</p><pre class=\\" language-bash\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 16px; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-bash\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">mkdir</span> sp<span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">-</span>node<span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">-</span>mysql\\r\\n<span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">cd</span> sp<span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">-</span>node<span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">-</span>mysql\\r\\nnpm <span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">install</span> mysql</code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">If you need help using npm, then be sure to check out <a href=\\"http://www.sitepoint.com/beginners-guide-node-package-manager/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">this article</a>, or ask in <a href=\\"http://community.sitepoint.com/c/javascript\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">our forums</a>.</p><h2 id=\\"getting-started\\" style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Getting Started</h2><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Once you are done installing node-mysql module, you are good to go. For this demo I??ll be using a database called <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">sitepoint</code> and a table called <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">employees</code>. Here??s a dump of the database, so that you can get up and running quickly, if you wish to follow along:</p><pre class=\\" language-sql\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 16px; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-sql\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">CREATE</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">TABLE</span> employees <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>\\r\\n id <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">int</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">11</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span> <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">NOT</span> <span class=\\"token boolean\\" style=\\"color: rgb(153, 0, 85);\\">NULL</span> AUTO_INCREMENT<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n name <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">varchar</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">50</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n location <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">varchar</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">50</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">PRIMARY</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">KEY</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>id<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">ENGINE</span><span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">InnoDB</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">DEFAULT</span> CHARSET<span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span>utf8 AUTO_INCREMENT<span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">5</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n\\r\\n<span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">INSERT</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">INTO</span> employees <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>id<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> name<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> location<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">VALUES</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">1</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Jasmine\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Australia\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">2</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Jay\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'India\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">3</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Jim\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Germany\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">4</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Lesley\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Scotland\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span></code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Now, let??s create a file called app.js in our <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">sp-node-mysql</code> directory and see how to connect to MySQL from Node.js.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><span style=\\"font-weight: 700; line-height: inherit;\\">app.js</span></p><pre class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 16px; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">var</span> mysql <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">require</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"mysql\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n\\r\\n<span class=\\"token comment\\" spellcheck=\\"true\\" style=\\"color: rgb(112, 128, 144);\\">// First you need to create a connection to the db</span>\\r\\n<span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">var</span> con <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> mysql<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">createConnection</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n host<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"localhost\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n user<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"jay\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n password<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"jay\\"</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n\\r\\ncon<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">connect</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">function</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>err<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">if</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>err<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n console<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">log</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Error connecting to Db\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">return</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n console<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">log</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Connection established\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n\\r\\ncon<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">end</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">function</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>err<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n <span class=\\"token comment\\" spellcheck=\\"true\\" style=\\"color: rgb(112, 128, 144);\\">// The connection is terminated gracefully</span>\\r\\n <span class=\\"token comment\\" spellcheck=\\"true\\" style=\\"color: rgb(112, 128, 144);\\">// Ensures all previously enqueued queries are still</span>\\r\\n <span class=\\"token comment\\" spellcheck=\\"true\\" style=\\"color: rgb(112, 128, 144);\\">// before sending a COM_QUIT packet to the MySQL server.</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span></code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Now open up a terminal and enter <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">node app.js</code>. Once the connection is successfully established you should be able to see the ??Connection established? message in the console. If something goes wrong (for example you enter the wrong password), a callback is fired, which is passed an instance of the JavaScript Error object (<code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">err</code>). Try logging this to the console to see what additional useful information it contains.</p><h3 id=\\"pro-tip\\" style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em;\\">Pro Tip</h3><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">If JavaScript task runners are your thing, you can watch the file <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">app.js</code> for changes and have the task runner execute it every time a change is detected.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Here??s how you might do that with <a href=\\"http://gruntjs.com/\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">Grunt</a>.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><span style=\\"font-weight: 700; line-height: inherit;\\">package.json</span></p><pre class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 16px; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"name\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"sp-node-mysql\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"version\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"0.1.0\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"devDependencies\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"grunt\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"~0.4.5\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"grunt-contrib-watch\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"^0.6.1\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"grunt-execute\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"^0.2.2\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span></code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><span style=\\"font-weight: 700; line-height: inherit;\\">Gruntfile.js</span></p><pre class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 16px; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">module<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span>exports <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">function</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>grunt<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n grunt<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">initConfig</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n execute<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n target<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n src<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">[</span><span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'app.js\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">]</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n watch<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n scripts<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n files<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">[</span><span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'app.js\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">]</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n tasks<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">[</span><span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'execute\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">]</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n\\r\\n grunt<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">loadNpmTasks</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'grunt-contrib-watch\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n grunt<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">loadNpmTasks</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'grunt-execute\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span></code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Then run <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">npm install</code>, followed by <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">grunt watch</code>.</p><h2 id=\\"executing-queries\\" style=\\"margin: 0px 0px 16px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 34px; letter-spacing: -0.02em;\\">Executing Queries</h2><h3 id=\\"reading\\" style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em;\\">Reading</h3><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Now that you know how to establish a connection to MySQL from Node.js, let??s see how to execute SQL queries. We??ll start by specifying the database name (<code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">sitepoint</code>) in the <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">createConnection</code> command.</p><pre class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 16px; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">var</span> con <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> mysql<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">createConnection</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n host<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"localhost\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n user<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"jay\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n password<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"jay\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n database<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"sitepoint\\"</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span></code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Once the connection is established we??ll use the connection variable to execute a query against the database table <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">employees</code>.</p><pre class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 16px; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">con<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">query</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'SELECT * FROM employees\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">function</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>err<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>rows<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">if</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>err<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">throw</span> err<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n\\r\\n console<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">log</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Data received from Db:\\\\n\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n console<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">log</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>rows<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span></code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">When you run <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">app.js</code> (either using <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">grunt-watch</code> or by typing <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">node app.js</code> into your terminal), you should be able to see the data returned from database logged to the terminal.</p><pre class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 16px; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">[</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span> id<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">1</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> name<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Jasmine\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> location<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Australia\\\'</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span> id<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">2</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> name<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Jay\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> location<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'India\\\'</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span> id<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">3</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> name<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Jim\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> location<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Germany\\\'</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span> id<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">4</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> name<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Lesley\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> location<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Scotland\\\'</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">]</span></code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Data returned from the MySQL database can be parsed by simply lopping over the <code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">rows</code> object.</p><pre class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 16px; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">for</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">var</span> i <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">0</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> i <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\"><</span> rows<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span>length<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span> i<span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">++</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n console<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">log</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>rows<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">[</span>i<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">]</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span>name<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span></code></pre><h3 id=\\"creating\\" style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em;\\">Creating</h3><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">You can execute an insert query against a database, like so:</p><pre class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 16px; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\"><span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">var</span> employee <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">=</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span> name<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Winnie\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> location<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">:</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Australia\\\'</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\ncon<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">query</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'INSERT INTO employees SET ?\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> employee<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">function</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>err<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>res<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">if</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>err<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">throw</span> err<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n\\r\\n console<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">log</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Last insert ID:\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> res<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span>insertId<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span></code></pre><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Note how we can get the ID of the inserted record using the callback parameter.</p><h3 id=\\"updating\\" style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em;\\">Updating</h3><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Similarly, when executing an update query, the number of rows affected can be retrieved using<code class=\\" language-undefined\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; padding: 3px; border-radius: 3px; background: rgb(232, 232, 232);\\">result.affectedRows</code>:</p><pre class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 16px; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">con<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">query</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>\\r\\n <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'UPDATE employees SET location = ? Where ID = ?\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">[</span><span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\"South Africa\\"</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> <span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">5</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">]</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">function</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>err<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> result<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">if</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>err<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span> <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">throw</span> err<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n\\r\\n console<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">log</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span><span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'Changed \\\'</span> <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">+</span> result<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span>changedRows <span class=\\"token operator\\" style=\\"color: rgb(166, 127, 89); background: rgba(255, 255, 255, 0.498039);\\">+</span> <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\' rows\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">}</span>\\r\\n<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">;</span></code></pre><h3 id=\\"destroying\\" style=\\"margin: 0px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; color: rgb(38, 38, 38); text-rendering: optimizeLegibility; line-height: 1.5; font-size: 20.8px; letter-spacing: -0.02em;\\">Destroying</h3><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Same thing goes for a delete query:</p><pre class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 16px; margin-bottom: 32px; padding: 1em; direction: ltr; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; line-height: 1.5; tab-size: 4; border-color: rgba(51, 51, 51, 0.0980392); background: rgb(249, 249, 250);\\"><code class=\\" language-javascript\\" style=\\"font-family: Consolas, Monaco, \\\'Andale Mono\\\', \\\'Ubuntu Mono\\\', monospace; font-size: 1em; color: rgb(0, 0, 0); text-shadow: rgb(255, 255, 255) 0px 1px; direction: ltr; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; tab-size: 4; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\">con<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">.</span><span class=\\"token function\\" style=\\"color: rgb(221, 74, 104);\\">query</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>\\r\\n <span class=\\"token string\\" style=\\"color: rgb(102, 153, 0);\\">\\\'DELETE FROM employees WHERE id = ?\\\'</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">[</span><span class=\\"token number\\" style=\\"color: rgb(153, 0, 85);\\">5</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">]</span><span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">function</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>err<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">,</span> result<span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">)</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">{</span>\\r\\n <span class=\\"token keyword\\" style=\\"color: rgb(0, 119, 170);\\">if</span> <span class=\\"token punctuation\\" style=\\"color: rgb(153, 153, 153);\\">(</span>err<span class=\\"token punctuation\\" style=\\"color: rgb(153, ', 5, '51.png', 'using-mysql-with-node-js-the-node-mysql-javascript-client/', '2016-02-03 14:17:38');
INSERT INTO `articles` (`article_id`, `article_name`, `article_content`, `category_id`, `img`, `url`, `date`) VALUES
(17, 'Taming MySQL Administration', '<p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Taming the management of your MySQL Server may have just become a little easier with the most recent release of Navicat.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">This GUI administration tool for MySQL servers has some advantages for the developer ?? for starters it runs on Linux, Macintosh and Windows with fair consistency (as far as equivalent feature sets go). A feature matrix is <a href=\\"http://www.navicat.com/feature.php3\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">available online</a>.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">(to see the screen shots included with this post please see the Open Sourcery blog at<a href=\\"http://www.sitepoint.com/blog-post-view.php?id=200601\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">http://www.sitepoint.com/blog-post-view.php?id=200601</a>)</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Several existing and new features will appeal to power users, including:</p><ul style=\\"margin-right: 0px; margin-bottom: 1.25em; margin-left: 25px; padding: 0px; direction: ltr; font-size: 16px; line-height: 1.6; list-style: none; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; counter-reset: ol-counter 0; color: rgb(74, 74, 74);\\"><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\">Import from ODBC source (Windows only)</li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\">Stored Procedure design for MySQL 5 (all versions)</li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\">Batch Job and Scheduling (all versions)</li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\">Data Transfer from MySQL to MySQL or to a file (all versions)</li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\">Manage indexes and foreign key configuration</li><li style=\\"margin: 0px; padding: 0px; direction: ltr; position: relative;\\">User privileges management</li></ul><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">I kicked around Navicat on both Mac OS 10.3.5 and Windows XP Pro using both development and production database servers and found it easy to use in function and interface. Some of the areas of interest are below.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">The main view of Navicat, as shown below, is a clean workspace with support for multiple sql server connections.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><img src=\\"http://www.sitepoint.com/authors/images/338_navi_main.jpg\\" alt=\\"\\" style=\\"max-width: 100%; height: auto; display: block; margin: 0px auto;\\"></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Interaction with connections and tables can be done via double clicks and right click contextual menus.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">To get started with testing, I moved some data from a production server to a development system via Navicat??s data transfer, which could surely become an invaluable tool for various purposes.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><img src=\\"http://www.sitepoint.com/authors/images/338_navi_transfer.jpg\\" alt=\\"\\" style=\\"max-width: 100%; height: auto; display: block; margin: 0px auto;\\"></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">I then did some querying both through the programs visual query builder ??</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><img src=\\"http://www.sitepoint.com/authors/images/338_navi_query_builder.jpg\\" alt=\\"\\" style=\\"max-width: 100%; height: auto; display: block; margin: 0px auto;\\"></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">?? and some simple sql tests via the raw sql pad also available.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><img src=\\"http://www.sitepoint.com/authors/images/338_navi_sql_pad.jpg\\" alt=\\"\\" style=\\"max-width: 100%; height: auto; display: block; margin: 0px auto;\\"></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Finally, one can see the results on demand within the program.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><img src=\\"http://www.sitepoint.com/authors/images/338_navi_query_result.jpg\\" alt=\\"\\" style=\\"max-width: 100%; height: auto; display: block; margin: 0px auto;\\"></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">The included Export Wizard allows for export to delimited, XML and Dbase file formats on Mac OS X and up to 18 formats on Windows. Unfortunately the Linux version does not currently support exports from query results.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">As with any database administrator??s routine, monitoring the performance of your databases is essential. The Server Monitor within Navicat allows for one or more active MySQL connections to run a ??show processlist;? within the GUI. Tools include a static capture of running processes or an active refresh for ongoing tracking.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><img src=\\"http://www.sitepoint.com/authors/images/338_navi_proclist.jpg\\" alt=\\"\\" style=\\"max-width: 100%; height: auto; display: block; margin: 0px auto;\\"></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Additionally, with a click one can see the results of the ??show status;? and ??show variables;? mysql commands.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">The ability to kill processes is available within Server Monitor.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Finally, a feature I like personally for use during development, Navicat??s Backup/Restore allows for hot backups and restoration of MySQL database/tables.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\"><img src=\\"http://www.sitepoint.com/authors/images/338_navi_backup.jpg\\" alt=\\"\\" style=\\"max-width: 100%; height: auto; display: block; margin: 0px auto;\\"></p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">For smaller MySQL deployments this will also work as a production backup routine. However, in my case I leave production backup running via an automation script (not Navicat) on my various servers, dumping all backups to a separate consolidated backup server.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Navicat ranges in price from $45 US to $125 depending upon your licensing needs and can be purchased online from the <a href=\\"http://www.navicat.com/order_buy.php3\\" style=\\"color: rgb(54, 155, 200); line-height: inherit; word-wrap: break-word; padding: 5px 0px 1px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(54, 155, 200, 0.298039); transition: all 0.3s ease;\\">company??s store</a>.</p><p style=\\"margin-bottom: 32px; padding: 0px; direction: ltr; font-family: Roboto, \\\'Helvetica Neue\\\', Helvetica, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 28.8px; text-rendering: optimizeLegibility; color: rgb(74, 74, 74);\\">Product inquiries can be directed to sales at navicat.com</p>', 5, '33.png', 'taming-mysql-administration/', '2016-02-03 14:18:06'),
(18, '5 Free fancy light weight jQuery plugins to add 3d effects to your website', '<p>Hello Friends in today??s tutorial I will give you some really amazing\\r\\n list of jQuery plugins to add 3d effects to your website, I hope you \\r\\nwill like this tutorial and implement it in your websites.</p>\\r\\n<h2><strong>Makisu</strong></h2>\\r\\n<p><img class=\\"aligncenter size-full wp-image-3362\\" src=\\"http://images.phpgang.com/2016/02/makisu_css_3d_dropdown.png\\" alt=\\"makisu_css_3d_dropdown\\" width=\\"1109\\" height=\\"568\\"></p>\\r\\n<p>Simply, It??s a nice CSS 3D dropdown concept, wrapped up in a jQuery \\r\\nplugin. You can adjuct the wrapping speed, 3d perspective and shading \\r\\nwhich makes it perfect for any fancy design that you may have.</p>\\r\\n<p>Link to official website and demo: <a href=\\"http://soulwire.github.io/Makisu/\\" target=\\"_blank\\" rel=\\"nofollow\\">http://soulwire.github.io/Makisu/</a></p><div id=\\"header-banner2\\" style=\\"text-align:center;\\">\\r\\n \\r\\n</div>\\r\\n<p>Github link: <a href=\\"https://github.com/soulwire/Makisu\\" target=\\"_blank\\" rel=\\"nofollow\\">https://github.com/soulwire/Makisu</a></p>\\r\\n<p>List of supported browser: <a href=\\"http://caniuse.com/#search=3d%20transform\\" target=\\"_blank\\" rel=\\"nofollow\\">http://caniuse.com/#search=3d%20transform</a></p>\\r\\n<h2><strong>Flipster</strong></h2>\\r\\n<p><img class=\\"aligncenter size-full wp-image-3361\\" src=\\"http://images.phpgang.com/2016/02/flipster.png\\" alt=\\"flipster\\" width=\\"1027\\" height=\\"334\\"></p>\\r\\n<p>Flipster is a CSS3 3D transform-based jQuery plugin. The creators \\r\\ndescribe it as built to replicate the familiar ??cover flow?? effect. It??s\\r\\n responsive, supports touch, wheel, trackpad and keyboard and has \\r\\ndifferent styles.</p>\\r\\n<p>It supports Chrome, Safari & iOS Safari, Firefox, IE 10+ and limited support for IE 8-9.</p>\\r\\n<p>Link to official website and demo: <a href=\\"http://brokensquare.com/Code/jquery-flipster/demo/\\" target=\\"_blank\\" rel=\\"nofollow\\">http://brokensquare.com/Code/jquery-flipster/demo/</a></p>\\r\\n<p>Github link: <a href=\\"https://github.com/drien/jquery-flipster\\" target=\\"_blank\\" rel=\\"nofollow\\">https://github.com/drien/jquery-flipster</a></p>\\r\\n<h2><strong>3D curtain</strong></h2>\\r\\n<p><img class=\\"aligncenter size-full wp-image-3360\\" src=\\"http://images.phpgang.com/2016/02/curtains.png\\" alt=\\"curtains\\" width=\\"1172\\" height=\\"618\\"></p>\\r\\n<p>It??s a simple 3D curtain style animation. It??s developed using \\r\\nAnimate.CSS and jQuery, And with support for mousewheel with debounce.</p>\\r\\n<p>Link to official website and demo: <a href=\\"https://hasinhayder.github.io/css3-3d-curtain/\\" target=\\"_blank\\" rel=\\"nofollow\\">https://hasinhayder.github.io/css3-3d-curtain/</a></p>\\r\\n<p>Github link: <a href=\\"https://github.com/hasinhayder/css3-3d-curtain\\" target=\\"_blank\\" rel=\\"nofollow\\">https://github.com/hasinhayder/css3-3d-curtain</a></p>\\r\\n<h2><strong>Reveal.js</strong></h2>\\r\\n<p><img class=\\"aligncenter size-full wp-image-3363\\" src=\\"http://images.phpgang.com/2016/02/reveal.png\\" alt=\\"reveal\\" width=\\"1286\\" height=\\"560\\"></p>\\r\\n<p>It??s an advanced yet simple framework which can be used for easily creating beautiful presentations using HTML.</p>\\r\\n<p>reveal.js is loaded with with a wide range of features including \\r\\nnested slides, Markdown contents, PDF export, speaker notes and a \\r\\nJavaScript API. It??s supports all the modern browsers.</p>\\r\\n<p>Link to official website and demo: <a href=\\"http://lab.hakim.se/reveal-js/#/\\" target=\\"_blank\\" rel=\\"nofollow\\">http://lab.hakim.se/reveal-js/#/</a></p>\\r\\n<p>Github link: <a href=\\"https://github.com/hakimel/reveal.js\\" target=\\"_blank\\" rel=\\"nofollow\\">https://github.com/hakimel/reveal.js</a></p>\\r\\n<h2><strong>Slicebox</strong></h2>\\r\\n<p><img class=\\"aligncenter size-full wp-image-3364\\" src=\\"http://images.phpgang.com/2016/02/slicebox.jpg\\" alt=\\"slicebox\\" width=\\"580\\" height=\\"315\\"></p>\\r\\n<p>Slicebox is a beautiful jQuery image slider plugin that is based on \\r\\nCSS 3D Transforms and comes with a graceful fallback for older browsers \\r\\nthat don??t support the new properties, And of course it supports all the\\r\\n modern browsers.</p>\\r\\n<p>Link to official website and demo: <a href=\\"http://tympanus.net/Development/Slicebox/\\" target=\\"_blank\\" rel=\\"nofollow\\">http://tympanus.net/Development/Slicebox/</a></p>', 5, '63.png', '5-free-fancy-light-weight-jquery-plugins-to-add-3d-effects-to-your-website/', '2016-02-18 15:30:08');
-- --------------------------------------------------------
--
-- Table structure for table `categories`
--
CREATE TABLE `categories` (
`category_id` int(11) NOT NULL,
`category_name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `categories`
--
INSERT INTO `categories` (`category_id`, `category_name`) VALUES
(1, 'php'),
(2, 'html5'),
(3, 'js'),
(4, 'css'),
(5, 'sql server');
-- --------------------------------------------------------
--
-- Table structure for table `comments`
--
CREATE TABLE `comments` (
`comment_id` int(11) NOT NULL,
`article_id` int(11) NOT NULL,
`cname` varchar(50) NOT NULL,
`cemail` varchar(50) NOT NULL,
`cweb` varchar(50) DEFAULT NULL,
`comment` text NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `comments`
--
INSERT INTO `comments` (`comment_id`, `article_id`, `cname`, `cemail`, `cweb`, `comment`, `date`) VALUES
(4, 9, 'Ahmed Khan', 'ahmedkhan_847@hotmail.com', 'http://www.cloudways.com', 'I am Really Enjoying it a lot.', '2016-02-18 17:51:05');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`user_id` int(11) NOT NULL,
`u_fname` varchar(50) NOT NULL,
`u_lname` varchar(50) NOT NULL,
`user_name` varchar(20) NOT NULL,
`user_psw` varchar(255) NOT NULL,
`user_email` varchar(255) NOT NULL,
`img` varchar(50) NOT NULL,
`user_city` varchar(50) NOT NULL,
`user_country` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`user_id`, `u_fname`, `u_lname`, `user_name`, `user_psw`, `user_email`, `img`, `user_city`, `user_country`) VALUES
(1, 'ahmed', 'khan', 'ahmedkhan', '$2y$10$fCEasQ.r5CBE7JXxlfZiY.jwC0A3KJdGmsGfrJE3e6ugl46a/kqVe', 'ahmedkhan_847@hotmail.com', '26.jpg', 'pakistan', 'karachi');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `article`
--
ALTER TABLE `article`
ADD KEY `arts` (`article_id`),
ADD KEY `uses` (`user_id`);
--
-- Indexes for table `articles`
--
ALTER TABLE `articles`
ADD PRIMARY KEY (`article_id`),
ADD KEY `cats` (`category_id`);
--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`category_id`);
--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
ADD PRIMARY KEY (`comment_id`),
ADD KEY `comment` (`article_id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`user_id`),
ADD UNIQUE KEY `user_name` (`user_name`),
ADD UNIQUE KEY `user_email` (`user_email`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `articles`
--
ALTER TABLE `articles`
MODIFY `article_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
MODIFY `category_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
MODIFY `comment_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `article`
--
ALTER TABLE `article`
ADD CONSTRAINT `arts` FOREIGN KEY (`article_id`) REFERENCES `articles` (`article_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `uses` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `articles`
--
ALTER TABLE `articles`
ADD CONSTRAINT `cats` FOREIGN KEY (`category_id`) REFERENCES `categories` (`category_id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `comments`
--
ALTER TABLE `comments`
ADD CONSTRAINT `comment` FOREIGN KEY (`article_id`) REFERENCES `articles` (`article_id`) ON DELETE CASCADE ON UPDATE CASCADE;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|