<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2945702370683669100</id><updated>2018-04-23T14:56:21.985+05:30</updated><category term="PHP"/><category term="Cygnite Framework"/><category term="Jquery"/><category term="javascript"/><category term="PHP Framworks"/><category term="AJax"/><category term="Mysql"/><category term="web development"/><category term="Codeigniter"/><category term="facebook"/><category term="Magento"/><category term="html"/><category term="Angular JS"/><category term="Twig"/><category term="bootstrap"/><category term="high performance web application"/><category term="ubuntu"/><category term="web design"/><category term="web service"/><category term="Angular js with PHP"/><category term="CRUD"/><category term="CSV Import"/><category term="Cache"/><category term="Composer PHP"/><category term="Cygnite framework Code Generator"/><category term="Javascript Frameworks"/><category term="Json"/><category term="LINUX"/><category term="Responsive Design"/><category term="SOAP"/><category term="Symfony2"/><category term="Zend"/><category term="class"/><category term="client"/><category term="codeigniter helper"/><category term="codeigniter librery"/><category term="dompdf"/><category term="export data"/><category term="export pdf"/><category term="generate pdf"/><category term="google"/><category term="helpers"/><category term="mpdf"/><category term="mvc"/><category term="nusoap"/><category term="object oriented programming"/><category term="pdf"/><category term="web application"/><category term=".htaccess"/><category term="5 Best Things You Should Know About PHP7"/><category term="8 Brilliant Tools for web application"/><category term="Angular Routing"/><category term="Backbone JS"/><category term="C#"/><category term="CSV Reader"/><category term="Concanate String"/><category term="Continuous Integration"/><category term="Craft Console"/><category term="Cross-site request forgery"/><category term="Cygnite"/><category term="Cygnite Framework DI Container"/><category term="Cygnite Framework with Angular Js"/><category term="Cygnite PHP Framework"/><category term="Dependency Injection in PHP"/><category term="Dependency Management in PHP"/><category term="Difference between asp and asp.net"/><category term="Drupal"/><category term="Dual Boot- Windows With Ubuntu (Linux)"/><category term="Event Schedular"/><category term="Excel"/><category term="File Upload"/><category term="Form"/><category term="Form Generator"/><category term="Framwork"/><category term="How to split Large CSV file into multiple pieces?"/><category term="Install and Configuration of Cygnite"/><category term="Jquery Plugin"/><category term="Jquery binding"/><category term="Jsonp"/><category term="LAMP Server"/><category term="Lamp stack installation"/><category term="Laravel"/><category term="Large File"/><category term="Latest PHP frameworks in 2014"/><category term="Magento Custom Module"/><category term="Magento Installation and Configuration"/><category term="Magento Module"/><category term="Magento Skinning"/><category term="Magento module development"/><category term="Megento Theme Customization"/><category term="Memcached Installation"/><category term="Mobile Responsive Site"/><category term="Mockery"/><category term="MongoDB"/><category term="MongoDB Tutorials"/><category term="Mysql Event"/><category term="No captcha reCAPTCHA"/><category term="PHP 7 features and release date"/><category term="PHP Form Builder class"/><category term="PHP7"/><category term="PHPDocumentor"/><category term="PHPUnit"/><category term="Packagist"/><category term="Padding"/><category term="Pagination"/><category term="Php7 Revolution"/><category term="Plugins"/><category term="REST"/><category term="REST webservice"/><category term="RESTful routing"/><category term="Read CSV file"/><category term="SimpleTest"/><category term="Software Design Patterns"/><category term="Split CSV"/><category term="Starting with Angular js PHP and Mysql"/><category term="Template Engine"/><category term="Test Driven Development"/><category term="Travis CI"/><category term="Travis CI and GitHub"/><category term="Unit Testing"/><category term="Upload"/><category term="WAMP server"/><category term="WCF"/><category term="Webservice"/><category term="Webservice to fetch data from database"/><category term="Windows 8"/><category term="Yii"/><category term="Zend2"/><category term="advantages of asp.net"/><category term="ajax request"/><category term="apache"/><category term="asp"/><category term="asp.net"/><category term="call server"/><category term="captcha"/><category term="coding standards"/><category term="connection class"/><category term="count gmail inbox messages with php"/><category term="cross domain ajax"/><category term="cross site ajax"/><category term="cross site scripting"/><category term="css"/><category term="current element position using jquery"/><category term="design patterns"/><category term="disadvantages of classic asp"/><category term="domain"/><category term="e-commerce"/><category term="element position"/><category term="framework"/><category term="gmail"/><category term="high performance web applicatiuon"/><category term="how to use singleton"/><category term="image cropping"/><category term="imap"/><category term="jquery ul li value"/><category term="json_encode"/><category term="logic"/><category term="mail"/><category term="mecached"/><category term="memcached"/><category term="mod_rewrite"/><category term="module creator"/><category term="naming conventions"/><category term="numbers"/><category term="object"/><category term="oops"/><category term="oops principle"/><category term="page load"/><category term="patterns"/><category term="pdf export in php"/><category term="position"/><category term="programming architecture"/><category term="psr-0"/><category term="random generate numbers"/><category term="random numbers"/><category term="random numbers on page refresh event using jquery"/><category term="random strings"/><category term="reCAPTCHA using javascript"/><category term="read mails"/><category term="reading gmail inbox"/><category term="reading inbox mails using php"/><category term="remove index.php from url"/><category term="reuse code"/><category term="scripting"/><category term="security"/><category term="self-driving car"/><category term="server"/><category term="silverlight"/><category term="singleton pattern"/><category term="thumbnail image"/><category term="to-do lists"/><category term="tutorial"/><category term="validation in php"/><category term="value from element"/><category term="water mark"/><category term="watermark"/><category term="web application tools"/><category term="website optimization"/><category term="what is singleton"/><category term="which is the best framework in PHP"/><category term="wordpress"/><title type='text'>Appsntech.com The Tutorial Hub For Developers </title><subtitle type='html'>appsntech.com is a how to blog maintained by Sanjoy Dey. Tutorials are mostly focused on web application development, PHP Jquery, Ajax, AngularJS, Web Design, Web Development, Magento, Javascript,Cygnite PHP Framework and MySQL etc.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.appsntech.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>59</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-847364964813203459</id><published>2017-01-01T21:17:00.000+05:30</published><updated>2017-01-02T02:33:47.595+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Craft Console"/><category scheme="http://www.blogger.com/atom/ns#" term="Cygnite Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="Cygnite framework Code Generator"/><category scheme="http://www.blogger.com/atom/ns#" term="Mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="to-do lists"/><title type='text'>Creating A Task List Using Craft Console</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;   &lt;h2 class=&quot;heading-class&quot;&gt;Creating A To-Do List:&lt;/h2&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://4.bp.blogspot.com/-DrX0vdR-spA/WGkXS6Ex43I/AAAAAAAABTA/cd6Avm3AALAncEUjj8_7Z9721yBMtepGgCPcB/s1600/creating-todo-list-using-cygnite-php-framework.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://4.bp.blogspot.com/-DrX0vdR-spA/WGkXS6Ex43I/AAAAAAAABTA/cd6Avm3AALAncEUjj8_7Z9721yBMtepGgCPcB/s1600/creating-todo-list-using-cygnite-php-framework.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;p&gt;Our previous article was on &lt;a href=&quot;http://www.appsntech.com/2015/10/travis-ci-continuous-integration-for-php-project.html&quot; target=&quot;_blank&quot;&gt;&quot;Travis CI: Continuous Integration for PHP Project&quot;&lt;/a&gt;. A very happy new year. It is this year&#39;s first tutorial for appsntech.com readers. In this article I will discuss How To Create A Simple To Do List Using &lt;a href=&quot;http://www.cygniteframework.com/2016/07/creating-command.html&quot; target=&quot;_blank&quot;&gt;Craft Console&lt;/a&gt; (Cygnite Component). In this tutorial we will be using Cygnite PHP Framework v2.x. &lt;/p&gt; &lt;p&gt;I will not explain how to &lt;a href=&quot; http://www.cygniteframework.com/2015/02/installation.html&quot; target=&quot;_blank&quot;&gt;install &lt;/a&gt; cygnite framework &amp; &lt;a href=&quot; http://www.cygniteframework.com/2013/11/database-configurations.html&quot;&gt;configure database&lt;/a&gt; connections, as it is already explained in its &lt;a href=&quot; http://www.cygniteframework.com/2013/07/introduction.html&quot; target=&quot;_blank&quot;&gt; beautiful documentation&lt;/a&gt;.  Cygnite &lt;a href=&quot; http://www.cygniteframework.com/2016/07/directory-structure.html&quot; target=&quot;_blank&quot;&gt; directory structure&lt;/a&gt; explained here.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;What is Craft Console?&lt;/h2&gt; &lt;p&gt; &lt;a href=&quot;http://www.cygniteframework.com/2014/03/console-overview.html&quot; target=&quot;_blank&quot;&gt;Craft&lt;/a&gt; introduced in Cygnite v2.0. Craft is console based &lt;a href=&quot;http://www.cygniteframework.com/2013/11/crud-generator-by-cygnite-cli.html&quot; target=&quot;_blank&quot;&gt;powerful code generator&lt;/a&gt; provided by Cygnite Framework. It is built on top of Symfony console component. &lt;/p&gt; &lt;p&gt;It helps you to create and generate fully customized Controllers, Models, Forms, Migrations, Commands, CRUD for database and more. To access craft in Cygnite, just go to:&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;cd /var/www/cygnite/console/bin/&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; Execute below command to see list of available commands for your application. &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;php craft list&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; To demonstrate, I will use Craft for building our simple To-Do list. Let&#39;s get started.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Creating a Table For To-Do List:&lt;/h2&gt; &lt;p&gt;Configuration of &lt;a href=&quot; http://www.cygniteframework.com/2013/11/database-configurations.html&quot; target=&quot;_blank&quot;&gt;database connection explained here&lt;/a&gt;. Once you have configured database connection. Let us create a new table for our &quot;To-Do app&quot;. &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Meet Migration &amp; Schema Builder:&lt;/h2&gt; &lt;p&gt;Before doing anything else we need to build a table schema. Cygnite has a &lt;a href=&quot;http://www.cygniteframework.com/2013/11/schema-builder.html&quot; target=&quot;_blank&quot;&gt;Schema Builder&lt;/a&gt; to help you building table schema and &lt;a href=&quot;http://www.cygniteframework.com/2013/11/migrations.html&quot; target=&quot;_blank&quot;&gt;Migrations&lt;/a&gt; class to build create database version control.&lt;/p&gt; &lt;p&gt;All though you can create a table schema executing query. But recommended way to build table schema is using &lt;a href=&quot; http://www.cygniteframework.com/2013/11/migrations.html&quot; target=&quot;_blank&quot;&gt; Migrations &lt;/a&gt;.  Execute below command to generate your migration file.&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;php craft migrate:init to_do&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-GP1pvFk1clY/WGj9BGj7egI/AAAAAAAABSg/t9bOkpGjC5kYmR8oCBOs5kYJo_2MXvruQCPcB/s1600/migration_todo_success.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://3.bp.blogspot.com/-GP1pvFk1clY/WGj9BGj7egI/AAAAAAAABSg/t9bOkpGjC5kYmR8oCBOs5kYJo_2MXvruQCPcB/s640/migration_todo_success.png&quot; width=&quot;640&quot; height=&quot;407&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt; Go to &lt;b&gt;/src/Apps/Resources/Database/Migrations/&lt;/b&gt; directory and find out the file with name &lt;b&gt;xxxx_to_do.php&lt;/b&gt;. Edit the file add below lines of code inside &quot;up&quot; method .&lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;//Your schema to migrate&lt;br /&gt;Schema::make(&#39;to_do&#39;, function ($schema)&lt;br /&gt;{&lt;br /&gt;    $schema-&gt;create([&lt;br /&gt;            [&#39;column&#39;=&gt; &#39;id&#39;, &#39;type&#39; =&gt; &#39;int&#39;, &#39;length&#39; =&gt; 11,&lt;br /&gt;             &#39;increment&#39; =&gt; true, &#39;key&#39; =&gt; &#39;primary&#39;],&lt;br /&gt;            [&#39;column&#39;=&gt; &#39;title&#39;, &#39;type&#39; =&gt; &#39;string&#39;, &#39;length&#39; =&gt;100],&lt;br /&gt;            [&#39;column&#39;=&gt; &#39;description&#39;, &#39;type&#39; =&gt; &#39;string&#39;, &lt;br /&gt;             &#39;length&#39;  =&gt;16],&lt;br /&gt;            &lt;br /&gt;            /*..Add columns to your table schema .*/&lt;br /&gt;            [&#39;column&#39;=&gt; &#39;created_at&#39;, &#39;type&#39; =&gt; &#39;datetime&#39;, &lt;br /&gt;             &#39;length&#39; =&gt; &#39;null&#39;],&lt;br /&gt;            [&#39;column&#39;=&gt; &#39;due_date&#39;, &#39;type&#39; =&gt; &#39;datetime&#39;, &lt;br /&gt;             &#39;length&#39; =&gt; &#39;null&#39;],&lt;br /&gt;&lt;br /&gt;    ], &#39;InnoDB&#39;, &#39;latin1&#39;);&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt; Execute below command to create table schema. &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;php craft migrate&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; You will see the below message in your console: &lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/--oV3tVH2t2Q/WGkZjpFHsAI/AAAAAAAABTM/qpf25WKDdmwvI_h0WHI3Whazxzxz1VyMACLcB/s1600/migration_todo_up_successfull.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://1.bp.blogspot.com/--oV3tVH2t2Q/WGkZjpFHsAI/AAAAAAAABTM/qpf25WKDdmwvI_h0WHI3Whazxzxz1VyMACLcB/s640/migration_todo_up_successfull.png&quot; width=&quot;640&quot; height=&quot;408&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;p&gt; Now your &quot;to_do&quot; table is ready to store some tasks.  &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Generating CRUD Using Craft:&lt;/h2&gt; &lt;p&gt;You don&#39;t have to do much stuff  as Craft commands are ready to generate most of the stuffs for you. Open the console window and from the root directory of your project, go to &lt;b&gt;/var/www/cygnite/console/bin/&lt;/b&gt; directory and issue below command. &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;php craft generate:crud todo to_do&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-QQElQBzBSg0/WGkaE2Bc1UI/AAAAAAAABTQ/78UYvzfdqUgaTtvUrp_t9OvgFaL_5VznwCLcB/s1600/generate_crud_generated_successfully.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://3.bp.blogspot.com/-QQElQBzBSg0/WGkaE2Bc1UI/AAAAAAAABTQ/78UYvzfdqUgaTtvUrp_t9OvgFaL_5VznwCLcB/s640/generate_crud_generated_successfully.png&quot; width=&quot;640&quot; height=&quot;408&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;p&gt; Your to do manager is ready, let us add a single route to the controller to test the newly created app by executing CRUD operations. &lt;/p&gt; &lt;p&gt;Open &lt;b&gt;/var/www/cygnite/src/Apps/Routing/RouteCollection.php&lt;/b&gt;, add a route as below in the  &lt;b&gt;executeStaticRoutes()&lt;/b&gt; method. &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;$this-&gt;routesController-&gt;controller(&#39;Todo&#39;);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Go to the url:&lt;b&gt; http://localhost/cygnite/todo/&lt;/b&gt; You will see below screen.&lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-rY_thZywW5A/WGkaxgKrtNI/AAAAAAAABTY/gZhF4hHPHU81b6TmErWjxbGJ0kvFF6lfwCLcB/s1600/todo_lists.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://1.bp.blogspot.com/-rY_thZywW5A/WGkaxgKrtNI/AAAAAAAABTY/gZhF4hHPHU81b6TmErWjxbGJ0kvFF6lfwCLcB/s640/todo_lists.PNG&quot; width=&quot;640&quot; height=&quot;247&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;p&gt; This page will display empty records in the grid as we didn&#39;t add any to do tasks. &lt;/p&gt; &lt;h3&gt; Creating And Updating the To-Do List&lt;/h3&gt; &lt;p&gt;Let us add a new tasks by clicking Add Todo button. You will land to below form. Now let us add a new to-do task using this form.  &lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-umjq1T0nISU/WGkbcZ84-QI/AAAAAAAABTg/opRB8rbMLdw5iQEg9wnhcmyRyuUoIK3pwCLcB/s1600/todo_add.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://3.bp.blogspot.com/-umjq1T0nISU/WGkbcZ84-QI/AAAAAAAABTg/opRB8rbMLdw5iQEg9wnhcmyRyuUoIK3pwCLcB/s640/todo_add.PNG&quot; width=&quot;640&quot; height=&quot;490&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;p&gt;Once you added a new to do task you will be redirected to task list page.&lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://2.bp.blogspot.com/-BtfhmqRsr78/WGkbxhbP7rI/AAAAAAAABTk/b-Y48UHUsXMCcwZS0H0swAuOUXC0fW9uQCLcB/s1600/todo_list_added.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://2.bp.blogspot.com/-BtfhmqRsr78/WGkbxhbP7rI/AAAAAAAABTk/b-Y48UHUsXMCcwZS0H0swAuOUXC0fW9uQCLcB/s640/todo_list_added.PNG&quot; width=&quot;640&quot; height=&quot;268&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;Now let&#39;s say added to do task needs to be updated. Click Edit button in the grid, it will take you to edit form.&lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-X7EtxLnBSKw/WGkb97wLceI/AAAAAAAABTo/_sDqY9Zv3v4Uzoebmxbc1Glq-q-ku4z_QCLcB/s1600/todo_edit_data.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://1.bp.blogspot.com/-X7EtxLnBSKw/WGkb97wLceI/AAAAAAAABTo/_sDqY9Zv3v4Uzoebmxbc1Glq-q-ku4z_QCLcB/s640/todo_edit_data.PNG&quot; width=&quot;640&quot; height=&quot;454&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt; Click on save button once you updated the Todo, it will update the todo list and redirect you to list page. You will see screen as below. &lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-Hq8FlMjfRc4/WGkcKmgQhQI/AAAAAAAABTs/m375Omu-kbYG8qasU47PlUg0kOh8tJbDwCLcB/s1600/todo_updated_successfully_list.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://1.bp.blogspot.com/-Hq8FlMjfRc4/WGkcKmgQhQI/AAAAAAAABTs/m375Omu-kbYG8qasU47PlUg0kOh8tJbDwCLcB/s640/todo_updated_successfully_list.PNG&quot; width=&quot;640&quot; height=&quot;279&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;h3&gt;Liked this? Read these!&lt;/h3&gt; &lt;ol&gt;  &lt;li&gt; &lt;a href=&quot;http://www.appsntech.com/2015/09/get-started-with-test-driven-development-unit-testing-with-phpunit.html&quot; target=&quot;_blank&quot;&gt;Get Started With Test Driven Development: Unit Testing With PHPUnit?&lt;/a&gt; &lt;/li&gt;  &lt;li&gt; &lt;a href=&quot;http://www.appsntech.com/2015/08/backbone-js-vs-angular-js-uncovering-key-differences.html&quot; target=&quot;_blank&quot;&gt;Backbone JS vs Angular JS- Uncovering key differences&lt;/a&gt; &lt;/li&gt;  &lt;li&gt; &lt;a href=&quot;http://www.appsntech.com/2015/04/5-best-things-you-should-know-about-php.html&quot; target=&quot;_blank&quot;&gt;5 Best Things You Should Know About PHP 7&lt;/a&gt;&lt;/li&gt;  &lt;li&gt; &lt;a href=&quot;http://www.appsntech.com/2014/10/facebook-style-wall-posting-using.html&quot; target=&quot;_blank&quot;&gt; Facebook style wall posting using Cygnite PHP Framework, Jquery, Ajax&lt;/a&gt; &lt;/li&gt;&lt;/ol&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Wrapping Up:&lt;/h2&gt; &lt;p&gt;I have explained you how to create a simple To-Do list using &lt;a href=&quot;http://www.cygniteframework.com/&quot;&gt;Cygnite Framework&lt;/a&gt;. That’s all for this tutorial. Isn&#39;t easy? This is just a basic tutorial. You can do much more. So now it’s your turn, give it a try. Use Cygnite framework, save time. You will be up and running fast. &lt;/p&gt; &lt;p&gt; Hope you like this tutorial and many more useful posts to publish for this year. If you have any questions, please let us know by posting your comments below. Please don&#39;t forget to share or like this article with your friends. Thanks for reading. &lt;/p&gt;     &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/847364964813203459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2017/01/creating-task-list-using-craft-console.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/847364964813203459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/847364964813203459'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2017/01/creating-task-list-using-craft-console.html' title='Creating A Task List Using Craft Console'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://4.bp.blogspot.com/-DrX0vdR-spA/WGkXS6Ex43I/AAAAAAAABTA/cd6Avm3AALAncEUjj8_7Z9721yBMtepGgCPcB/s72-c/creating-todo-list-using-cygnite-php-framework.jpg" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-8558052918701225381</id><published>2015-10-06T00:21:00.001+05:30</published><updated>2015-10-06T22:41:27.189+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Continuous Integration"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Travis CI"/><category scheme="http://www.blogger.com/atom/ns#" term="Travis CI and GitHub"/><title type='text'>Travis CI: Continuous Integration for PHP Project</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Introduction:&lt;/h2&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-LPpwlBls7fY/VhLEYga1tkI/AAAAAAAABC8/p0uGhsFDiH8/s1600/travis-ci-github-php-project-integration.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-LPpwlBls7fY/VhLEYga1tkI/AAAAAAAABC8/p0uGhsFDiH8/s640/travis-ci-github-php-project-integration.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;br /&gt; &lt;p&gt; While the last article was “&lt;a href=&quot;http://www.appsntech.com/2015/09/get-started-with-test-driven-development-unit-testing-with-phpunit.html&quot;&gt;Get Started With Test Driven Development: Unit Testing With PHPUnit?. &lt;/a&gt;”, this article will help to getting started with Travis, which make collaboration with your team breeze.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Travis CI&lt;/b&gt; is an automation tool which allows team to commit and build project easily. Once you have configured your GITHUB project, whenever there is a new commit, Travis CI will sync code from GITHUB repository and initialize the build process. This way developer don&#39;t need to worry about running PHPUnit every time. Travis builds &amp; deploy your software rapidly. I personally like Travis CI as an automation tool because it is easy to integrate, clean UI, plenty of features whereas getting started with other automation tool little tricky. &lt;/p&gt; &lt;p&gt; Travis CI supports &lt;a href=&quot;http://docs.travis-ci.com/user/languages/&quot;&gt;multiple programming languages&lt;/a&gt;, you just need to define in your &lt;b&gt;.travis.yml&lt;/b&gt; file (in root directory of the project) that which language project written and remaining Travis will take care. I will not be able to explain all language and environment they support, you can find from their &lt;a href=&quot;http://docs.travis-ci.com/user/getting-started/&quot;&gt;documentation&lt;/a&gt;. In this article we will focus on “How to integrate Travis CI (continuous integration) tool with PHP project on GITHUB repository.” &lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Get Started With Travis CI:&lt;/h2&gt; &lt;p&gt;Below are neat steps for Integrating Travis CI in your GITHUB projects. &lt;/p&gt; &lt;h3&gt; Step1: Travis UI- Sign in: &lt;/h3&gt; &lt;p&gt; Sign in into Travis CI Tool using your GITHUB account.  &lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-8evITRMDrBo/VhK9RKaMPQI/AAAAAAAABCA/dL9TPsxPRg8/s1600/travis-ci-signin.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-8evITRMDrBo/VhK9RKaMPQI/AAAAAAAABCA/dL9TPsxPRg8/s640/travis-ci-signin.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;br /&gt; &lt;h3&gt;Step2: Travis Setup- Activating for the repository: &lt;/h3&gt; &lt;p&gt; Setting up Travis is very simple and straight forward. Once you logged into Travis, go to profile page and you can see your entire GITHUB repositories already synchronized and displaying into the page. Choose which repository you want to build, activate/deactivate it using simple “on”/“off” button as below screenshot. &lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-5NsSeZouIIg/VhK95um5VUI/AAAAAAAABCE/Kjss0kTNkhw/s1600/travis-ci-github-repo-in-profile-page.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-5NsSeZouIIg/VhK95um5VUI/AAAAAAAABCE/Kjss0kTNkhw/s640/travis-ci-github-repo-in-profile-page.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt; &lt;p&gt;If you have created a new repository into GITHUB under the same account and it is not displaying into Travis profile page, then simply click on “Sync” button as highlighted in above screenshot. Once you activate Travis for your repository every time you commit into the repository Travis will trigger build process. &lt;/p&gt;  &lt;h3&gt; Step3: Travis Aware- Add a .travis.yml file into your Repository &lt;/h3&gt; &lt;p&gt;Different project will different environment setup. To inform Travis CI under what environment you require to build and test your project, you need to add a configuration file named &lt;b&gt;.travis.yml&lt;/b&gt; in root directory of your GITHUB project. Below sample example,&lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-uDRiux7SKcY/VhK-pdkUxgI/AAAAAAAABCQ/yQerRHsQZ7I/s1600/travis-ci-github-cygnite-.travis.yml-file.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-uDRiux7SKcY/VhK-pdkUxgI/AAAAAAAABCQ/yQerRHsQZ7I/s640/travis-ci-github-cygnite-.travis.yml-file.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt; &lt;p&gt; Above &lt;b&gt;.travis.yml&lt;/b&gt; configuration file informs Travis that it is PHP based project, Travis should run tests against 4 different versions of PHP as well as in &lt;b&gt;HVVM&lt;/b&gt;. It also tells that project will accept failure in PHP v7.0, before build it should update the composer version. It will run all our tests suits located into tests directory. &lt;/p&gt; &lt;p&gt; By default on every Build Failure Travis will notify you via email. However you can stop notification by changing the &lt;b&gt;notification &lt;/b&gt;flag as &lt;b&gt;&quot;false&quot;&lt;/b&gt; as above screenshot. &lt;/p&gt; &lt;p&gt;To verify yml config file use &lt;a href=&quot;http://lint.travis-ci.org/&quot;&gt;http://lint.travis-ci.org/&lt;/a&gt;.&lt;/p&gt; &lt;p&gt; A great way to learn about &lt;b&gt;.travis.yml&lt;/b&gt; is browse through various open source projects in GITHUB repositories that are uses Travis CI for build process. Here some example below, &lt;/p&gt; &lt;ul&gt;  &lt;li&gt;        &lt;a href=&quot;https://github.com/cygnite/framework/blob/master/.travis.yml&quot;&gt;Cygnite PHP Framework&lt;/a&gt;&lt;/li&gt;&lt;li&gt;        &lt;a href=&quot;https://github.com/slimphp/Slim/blob/2.x/.travis.yml&quot;&gt; SlimPHP &lt;/a&gt;&lt;/li&gt;&lt;li&gt;        &lt;a href=&quot;https://github.com/briannesbitt/Carbon/blob/master/.travis.yml&quot;&gt; Carbon &lt;/a&gt;&lt;/li&gt;&lt;li&gt;        &lt;a href=&quot;https://github.com/mitsuhiko/flask/blob/master/.travis.yml&quot;&gt;Flask&lt;/a&gt;&lt;/li&gt;&lt;li&gt;        &lt;a href=&quot;https://github.com/rails/rails/blob/master/.travis.yml&quot;&gt;Ruby on Rails&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;h3&gt;Step4: Adding Travis CI Service into GITHUB: &lt;/h3&gt; &lt;p&gt;Goto your Travis profile page by clicking Account, find token left hand side. This token will be used to identify your github project by Travis CI. See screenshot below,&lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-K3Nu_GmwXek/VhLBcDmRnZI/AAAAAAAABCc/KlHtbJMz2hk/s1600/travis-ci-token.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-K3Nu_GmwXek/VhLBcDmRnZI/AAAAAAAABCc/KlHtbJMz2hk/s640/travis-ci-token.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;  &lt;p&gt;Copy the token and while adding a service paste into the box, goto your repository settings, under &lt;b&gt;“Webhooks &amp; Services”&lt;/b&gt;. sample screenshot below to find location.&lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-oAxu12MHMTo/VhLB0xdmRsI/AAAAAAAABCk/j0JTej_G4Vg/s1600/GITHUB-adding-travis-ci-service.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-oAxu12MHMTo/VhLB0xdmRsI/AAAAAAAABCk/j0JTej_G4Vg/s640/GITHUB-adding-travis-ci-service.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;  &lt;h3&gt; Step5: Travis Build- Triggering Build Process:  &lt;/h3&gt; &lt;p&gt;Now Travis is ready to build our awesome project, every time we push into GITHUB repository Travis will start building the project. You can see the build process or status in your travis page, under your &lt;b&gt;githubu-username/repository-name&lt;/b&gt;. For example below. &lt;/p&gt;  &lt;p&gt; &lt;a href=&quot;https://travis-ci.org/cygnite/framework&quot;&gt; https://travis-ci.org/cygnite/framework&lt;/a&gt; &lt;/p&gt; &lt;p&gt;See the build status on same page. You can see below screenshot as all tests passes for Cygnite it shows green, else it will display as red.&lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-tnn4lNeP-Kg/VhLCZp1GobI/AAAAAAAABCs/WbWNo6sBs5Q/s1600/travis-ci-cygnite-framework-build-process.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-tnn4lNeP-Kg/VhLCZp1GobI/AAAAAAAABCs/WbWNo6sBs5Q/s640/travis-ci-cygnite-framework-build-process.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt; &lt;p&gt;You can &lt;b&gt;manually restart&lt;/b&gt; the build by clicking a&lt;b&gt; button&lt;/b&gt; as above screenshot.&lt;/p&gt;  &lt;h3&gt;Build History:&lt;/h3&gt;   &lt;p&gt;Click on Build history tab to see history of builds it processed. Sample screenshot below.&lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-zOBMZC8H54M/VhLC6nZIR-I/AAAAAAAABC0/Gg_DVKrpomE/s1600/travis-ci-cygnite-framework-build-history2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-zOBMZC8H54M/VhLC6nZIR-I/AAAAAAAABC0/Gg_DVKrpomE/s640/travis-ci-cygnite-framework-build-history2.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;  &lt;h3&gt; Learn More: &lt;/h3&gt;  &lt;p&gt;You can find more information about Travis configuration in their official documentation. Some useful links below, &lt;/p&gt; &lt;p&gt;    &lt;ul&gt;     &lt;li&gt; &lt;a href=&quot;http://docs.travis-ci.com/user/languages/php/&quot;&gt;Building PHP Project&lt;/a&gt;&lt;/li&gt;     &lt;li&gt; &lt;a href=&quot;http://docs.travis-ci.com/user/ci-environment/&quot; &gt;The Build Environment&lt;/a&gt;&lt;/li&gt;     &lt;li&gt; &lt;a href=&quot;http://docs.travis-ci.com/user/deployment/&quot;&gt; Deployment&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;/p&gt;   &lt;h2 class=&quot;heading-class&quot;&gt;Wrapping Up:&lt;/h2&gt; &lt;p&gt; I believe I gave you very good introduction of Travis CI Integration with GITHUB projects. It is really very easy to use. As popular dependency manager &lt;a href=&quot;https://getcomposer.org&quot;&gt;composer&lt;/a&gt; for PHP, Travis CI is also becoming favorite Continuous Integration tool for developers. So now it’s your turn, give it a try. You will be up and running fast. &lt;/p&gt; &lt;p&gt;You have anything to share? Please let us know by posting your comments below. Please don&#39;t forget to share this article with your friends. Thanks for reading. &lt;/p&gt;     &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/8558052918701225381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2015/10/travis-ci-continuous-integration-for-php-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/8558052918701225381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/8558052918701225381'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2015/10/travis-ci-continuous-integration-for-php-project.html' title='Travis CI: Continuous Integration for PHP Project'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-LPpwlBls7fY/VhLEYga1tkI/AAAAAAAABC8/p0uGhsFDiH8/s72-c/travis-ci-github-php-project-integration.jpg" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-1677113093108218003</id><published>2015-09-08T01:08:00.000+05:30</published><updated>2017-02-03T01:17:08.227+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mockery"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHPUnit"/><category scheme="http://www.blogger.com/atom/ns#" term="Test Driven Development"/><category scheme="http://www.blogger.com/atom/ns#" term="Unit Testing"/><title type='text'>Get Started With Test Driven Development: Unit Testing With PHPUnit?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;br /&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-Ux7NaxtoQV0/VdpE_mhF43I/AAAAAAAAA-8/Y99J0qPmNbs/s1600/phpunit-logo.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-Ux7NaxtoQV0/VdpE_mhF43I/AAAAAAAAA-8/Y99J0qPmNbs/s640/phpunit-logo.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Introduction&lt;/h2&gt; &lt;p&gt; While last article was &lt;a href=&quot;http://www.appsntech.com/2015/08/10-best-php-tools-for-developers.html&quot;&gt;&quot;10 Best PHP Tools For Developers&quot;&lt;/a&gt;, choosing better tools for web development, this article is for those who want to write better testable code.&lt;/p&gt; &lt;p&gt;You might have come across such situations where you write bunch of code as library or component, where one library is depend on another, and when you fix one bug another comes up. This is frustrating when you need to go for production deployment and at the last moment you are identifying an bug which is related to your earlier fix or may be new one. You may need to sit back and debug entire application to find out where exactly going wrong. It happens for most of the developers, when we are most confident about our code, don&#39;t do unit testing or miss small piece of code which break down the application at end. &lt;/p&gt; &lt;p&gt;Well!! &lt;b&gt;Is there any better way of delivering quality code? Yes!!&lt;/b&gt; Unit testing is the right approach. In this tutorial we will see how to make use of PHPUnit to develop error free application. This article is absolutely for beginner, as it will show you how to setup environment, write  basic test cases using PHPUnit. You can start from here, do unit test in your future work.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Unit Testing &amp; Why?&lt;/h2&gt; &lt;p&gt;Before getting started with PHPunit to write some tests, let us find out &quot;&lt;b&gt;What is unit testing?&lt;/b&gt;&quot;, &lt;b&gt;Why it required&lt;/b&gt;? &lt;b&gt;How to get started with?&lt;/b&gt;&lt;/p&gt; &lt;p&gt;Unit testing is practice of testing unit of code or functions. By this way we can verify our code returns expected output. &lt;/p&gt; &lt;p&gt;From my personal experience, I would say if unit testing is in your mind, it helps you to write better testable code, refactoring existing code, helps you to build decoupled application. Consider you have been writing huge libraries for your project, due to time constraints you have skipped unit testing on the code, later on when you want to write some unit tests you couldn&#39;t, because code is not easy to test. And you will end up refactoring to write testable code. By this way unit testing helps to write testable code. It&#39;s always better to go for test driven approach, write code and keep unit testing in mind, do run tests after every changes in code, it will save you at end.&lt;/p&gt; &lt;p&gt;You may be wondering, If Unit Testing is de-facto standard then “&lt;b&gt;Why People don&#39;t write Unit Tests?&lt;/b&gt;”. May be there are several reason,&lt;/p&gt; &lt;p&gt; • Most of the developers are confident about their code, they feel unit testing not required. But in real time some scenarios, it fails. &lt;/p&gt;&lt;p&gt; • It really takes lot time to test each class.&lt;/p&gt;&lt;p&gt; • Some people feel boring to write test assertions on every functions.&lt;/p&gt; &lt;p&gt; But believe me unit testing will save your ass at end and help you to deliver quality code.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Installing PHPUnit:&lt;/h2&gt; &lt;p&gt;I will not go in detail as it is already explained in PHPUnit’s beautiful &lt;a href=&quot;https://phpunit.de/manual/current/en/installation.html&quot;&gt; documentation&lt;/a&gt;.  If you are using linux you can install PHPUnit using simple commands as below,&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;$ wget https://phar.phpunit.de/phpunit.phar&lt;br /&gt;$ chmod +x phpunit.phar&lt;br /&gt;$ sudo mv phpunit.phar /usr/local/bin/phpunit&lt;br /&gt;$ phpunit --version&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; Above command will install PHPUnit globally. &lt;/p&gt;  &lt;h3&gt;PHPUnit - Composer Installation:&lt;/h3&gt; &lt;p&gt; You can also install PHPUnit using composer, which is handy too. Just specify requirement into your &lt;b&gt;composer.json&lt;/b&gt; as below, &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;{&lt;br /&gt;&quot;require&quot;: {&lt;br /&gt;        &quot;php&quot;: &quot;&gt;=5.4&quot;,&lt;br /&gt;        &quot;cygnite/framework&quot;: &quot;dev-master&quot;,&lt;br /&gt;   }, &lt;br /&gt;   &quot;require-dev&quot;: {&lt;br /&gt;       &quot;mockery/mockery&quot;: &quot;~0.9.1&quot;,&lt;br /&gt;       &quot;phpunit/phpunit&quot;: &quot;4.8.*&quot;&lt;br /&gt;   },&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;blockquote&gt;See also: &lt;a href=&quot;https://github.com/cygnite/framework/blob/master/composer.json&quot;&gt;Cygnite composer.json&lt;/a&gt;&lt;/blockquote&gt; &lt;p&gt; I hope you have composer installed already. Now go to terminal and enter &lt;b&gt;&quot;composer install&quot;&lt;/b&gt; from the root directory of your project. Alternatively you can also install PHPunit globally using composer as below,&lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;composer global require &quot;phpunit/phpunit=4.8.*&quot;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; You can find vendor folder with PHPUnit libraries, and other packages.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Environment Setup:&lt;/h2&gt; &lt;p&gt; In order to test the code we need some libraries. We have already installed Cygnite PHP Framework. For sample example we will test Cygnite&#39;s IoC Container class. You can define your configuration into the file &lt;b&gt;phpunit.xml&lt;/b&gt; and the bootstrap file &lt;b&gt;index.php&lt;/b&gt; or &lt;b&gt;phpunit.php&lt;/b&gt; into your root directory.&lt;/p&gt; &lt;p&gt; Your &lt;b&gt;phpunit.xml&lt;/b&gt; should look somewhat like below, &lt;/p&gt;  &lt;blockquote&gt;See also: &lt;a href=&quot;https://github.com/cygnite/framework/blob/master/phpunit.xml&quot;&gt;Cygnite phpunit.xml&lt;/a&gt;&lt;/blockquote&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;xml&quot;&gt;&lt;br /&gt;&amp;#x3C;?xml version=&amp;#x22;1.0&amp;#x22; encoding=&amp;#x22;UTF-8&amp;#x22;?&amp;#x3E;&lt;br /&gt;&amp;#x3C;phpunit backupGlobals=&amp;#x22;false&amp;#x22;&lt;br /&gt;         backupStaticAttributes=&amp;#x22;false&amp;#x22;&lt;br /&gt;         bootstrap=&amp;#x22;phpunit.php&amp;#x22;&lt;br /&gt;         colors=&amp;#x22;true&amp;#x22;&lt;br /&gt;         convertErrorsToExceptions=&amp;#x22;true&amp;#x22;&lt;br /&gt;         convertNoticesToExceptions=&amp;#x22;true&amp;#x22;&lt;br /&gt;         convertWarningsToExceptions=&amp;#x22;true&amp;#x22;&lt;br /&gt;         processIsolation=&amp;#x22;false&amp;#x22;&lt;br /&gt;         stopOnFailure=&amp;#x22;false&amp;#x22;&lt;br /&gt;         syntaxCheck=&amp;#x22;false&amp;#x22;&lt;br /&gt;&amp;#x3E;&lt;br /&gt;    &amp;#x3C;testsuites&amp;#x3E;&lt;br /&gt;        &amp;#x3C;testsuite name=&amp;#x22;Cygnite Test Suite&amp;#x22;&amp;#x3E;&lt;br /&gt;            &amp;#x3C;directory&amp;#x3E;./tests/&amp;#x3C;/directory&amp;#x3E;&lt;br /&gt;        &amp;#x3C;/testsuite&amp;#x3E;&lt;br /&gt;    &amp;#x3C;/testsuites&amp;#x3E;&lt;br /&gt;&lt;br /&gt;    &amp;#x3C;filter&amp;#x3E;&lt;br /&gt;        &amp;#x3C;whitelist addUncoveredFilesFromWhitelist=&amp;#x22;false&amp;#x22;&amp;#x3E;&lt;br /&gt;            &amp;#x3C;directory suffix=&amp;#x22;.php&amp;#x22;&amp;#x3E;src&amp;#x3C;/directory&amp;#x3E;&lt;br /&gt;            &amp;#x3C;exclude&amp;#x3E;&lt;br /&gt;                &amp;#x3C;directory suffix=&amp;#x22;.php&amp;#x22;&amp;#x3E;vendor&amp;#x3C;/directory&amp;#x3E;&lt;br /&gt;            &amp;#x3C;/exclude&amp;#x3E;&lt;br /&gt;        &amp;#x3C;/whitelist&amp;#x3E;&lt;br /&gt;    &amp;#x3C;/filter&amp;#x3E;&lt;br /&gt;&amp;#x3C;/phpunit&amp;#x3E;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; And bootstrap file &lt;b&gt;phpunit.php&lt;/b&gt; : &lt;/p&gt;  &lt;blockquote&gt;See also: &lt;a href=&quot;https://github.com/cygnite/framework/blob/master/phpunit.php&quot;&gt;Cygnite phpunit.php&lt;/a&gt;&lt;/blockquote&gt; &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;define(&#39;CF_SYSTEM&#39;,1);&lt;br /&gt;require __DIR__.&#39;/vendor/autoload.php&#39;;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; If you look at the xml configuration you can see we have defined the &lt;b&gt;test directory&lt;/b&gt; also other configuration such as name of &lt;b&gt;bootstrap file&lt;/b&gt; and &lt;b&gt;colors=“true”&lt;/b&gt;. It helps to display success or failure in &lt;b&gt;green&lt;/b&gt; or &lt;b&gt;red&lt;/b&gt; respectively.&lt;/p&gt; &lt;p&gt; You can also specify configuration by passing argument from command line. You can &lt;a href=&quot;https://phpunit.de/manual/current/en/textui.html#textui.clioptions&quot;&gt;read from here &lt;/a&gt;&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Sample Application Structure:&lt;/h2&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-2D18Q3xaM4s/VeN1CCxwkbI/AAAAAAAAA_M/fswhpZCZuLo/s1600/phpunit-installation-sample-directory-structure.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-2D18Q3xaM4s/VeN1CCxwkbI/AAAAAAAAA_M/fswhpZCZuLo/s320/phpunit-installation-sample-directory-structure.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt; It is sample directory structure; however it depends on your application. Now our environment ready to test something awesome. &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Writing Our First Test Cases:&lt;/h2&gt; &lt;p&gt; As a part of tutorial we will test Cygnite Framework&#39;s &lt;a href=&quot;http://www.cygniteframework.com/2013/11/ioc-container.html&quot;&gt;Container class&lt;/a&gt;. For sample, we will write some basic assertion to test Container class. All of our tests files are located inside &lt;b&gt;tests&lt;/b&gt; directory.&lt;/p&gt; &lt;p&gt; Folder Structure: &lt;/p&gt; &lt;p&gt; &lt;b&gt;Root Directory:&lt;/b&gt; phpunit/ &lt;/p&gt;&lt;p&gt; &lt;b&gt;Xml Configuration File:&lt;/b&gt; phpunit.xml &lt;/p&gt;&lt;p&gt; &lt;b&gt;Bootstrap File:&lt;/b&gt; phpunit.php &lt;/p&gt;&lt;p&gt; &lt;b&gt;Testable Class Path:&lt;/b&gt; phpunit/vendor/cygnite/framework/src/Cygnite/Container/Container.php &lt;/p&gt;&lt;p&gt; &lt;b&gt;Test Class:&lt;/b&gt; phpunit/vendor/cygnite/framework/tests/Cygnite/Container/ContainerTest.php &lt;/p&gt; &lt;p&gt; We will also use &lt;a href=&quot;http://docs.mockery.io/en/latest/&quot;&gt;Mockery&lt;/a&gt; to mock object with &lt;b&gt;PHPunit&lt;/b&gt;. Make sure every class should be suffix with string &lt;b&gt;&quot;Test&quot;&lt;/b&gt;, for example below sample &lt;b&gt;ContainerTest.php&lt;/b&gt; class.&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;use Mockery as m;&lt;br /&gt;&lt;br /&gt;class ContainerTest extends PHPUnit_Framework_TestCase&lt;br /&gt;{&lt;br /&gt;    private $container;&lt;br /&gt;&lt;br /&gt;    public function setUp()&lt;br /&gt;    {&lt;br /&gt;        $this-&gt;container = new \Cygnite\Container\Container();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public function testMakeClass()&lt;br /&gt;    {&lt;br /&gt;        $router = new \Cygnite\Base\Router\Router();&lt;br /&gt;        $url = new \Cygnite\Common\UrlManager\Url($router);&lt;br /&gt;&lt;br /&gt;        $madeUrl = $this-&gt;container-&gt;make(&#39;\Cygnite\Common\UrlManager\Url&#39;);&lt;br /&gt;        $this-&gt;assertEquals($url, $madeUrl);&lt;br /&gt;        $this-&gt;assertInstanceOf(&#39;\Cygnite\Container\Container&#39;, $this-&gt;container);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public function testClouserResolutionAsObject()&lt;br /&gt;    {&lt;br /&gt;        $this-&gt;container-&gt;name = function() {&lt;br /&gt;             return &#39;Cygnite&#39;;&lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;        $this-&gt;assertEquals(&#39;Cygnite&#39;, $this-&gt;container-&gt;name);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public function testArrayAccess()&lt;br /&gt;    {&lt;br /&gt;        $this-&gt;container[&#39;greet&#39;] = &#39;Hello World!!&#39;;&lt;br /&gt;        $this-&gt;assertEquals(&quot;Hello World!!&quot;, $this-&gt;container[&#39;greet&#39;]);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * @expectedException     \Cygnite\Exception\Http\HttpException&lt;br /&gt;     * @expectedExceptionMessage Not Found!&lt;br /&gt;     */&lt;br /&gt;    public function testException()&lt;br /&gt;    {&lt;br /&gt;        throw new \Cygnite\Exception\Http\HttpException(404, &quot;Not Found!&quot;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    public function tearDown()&lt;br /&gt;    {&lt;br /&gt;        m::close();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;blockquote&gt;See also: &lt;a href=&quot;https://github.com/cygnite/framework/blob/master/tests/Cygnite/Container/ContainerTest.php&quot;&gt;ContainerTest.php&lt;/a&gt;&lt;/blockquote&gt; &lt;p&gt; In the above example, you can see method “&lt;b&gt;setUp&lt;/b&gt;” and “&lt;b&gt;tearDown&lt;/b&gt;” similar as magic method __construct  and __destruct, &lt;b&gt;setUp&lt;/b&gt; is where you can do some configuration before executing test methods. For example you want to test database queries or you don’t want to create an object of class every time in all methods. In such cases, you can configure connection or create an instance of class one time into &lt;b&gt;setUp()&lt;/b&gt; method and use it in any method of that test class. Similarly you can see, I have used &lt;b&gt;tearDown()&lt;/b&gt; method to close Mockery object. &lt;/p&gt; &lt;h3&gt;Few Basic Assetion Methods To Remember: &lt;/h3&gt; &lt;p&gt; &lt;b&gt;setUp() –&lt;/b&gt; setting up configurations etc. &lt;/p&gt;&lt;p&gt; &lt;b&gt;tearDown() –&lt;/b&gt; Close connection or destroy mock objects &lt;/p&gt;&lt;p&gt; &lt;b&gt;assertEquals –&lt;/b&gt; Check equality of output&lt;/p&gt;&lt;p&gt; &lt;b&gt;assertTrue –&lt;/b&gt;  Check method returning true or not.&lt;/p&gt;&lt;p&gt; &lt;b&gt;assertEmpty –&lt;/b&gt; Check function or any argument value is empty&lt;/p&gt;&lt;p&gt; &lt;b&gt;assetInstanceOf-&lt;/b&gt; Check given string is instance of specific class&lt;/p&gt;&lt;p&gt; &lt;b&gt;assertNull –&lt;/b&gt; Check if value is null or not &lt;/p&gt; &lt;p&gt; Apart from that there are many assertion methods, you can make use of those based on the requirement. Find out those assertion functions from &lt;a href=&quot;https://phpunit.de/manual/current/en/appendixes.assertions.html&quot;&gt;PHPUnit documentation&lt;/a&gt;. You can also use &lt;b&gt;annotation&lt;/b&gt; for running assertion. For example you want to do some test to verify if method throws correct exceptions with exception message. Such case simply use annotation as below,&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;   /**&lt;br /&gt;     * @expectedException  \Cygnite\Exception\Http\HttpException&lt;br /&gt;     * @expectedExceptionMessage Not Found!&lt;br /&gt;     */&lt;br /&gt;    public function testException()&lt;br /&gt;    {&lt;br /&gt;        throw new \Cygnite\Exception\Http\HttpException(404, &quot;Not Found!&quot;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; In above &lt;b&gt;testException&lt;/b&gt; method we are verifying if code throws “&lt;b&gt;Cygnite\Exception\Http\HttpException&lt;/b&gt;” exception, and with the message “&lt;b&gt;Not Found!&lt;/b&gt;”.&lt;/p&gt; &lt;p&gt; Likewise there are various &quot;annotation&quot; exists in PHPUnit to run assertions &lt;a href=&quot;https://phpunit.de/manual/current/en/appendixes.annotations.html&quot;&gt;read from here&lt;/a&gt;. &lt;/p&gt; &lt;p&gt; Are you still wondering how to test code using PHPUnit ? Have a look at &lt;a href=&quot;https://github.com/cygnite/framework/tree/2.0/tests/&quot;&gt;some sample tests&lt;/a&gt;, I executed on &lt;a href=&quot;http://www.cygniteframework.com/&quot;&gt;Cygnite PHP Framework&lt;/a&gt; core classes.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Running Tests:&lt;/h2&gt; &lt;p&gt; Running tests is just simple using phpunit executable file, but you need to make sure you are pointing it to your test file. Here example:&lt;/p&gt; &lt;pre &gt;&lt;br /&gt;&lt;code class=&quot;php&quot; style=&quot;width:730px;overflow-y: scroll;&quot;&gt;&lt;br /&gt;&lt;br /&gt;phpunit\vendor\bin&gt; phpunit –c ../../phpunit.xml --bootstrap ../../phpunit.php ../cygnite/framework/tests/Cygnite/Container/ContainerTest.php&lt;br /&gt;&lt;br /&gt;// -c – Xml configuration file&lt;br /&gt;&lt;br /&gt;// --bootstrap – Your bootstrap file to autoload all files or for some initial configurations etc.&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Sample Output:&lt;/h2&gt; &lt;h3&gt;Assertion Failure:&lt;/h3&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-VASil5XpG2o/VdpAFzXc2fI/AAAAAAAAA-g/UIN3Dqsd4rA/s1600/phpunit-failure_test_results.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-VASil5XpG2o/VdpAFzXc2fI/AAAAAAAAA-g/UIN3Dqsd4rA/s400/phpunit-failure_test_results.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;h3&gt;Assertion Success:&lt;/h3&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-nBXGU9uR7u0/VdpAK0NuHMI/AAAAAAAAA-o/RVMsfx_nBjI/s1600/phpunit-test-results.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-nBXGU9uR7u0/VdpAK0NuHMI/AAAAAAAAA-o/RVMsfx_nBjI/s400/phpunit-test-results.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;p&gt; PHPunit displays number of assertion, pass, failure, number of tests etc. If any of the tests fails it will display failed in red with method name, reason etc. And on success it will display green with number of assertion, tests etc. &lt;/p&gt; &lt;p&gt; &lt;b&gt;Is it not easy? &lt;/b&gt;&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Conclusion:&lt;/h2&gt; &lt;p&gt;Though there are multiple things to cover, I believe I have given you good introduction of PHPUnit and How to write basic unit tests using PHPUnit. &lt;/p&gt; &lt;p&gt;So, why to be lazy? when you can deliver quality code. Start doing assertions tests on your code for current or future projects. Jump start from here with test driven development. Write code better, testable, modular. I hope this article is useful to you. Please don&#39;t forget to share with your friends and leave your comments below. &lt;/p&gt; &lt;p&gt;Keep Visiting.&lt;/p&gt;  &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/1677113093108218003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2015/09/get-started-with-test-driven-development-unit-testing-with-phpunit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/1677113093108218003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/1677113093108218003'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2015/09/get-started-with-test-driven-development-unit-testing-with-phpunit.html' title='Get Started With Test Driven Development: Unit Testing With PHPUnit?'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-Ux7NaxtoQV0/VdpE_mhF43I/AAAAAAAAA-8/Y99J0qPmNbs/s72-c/phpunit-logo.PNG" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-2230669725775762720</id><published>2015-08-31T22:40:00.000+05:30</published><updated>2015-08-31T22:40:22.389+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHPDocumentor"/><category scheme="http://www.blogger.com/atom/ns#" term="SimpleTest"/><category scheme="http://www.blogger.com/atom/ns#" term="Twig"/><title type='text'>10 Best PHP Tools For Developers</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Introduction&lt;/h2&gt; &lt;p&gt;You may wish to read our last article &quot;&lt;a href=&quot;http://www.appsntech.com/2015/08/backbone-js-vs-angular-js-uncovering-key-differences.html&quot;&gt;Backbone JS vs Angular JS- Uncovering key differences&lt;/a&gt;&quot;.&lt;/p&gt; &lt;p&gt; PHP (a recursive backronym which means PHP Hypertext Preprocessor) is one of the most popular scripting languages among web developers because it is open source and platform independent. Apart from that, the most important thing is that it is easier to learn than most other  scripting languages. Still like any other coding languages, PHP takes a lot of concentration and practice to make use of its full functionality.&lt;/p&gt;   &lt;p&gt; There are a lot of PHP tools that developers can use to make their workflow easier and faster. PHP documents also need proper error check which makes it difficult to do it manually. These tools help in providing error alerts and any potential error while writing the codes. The web is full of different tools for PHP. So to make it easier for you I have mentioned some of the most popular and useful PHP developer tools in this article. &lt;/p&gt;  &lt;h3&gt;1.&lt;a href=&quot;http://twig.sensiolabs.org/&quot;&gt;TWIG&lt;/a&gt;– &lt;/h3&gt; &lt;p&gt; It is a fast, secure and flexible template engine for PHP developers. It is fully documented, with a dedicated online book and a full API documentation. It is fast compared to other regular PHP code as the overhead has been reduced to the very minimum. It has a open architecture which will help you to create your own DSL. &lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-EdmLfv0cCUA/VeSCirBf70I/AAAAAAAAA_k/q2bcyYl2H24/s1600/twig-template-engine.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-EdmLfv0cCUA/VeSCirBf70I/AAAAAAAAA_k/q2bcyYl2H24/s640/twig-template-engine.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;h3&gt;2. &lt;a href=&quot;http://phpdebugbar.com/&quot;&gt;DebugBar&lt;/a&gt;– &lt;/h3&gt; &lt;p&gt; DebugBar has made debugging easier for PHP developers. You can easily integrate it in any projects without any other dependencies. It has a clean, fast and easy-to-use interface. Also, it is very well documented and includes generic data collectors.&lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-RduZ7P8W3is/VeSDKsOSkzI/AAAAAAAAA_s/3rrp6fiqlxI/s1600/php-debugbar.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-RduZ7P8W3is/VeSDKsOSkzI/AAAAAAAAA_s/3rrp6fiqlxI/s640/php-debugbar.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;   &lt;h3&gt;3.&lt;a href=&quot;http://geocoder-php.org/&quot;&gt;Geocoder&lt;/a&gt;– &lt;/h3&gt;&lt;p&gt;Geocoder is a library that helps you to create geo-aware applications and supports a lot of third party services like Google Maps, Bing Maps, TomTom and OpenStreetMap. It provides the user with an abstraction layer for geocoding manipulations and a powerful API. It provides complete documentation.&lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-xbUFA2pixb4/VeSDZL2zF1I/AAAAAAAAA_0/D-DNv4_vi24/s1600/geo-coder-php.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-xbUFA2pixb4/VeSDZL2zF1I/AAAAAAAAA_0/D-DNv4_vi24/s640/geo-coder-php.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;h3&gt;4.&lt;a href=&quot;http://phpimageworkshop.com/&quot;&gt;PHP Image Workshop&lt;/a&gt;– &lt;/h3&gt;  &lt;p&gt; Image Workshop is an open source tool using GD library that makes managing images in PHP easy. It is like a photo editing software where you can superimpose many layers or layer groups, with each layer having a background image. From simple to complex tasks, it is a highly flexible tool.&lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-nzcbGBdd8IA/VeSDkMEwCWI/AAAAAAAAA_8/r9NS10yeXmk/s1600/php-image-workshop.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-nzcbGBdd8IA/VeSDkMEwCWI/AAAAAAAAA_8/r9NS10yeXmk/s640/php-image-workshop.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;h3&gt;5. &lt;a href=&quot;http://www.sylius.com/&quot;&gt;Sylius&lt;/a&gt;– &lt;/h3&gt; &lt;p&gt; Sylius is an open source PHP tool for e-commerce and is based on Symfony2. It has a component-based approach where you can build a custom platform on top of Sylius. It is highly customisable and you can customise its core model easily. It has a clean  architecture and has an easily understandable code.&lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-hsAb5PPBfbM/VeSDyil3j5I/AAAAAAAABAE/JJClfE4zwME/s1600/sylius.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-hsAb5PPBfbM/VeSDyil3j5I/AAAAAAAABAE/JJClfE4zwME/s640/sylius.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;h3&gt;6.&lt;a href=&quot;http://www.xsanisty.com/project/slim-starter/&quot;&gt;SlimStarter&lt;/a&gt;– &lt;/h3&gt; &lt;p&gt;Built on the top of a well established Slim Framework, SlimStarter is the perfect solution for bootstrapping small-to-middle web application and provide HMC environment in small footprint. It is powered by Eloquent ORM on database layer and TWIG template engine on presentation layer. It is also shipped with basic application features such as User and Group Manager.&lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-1Fy7XR_u7DY/VeSD_MCbc7I/AAAAAAAABAM/LonDclrLrdQ/s1600/slim-starter.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-1Fy7XR_u7DY/VeSD_MCbc7I/AAAAAAAABAM/LonDclrLrdQ/s640/slim-starter.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;h3&gt;7.&lt;a href=&quot;http://www.simpletest.org/&quot;&gt;SimpleTest&lt;/a&gt;– &lt;/h3&gt;&lt;p&gt;It is a unit test and web test framework for PHP applications. It has support for SSL, forms, frames, proxies and basic authentication. It is well documented and easy to use. &lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-Rc9MfcrV7dQ/VeSEe_-86oI/AAAAAAAABAU/3PAATVmUeb0/s1600/simple-test-php.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-Rc9MfcrV7dQ/VeSEe_-86oI/AAAAAAAABAU/3PAATVmUeb0/s640/simple-test-php.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;h3&gt;8.&lt;a href=&quot;https://trac.anl.gov/scavenger/wiki/WikiStart&quot;&gt;Scavenger&lt;/a&gt;– &lt;/h3&gt; &lt;p&gt;It is an open source real-time vulnerability management tool for PHP developers. It helps system administrators to track vulnerability findings and respond to it without “nagging” them with old vulnerabilities. &lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-MdTB4iqcR8U/VeSFJDc7fWI/AAAAAAAABAc/y3QaybcODRU/s1600/scavenger.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-MdTB4iqcR8U/VeSFJDc7fWI/AAAAAAAABAc/y3QaybcODRU/s640/scavenger.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;h3&gt;9.&lt;a href=&quot;http://hoa-project.net/En/&quot;&gt;Hoa&lt;/a&gt;– &lt;/h3&gt;   &lt;p&gt;It is a modular, extensible and structured set of PHP libraries. You can compose and extend libraries to create applications of your own libraries. It aims at bridging the gap between industrial and research worlds. Hoa is a an open source tool and is an retro-recursive acronym for Hoa, Open Accessibility.&lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-BEj3HvNqkLU/VeSFf170WEI/AAAAAAAABAk/cpPpWenYnfY/s1600/hoa.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-BEj3HvNqkLU/VeSFf170WEI/AAAAAAAABAk/cpPpWenYnfY/s640/hoa.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;h3&gt;10.&lt;a href=&quot;http://phpdoc.org/&quot;&gt;phpDocumentor&lt;/a&gt;-&lt;/h3&gt;  &lt;p&gt;It enables you to generate documentation directly from your PHP source code. It does not aim to replace the conventional documentation but is more of a supplemental one. phpDocumentor has an incredibly flexible template system which enables you to alter the output in any way imaginable.&lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-n1rXPgFLXro/VeSF3aiTTpI/AAAAAAAABAs/UXt2SnD5qEY/s1600/php-documentor.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-n1rXPgFLXro/VeSF3aiTTpI/AAAAAAAABAs/UXt2SnD5qEY/s640/php-documentor.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;p&gt;These are amazing tools to help you in your PHP development projects and if you are a fresh PHP developer, it will help you in getting your job done easily. &lt;/p&gt;  &lt;div class=&quot;author-bio&quot;&gt;&lt;strong&gt;Author Bio: &lt;/strong&gt; &lt;p&gt; Hasib is a professional writer working and writes articles related to jobs, education and guides for fresh graduates. This post has been written keeping in mind PHP enthusiasts and professionals &lt;a href=&quot;http://jobsearch.naukri.com/php-fresher-jobs&quot;&gt;applying to jobs in PHP as fresher&lt;/a&gt; or experienced .He is an avid reader and lives for two things – football and food. Follow him @ &lt;a href=&quot;https://twitter.com/maverickh47&quot;&gt;twitter&lt;/a&gt;, &lt;a href=&quot;https://plus.google.com/u/0/104836589443864759673/about&quot;&gt;Google+&lt;/a&gt;, &lt;a href=&quot;https://in.linkedin.com/in/hasibuddinahmed&quot;&gt;LinkedIn&lt;/a&gt;.  &lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;/div&gt;   &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/2230669725775762720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2015/08/10-best-php-tools-for-developers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/2230669725775762720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/2230669725775762720'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2015/08/10-best-php-tools-for-developers.html' title='10 Best PHP Tools For Developers'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-EdmLfv0cCUA/VeSCirBf70I/AAAAAAAAA_k/q2bcyYl2H24/s72-c/twig-template-engine.jpg" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-7639265856822264852</id><published>2015-08-25T00:14:00.000+05:30</published><updated>2015-08-27T23:39:55.473+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular JS"/><category scheme="http://www.blogger.com/atom/ns#" term="Backbone JS"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript Frameworks"/><title type='text'>Backbone JS vs Angular JS- Uncovering key differences</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-1aCVMYbsbw4/Vdd71I9QcnI/AAAAAAAAA-M/32ese8qvfV4/s1600/backbone-js-vs-angular-js.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-1aCVMYbsbw4/Vdd71I9QcnI/AAAAAAAAA-M/32ese8qvfV4/s1600/backbone-js-vs-angular-js.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Introduction&lt;/h2&gt; &lt;p&gt; Our last article was about &lt;a href=&quot;http://www.appsntech.com/2015/07/8-brilliant-tools-that-empower-web-developers.html&quot;&gt;8 Brilliant Tools That Empower Web Developers To Work With A Flair&lt;/a&gt; &lt;/p&gt;&lt;p&gt; Every since JavaScript development gained traction, the war of front-end JavaScript frameworks hasn&#39;t ceased to exist. As a JavaScript  developer, I&#39;ve tried hands on numerous JavaScript frameworks that have some of the finest features, helping in improving the overall productivity. Two of the best JavaScript frameworks that have proved utmost useful in building stunning web apps are BackboneJS and &lt;a href=&quot;https://angularjs.org/&quot;&gt;AngularJS&lt;/a&gt;. Today, in my post, I&#39;d be taking up a simple and crisp comparison between these two JavaScript frameworks that have been embraced by JavaScript developers, both amateurs and experts.&lt;/p&gt;   &lt;h2 class=&quot;heading-class&quot;&gt;BackboneJS vs AngularJS – Background&lt;/h2&gt; &lt;p&gt;While &lt;a href=&quot;http://backbonejs.org/&quot;&gt;BackboneJS&lt;/a&gt; is a 2010 product, AngularJS was released in the year 2009. Serving as a quick alternative to heavy frameworks, Backbone.js is a light weighted JavaScript framework that loads faster due to use of the &lt;a href=&quot;http://underscorejs.org/&quot;&gt;Underscrore.js&lt;/a&gt; dependency framework. On the contrary, AngularJS is an open source framework that allows an easy extension of HTML in addition to two-way data binding via simple code testing. That means, with the two-way binding, you can use HTML for declaring the template, eliminating the need for writing any code.&lt;/p&gt;   &lt;h2 class=&quot;heading-class&quot;&gt;BackboneJS vs AngularJS- Website Categories&lt;/h2&gt; &lt;p&gt;While Backbone.js serves as an excellent choice for building eye-catchy websites for real estate, shopping, business &amp; industry, arts &amp; entertainment etc; AngularJS has been designed keeping in mind the need for building websites related to Career &amp; Education, Internet &amp; Telecom, Software, Computer &amp; Electronics and many more.&lt;/p&gt;   &lt;h2 class=&quot;heading-class&quot;&gt;BackboneJS vs AngularJS- Architecture&lt;/h2&gt; &lt;p&gt;While the Backbone.js framework uses MVP(Model View Presenter) architecture, AngularJS uses the traditional MVC(Model View Controller) architecture. The main differences arising out of this variation in architecture include the following:&lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;h3&gt;DOM - &lt;/h3&gt; &lt;p&gt;Unlike AngularJS which rebuilds the DOM in accordance to the specified rules, BackboneJS manipulates direct DOM for representing the changes made to the data.&lt;/p&gt;   &lt;/li&gt; &lt;li&gt; &lt;h3&gt;Data Binding - &lt;/h3&gt;  &lt;p&gt;Unlike AngularJS which comes with a &lt;a href=&quot;https://docs.angularjs.org/tutorial/step_04&quot;&gt;two-way binding feature&lt;/a&gt; that allows it to run the applications, track and trigger data changes; BackboneJS lacks a data binding feature forcing the developer to create a custom binding mechanism or opt for a third-party data binding service.&lt;/p&gt;  &lt;/li&gt; &lt;/ul&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;BackboneJS vs AngularJS- Templating&lt;/h2&gt;   &lt;p&gt;Talking about templating, well it is in effective technique of reducing the amount of code that needs to be written for getting the single-page applications off the ground. While on one hand, we have BackboneJS which builds off the Underscore templates i.e. you&#39;re expected to write certain custom JavaScript for ensuring smooth functioning of the templates, on the other hand there is &lt;a href=&quot;https://docs.angularjs.org/tutorial/step_02&quot;&gt;AngularJS which offers templating&lt;/a&gt; via dynamic HTML attributes that have already been incorporated into the document, ensuring the representation is concise and easy-to-grasp.&lt;/p&gt;   &lt;blockquote&gt; You may also like to read: &lt;a href=&quot;http://www.appsntech.com/2015/07/angularjs-is-superior-javascript-framework.html&quot;&gt;AngularJS Is A Superior Javascript Framework &lt;/a&gt;&lt;/blockquote&gt; &lt;h2 class=&quot;heading-class&quot;&gt;BackboneJS vs AngularJS- Validation&lt;/h2&gt; &lt;p&gt;BackboneJS doesn&#39;t comprise of a function that can execute the validations part. That means, you&#39;re either supposed to write the logic by yourself or choose one from Backbone validations(9.5 unminified) or Backbone.validation(8.2HB minified) or Backbone.validator(8.2 non-minified) etc. In contrast to this, there is AngularJS which includes validation by default. That means, you can see some of the validations like min-length, max-length, email etc. implemented by default. Moreover, if you&#39;re interested in having a custom validation(s), then you can choose to create one.&lt;/p&gt;     &lt;h2 class=&quot;heading-class&quot;&gt;BackboneJS vs AngularJS- Non-Restful Backend&lt;/h2&gt; &lt;p&gt;While BackboneJS is purely meant for Restful backends, AngularJS comes with $http which allows you to go beyond the boundaries of a Restful backend. Well, when it&#39;s about Backbone.JS, for each end-point within the backend, there&#39;s a need for creating an associated model on the front-end. That means, if you aren&#39;t using a Restful backend, then there will be a need for performing a lot of tweaks that may lead to multiple overrides to Backbone.sync. On the contrary, AngularJS makes the concept of having a &lt;a href=&quot;https://docs.angularjs.org/api/ngResource/service/$resource&quot;&gt;Restful &lt;/a&gt;backend easier. It comes with &lt;a href=&quot;https://docs.angularjs.org/api/ngResource&quot;&gt;ngResource&lt;/a&gt;- an extra file that&#39;s required for adding 16KB min. Hence, you&#39;re free to either use this file or $http directly.&lt;/p&gt;   &lt;blockquote&gt; &lt;a href=&quot;http://www.appsntech.com/2015/04/building-simple-product-management-app.html&quot;&gt;Building A Simple Product Management App Using Angular JS + Cygnite PHP + Bootstrap &lt;/a&gt;&lt;/blockquote&gt; &lt;h2 class=&quot;heading-class&quot;&gt;BackboneJS vs AngularJS- Overall Performance&lt;/h2&gt;   &lt;p&gt;In simple words, BackboneJS is a lot more faster and better performing as compared to AngularJS. The basic reason for this is that as the page grows, AngularJS&#39;s two-way data binding feature tends to introduce negative performance effects into the framework. Unlike this, BackboneJS lacks a data binding feature, expecting you to write lengthy code. This allows you to focus on improving the performance, removing the need for hacking the framework from scratch. All in all, it is the compact data representation which makes AngularJS a low-performing JavaScript framework.&lt;/p&gt;   &lt;h2 class=&quot;heading-class&quot;&gt;Final Thoughts&lt;/h2&gt;   &lt;p&gt;While each of the two JavaScript frameworks viz: BackboneJS and AgularJS have their own set of pros and cons, it is better to opt for the one which suits your project requirements fully. Remember, a framework that&#39;s been chosen after a lot of planning and analysis will fetch you the desired results instantly.&lt;/p&gt;    &lt;div class=&quot;author-bio&quot;&gt;&lt;strong&gt;Author Bio: &lt;/strong&gt; &lt;p&gt; My name is Andrey. I am a web developer in &lt;a href=&quot;http://www.xicom.biz/services/web-development/content-management-system.html&quot;&gt;CMS Website Development&lt;/a&gt; Company. I am fond of finding simple solutions to complex problems. If you loved the topic, do share and comment. Also, you can follow me on &lt;a href=&quot;https://twitter.com/andreykvloch&quot;&gt;Twitter&lt;/a&gt; for more updates.  &lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;/div&gt;     &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/7639265856822264852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2015/08/backbone-js-vs-angular-js-uncovering-key-differences.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/7639265856822264852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/7639265856822264852'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2015/08/backbone-js-vs-angular-js-uncovering-key-differences.html' title='Backbone JS vs Angular JS- Uncovering key differences'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-1aCVMYbsbw4/Vdd71I9QcnI/AAAAAAAAA-M/32ese8qvfV4/s72-c/backbone-js-vs-angular-js.jpg" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-2645162347096866277</id><published>2015-07-21T22:48:00.000+05:30</published><updated>2015-07-21T23:09:06.136+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="8 Brilliant Tools for web application"/><category scheme="http://www.blogger.com/atom/ns#" term="web application tools"/><category scheme="http://www.blogger.com/atom/ns#" term="web development"/><title type='text'>8 Brilliant Tools That Empower Web Developers To Work With A Flair</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-a8kPUBC_-_A/Va5lVJ6bA3I/AAAAAAAAA9w/wgIZx7AWq4Y/s1600/8_Brilliant_Tools_That_Empower_Web_Developers_To_Work_With_A_Flair.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-a8kPUBC_-_A/Va5lVJ6bA3I/AAAAAAAAA9w/wgIZx7AWq4Y/s1600/8_Brilliant_Tools_That_Empower_Web_Developers_To_Work_With_A_Flair.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Introduction&lt;/h2&gt; &lt;p&gt; Our last article was about &quot;&lt;a href=&quot;http://www.appsntech.com/2015/07/angularjs-is-superior-javascript-framework.html&quot; &gt;AngularJS Is A Superior Javascript Framework ­ Let&#39;s Explore Why&lt;/a&gt;&quot;. The Internet has inevitably become an integral part of the life for most of us. This has certainly raised the level of expectations from web developers while adding to their business. With a fierce competition in the market, web developers need to be on their toes and deliver superlative products to attain a sustainable success in the wobbly marketplace. &lt;/p&gt; &lt;p&gt;Today, almost every business embraces an online presence that is optimized for mobiles to ensure their reach to a wider audience base. This has substantially created a lot of work load for web professionals, as they need to expeditiously deliver outstanding results that can let businesses boast unique and impressive web presence.&lt;/p&gt; &lt;p&gt;Fortunately, with the advancement in web technology, there is a slew of excellent tools that can help web developers to stay productive in their work without compromising on the quality. This post will uncover some marvellous tools that every web developer must know, as these can help them boost their performance and have an edge over the competition.&lt;/p&gt; &lt;p&gt; Let&#39;s distil a few of the amazing tools for accomplishing web development task with a breeze.&lt;/p&gt; &lt;blockquote&gt;Read: &lt;a href=&quot;http://www.appsntech.com/2015/04/5-best-things-you-should-know-about-php.html&quot; target=&quot;_blank&quot;&gt;5 Best Things You Should Know About PHP 7&lt;/a&gt;&lt;/blockquote&gt; &lt;h2 class=&quot;heading-class&quot;&gt; 1. Freepik&lt;/h2&gt; &lt;p&gt;If you need any type of vector images, illustrations, or any other vector art piece, Freepik makes a fabulous choice. It offers a gigantic collection of amazing vector art that too for free. Since, everything is kept in a well organized and uncluttered way, you can easily find a desired option. However, the huge list of options available there might make it hard and time consuming to streamline your choice.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; 2. ExpressionEngine &lt;/h2&gt; &lt;p&gt; The ExpressionEngine is a wonderful content management tool that beautifully separates the web content from the design. It, thus, facilitates one to showcase the content in a desired manner and on desired location. This tool is flexible enough to work efficiently with any kind of website from eCommerce to a personal blog; it is custom made to support any niche business. Moreover, it is absolutely simple to install and use, even individuals with no technical knowledge can also operate this extensible tool. The huge community support further adds to its credibility, so whenever you feel that you get stuck and don&#39;t know how to proceed, you can reach the community; there are several experienced professionals and individuals who can help resolve your web-related issues. &lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; 3. Play Framework &lt;/h2&gt; &lt;p&gt; &lt;a href=&quot;https://www.playframework.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Play Framework&lt;/a&gt; is a prolific web framework that supports rapid web application development with Java and Scala. To work with this framework, only a text editor and browser is required. It includes resourceful testing tools, and also displays the outcomes corresponding to the amendments made by you by simply clicking on refresh button.&lt;/p&gt; &lt;p&gt;Built on Akka, this framework consumes minimal resources, and delivers highly scalable web applications. While supporting a plethora of useful Java libraries, and compiling and running apps on the JVM for quick performance, it ensures responsive web apps that can run seamlessly on any device.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; 4. Hotjar &lt;/h2&gt; &lt;p&gt; Now, you can easily learn and understand how your website is perceived by your web as well as mobile users. All this is possible with &lt;a href=&quot;https://www.hotjar.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;this awesome web development tool&lt;/a&gt;. It comes complete with features like Heatmaps, and offers you the appropriate analytic result to help you proficiently improve the usability of your site. You can scour and analyse the elements that grab your viewers&#39; interest, as it offers insights of your visitors&#39; behaviour (including number of taps, click, scrolling and so forth) while interacting with the website.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; 5. HTML5 Maker&lt;/h2&gt; &lt;p&gt; Today, adding captivating graphics in a website can enhance its look and feel, which has become quite essential nowadays to stay ahead of the competition. If you want to grab your viewers&#39; attention, animations can definitely help you achieve your goal with ease. The HTML5 Maker is one of the most recommended online tool that facilitates one to efficiently generate animated multimedia content. Whether you like to have an impressive sliders or banners, this blissful tool can cater to your needs. &lt;/p&gt; &lt;p&gt; The best thing about this tool is that it doesn&#39;t even require design and development skills. It comprises several resourceful features, including Online Image Editor, Online Animation Editor, built-in templates that help generate innovative web solutions. The animations generated via this tool are compatible with Google Double-Click and Google AdWords. Moreover, these animations can be shared with others as templates.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; 6. &lt;a href=&quot;http://www.cygniteframework.com&quot; target=&quot;_blank&quot;&gt;Cygnite&lt;/a&gt; - A Modern Toolkit For Web Developers &lt;/h2&gt; &lt;p&gt; Cygnite is a new toolkit designed to augment the development of full-featured web applications. This elegant and effective framework delivers ultimate performance and allows professionals to create exquisite and feature-rich web solutions with ease. It features clean and legible syntax, which makes it extremely convenient for one to proficiently develop the code. This PHP framework is power-packed with an array of useful features, including Code Generator, &lt;a href=&quot;http://www.cygniteframework.com/2014/06/active-record.html&quot; target=&quot;_blank&quot;&gt;ActiveRecord&lt;/a&gt;, &lt;a href=&quot;http://www.cygniteframework.com/2013/11/ioc-container.html&quot; target=&quot;_blank&quot;&gt;Container&lt;/a&gt;, &lt;a href=&quot;http://www.cygniteframework.com/2013/11/dynamic-finders.html&quot; target=&quot;_blank&quot;&gt;Finders&lt;/a&gt;, &lt;a href=&quot;http://www.cygniteframework.com/2013/08/controllers.html#RESTful-resource-controller&quot; target=&quot;_blank&quot;&gt;RESTful routing&lt;/a&gt;, &lt;a href=&quot;http://www.cygniteframework.com/2013/11/schema-builder.html&quot; target=&quot;_blank&quot;&gt;Schema Builder&lt;/a&gt;, and many more. The integrated Composer tool facilitates one to incorporate a desired third-party plugins into his web application. Cygnite 1.3.1 is the small footprint; however, its major update &lt;a href=&quot;https://github.com/cygnite/cygnite-application/tree/2.0&quot; target=&quot;_blank&quot;&gt;Cygnite Framework 2.0&lt;/a&gt; version will be available soon with tons of awesome features. &lt;/p&gt;  &lt;blockquote&gt;Read: &lt;a href=&quot;http://www.appsntech.com/2015/04/building-simple-product-management-app.html&quot; target=&quot;_blank&quot;&gt;Building A Simple Product Management App Using Angular JS + Cygnite PHP + Bootstrap&lt;/a&gt;&lt;/blockquote&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; 7. Apache Couch DB &lt;/h2&gt; &lt;p&gt;&lt;a href=&quot;http://couchdb.apache.org/&quot;&gt;Apache Couch DB&lt;/a&gt; forms another highly useful web development tool. Yes! It is an open source database where you can stack all the requisite documents in the cloud with JSON documents. Once you have stored your data, it automatically indexes, combines and transforms your data by implementing JavaScript. With this tool, you can use HTTP to query your indexes with a web browser, and it offers real-time notifications for every change made on a website. This web database features an intuitive interface that facilitates the admin to make amendments with ease. &lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; 8. Google Fonts &lt;/h2&gt; &lt;p&gt;I don&#39;t think &lt;a href=&quot;https://www.google.com/fonts&quot; target=&quot;_blank&quot;&gt;Google Fonts&lt;/a&gt; needs any introduction, most of you might have been already using it. This list would have been incomplete without including this tool. It is basically Google&#39;s font library that offers a great list of web-compatible fonts. You can search any font that best suits the look and feel of your website. &lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Reflection &lt;/h2&gt; &lt;p&gt; Today, it has become more than imperative to make your website stand out with an impressive appearance and valuable functions. This ultimately adds to the web developers&#39; job. If you are a web professional and seeking cutting edge tools that can augment your performance and help deliver an invaluable web solution, go through the aforementioned list of tools. I hope this list will surely heighten your business success while making your life much easier. &lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Author Signature: &lt;/h2&gt; &lt;p&gt; Victoria Brinsley is a skilled Android app developer for Appsted Ltd - a outsource &lt;a href=&quot;http://www.appsted.com/services/android-development&quot; target=&quot;_blank&quot;&gt;Android app development company&lt;/a&gt;. You can explore more about the development tips and tricks by clearing your queries with her.&lt;/p&gt;  &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/2645162347096866277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2015/07/8-brilliant-tools-that-empower-web-developers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/2645162347096866277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/2645162347096866277'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2015/07/8-brilliant-tools-that-empower-web-developers.html' title='8 Brilliant Tools That Empower Web Developers To Work With A Flair'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-a8kPUBC_-_A/Va5lVJ6bA3I/AAAAAAAAA9w/wgIZx7AWq4Y/s72-c/8_Brilliant_Tools_That_Empower_Web_Developers_To_Work_With_A_Flair.jpg" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-5507590361107431450</id><published>2015-07-15T21:00:00.000+05:30</published><updated>2015-07-16T22:01:31.642+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular JS"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript Frameworks"/><title type='text'>AngularJS Is A Superior Javascript Framework ­ Let&#39;s Explore Why</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-YNNtK3Gn-TY/VaZ-ei6zgoI/AAAAAAAAA84/5D_q8n3-coI/s1600/angular-js-framework.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-YNNtK3Gn-TY/VaZ-ei6zgoI/AAAAAAAAA84/5D_q8n3-coI/s1600/angular-js-framework.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Introduction&lt;/h2&gt; &lt;p&gt; Last article was about the &lt;a href=&quot;http://www.appsntech.com/2015/07/unerring-tips-for-high-performing.html&quot;&gt;Unerring Tips for High Performing WordPress Themes&lt;/a&gt; you may like to read out.&lt;/p&gt; &lt;p&gt;One of the probable reasons why JavaScript is extolled across the globe is the availability of prolific frameworks that support JavaScript development. However, it has been observed that most of the frameworks only wraps a slew of existing tools, and do nothing much in addition to it.&lt;/p&gt; &lt;p&gt;Fortunately, AngularJS is a brilliant framework that has an edge over its competitors. It embraces a set of resourceful tools that have been incorporated after ensuring their smooth and flawless performance. Although one needs to have proper insights into the framework and get the requisite expertise to reap its benefits, there are several outstanding advantages that make it a much sought after choice.&lt;/p&gt;  &lt;blockquote&gt;Read: &lt;a href=&quot;http://www.appsntech.com/2015/04/building-simple-product-management-app.html&quot; target=&quot;_blank&quot;&gt;Building A Simple Product Management App Using Angular JS + Cygnite PHP + Bootstrap&lt;/a&gt;&lt;/blockquote&gt; &lt;p&gt;This post will unleash a few worthy benefits of AngularJS.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;1. Has an ideal framework size that helps develop a variety of apps&lt;/h2&gt; &lt;p&gt;The most common cause that add to the bounce rate of a product is its loading time. If your application consumes a lot of time to load, most of your users will certainly prefer abandoning your app. Thus, it is better to scour the impact of a framework on the loading time. This can be proficiently analyzed by taking the framework size and time taken by the framework for bootstrapping into account. AngularJS consumes ~50 KB, and allows professionals to develop beautiful, feature rich applications with a flair.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;2. Helps generate an intuitive UI&lt;/h2&gt; &lt;p&gt;You can create dynamic interfaces for your web apps, as AngularJS allows one to extend the definition of HTML. This certainly makes it easy to tweak the UI design in a suitable manner and create a desired look and feel. The framework offers a list of various UI elements and ensure that all of them work seamlessly when integrated in a design. This adds to the agile app development, and delivers fabulous apps with an impressive UI design that are sure to enhance the UX.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;3. Delivers precise results while catering to your client&#39;s needs&lt;/h2&gt; &lt;p&gt;Programming for AJAX and DOM is not a child&#39;s play, but it definitely an arduous task. However, while working with AngularJS, the code becomes much organized and uncluttered that helps you efficiently manage the development of CRUD apps. The framework offers a better conceptualization to deal with it in a precise way while creating applications.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;4. Augments parallel development&lt;/h2&gt; &lt;p&gt;AngularJS brilliantly manages dependencies, though the dependencies are not completely eradicated. The integrated massive grid facilitates one to streamline multitasking and testing while keeping the risk to crashing at bay.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;5. Minimal coding is required&lt;/h2&gt; &lt;p&gt;Loaded with a whopping number of useful functions, AngularJS offers valuable features without demanding lengthy codes. Here are a few of its incredible functions.&lt;/p&gt; &lt;p&gt;It completely handles the MVC pipeline.&lt;/p&gt; &lt;p&gt;You can support a required data model by writing only a few code chunks.&lt;/p&gt; &lt;p&gt;You can implement HTML to create a desired view.&lt;/p&gt; &lt;p&gt;By the virtue of filters, you can easily tweak the data in a desired fashion without affecting the controller.&lt;/p&gt; &lt;p&gt;You won&#39;t need to tinker the code in order to manage the directives, as they can be handled in another way.&lt;/p&gt; &lt;p&gt;All these blissful features of the framework make it absolutely convenient for one to generate a high end application with just a simple and precise code.&lt;/p&gt;  &lt;blockquote&gt;Read: &lt;a href=&quot;http://www.appsntech.com/2014/04/building-simple-form-using-angular-js.html&quot; target=&quot;_blank&quot;&gt;Building a Simple Form Using Angular JS and Cygnite PHP Framework&lt;/a&gt;&lt;/blockquote&gt; &lt;h2 class=&quot;heading-class&quot;&gt;6. Makes single page app development easier&lt;/h2&gt; &lt;p&gt;Although developing a single page application (SPA) is a daunting task, it has incessantly garnered a great popularity. By implementing the AngularJS framework for the same, you can proficiently create a high quality single page application, while ensuring a responsive design. This further facilitates an app with smooth and consistent performance that amazingly adds to a better UX.&lt;/p&gt; &lt;p&gt;Moreover, as these kind of apps are rendered on the client side, it dramatically reduces the network traffic and further improves the loading time. The framework is jam­packed with resourceful templates, routing, and more features that facilitate one to develop highly functional apps.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;7. Aids application testing&lt;/h2&gt; &lt;p&gt;The significance of testing cannot be overseen. One must test his application before launching it in the market. This helps one to ensure its flawless performance and deliver an impressive app that can compete with the fierce competition out there. AngularJS framework has been developed while keeping the testing into account. Understanding the proliferation of mobiles and the fact that app testing requires a lot of precision, the framework is powered with powerful services to deliver an astonishing product.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Conclusion&lt;/h2&gt; &lt;p&gt;AngularJS is an invaluable JavaScript framework that is consistently going through reinventions. This is certainly further enhancing the framework and making it a better companion for developing stunning, intuitive and highly engaging applications. The above are just a few of its utile features, you will get a lot more under its hood.&lt;/p&gt;  &lt;div class=&quot;author-bio&quot;&gt;&lt;strong&gt;Author Biography: &lt;/strong&gt; &lt;p&gt;I am Savy Nacion, working as a technology specialist in Markupcloud, &lt;b&gt;&lt;a href=&quot;http://www.markupcloud.com/services/html-to-wordpress&quot; target=&quot;_blank&quot;&gt;HTML to Wordpress Service &lt;/a&gt;&lt;/b&gt; company, based in Rochester, New York. With over 10 years of experience in the technology domain, I aim at bringing new and innovative technology solutions to the company to help it keep thriving in the industry. &lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/5507590361107431450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2015/07/angularjs-is-superior-javascript-framework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/5507590361107431450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/5507590361107431450'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2015/07/angularjs-is-superior-javascript-framework.html' title='AngularJS Is A Superior Javascript Framework ­ Let&#39;s Explore Why'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-YNNtK3Gn-TY/VaZ-ei6zgoI/AAAAAAAAA84/5D_q8n3-coI/s72-c/angular-js-framework.jpg" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-7640474938090644142</id><published>2015-07-05T14:35:00.000+05:30</published><updated>2015-07-09T22:47:30.301+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="high performance web application"/><category scheme="http://www.blogger.com/atom/ns#" term="Responsive Design"/><category scheme="http://www.blogger.com/atom/ns#" term="website optimization"/><category scheme="http://www.blogger.com/atom/ns#" term="wordpress"/><title type='text'>Unerring Tips for High Performing WordPress Themes</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt; &lt;p&gt;In the last article we discussed about &lt;a href=&quot;http://www.appsntech.com/2015/06/advantages-and-disadvantages-e-commerce-business.html&quot;&gt;&quot;Advantages and Disadvantages of Ecommerce Business&quot;&lt;/a&gt;. &lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-dAMk_a24iaw/VZjy5AAnpBI/AAAAAAAAA7k/HtTjOp9bd48/s1600/tips_for_high_performing_wordpress_themes.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-dAMk_a24iaw/VZjy5AAnpBI/AAAAAAAAA7k/HtTjOp9bd48/s640/tips_for_high_performing_wordpress_themes.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;h2 class=&quot;heading-class&quot;&gt;“Doing The Same Thing Over And Over Again And Expecting Different Results” &lt;/h2&gt; &lt;p&gt;This is what we call insanity. If you think that you are doing everything right but the desired result is still awaited, then you need to go back, test and then optimize your policies. We all have been ranting and raving about responsive themes, but we never dared to look beyond it. In this blog, we will discuss how to get high performance from your WordPress themes.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Gauging the performance of your Responsive theme&lt;/h2&gt; &lt;p&gt; Choosing the size of a responsive web theme matters because it affects the end users as well as the web servers.  Due to heavy weightage, server needs more time to get extra file and with each such file, extra milliseconds are added in the loading time. On the other hand the user have to wait till the total number of kilobytes are loaded. Apart from using Media Queries various WordPress themes now use several other techniques to respond to the browser&#39;s.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Being choosy pays off!&lt;/h2&gt; &lt;p&gt;Designing a responsive website is more than just defining different number of columns in a website. This question was for all the websites designed for mobile users, without concerning the fact that these were CMS. Before choosing a theme you need to first go through the following set of questions:&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Does your project needs a mobile development?&lt;/h2&gt; &lt;p&gt;With the proliferation in the mobile devices it is highly unlikely for business owners with up to date market knowledge and trends to say no to mobile first technology. However, one cannot go on for adopting all kind of technological development. Though, earlier we had a choice for adopting mobile designs, but now with the advent of Google&#39;s algorithm it becomes crucial.&lt;/p&gt;  &lt;blockquote&gt;Read: &lt;a href=&quot;http://www.appsntech.com/2015/06/how-to-guide-to-create-mobile-responsive-design.html&quot; target=&quot;_blank&quot;&gt;Creating ​Mobile ​Responsive ​Design&lt;/a&gt;&lt;/blockquote&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;How many steps do we need?&lt;/h2&gt; &lt;p&gt;Performance of a responsive website depends highly on the screen it is viewed on. Responsive design does not mean that the screen should adjust on the mobile devices such as tablet, phablet or smartphones, wherein responsive means that your website must be fit to wide screen sizes. The best option is follow device-agnostic approach which focuses on web design instead of device functionalities.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Do you understand the layout and formatting of the responsive pages?&lt;/h2&gt; &lt;p&gt;In order to craft a successful layout you need to display the elements one by one. Now, when it comes to wide screens we must make sure that the headings must be larger than the content, whereas when it comes to smaller screen the ratio drastically changes. &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;How to tailor your application for mobile devices?&lt;/h2&gt; &lt;p&gt;Displaying content via multiple columns needs a particular hierarchical flow, as each page comprises of its own unique content and secondary content is the one which is displayed on more than one page. This content approach is difficult to follow while designing for mobile screen. You need to ensure that you need to remove the irrelevant content from the mobile screens. On contrary if you think that you need all those pages then draw out a proper methodology such as long scrolling to display you content. Further, as per thumb rule the elements which do not supports the title of the page is not the primary content. &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Measure your Websites performance&lt;/h2&gt;&lt;p&gt;Now after all the detailed analysis and study you have finally chosen a WordPress theme and have decided on the content placement and stuff, do not think that you have accomplished your goal. The next step is to know whether you did it right and is your website well accepted by users. There are numerous tools present in the market to gauge the performance of a website. However, you can count on  Google Page Speed and for second choice keep Gtmetrix for analyzing the current performance of your website. &lt;/p&gt;  &lt;blockquote&gt;Read: &lt;a href=&quot;http://www.appsntech.com/2015/04/5-best-things-you-should-know-about-php.html&quot; target=&quot;_blank&quot;&gt;5 Best Things You Should Know About PHP 7&lt;/a&gt;&lt;/blockquote&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://developers.google.com/speed/pagespeed/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-NyHP4jfeKJs/VZjuyp5TGpI/AAAAAAAAA7M/fbR9RfXIIYQ/s400/google_performance.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;With 7 Google Page rank and Alexa rank 11, Gtmetix serves as an incredible tool for analyzing your website. Along with page speed results this tool uses YSlow ( a tool from Yahoo for measuring performance).  Do not worry as you do not have to do much and all you need to do is to enter the url of your website to get a comprehensive performance report. Further, it allows comparative analysis for a healthy competition.&lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://gtmetrix.com/&quot; target=&quot;_blank&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-ah-t0yJJh4Y/VZjuTHnyErI/AAAAAAAAA7E/Z2MIA92Syr0/s400/gtmetix-analyse-performance.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Poor performance!&lt;/h2&gt; &lt;h3&gt;Plugins can ameliorate the performance&lt;/h3&gt; &lt;p&gt;One can certainly meter the performance of their website, however this leads to the crux: how to improve? &lt;/p&gt; &lt;p&gt;With a wholesome development of community existing for more than a decade have found  solution of this unnerving questions. We have  plugins namely auto optimize, WP Super Cache and several other which can work as a performance booster for your WordPress website. These plugins are easy to install and ready to use which have the potential to ameliorate the performance of a poor performing websites.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Present the cached version&lt;/h2&gt; &lt;h3&gt;Caching works as a performance booster!&lt;/h3&gt; &lt;p&gt;As we know that every time a user enters a website,  content is fetched from the server and then displayed on the browser. In case of static resources the data will fetched every single time a user visits the website. This is certainly not an optimal technique, as the server has to do a single task over and over again.&lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-3DAe1kdBNso/VZjuDU0gY9I/AAAAAAAAA68/o0XU8aMc_iQ/s1600/wp_cache_settings.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-3DAe1kdBNso/VZjuDU0gY9I/AAAAAAAAA68/o0XU8aMc_iQ/s400/wp_cache_settings.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;p&gt;In order to optimize this functionality we have well engineered  plugins such as WP Super Cache, which ensures that the users get to access the cached website which removes the unnecessary loading of content again and again.&lt;/p&gt;  &lt;p&gt;I hope this might help you!&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Conclusion: &lt;/h2&gt; &lt;p&gt;The long and short of the complete article is that we need to pull up our socks in order to do reach another level of web development. There are a lot of optimization techniques for WordPress which one can harness to provide top notch solutions. &lt;/p&gt; &lt;div class=&quot;author-bio&quot;&gt;&lt;strong&gt;Author Biography: &lt;/strong&gt; &lt;p&gt;I am Savy Nacion, working as a technology specialist in Markupcloud, &lt;b&gt;&lt;a href=&quot;http://www.markupcloud.com/services/psd-to-wordpress&quot; target=&quot;_blank&quot;&gt;PSD to Wordpress conversion&lt;/a&gt;&lt;/b&gt; company, based in Rochester, New York. With over 10 years of experience in the technology domain, I aim at bringing new and innovative technology solutions to the company to help it keep thriving in the industry.   &lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/7640474938090644142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2015/07/unerring-tips-for-high-performing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/7640474938090644142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/7640474938090644142'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2015/07/unerring-tips-for-high-performing.html' title='Unerring Tips for High Performing WordPress Themes'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-dAMk_a24iaw/VZjy5AAnpBI/AAAAAAAAA7k/HtTjOp9bd48/s72-c/tips_for_high_performing_wordpress_themes.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-8340795335687248385</id><published>2015-06-26T23:13:00.002+05:30</published><updated>2015-06-30T22:17:46.763+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="e-commerce"/><category scheme="http://www.blogger.com/atom/ns#" term="Magento"/><title type='text'>Advantages and Disadvantages of Ecommerce Business</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt;  &lt;p&gt; e-Commerce business is increasing day to day. It has created opportunity for everyone to start online business with little investment. Many people are not aware that starting eCommerce business require steps and decision to work together at right time. Like offline business, online business also have some advantages as well as disadvantages. Review the pros and cons of e-Commerce business. &lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-oXT9-yKZPjQ/VYUmYPzu41I/AAAAAAAAA6A/r7OYlbvGx7g/s1600/ecommerce.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-oXT9-yKZPjQ/VYUmYPzu41I/AAAAAAAAA6A/r7OYlbvGx7g/s1600/ecommerce.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;blockquote&gt;You may also like to read &lt;a href=&quot;http://www.appsntech.com/2015/06/how-to-guide-to-create-mobile-responsive-design.html&quot;&gt;&quot;How to Guide to Create ​Mobile ​Responsive ​Design&quot;&lt;/a&gt;. &lt;/blockquote&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Advantage of eCommerce Business&lt;/h2&gt; &lt;h3&gt;1. Limitations – &lt;/h3&gt; &lt;p&gt;Unlike e-Business, offline business have certain limitations to reach the customers. In e-Business owner can target the whole country at the same time and takes the lead on offline business because whole world is its playground. &lt;/p&gt;  &lt;h3&gt; 2. New Customers –&lt;/h3&gt; &lt;p&gt; There are limited customers for offline business. It cannot cross the limit.  But on the other side Online business targeted area is too big. It receives new customers from Search Engine and other different methods.&lt;/p&gt;  &lt;h3&gt; 3. Time Saving – &lt;/h3&gt; &lt;p&gt; e-Commerce business is time saving for customers, they don&#39;t have to travel to purchase a products. &lt;/p&gt; &lt;h3&gt; 4. Physical Store –&lt;/h3&gt; &lt;p&gt; Online business doesn&#39;t require a physical store and hence saves the cost of establishing a physical store. For users, it becomes easy to visit online website to purchase product instead of visiting physical store.&lt;/p&gt; &lt;h3&gt; 5. Low Startup Cost –&lt;/h3&gt;   &lt;p&gt; Offline business requires good amount to setup a business. But eCommerce business can be started with a little investment. If a person does not have any website, he can sell his products on various  eCommerce portals available online as there are so many &lt;a href=&quot;http://www.magentostore.in/&quot;&gt;Ecommerce store development&lt;/a&gt; companies like shopify offering affordable and ready to use eCommerce portal.  &lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;  Disadvantage of e-Commerce Business &lt;/h2&gt; &lt;h3&gt;1. Personal Touch -  &lt;/h3&gt; &lt;p&gt;Offline business builds the relationship with its customers personally. But on the other side e-Commerce business missed this important part. In offline business user visits again to the store because of personal touch, but not the same with online business.&lt;/p&gt;  &lt;h3&gt;2. Internet Connection – &lt;/h3&gt; &lt;p&gt;Internet is the life of eCommerce business. Once the internet is down it will miss all the sales. It is like no internet no revenue online. But offline business never faces this types of issue. &lt;/p&gt;  &lt;h3&gt;3. Technical Issues – &lt;/h3&gt; &lt;p&gt;Shopping carts and payment processing are very important parts of any eCommerce Business. But sometimes, a little technical bug can create issues in website and website stop working. Hence, it won&#39;t do any conversion until that issue get fixed. &lt;/p&gt; &lt;h3&gt;4. Return Policy –  &lt;/h3&gt; &lt;p&gt;In online business business owner have to take the responsibility of products even after its delivery. If user is not satisfy with product he received, he will return it to the owner and owner have to refund the amount.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; VERDICT : &lt;/h2&gt; &lt;p&gt;Well with this article we may conclude that every business has advantage and disadvantage. Although we cannot avoid disadvantages but certainly, we can take measure to manage risks and get abundant advantages from eCommerce business. Advantages are undoubtedly teasing, and we will appreciate such simple exchange nowadays. It is suggested that always try to manage risks before it hinders your online business. Appreciate more your web searching and appreciate more your e-business exercises! &lt;/p&gt;  &lt;div class=&quot;author-bio&quot;&gt;&lt;strong&gt;Author Biography: &lt;/strong&gt; &lt;p&gt;&lt;b&gt;&lt;a href=&quot;https://plus.google.com/103614203237142130423/&quot;&gt;James Anderson&lt;/a&gt;&lt;/b&gt; is an professional content writer. Email: &lt;b&gt;ja9663019@gmail.com&lt;/b&gt; &lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/8340795335687248385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2015/06/advantages-and-disadvantages-e-commerce-business.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/8340795335687248385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/8340795335687248385'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2015/06/advantages-and-disadvantages-e-commerce-business.html' title='Advantages and Disadvantages of Ecommerce Business'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-oXT9-yKZPjQ/VYUmYPzu41I/AAAAAAAAA6A/r7OYlbvGx7g/s72-c/ecommerce.jpg" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-265426835916925987</id><published>2015-06-20T16:06:00.000+05:30</published><updated>2015-06-24T22:17:32.902+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="Jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="Mobile Responsive Site"/><category scheme="http://www.blogger.com/atom/ns#" term="Responsive Design"/><title type='text'>How to Guide to Create ​Mobile ​Responsive ​Design</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot; class=&quot;blog-post-wrapper&quot;&gt;&lt;br /&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-R0LNhZYo8VI/VYgv0lAHJNI/AAAAAAAAA6k/x2APnk5xLPc/s1600/html_css_mobile_responsive_design.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-R0LNhZYo8VI/VYgv0lAHJNI/AAAAAAAAA6k/x2APnk5xLPc/s640/html_css_mobile_responsive_design.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt; &lt;p&gt;Hey Guys! Last article was about &lt;a href=&quot;http://www.appsntech.com/2015/05/how-to-install-ubuntu-15-04-along-with-pre-installed-windows-8-64bit.html&quot;&gt;&quot;How to Install Ubuntu 15.04 Along With Windows 8 (Dual Boot)&quot;&lt;/a&gt;. &lt;/p&gt; &lt;p&gt; Unlike a conventional desktop oriented website, the one which has been created for the mobile screens is a lot more in demand. It is a responsive website which automatically adjusts itself to fit the screen of device that the site is being viewed on. All the content, whether it is the text, images or video get moderated to ensure best display on the screen under focus. Whether you&#39;re a publisher, a designer or a developer, taking care of your site&#39;s mobile responsive design is something that can render flawless experience to the targeted users. In this post, I&#39;ll be walking you through the vital steps that must be followed for building a fine quality mobile responsive design.  &lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; What kind of mobile responsive design are we going to create in this tutorial?&lt;/h2&gt; &lt;p&gt;Here, I&#39;ll be creating a simple e-commerce product detail page for a t-shirt firm. So, while ensuring that the customers are able to make the purchases conveniently, we&#39;ll also be making the product review easy-to-access, followed by utilizing customer&#39;s location for enhancing the overall mobile shopping experience.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; A look at the basic structure &lt;/h2&gt; &lt;p&gt;It is essential to author a semantic HTML5 markup that will allow you to ensure completely manageable and fully accessible adaptive experiences. The reason for this being that semantic markup is fully portable and can be easily accessed on a variety of mobile devices, desktop browsers, tablets etc. &lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Coming to the individual steps for creating mobile responsive design  &lt;/h2&gt; &lt;h3&gt;Step 1- Set the Viewport  &lt;/h3&gt; &lt;p&gt;While for a majority of non-mobile-optimized websites, most of the contemporary browsers set up a larger browser viewport, in case of designing a website using mobile responsive design, we&#39;ll be using viewport meta tag for setting the screen width to the device width as shown below: &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;#x3C;meta name=&amp;#x22;viewport&amp;#x22; content=&amp;#x22;width=device-width, initial-scale=1&amp;#x22; /&amp;#x3E;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;h3&gt;Step 2- Adding the flexibility to load the website content conditionally  &lt;/h3&gt; &lt;p&gt;Here, we&#39;ll be creating two new HTML documents for the auxiliary content viz: reviews.html and related.html. Unlike the default way in which the content is accessible via links available on the page, we can use a little bit of javascript for loading the content as and when user requests for the same or when the screen&#39;s resolution reaches a specific breakpoint. &lt;/p&gt; &lt;h3&gt;Step 3- Use HTML special characters   &lt;/h3&gt; &lt;p&gt;As an attempt to decrease the need for background images, it is recommended to use HTML special characters. In this tutorial, I&#39;ve used $#9733  for creating a solid star (★) and &amp;#9734 for creating empty stars (☆) for the product ratings.&lt;/p&gt; &lt;h3&gt;Step 4- Include a clickable link within footer &lt;/h3&gt; &lt;p&gt;Here, we&#39;ll use the tel URI scheme for including a clickable link to customer service number, within the footer. Here&#39;s a look at the tel URI scheme: &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;#x3C;a href=&amp;#x22;tel:1234567891&amp;#x22;&amp;#x3E;123 456 7891&amp;#x3C;/a&amp;#x3E;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;h3&gt;Step 5- Add style enhancements &lt;/h3&gt; &lt;p&gt;With a strong semantic markup in place, it&#39;s time to add some style enhancements as explained below:&lt;/p&gt; &lt;h3&gt;Create separate style sheet for screens with larger displays &lt;/h3&gt; &lt;p&gt;Here, we&#39;ll be creating two CSS files viz: style.css and enhanced.css for delivering basic styles for screens with dimension less than 967px. We&#39;ll be using media queries for serving the new styles for screens with dimension greater than 967px as shown below:  &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;#x3C;link rel=&amp;#x22;stylesheet&amp;#x22; href=&amp;#x22;style.css&amp;#x22; type=&amp;#x22;text/css&amp;#x22; media=&amp;#x22;screen&amp;#x22; /&amp;#x3E;&lt;br /&gt;&amp;#x3C;link rel=&amp;#x22;stylesheet&amp;#x22; href=&amp;#x22;style-967.css&amp;#x22; type=&amp;#x22;text/css&amp;#x22; media=&amp;#x22;screen  and (min-width: 967px)&amp;#x22; /&amp;#x3E;&lt;br /&gt;&amp;#x3C;!--[if (lt IE 9)&amp;#x26;(!IEMobile)]&amp;#x3E;&lt;br /&gt;&amp;#x3C;link rel=&amp;#x22;stylesheet&amp;#x22; href=&amp;#x22;ie9.css&amp;#x22; type=&amp;#x22;text/css&amp;#x22; /&amp;#x3E;&lt;br /&gt;&amp;#x3C;![endif]--&amp;#x3E;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;h3&gt;Adding Mobile-first styles &lt;/h3&gt; &lt;p&gt;Next, we can start off with adding shared styles and advanced layout rules as shown below: &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;/* Avoid this style */&lt;br /&gt;.customer-list img {&lt;br /&gt;  width: 30%;&lt;br /&gt;  float: left;&lt;br /&gt;}&lt;br /&gt;@media screen and (max-width: 967px) {&lt;br /&gt;  .customer-list img{&lt;br /&gt;    width: auto;&lt;br /&gt;    float: none;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;The mobile-first approach will now look like this: &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;@media screen and (min-width: 967px) {&lt;br /&gt;.customer-list img {&lt;br /&gt;    width: 30%;&lt;br /&gt;    float: left;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;Next, we&#39;ll be applying media queries as shown in the below code snippet:  &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;/*Display 2 per row for medium displays*/&lt;br /&gt;@media screen and (min-width: 480px) {&lt;br /&gt;  . customer-list li {&lt;br /&gt;    width: 50%;&lt;br /&gt;    float: left;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;/*Display 3 to a row for large displays*/&lt;br /&gt;@media screen and min-width: 768px) {&lt;br /&gt;  . customer-list li {&lt;br /&gt;    width: 33.33%;&lt;br /&gt;    float: left;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;h3&gt;Step 6- Use CSS for reducing HTTP requests&lt;/h3&gt; &lt;p&gt;Have a look at the below CSS which will play a vital role in saving HTTP requests so as to improve the overall performance of your website. For instance, CSS gradients can replace background images for decreasing the count of image requests and rendering a greater control over the original design. &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;/*Using CSS gradients rather than background images*/&lt;br /&gt;header {&lt;br /&gt;  background: #333; &lt;br /&gt;  background: +linear-gradient (top, # 333 0%, #555 100%);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;h3&gt;Step 7- Add Javascript enhancements &lt;/h3&gt; &lt;p&gt;To start off, we&#39;ll be adding functionality to the site&#39;s navigation. In the HTML5 Markup, we&#39;ll using a list #top-menu for toggling the visibility of navigation as well as the search bar on all small screens. Have a look at this: &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;#x3C;ul  id=&amp;#x22;top-menu&amp;#x22; class=&amp;#x22;top-menu&amp;#x22;&amp;#x3E;&lt;br /&gt;  &amp;#x3C;li&amp;#x3E;&amp;#x3C;a href=&amp;#x22;#&amp;#x22;&amp;#x3E;Menu&amp;#x3C;/a&amp;#x3E;&amp;#x3C;/li&amp;#x3E;&lt;br /&gt;  &amp;#x3C;li&amp;#x3E;&amp;#x3C;a href=&amp;#x22;#&amp;#x22;&amp;#x3E;Search&amp;#x3C;/a&amp;#x3E;&amp;#x3C;/li&amp;#x3E;&lt;br /&gt;&amp;#x3C;/ul&amp;#x3E;&lt;br /&gt;&amp;#x3C;nav id=&amp;#x22;main-menu&amp;#x22; class=&amp;#x22; main-menu&amp;#x22;&amp;#x3E;&lt;br /&gt;  &amp;#x3C;ul role=&amp;#x22;main-menu&amp;#x22;&amp;#x3E;&lt;br /&gt;    &amp;#x3C;li&amp;#x3E;&amp;#x3C;a href=&amp;#x22;#&amp;#x22;&amp;#x3E;Home&amp;#x3C;/a&amp;#x3E;&amp;#x3C;/li&amp;#x3E;&lt;br /&gt;    &amp;#x3C;li&amp;#x3E;&amp;#x3C;a href=&amp;#x22;#&amp;#x22;&amp;#x3E;About&amp;#x3C;/a&amp;#x3E;&amp;#x3C;/li&amp;#x3E;&lt;br /&gt;    &amp;#x3C;li&amp;#x3E;&amp;#x3C;a href=&amp;#x22;#&amp;#x22;&amp;#x3E;Services&amp;#x3C;/a&amp;#x3E;&amp;#x3C;/li&amp;#x3E;&lt;br /&gt;  &amp;#x3C;/ul&amp;#x3E;&lt;br /&gt;&amp;#x3C;/nav&amp;#x3E;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt; Additionally, we will include a resize listener which will find whether there&#39;s any possibility of displaying the search bar and navigation. Have a look at this: &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;var swidth, sheight ;&lt;br /&gt;$(window).resize(function(){&lt;br /&gt;  swidth = document.documentElement.clientWidth;&lt;br /&gt;  sheight = document.documentElement.clientHeight;&lt;br /&gt;  setElements();&lt;br /&gt;});&lt;br /&gt;  &lt;br /&gt;//Set elements according to differ screen size&lt;br /&gt;function setElements() {&lt;br /&gt;  device = (swidth &lt; breakpoint) ? true : false;&lt;br /&gt;  if (!device) { &lt;br /&gt;    $(&#39;#top-menu&#39;).show(); &lt;br /&gt;  } else {&lt;br /&gt;      $(&#39;#top-menu&#39;).hide();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Adding functionality to the Image Gallery&lt;/h2&gt; &lt;p&gt;To start off, we&#39;ll be adding functionality to the site&#39;s navigation. In the HTML5 Markup, we&#39;ll using a list #top-menu for toggling the visibility of navigation as well as the search bar on all small screens. Have a look at this: &lt;/p&gt;  &lt;p&gt;Have a look at the below code snippet which will allow us to build an image carousel using the available thumbnail images: &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;function intslide() {&lt;br /&gt;  container.html(&amp;#x27;&amp;#x3C;div id=&amp;#x22;img-slider&amp;#x22;&amp;#x3E;&amp;#x3C;ul /&amp;#x3E;&amp;#x3C;/div&amp;#x3E;&amp;#x27;);&lt;br /&gt;  imgSlider = $(&amp;#x27;#img-slider&amp;#x27;);&lt;br /&gt;  $(&amp;#x27;nav a:first-child&amp;#x27;).addClass(&amp;#x27;active&amp;#x27;);&lt;br /&gt;  &lt;br /&gt;  $(&amp;#x27;nav a&amp;#x27;).each(function() {&lt;br /&gt;    var href = $(this).attr(&amp;#x27;href&amp;#x27;);&lt;br /&gt;    imglist += &amp;#x27;&amp;#x3C;li data-src=&amp;#x22;&amp;#x27;+href+&amp;#x27;&amp;#x22;&amp;#x3E;&amp;#x3C;/li&amp;#x3E;&amp;#x27;;&lt;br /&gt;  });&lt;br /&gt;  &lt;br /&gt;  imgSlider.find(&amp;#x27;ul&amp;#x27;).append(imglist);&lt;br /&gt;      &lt;br /&gt;  $(&amp;#x27;nav a&amp;#x27;).on(&amp;#x27;click&amp;#x27;, function(e) {&lt;br /&gt;    var slidepos = $(this).parent().index();&lt;br /&gt;    e.preventDefault();&lt;br /&gt;    loadImg(slidepos);&lt;br /&gt;    if(swipeEnabled) {&lt;br /&gt;      mySwipe.slide(index, 500);&lt;br /&gt;    }&lt;br /&gt;    updateNav(slidepos);&lt;br /&gt;  });&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Adding functionality for Related Content &lt;/h2&gt; &lt;p&gt;A code snippet will allow us to pull in related content in case any one of the below two conditions are met: &lt;/p&gt; &lt;p&gt; When a mobile user clicks on related t-shirts or the product reviews links &lt;/p&gt; &lt;p&gt;  When screen has enough space for loading the auxiliary content  &lt;/p&gt;  &lt;p&gt;The code snippet that I&#39;m referring to is shown below: &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;function setElements() {&lt;br /&gt;    device = (swidth &amp;#x3C; breakpoint) ? true : false;&lt;br /&gt;  &lt;br /&gt;  if (!device) {&lt;br /&gt;    loadContent(); &lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//Set up content&lt;br /&gt;function loadContent() {&lt;br /&gt;  var $content = $(&amp;#x27;.content&amp;#x27;);&lt;br /&gt;  $content.each(function(index) {&lt;br /&gt;    var $this = $(this);&lt;br /&gt;    var contentLink = $this.find(&amp;#x27;a&amp;#x27;);&lt;br /&gt;    var contentFragment = contentLink.attr(&amp;#x27;href&amp;#x27;);&lt;br /&gt;    var realContent = $this.find(&amp;#x27;.demo&amp;#x27;);&lt;br /&gt;    if (realContent .size()===0 &amp;#x26;&amp;#x26; $this.hasClass(&amp;#x27;loaded&amp;#x27;)===false) {&lt;br /&gt;      getContent(contentFragment,$this);&lt;br /&gt;    }&lt;br /&gt;  });&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function getContent(src,container) {&lt;br /&gt;  container.addClass(&amp;#x27;showcontent&amp;#x27;);&lt;br /&gt;  $(&amp;#x27;&amp;#x3C;div class=&amp;#x201D;demo&amp;#x201D; /&amp;#x3E;&amp;#x27;).load(src +&amp;#x27; #content &amp;#x3E; div&amp;#x27;,function() {&lt;br /&gt;    $(this).appendTo(container);&lt;br /&gt;  });&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;As an approach to keep the web pages lightweight, I recommend using Closure Compiler for chopping off all the unused bits of the jQuery library. Other impressive alternatives include popular micro-frameworks like Zepto.js etc. Finally, don&#39;t forget to pay special attention to ensuring seamless off line access to your website. This will serve as a brilliant surprise to mobile users who aren&#39;t connected to the Internet at times. &lt;/p&gt; &lt;p&gt; We&#39;re done!&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Conclusion: &lt;/h2&gt; &lt;p&gt;With that it&#39;s a wrap on this post which made you familiar with the  basic steps of creating a mobile responsive design. Hope by having a responsive design, it will become convenient for you to adapt to all the future mobile devices and browsers quite conveniently and instantly.  &lt;/p&gt; &lt;div class=&quot;author-bio&quot;&gt;&lt;strong&gt;Author Biography: &lt;/strong&gt; &lt;p&gt;Samuel Dawson is a comprehensive expert in Designs2HTML Ltd involved in the process of to &lt;a href=&quot;http://www.designs2html.com/services/html-to-wordpress&quot;&gt; convert HTML to Wordpress &lt;/a&gt; in a top manner. &lt;/p&gt; &lt;/div&gt;   &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/265426835916925987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2015/06/how-to-guide-to-create-mobile-responsive-design.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/265426835916925987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/265426835916925987'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2015/06/how-to-guide-to-create-mobile-responsive-design.html' title='How to Guide to Create ​Mobile ​Responsive ​Design'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-R0LNhZYo8VI/VYgv0lAHJNI/AAAAAAAAA6k/x2APnk5xLPc/s72-c/html_css_mobile_responsive_design.jpg" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-4877293891606266963</id><published>2015-05-30T02:41:00.000+05:30</published><updated>2015-05-31T03:41:25.564+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dual Boot- Windows With Ubuntu (Linux)"/><category scheme="http://www.blogger.com/atom/ns#" term="LINUX"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 8"/><title type='text'>How to Install Ubuntu 15.04 Along With Windows 8 (Dual Boot)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a target=&quot;blank&quot; href=&quot;http://www.ubuntu.com/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-Cv5KNf4JlHA/VWjZgru6_BI/AAAAAAAAA44/2fxWkjGGYEY/s1600/ubuntu-logo.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;br /&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt; &lt;p&gt; Hey Guys!&lt;/p&gt; &lt;p&gt;   In my last article shown you &lt;a href=&quot;http://www.appsntech.com/2015/05/installing-lamp-stack-in-ubuntu-step-by-step.html&quot;&gt;How to install LAMP stack with easy steps&lt;/a&gt;. Today I would like to write about &lt;a href=&quot;http://www.appsntech.com/2015/05/how-to-install-ubuntu-15-04-along-with-pre-installed-windows-8-64bit.html&quot;&gt;“How to install Ubuntu 15.04 along with Windows 8”&lt;/a&gt;. Recently I was trying to make my system dual boot (Ubuntu 15.04 alongside Windows 8), I have faced couple of issue before I am successful. It is not anymore that easy to install Ubuntu 14.10/ 15.04 alongside Windows 8, earlier we were able to install directly using WUBI installer. I thought I can post steps here, so that it will also help others. If you have Windows 8 pre-installed, you may find difficult to install Ubuntu or any other OS alongside. Microsoft has introduced several new features which made a mess for Linux based operating system. Windows 8 introduced UEFI and secure booting which is preventing any other operating system to install. UEFI is basically similar as BIOS booting.  &lt;/p&gt; &lt;p&gt;You should know that until UEFI mode and secure booting is enabled you cannot directly boot/use Ubuntu. Installing Ubuntu inside Windows using WUBI is not supported in Windows 8. &lt;/p&gt; &lt;p&gt;Here I am posting some steps as I followed towards successful Ubuntu installation alongside Windows 8. &lt;/p&gt;  &lt;blockquote&gt;You might also be interested on reading &lt;a href=&quot;http://www.appsntech.com/2015/05/installing-lamp-stack-in-ubuntu-step-by-step.html&quot;&gt;“Installing LAMP stack on Ubuntu 15.04”&lt;/a&gt; &lt;/blockquote&gt;   &lt;h2 class=&quot;heading-class&quot;&gt; Step 1: Download Ubuntu ISO File&lt;/h2&gt; &lt;p&gt; &lt;a href=&quot;http://www.ubuntu.com/download/desktop&quot;&gt;Download Ubuntu from the website&lt;/a&gt;. Make sure you are downloading 64 bit, 32 bit may not work. In my case I have downloaded 64 bit version. &lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Step 2: Use Universal Installer to Install Ubuntu &lt;/h2&gt; &lt;p&gt;Make sure you have space least 10 GB in separate drive. In my case I have created a drive with 100GB for Ubuntu installation. Burn the Ubuntu into Live CD, DVD or USB in windows. I have used USB drive to boot Ubuntu. &lt;a href=&quot;http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows&quot;&gt;Download USB installer &lt;/a&gt; and install it. Browse downloaded Ubuntu ISO as below screenshot below.&lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-1Pq5sYfMd10/VWjP4HiwgII/AAAAAAAAA38/f2BcLFkIpDQ/s400/Linux-Ubuntu-Universal-USB-Installer.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;p&gt; Choose USB drive and click create to install Ubuntu into your USB drive.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Step 3: Disable Fast Startup (Windows 8 or 8+)&lt;/h2&gt; &lt;p&gt;This technique introduced in Windows 8 to reduce booting time. When we shut down our Windows 8 system, it use hibernate concept to write some system data from RAM to disk. Doing this when next time windows boot it restore the data faster. By this way Windows 8 manage to boot in 10 seconds on SSD. This is creating a problem for Ubuntu or any other operating system installation process. &lt;/p&gt; &lt;p&gt;So it’s important to disable Fast Startup in Windows 8 / 8.1 before installing Ubuntu. &lt;/p&gt; &lt;p&gt;Go to Power option and click on the “Choose What Power buttons do” link from left menu. You will be landed on screenshot below. &lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-l7n-N5nc6XM/VWjQnyxI1tI/AAAAAAAAA4o/34omlOk4bJI/s400/power_option_01.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;br /&gt;  &lt;p&gt;Click on the highlighted link “Change settings that are currently unavailable” to change settings and uncheck “Turn on fast startup” screenshot below.&lt;/p&gt; &lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-Jd6Cy3wPxBc/VWjQoP48zdI/AAAAAAAAA4s/VkXzDK79y9Q/s1600/turn_on_fast_startup_windows8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-Jd6Cy3wPxBc/VWjQoP48zdI/AAAAAAAAA4s/VkXzDK79y9Q/s400/turn_on_fast_startup_windows8.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt; &lt;p&gt;That’s it well good to go for installation process.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Step4: Disable Secure Boot&lt;/h2&gt; &lt;p&gt;Next important thing is to disable secure boot. You can go to boot manager from BIOS (By Pressing ESC/Delete or F1-F12 keys) setup when system starts, In my case I pressed ESC to go to “BIOS settings” from there “boot manager” in that section you also will find “Secure Boot” make sure it is disabled. Windows 8 has UEFI design which is replacement of BIOS.&lt;/p&gt; &lt;p&gt;Save changes and we are ready to install Ubuntu now.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Step 5: How to Install Ubuntu 15.04 &lt;/h2&gt; &lt;h3&gt;Install Using USB drive &lt;/h3&gt; &lt;p&gt;Plug in USB drive into your system and restart. When you restart system you will find screen to “Try Ubuntu” and “Install Ubuntu”. Click on “Try Ubuntu” as this helps to check your hardware compatibility. You will login into Ubuntu and see screen below.&lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-ily8SFeingw/VWjQm7Zx3hI/AAAAAAAAA4Q/4dbABhwMSP8/s1600/Install-Ubuntu-15.04-Alongside-Windows.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-ily8SFeingw/VWjQm7Zx3hI/AAAAAAAAA4Q/4dbABhwMSP8/s400/Install-Ubuntu-15.04-Alongside-Windows.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;br /&gt; &lt;p&gt;Click “Install Ubuntu 15.04” highlighted above. This is lead you to installation process.&lt;/p&gt; &lt;h3&gt;Select Installation Type: &lt;/h3&gt; &lt;p&gt;On the “Installation type” screen you need to select “Something else” as we are going to make “Duel Boot” with Windows, screenshot below.&lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-SVg44_LmN7g/VWjQngusKVI/AAAAAAAAA4k/0jH9g9glINI/s1600/Install-Ubuntu15.04-Alongside-Windows.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-SVg44_LmN7g/VWjQngusKVI/AAAAAAAAA4k/0jH9g9glINI/s400/Install-Ubuntu15.04-Alongside-Windows.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;br /&gt; &lt;p&gt; Select appropriate drive to install. Before pressing next button remember to format drive using “change” button and it should be “Ext4” file system.  Mounting point should be “/” as it will install Ubuntu into that primary drive. Screenshot below.&lt;/p&gt;   &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-WSpY9BZjWBI/VWjQmm4RJsI/AAAAAAAAA4M/cvsMvjQaBC8/s1600/Install-Ubuntu-15.04-Alongside-Windows-Select-Drive-To-Format.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-WSpY9BZjWBI/VWjQmm4RJsI/AAAAAAAAA4M/cvsMvjQaBC8/s400/Install-Ubuntu-15.04-Alongside-Windows-Select-Drive-To-Format.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;br /&gt;&lt;p&gt; That’s all we are done with main job, now you need to do regional, language, account settings etc. for successful installation. Wait till process completes and it will ask to restart, do restart. &lt;/p&gt;  &lt;h3&gt; First Time Ubuntu Booting:&lt;/h3&gt; &lt;p&gt; Remove USB and after system restart, you will see screen below where you need to select Ubuntu to boot.&lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-IAgfTxT5Fww/VWjQmmoAfGI/AAAAAAAAA4g/DxLkKaHzLNQ/s1600/Install-Ubuntu-15.04-Alongside-Windows-First-Time-Ubuntu-Booting.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-IAgfTxT5Fww/VWjQmmoAfGI/AAAAAAAAA4g/DxLkKaHzLNQ/s400/Install-Ubuntu-15.04-Alongside-Windows-First-Time-Ubuntu-Booting.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;br /&gt;  &lt;h3&gt; Boot Repair &lt;/h3&gt; &lt;p&gt; Some time you may not see the above screen and Ubuntu may directly boot. I was facing the same issue. If you don&#39;t see screen prompting you to choose which Operating system to use “Windows 8” or “Ubuntu” you need to execute below command from Ubuntu Terminal to enable GRUB window on startup. &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code &gt;&lt;br /&gt;&lt;br /&gt; sudo apt-get update&lt;br /&gt; sudo apt-get upgrade&lt;br /&gt; sudo add-apt-repository ppa:yannubuntu/boot-repair&lt;br /&gt; sudo apt-get update&lt;br /&gt; sudo apt-get install -y boot-repair &amp;&amp; boot-repair&lt;br /&gt; &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; Above command will repair boot screen issue. Restart the system. You will be able to see screen where you can choose “Windows” or “Ubuntu” to boot.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Step 6: &lt;/h2&gt; &lt;p&gt; That&#39;s all we are done. Enjoy the Linux flavor alongside Windows. &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Conclusion: &lt;/h2&gt; &lt;p&gt;Setting up Ubuntu 15.04 alongside Windows 8 for open source development is little challenging but following above steps you can easily achieve it. I faced couple of issue before successfully installation. Don’t wonder if Ubuntu installed drive is missing in Windows 8 “This PC”, it won’t display since the drive is “ext4” formatted for Ubuntu installation. &lt;/p&gt; &lt;p&gt;I hope this tutorial will help you. If useful please share, leave comments below. I will continue writing and try to bring some tutorial of real time challenges. &lt;/p&gt; &lt;p&gt; Stay Tuned! Have a nice day. &lt;/p&gt; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/4877293891606266963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2015/05/how-to-install-ubuntu-15-04-along-with-pre-installed-windows-8-64bit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/4877293891606266963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/4877293891606266963'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2015/05/how-to-install-ubuntu-15-04-along-with-pre-installed-windows-8-64bit.html' title='How to Install Ubuntu 15.04 Along With Windows 8 (Dual Boot)'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-Cv5KNf4JlHA/VWjZgru6_BI/AAAAAAAAA44/2fxWkjGGYEY/s72-c/ubuntu-logo.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-2902614999171821741</id><published>2015-05-13T01:16:00.001+05:30</published><updated>2015-05-30T02:44:58.745+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="LAMP Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Lamp stack installation"/><category scheme="http://www.blogger.com/atom/ns#" term="LINUX"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Installing LAMP Stack In Ubuntu Step By Step</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-ohmRr8GbF64/VVJYPErkx4I/AAAAAAAAAzs/oJNuBoIBMJs/s1600/installing-lamp-stack-on-ubuntu.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-ohmRr8GbF64/VVJYPErkx4I/AAAAAAAAAzs/oJNuBoIBMJs/s1600/installing-lamp-stack-on-ubuntu.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt; &lt;p&gt; Hey Guys!&lt;/p&gt; &lt;p&gt; Last article was &lt;a href=&quot;http://www.appsntech.com/2015/04/5-best-things-you-should-know-about-php.html&quot;&gt; “5 Best things you should know about PHP7”&lt;/a&gt;. If you are planning for PHP based development I would definitely recommend you to go for Linux based environment. I personally like the Ubuntu flavor. It is really developer friendly and power of terminal enable you the development much enjoyable. LAMP stack is combination of all open source software which helps to make dynamic web applications. This article can be considered as beginner article with LAMP stack.&lt;/p&gt; &lt;p&gt; The word &lt;b&gt;LAMP &lt;/b&gt;is an acronym of &lt;b&gt;L&lt;/b&gt;inux, &lt;b&gt;A&lt;/b&gt;pache, &lt;b&gt;M&lt;/b&gt;ysql, &lt;b&gt;P&lt;/b&gt;HP / &lt;b&gt;P&lt;/b&gt;ython / &lt;b&gt;P&lt;/b&gt;erl, combination of all first character. You might have used WAMP, XAMPP and most probably if you are looking for same bundle software in LINUX, than you can make use of tasksel to enable all features together. There are many tutorials around guide you to install LAMP stack but if you are not willing to run many commands and installing separately software than solution here. &lt;/p&gt; &lt;p&gt; This step by step process assumes that you have already Ubuntu installed in your machine. &lt;/p&gt;  &lt;blockquote&gt;You might also be interested on reading &lt;a href=&quot;http://www.appsntech.com/2015/05/how-to-install-ubuntu-15-04-along-with-pre-installed-windows-8-64bit.html&quot;&gt;“How to Install Ubuntu 15.04 Along With Windows 8 (Dual Boot)”&lt;/a&gt; &lt;/blockquote&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;3 Easiest Ways to install LAMP:&lt;/h2&gt; &lt;p&gt;There are there different ways you can easily install LAMP server on Ubuntu as below.&lt;/p&gt; &lt;p&gt;• Using Tasksel GUI&lt;/p&gt;&lt;p&gt;• Using Single Line Tasksel Command  &lt;/p&gt;&lt;p&gt;• &lt;a href=&quot;https://www.apachefriends.org/xampp-files/5.6.8/xampp-linux-x64-5.6.8-0-installer.run&quot;&gt;Using XAMPP bundle software&lt;/a&gt;  &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Step by Step Procedure:&lt;/h2&gt; &lt;h4&gt; Step1: Update Ubuntu: &lt;/h4&gt; &lt;p&gt; Once you have Ubuntu installed, make sure everything up to date. You can update / upgrade Ubuntu by issuing below commands. &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;sudo apt-get update&lt;br /&gt;&lt;br /&gt;sudo apt-get upgrade&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;h4&gt; Step2: Opening Tasksel Interface: &lt;/h4&gt; &lt;p&gt; Our next step is to install tasksel which enable you to install LAMP stack bundle software. Generally many people do install all software separately. In this article I will show you how you can save time simply using apachefriends project or simple command to wrap up all together. Open your terminal and type below command to open tasksel.&lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;sudo tasksel&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;h4&gt; Step3: Select LAMP Server: &lt;/h4&gt; &lt;p&gt; Once you enter the above command you can see the window as below.&lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-qxAEUuFbLNU/VVJR8Yqro5I/AAAAAAAAAzY/26cRlz0g95Q/s1600/ubuntu_tasksel_1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-qxAEUuFbLNU/VVJR8Yqro5I/AAAAAAAAAzY/26cRlz0g95Q/s1600/ubuntu_tasksel_1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;   &lt;/p&gt;Select LAMP server by pressing space and tab to select “ok” to start installation process.&lt;/p&gt;  &lt;h4&gt;Step4: Setting Mysql Password:  &lt;/h4&gt; &lt;p&gt; When the process will prompt you to set new password for mysql server, type and confirm the password again and hit ok. &lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-Nk6OIH-uxGg/VVJR8XqkxQI/AAAAAAAAAzU/gsHhGz-0nnY/s1600/ubuntu_tasksel_2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-Nk6OIH-uxGg/VVJR8XqkxQI/AAAAAAAAAzU/gsHhGz-0nnY/s1600/ubuntu_tasksel_2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;p&gt; The installation process will continue as below screen. &lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-7nQXZDp8f-4/VVJR8u4J6mI/AAAAAAAAAzc/WrzR0FlnSQ8/s1600/ubuntu_tasksel_lamp_installation.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-7nQXZDp8f-4/VVJR8u4J6mI/AAAAAAAAAzc/WrzR0FlnSQ8/s400/ubuntu_tasksel_lamp_installation.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;h2 class=&quot;heading-class&quot;&gt;• Using Single Line Tasksel Command: &lt;/h2&gt; &lt;p&gt; You can also install the same using single line of command by issuing below command from your terminal window.&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;sudo tasksel install lamp-server&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; To make sure PHP running fine we will create a file called &lt;b&gt;info.php&lt;/b&gt; into the &lt;b&gt;/var/www/&lt;/b&gt; directory. Paste below code into it. &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;  phpinfo();&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Now go to browser and enter &lt;b&gt;http://localhost/info.php&lt;/b&gt; &lt;/p&gt;  &lt;p&gt; That&#39;s all. You are done. &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Conclusion &lt;/h2&gt;  &lt;p&gt; Hope this article helpful to guide you step by step LAMP stack installation on Ubuntu. Feel free to share or like us on facebook/ google plus. Keep visiting. &lt;/p&gt; &lt;p&gt;Have a nice day.&lt;/p&gt;    &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/2902614999171821741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2015/05/installing-lamp-stack-in-ubuntu-step-by-step.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/2902614999171821741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/2902614999171821741'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2015/05/installing-lamp-stack-in-ubuntu-step-by-step.html' title='Installing LAMP Stack In Ubuntu Step By Step'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-ohmRr8GbF64/VVJYPErkx4I/AAAAAAAAAzs/oJNuBoIBMJs/s72-c/installing-lamp-stack-on-ubuntu.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-7937453971639280722</id><published>2015-04-27T00:37:00.000+05:30</published><updated>2015-06-26T00:13:40.498+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="5 Best Things You Should Know About PHP7"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP 7 features and release date"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP7"/><category scheme="http://www.blogger.com/atom/ns#" term="Php7 Revolution"/><title type='text'>5 Best Things You Should Know About PHP 7</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-wXJPzNs6WK4/VT0uZBueGQI/AAAAAAAAAx4/6kJtAWTN93Q/s1600/PHP_7_.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-wXJPzNs6WK4/VT0uZBueGQI/AAAAAAAAAx4/6kJtAWTN93Q/s1600/PHP_7_.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;br /&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt; &lt;p&gt; Hey Guys!&lt;/p&gt; &lt;p&gt;Last article was &lt;a href=&quot;http://www.appsntech.com/2015/04/building-simple-product-management-app.html&quot;&gt; “Building A Simple Product Management App Using Angular JS + Cygnite PHP Framework + Bootstrap - Part1”.&lt;/a&gt;. Tutorial part2 will be posted coming days. I have drafted this article couple of days back and finally got some time post here. You might have heard about the new major version of PHP is under active development since a year and finally scheduled to release this year. The &lt;a href=&quot;https://wiki.php.net/rfc/php7timeline&quot;&gt; PHP 7 timeline &lt;/a&gt; was approved by core members and aims to release PHP7 in OCT 2015. Even though little delay but we are lucky to see PHP7 end of this year. With the RFC for PHP7 timeline passed (32 to 2). We have now entered into new generation and PHPng is almost ready to speed you up. &lt;/p&gt; &lt;p&gt; The features of PHP7 are fairly enough for advance web application development and making use of latest resources to boost you development.  There are lot of talks about PHP5.7, PHP6 or PHP 7. The main reason behind the PHP7 is PHP6 has never reached to stable version, also there are many resources available about PHP6. So PHP community has chosen PHP5.6 to directly PHP7. &lt;/p&gt; &lt;p&gt; Let us get into some details.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; 1# Performance:&lt;/h2&gt; &lt;p&gt;You might have heard about &lt;a href=&quot;http://hhvm.com/&quot;&gt;Facebook HVVM&lt;/a&gt; out there, to provide you maximum performance for PHP based application. So &lt;a href=&quot; https://wiki.php.net/phpng&quot;&gt;PHPNG (PHP-Next-Gen)&lt;/a&gt; started with the idea to provide maximum performance as Facebook HVVM provides. The performance improvement source was led by ZEND to speed up PHP based applications. As per Zend performance improvement is huge! You can find some &lt;a href=&quot;http://goo.gl/giisgc&quot;&gt; benchmark against HVVM here&lt;/a&gt;. Without changing single piece of code, just upgrading to PHP7 gives you enormous performance. Deprecating many redundant features also part of performance improvement of PHP7.&lt;/p&gt;   &lt;h2 class=&quot;heading-class&quot;&gt; 2# Scalar Type Hints &amp; Return Types:&lt;/h2&gt; &lt;p&gt;While many developers would like able to declare return type for the function or method. By default PHP7 will allow developers to declare what kind of return type function is expected to return a value. It is almost similar as Type hinting parameters as below. &lt;/p&gt; &lt;p&gt;Example:&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;  public function isValidUser(int $id) : bool &lt;br /&gt;  {&lt;br /&gt;     return isset($this-&gt;users[$id]) ? true : false;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; Above example is similar as &lt;a href=&quot;http://hacklang.org/&quot;&gt; Facebook HACK&lt;/a&gt; syntax. In this example &lt;b&gt;bool&lt;/b&gt; indicates the function will return only boolean value. You can also have look at many &lt;a href=&quot;https://wiki.php.net/rfc/return_types#examples&quot;&gt;example in RFC here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;This allows developers to set expecting strings, int, float or bool to be passed or returned.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;3# Spaceship Operator&lt;/h2&gt; &lt;p&gt; PHP7 will introduce a new operator called spaceship operator (&lt;= &gt;) otherwise called combined comparison operator. It can be used mostly in sorting and combined comparison. It works like strcmp() or version_compare().&lt;/p&gt; &lt;p&gt; As per the PHP RFC common uses of sorting as below.&lt;/p&gt; &lt;p&gt; Example:&lt;/p&gt; &lt;p&gt;Before PHP7: &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;  function order_func($a, $b) &lt;br /&gt;  {&lt;br /&gt;    return ($a &lt; $b) ? -1 : (($a &gt; $b) ? 1 : 0);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;After PHP7: &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;  function order_func($a, $b) &lt;br /&gt;  {&lt;br /&gt;    return $a &lt;=&gt; $b;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; It is a beautiful addition to the PHP version. You can find more &lt;a href=&quot;https://wiki.php.net/rfc/combined-comparison-operator&quot;&gt;example here&lt;/a&gt;.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;4# Additional Features&lt;/h2&gt; &lt;p&gt;Apart from above changes there are few new features added into the PHP7 core. I am listing few major changes below.&lt;/p&gt;  &lt;ul&gt;      &lt;li&gt;          &lt;p&gt; • &lt;a href=&quot;https://wiki.php.net/rfc/abstract_syntax_tree&quot;&gt;Abstract Syntax Tree:&lt;/a&gt; – Another big change on the core. But most likely to be visible to developers. It makes parsing php code easier, less error, and way to build better things in future. &lt;/p&gt;    &lt;/li&gt;     &lt;li&gt;          &lt;p&gt; • &lt;a href=&quot;https://wiki.php.net/rfc/closure_apply&quot;&gt;Closure::call() :&lt;/a&gt; – This is the new method added into core. It allows variable binding at call time rather pre-binding. &lt;/p&gt;    &lt;/li&gt;     &lt;li&gt;          &lt;p&gt; • &lt;a href=&quot;https://wiki.php.net/rfc/isset_ternary&quot;&gt;Null Coalesce Operator :&lt;/a&gt; – The coalesce operator or ?? added to the core, which returns the first operand is exists or null. &lt;/p&gt; &lt;p&gt; Example:  &lt;/p&gt; &lt;p&gt; Before PHP7: &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;    $id = isset($_GET[‘id’]) ? $_GET[‘id’] : null;  &lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt; In PHP7: &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;    $id = $_GET[‘id’] ?? null;  //equivalent of writing old above syntax &lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;              &lt;/li&gt;      &lt;li&gt;          &lt;p&gt; • &lt;a href=&quot;https://wiki.php.net/rfc/uniform_variable_syntax&quot;&gt;Uniform Variable Syntax :&lt;/a&gt; – The main deference of existing syntax and new syntax is to keep consistence and complete variable syntax. Allows advance expressions. &lt;/p&gt; &lt;p&gt;Example: &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;    $$foo[&#39;bar&#39;][&#39;baz&#39;]   interpreted as   ($$foo)[&#39;bar&#39;][&#39;baz&#39;]&lt;br /&gt;    $foo-&gt;$bar[&#39;baz&#39;]()   interpreted as   ($foo-&gt;$bar)[&#39;baz&#39;]()&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;    &lt;/li&gt;    &lt;li&gt;          &lt;p&gt; • &lt;a href=&quot;https://wiki.php.net/rfc/unicode_escape&quot;&gt;Unicode Codepoint Escape Syntax:&lt;/a&gt; – PHP7 introduced syntax to escape unicode codepoint as below. &lt;/p&gt; &lt;p&gt;Example: &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;    echo &quot;\u{202E}Reversed text&quot;; // outputs ‮Reversed text&lt;br /&gt;    echo &quot;\u{1F602}&quot;; // outputs 😂&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;    &lt;/li&gt; &lt;/ul&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; 5# Cleanups: &lt;/h2&gt; &lt;p&gt; Developers can stop recognizing method name as class name to be a &lt;a href=&quot;https://wiki.php.net/rfc/remove_php4_constructors&quot;&gt;constructor as per PHP4 &lt;/a&gt;. It has been controversial early to remove but later has been removed completely as currently we no longer required to warn PHP developer how PHP4 works. This removal added as simplicity. &lt;/p&gt; &lt;p&gt;mysql_* functions are completely removed as extension removed by default. &lt;/p&gt; &lt;p&gt;Multiple default clause support has been removed from the switch case. &lt;/p&gt;  &lt;p&gt;Support of ASP tags (&lt;%) and script tags (&amp;#x3C;script language=&amp;#x22;php&amp;#x22;&amp;#x3E; &amp;#x3C;/script&amp;#x3E;) has been removed meaning that you can use those tags to enter php mode. &lt;/p&gt;  &lt;p&gt;You can find more, list of deprecated or removed functionalities here, &lt;a href=&quot; https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7&quot;&gt; Removed deprecated functionalities in PHP7 &lt;/a&gt;. &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Conclusion:&lt;/h2&gt; &lt;p&gt;Personally I believe recent changes of PHP versions, makes PHP as much more matured language. But it is good message to all PHP developers for building awesome enterprise level applications using latest PHP version. &lt;/p&gt; &lt;p&gt;&lt;b&gt;What do you feel about PHP7 / New RFCs ? Do you think PHP development taking a turn towards better enterprise development?&lt;/b&gt; Let me know your thought by passing your valuable feedback or commenting below.&lt;/p&gt;  &lt;p&gt;Feel free to share or like us. Keep visiting. Have a nice day.&lt;/p&gt; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/7937453971639280722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2015/04/5-best-things-you-should-know-about-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/7937453971639280722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/7937453971639280722'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2015/04/5-best-things-you-should-know-about-php.html' title='5 Best Things You Should Know About PHP 7'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-wXJPzNs6WK4/VT0uZBueGQI/AAAAAAAAAx4/6kJtAWTN93Q/s72-c/PHP_7_.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-8387981708181031976</id><published>2015-04-03T18:57:00.001+05:30</published><updated>2016-12-31T12:00:14.785+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular JS"/><category scheme="http://www.blogger.com/atom/ns#" term="Angular Routing"/><category scheme="http://www.blogger.com/atom/ns#" term="bootstrap"/><category scheme="http://www.blogger.com/atom/ns#" term="CRUD"/><category scheme="http://www.blogger.com/atom/ns#" term="Cygnite PHP Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Building A Simple Product Management App Using Angular JS + Cygnite PHP + Bootstrap</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.appsntech.com/2015/04/building-simple-product-management-app.html&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot; title=&quot;Building A Simple Product Management App Using Angular JS + Cygnite PHP + Bootstrap&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-RjVlWxi4HKI/U1zthxx04oI/AAAAAAAAAgE/ByjnMtaE9ZY/s400/Cygnite_With_Angular_JS.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt; &lt;p&gt; My previous article was &lt;a href=&quot;http://www.appsntech.com/2015/02/how-to-create-custom-module-in-magento.html&quot;&gt; “How to install custom theme in Magento”&lt;/a&gt;.  Recently AngularJS has occupied the market space. It became one of the most essential frontend framework. Building application using core javascript is really very painful. The code looks such messy as you need to write bunch of code or building everything from scratch. Modern application needs compact solution with the flavour of objects, this is where Angular JS enters into the web. It does fulfill all your basic needs. RESTful routing, Two-way binding, Model, dependency injection service make you to love developing web application. But in order to build full-featured web application you also need a powerful backend framework to do some of the job for you with an ease. &lt;/p&gt; &lt;p&gt; In this tutorial I will show you how you can make use of Angular routing to build single page application without refreshing page. I will make use of Cygnite PHP Framework, as it is easy, powerful and does awesome job handling your backend. &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Getting Started: &lt;/h2&gt; &lt;p&gt; Very first thing we need to do is install Cygnite. I will not explain installation briefly, as it is described well in Cygnite&#39;s&lt;a href=&quot;http://www.cygniteframework.com/2015/02/installation.html&quot;&gt;beautiful documentation&lt;/a&gt;. &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Installation: &lt;/h2&gt; &lt;p&gt; After &lt;a href=&quot;https://github.com/sanjoydesk/login-authentication-app-with-angularjs&quot;&gt; downloading cygnite package from github repo&lt;/a&gt;, unzip and rename the folder to &quot;cygnite&quot;. Now open your browser and &lt;a href=&quot;http://localhost/cygnite/&quot;&gt;navigate to http://localhost/cygnite/&lt;/a&gt;.  You will see Cygnite’s welcome page as below. &lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-scWWOhjHV9Y/VRrxNxayBSI/AAAAAAAAAxE/poCYu1BohHU/s1600/cygnite_welcome_page.png&quot; title=&quot;Cygnite Welcome Page&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-scWWOhjHV9Y/VRrxNxayBSI/AAAAAAAAAxE/poCYu1BohHU/s400/cygnite_welcome_page.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;&lt;a href=&quot;http://demo-aapsntech.16mb.com/cygnite-framework/index.php/angular/#/login&quot; class=&quot;btn btn-primary btn-&quot; target=&quot;_blank&quot; style=&quot;margin:20px 10px;color:#fff;&quot; rel=&quot;nofollow&quot;&gt;&lt;i class=&quot;glyphicon glyphicon-eye-open&quot;&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp;Live Demo&lt;/a&gt;   &lt;a href=&quot;https://github.com/sanjoydesk/login-authentication-app-with-angularjs&quot; class=&quot;pull-left btn btn-info btn-&quot; target=&quot;_blank&quot; style=&quot;margin:20px 10px;color:#fff;&quot; rel=&quot;nofollow&quot;&gt;&lt;i class=&quot;glyphicon glyphicon-download&quot;&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp;Download&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; After downloading the skeleton package from GITHUB, we need to install Cygnite core packages in order to make the application work. Please ensure you have composer installed already into your machine, and issue below command from your project root directory to install framework into your system.&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;  composer install&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;   &lt;br /&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Database Configurations: &lt;/h2&gt; &lt;p&gt; Before getting started with migrations you need to configure database connections into &lt;b&gt;/apps/configs/database.php file&lt;/b&gt;. If you open the file you can see sample database connection provided. You may change accordingly. You can see we are making use of &lt;b&gt;“cygnite”&lt;/b&gt; database, you may create same database, follow the steps or use different database and make changes accordingly.&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;  &#39;db&#39; =&gt; array(&lt;br /&gt;            &#39;driver&#39; =&gt; &#39;mysql&#39;,&lt;br /&gt;            &#39;host&#39; =&gt; &#39;localhost&#39;,&lt;br /&gt;            &#39;port&#39; =&gt; &#39;&#39;,&lt;br /&gt;            &#39;database&#39; =&gt; &#39;cygnite&#39;,&lt;br /&gt;            &#39;username&#39; =&gt; &#39;root&#39;,&lt;br /&gt;            &#39;password&#39; =&gt; &#39;&#39;,&lt;br /&gt;            &#39;charset&#39; =&gt; &#39;utf8&#39;&lt;br /&gt;         )&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; Once you configure database connection, you are ready for running migrations. &lt;/p&gt;  &lt;p&gt; &lt;blockquote&gt; &lt;span style=&quot;color:#888;&quot;&gt;You may be also interested to read &lt;/span&gt; &lt;a href=&quot;http://www.appsntech.com/2014/11/facebook-style-autocomplete-using-angular-js-php.html&quot;&gt;Facebook Style Autocomplete Using AngularJS + Cygnite PHP Framework + MySQL &lt;/a&gt;&lt;/blockquote&gt; &lt;/p&gt;   &lt;h2 class=&quot;heading-class&quot;&gt; Migrations &amp; Seeding: &lt;/h2&gt;  &lt;p&gt;If you open &lt;b&gt;/apps/database/migrations/&lt;/b&gt; folder you can see some files with number prefixed (&lt;b&gt;xxxx_product.php&lt;/b&gt; etc.). These are the migration files we will run. Open your terminal, if you are using windows obviously command prompt and execute below command from your installation directory to create schema file and run migrations.&lt;/p&gt; &lt;p&gt; Before running migration please make sure you are running &lt;b&gt;migrations.sql&lt;/b&gt; query into your database which is available into &lt;b&gt;apps/database/migrations.sql&lt;/b&gt;. &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt; cd console/bin &lt;br /&gt;&lt;br /&gt; php cygnite migrate&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt; Before running above command make sure you are changing the database connection name into the migration file (&lt;b&gt;apps/database/migrations/xxxx_user.php&lt;/b&gt;). Then run the command you will see new table “user” created into your database with sample data. To check you may manually open phpmyadmin and find table over there. This is the table by which we will authenticate users. &lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; RESTful Routing: &lt;/h2&gt; &lt;p&gt; We will display some basic layout page where angular templates will render. Want to display multiple theme based on the page ? Cygnite layout just made it simple. You can see if you just enter the base url it will display different page and different page when uri match with routing uri &quot;angular&quot;. Simply define layout in your controller and it will make use of the theme you wish. You can controllers using routing and also directly via uri. In the &lt;b&gt;apps/&lt;/b&gt; directory you will also find &lt;b&gt;&quot;routes.php&quot;&lt;/b&gt; file where we can define routing for our application. Open the file and add below routing to the file in order to display our login page by default. &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt; $app-&gt;router-&gt;get(&#39;/&#39;, function ($router)&lt;br /&gt; {&lt;br /&gt;   echo Widget::make(&#39;home:index&#39;); // apps/views/home/index.view.php&lt;br /&gt; });&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; It will display the basic page from where you will find login link, click on that and login page will appear. You can login into the application using your credentials. &lt;/p&gt;  &lt;p&gt;Default credentials are below:&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;Email: admin@cygnite.com&lt;br /&gt;&lt;br /&gt;Password: admin@123&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; You can make use of Migrations files to seed some sample users to authenticate.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Controllers: &lt;/h2&gt; &lt;p&gt; You will find AuthController available into your apps/controllers/ directory. This controller used to authenticate users. You can find checkAction and logoutAction. You don&#39;t need write authentication code as AuthController shipped with Cygnite skeleton project. Auth Controller looks like below.&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;namespace Apps\Controllers;&lt;br /&gt;&lt;br /&gt;use Cygnite\Common\Encrypt;&lt;br /&gt;use Cygnite\Common\Input\Input;&lt;br /&gt;use Cygnite\Foundation\Application as App;&lt;br /&gt;use Cygnite\Mvc\Controller\AbstractBaseController;&lt;br /&gt;use Application\Components\Authentication\Auth;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* This file is generated by Cygnite CLI&lt;br /&gt;* You may alter code to fit your needs&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;class AuthController extends AbstractBaseController&lt;br /&gt;{&lt;br /&gt;    //protected $layout = &#39;layout.base&#39;;&lt;br /&gt;&lt;br /&gt;    protected $templateEngine = false;&lt;br /&gt;&lt;br /&gt;    private $auth;&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;    * Your constructor.&lt;br /&gt;    * @access public&lt;br /&gt;    *&lt;br /&gt;    */&lt;br /&gt;    public function __construct()&lt;br /&gt;    {&lt;br /&gt;        parent::__construct();&lt;br /&gt;        $this-&gt;auth = Auth::model(&#39;\Apps\Models\User&#39;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   /**&lt;br /&gt;    * Default Action&lt;br /&gt;    */&lt;br /&gt;    public function indexAction()&lt;br /&gt;    {&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;    * Authenticate user and login into the system&lt;br /&gt;    *&lt;br /&gt;    */&lt;br /&gt;    public function checkAction()&lt;br /&gt;    {&lt;br /&gt;        $input = Input::make();&lt;br /&gt;        $post = $input-&gt;json();&lt;br /&gt;&lt;br /&gt;        $crypt = new Encrypt();&lt;br /&gt;        $credentials = array(&lt;br /&gt;            &#39;email&#39; =&gt; $post-&gt;email,&lt;br /&gt;            &#39;password&#39; =&gt; $crypt-&gt;encode($post-&gt;password)&lt;br /&gt;        );&lt;br /&gt;&lt;br /&gt;        if ($this-&gt;auth-&gt;verify($credentials)) {&lt;br /&gt;            $this-&gt;auth-&gt;login();&lt;br /&gt;            $userInfo = $this-&gt;auth-&gt;userInfo();&lt;br /&gt;            echo json_encode(array(&#39;success&#39; =&gt; true, &#39;flash&#39; =&gt; &#39;Logged In Successfully!!&#39;, &#39;name&#39; =&gt; $userInfo[&#39;username&#39;]));&lt;br /&gt;        } else {&lt;br /&gt;            echo json_encode(array(&#39;success&#39; =&gt; false, &#39;flash&#39; =&gt; &#39;Invalid username or password&#39;, &#39;name&#39; =&gt; &#39;&#39;));&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;    * Display specific information into the form to edit.&lt;br /&gt;    *&lt;br /&gt;    */&lt;br /&gt;    public function logoutAction()&lt;br /&gt;    {&lt;br /&gt;        $this-&gt;auth-&gt;logout(false);&lt;br /&gt;&lt;br /&gt;        echo json_encode(array(&#39;success&#39; =&gt; true, &#39;flash&#39; =&gt; &#39;Successfully Logged Out!&#39;));&lt;br /&gt;    }&lt;br /&gt;}//End of your LoginController&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Models:  &lt;/h2&gt; &lt;p&gt; Cygnite model classes are interacting with database. You can find the model user available in apps/models/User.php so you may not need to create it. You can also create a new model manually into &lt;b&gt;apps/models/User.php&lt;/b&gt; and change database name.&lt;/p&gt; &lt;p&gt; Feeling lazy? Yes. No worry! Cygnite makes your job simple, you can simply issue below command to generate model for you. &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;php cygnite model:create user cygnite&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; Above command &lt;b&gt;“cygnite”&lt;/b&gt; represent your database name and &lt;b&gt;“user”&lt;/b&gt; your model name.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Index View Page:  &lt;/h2&gt; &lt;p&gt;You can simply open &lt;b&gt;/apps/views/user/index.view.php&lt;/b&gt; file, which is the landing page of our application. This single view page render all angular templates into it. In this page you will also find &lt;b&gt;ng-app=&quot;MyTutorialApp&quot;&lt;/b&gt; in the &lt;html&gt; tag, &lt;b&gt;“ng-init”&lt;/b&gt; and &lt;b&gt;“ng-view”&lt;/b&gt; directives of angular js framework. You may get more informations about those in &lt;a href=&quot;https://angularjs.org&quot;&gt; angular documentation&lt;/a&gt;.  &lt;/p&gt; &lt;p&gt; In your view page you must have below tag with angular module name, baseurl, and ng-view. Apart from that you also required to include angular.min.js script, app.js, and bootstrap css etc. You can find the view in &lt;b&gt;apps/views/home/index.view.php&lt;/b&gt; file. &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;html&quot;&gt;&lt;br /&gt;&lt;br /&gt;  &amp;#x3C;html lang=&amp;#x22;en&amp;#x22; ng-app=&amp;#x22;MyTutorialApp&amp;#x22;&amp;#x3E;&lt;br /&gt; &amp;#x3C;head&amp;#x3E;&lt;br /&gt;&amp;#x3C;link rel=&amp;#x22;stylesheet&amp;#x22; type=&amp;#x22;text/css&amp;#x22; title= &amp;#x27;&amp;#x27; href=&amp;#x22;/mycygnite/assets/css/bootstrap/css/bootstrap.min.css&amp;#x22; &amp;#x3E;&lt;br /&gt;    &amp;#x3C;link rel=&amp;#x22;stylesheet&amp;#x22; type=&amp;#x22;text/css&amp;#x22; title= &amp;#x27;&amp;#x27; href=&amp;#x22;/mycygnite/assets/css/bootstrap/css/bootstrap-theme.min.css&amp;#x22; &amp;#x3E;&lt;br /&gt; &amp;#x3C;/head&amp;#x3E;&lt;br /&gt;&lt;br /&gt; ..............&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &amp;#x3C;base href=&amp;#x22;{{baseUrl}}&amp;#x22; ng-init=&amp;#x22;baseUrl = &amp;#x27;&amp;#x3C;?php echo Url::getBase(); ?&amp;#x3E;&amp;#x27;&amp;#x22; /&amp;#x3E;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &amp;#x3C;div id=&amp;#x22;view&amp;#x22; ng-view&amp;#x3E;&amp;#x3C;/div&amp;#x3E;&lt;br /&gt;&lt;br /&gt; &amp;#x3C;!-- load angular and angular route via CDN --&amp;#x3E;&lt;br /&gt; &amp;#x3C;script src=&amp;#x22;https://ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.min.js&amp;#x22;&amp;#x3E;&amp;#x3C;/script&amp;#x3E;&lt;br /&gt; &amp;#x3C;script src=&amp;#x22;//ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular-route.js&amp;#x22;&amp;#x3E;&amp;#x3C;/script&amp;#x3E;&lt;br /&gt; &amp;#x3C;script type=&amp;#x22;text/javascript&amp;#x22; src=&amp;#x22;/mycygnite/assets/js/angular/app.js&amp;#x22;&amp;#x3E;&amp;#x3C;/script&amp;#x3E;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;Our all angular templates will render into&lt;b&gt; “ng-view”&lt;/b&gt; directive.&lt;/p&gt;   &lt;h2 class=&quot;heading-class&quot;&gt; Angular Templates:&lt;/h2&gt; &lt;p&gt;If you open &lt;b&gt;assets/&lt;/b&gt; folder you will find another folder called &lt;b&gt;templates/&lt;/b&gt; where all your templates located. Each template called via angular routing. I will not display template html code here as you can find easily there.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Angular Module Script: &lt;/h2&gt; &lt;p&gt;If you open &lt;b&gt;/assets/js/angular/&lt;/b&gt; you will find &lt;b&gt;app.js&lt;/b&gt; which is has all necessary code for angular to work with Cygnite to authenticate users. For this tutorial we are making use of Angular routing, Factory Service, Controllers etc. So end of this tutorial you will be able to understand how Angular &lt;b&gt;routing, Authentication Service, Controllers&lt;/b&gt; works. &lt;/p&gt;  &lt;p&gt; Below code to define and getting the app object. We are also using ngRoute as dependency below.&lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;  var app = angular.module(&#39;MyTutorialApp&#39;,  [&#39;ngRoute&#39;]);&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt; and in the next line we are configuring routes to repond to our url.  &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt; app.config(function($routeProvider) {&lt;br /&gt;    //………………&lt;br /&gt; });&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; And next &lt;b&gt;AuthenticationService &lt;/b&gt;factory to authenticate user against database. &lt;/p&gt;    &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;js&quot;&gt;&lt;br /&gt;&lt;br /&gt; app.factory(&quot;AuthenticationService&quot;, function($http, UrlService) {&lt;br /&gt;     //…………………&lt;br /&gt;&lt;br /&gt; });&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt; This factory helps us to authenticate and login user, checking if user logged in, logout and get username from session. &lt;/p&gt; &lt;p&gt;Apart from that we have LoginController, LogoutController, HomeController to perform needed openration. &lt;/p&gt;  &lt;p&gt; Below entire code for our angular authentication app.&lt;/p&gt;  &lt;pre style=&quot;min-height:550px !important;&quot;&gt;&lt;br /&gt;&lt;code class=&quot;js&quot;&gt;&lt;br /&gt;var app = angular.module(&#39;MyTutorialApp&#39;,  [&#39;ngRoute&#39;]);&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * Configure routing for application&lt;br /&gt; */&lt;br /&gt;app.config(function($routeProvider) {&lt;br /&gt;&lt;br /&gt;    $routeProvider&lt;br /&gt;        // route for the login page&lt;br /&gt;        .when(&#39;/login&#39;, {&lt;br /&gt;            templateUrl : &#39;assets/templates/login.html&#39;,&lt;br /&gt;            controller  : &#39;LoginController&#39;&lt;br /&gt;        })&lt;br /&gt;&lt;br /&gt;        // route for the home page&lt;br /&gt;        .when(&#39;/home&#39;, {&lt;br /&gt;            templateUrl : &#39;assets/templates/home.phtml&#39;,&lt;br /&gt;            controller  : &#39;HomeController&#39;&lt;br /&gt;        })&lt;br /&gt;&lt;br /&gt;        // route for the contact page&lt;br /&gt;        .when(&#39;/logout&#39;, {&lt;br /&gt;            templateUrl : &#39;assets/templates/logout.html&#39;,&lt;br /&gt;            controller  : &#39;LogoutController&#39;&lt;br /&gt;        });&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * Url Service manager&lt;br /&gt; */&lt;br /&gt;app.factory(&quot;UrlService&quot;, function($rootScope) {&lt;br /&gt;    return {&lt;br /&gt;        set: function(url) {&lt;br /&gt;            $rootScope.baseUrl = url;&lt;br /&gt;        },&lt;br /&gt;        get: function() {&lt;br /&gt;            return $rootScope.baseUrl;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * Authentication Service handler&lt;br /&gt; */&lt;br /&gt;app.factory(&quot;AuthenticationService&quot;, function($http, UrlService) {&lt;br /&gt;&lt;br /&gt;    var cacheSession = function () {&lt;br /&gt;        sessionStorage.setItem(&#39;authenticated&#39;, true);&lt;br /&gt;    };&lt;br /&gt;&lt;br /&gt;    return {&lt;br /&gt;        login: function(credentials, url) {&lt;br /&gt;            UrlService.set(url);&lt;br /&gt;&lt;br /&gt;            var input = {&#39;email&#39;: credentials.email, &#39;password&#39;: credentials.password};&lt;br /&gt;            var login = $http.post(UrlService.get()+&quot;auth/check&quot;, JSON.stringify(input));&lt;br /&gt;&lt;br /&gt;            login.success(function (data) {&lt;br /&gt;                sessionStorage.setItem(&#39;authenticated&#39;, true);&lt;br /&gt;                sessionStorage.setItem(&#39;username&#39;, data.name);&lt;br /&gt;            });&lt;br /&gt;&lt;br /&gt;            return login;&lt;br /&gt;        },&lt;br /&gt;        logout: function() {&lt;br /&gt;            var logout = $http.get(UrlService.get() +&quot;auth/logout&quot;);&lt;br /&gt;&lt;br /&gt;            logout.success(function () {&lt;br /&gt;                return sessionStorage.removeItem(&#39;authenticated&#39;);&lt;br /&gt;            });&lt;br /&gt;&lt;br /&gt;            return logout;&lt;br /&gt;        },&lt;br /&gt;        isLoggedIn: function() {&lt;br /&gt;            return sessionStorage.getItem(&#39;authenticated&#39;);&lt;br /&gt;        },&lt;br /&gt;        getUser: function() {&lt;br /&gt;            return sessionStorage.getItem(&#39;username&#39;);&lt;br /&gt;        }&lt;br /&gt;    };&lt;br /&gt;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * Handle Login request. Authenticate user against database&lt;br /&gt; * and login into application&lt;br /&gt; */&lt;br /&gt;app.controller(&quot;LoginController&quot;, function($scope, $location, AuthenticationService) {&lt;br /&gt;&lt;br /&gt;    $scope.credentials = { email: &quot;&quot;, password: &quot;&quot; };&lt;br /&gt;&lt;br /&gt;    if (AuthenticationService.isLoggedIn()) {&lt;br /&gt;        $location.path(&#39;/home&#39;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    $scope.login = function() {&lt;br /&gt;&lt;br /&gt;        AuthenticationService.login($scope.credentials, $scope.baseUrl).success(function(response, status, headers, config) {&lt;br /&gt;&lt;br /&gt;            //console.log(response);&lt;br /&gt;            if (response.success == true) {&lt;br /&gt;                $location.path(&#39;/home&#39;);&lt;br /&gt;&lt;br /&gt;            } else {&lt;br /&gt;                alert(response.flash);&lt;br /&gt;                return false;&lt;br /&gt;            }&lt;br /&gt;        }).error(function(response, status, headers, config) {&lt;br /&gt;            alert(&quot;Login error: &quot; + status + response);&lt;br /&gt;            return false;&lt;br /&gt;        });&lt;br /&gt;    };&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * Logout from current session&lt;br /&gt; */&lt;br /&gt;app.controller(&quot;LogoutController&quot;, function($scope, $location, AuthenticationService) {&lt;br /&gt;&lt;br /&gt;    $scope.logout = function () {&lt;br /&gt;&lt;br /&gt;        AuthenticationService.logout().success(function(response) {&lt;br /&gt;&lt;br /&gt;            //console.log(response);&lt;br /&gt;            if (response.success == true) {&lt;br /&gt;                alert(response.flash);&lt;br /&gt;                $location.path(&#39;/login&#39;);&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;        }).error(function(response, status) {&lt;br /&gt;                alert(&quot;Login error: &quot; + status + response);&lt;br /&gt;                return false;&lt;br /&gt;            });&lt;br /&gt;    };&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;app.controller(&quot;HomeController&quot;, function($scope, $location, AuthenticationService) {&lt;br /&gt;&lt;br /&gt;    $scope.username = &#39;&#39;;&lt;br /&gt;    if (!AuthenticationService.isLoggedIn()) {&lt;br /&gt;        $location.path(&#39;/login&#39;);&lt;br /&gt;        return false;&lt;br /&gt;    }&lt;br /&gt;    $scope.content = true;&lt;br /&gt;    $scope.username = AuthenticationService.getUser();&lt;br /&gt;    $scope.title = &quot;Hello Developer!!&quot;;&lt;br /&gt;    $scope.cygnite = &quot;Cygnite PHP Framework&quot;;&lt;br /&gt;    $scope.angular = &quot;Angular JS&quot;;&lt;br /&gt;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;If you have a look at the code you can see all templates getting included only if there is a matching uri, angular routing made it just simple. AuthenticationService use to validate user against database using Ajax request, and display error if user credential doesn&#39;t match with database or if success redirect user to home page.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Conclusion: &lt;/h2&gt; &lt;p&gt; That’s all we are done with the “Angular + Cygnite PHP + Bootstrap“ tutorial part1. You can see the entire application works without refreshing the page. That is how most of the modern application works. In the &lt;b&gt;part 2 tutorial&lt;/b&gt; I will show you “How to Manage Products (CRUD) using Angular JS + Cygnite PHP Framework + Bootstrap”.  &lt;/p&gt;    &lt;p&gt;Hope you enjoyed the article and helpful to you to understand how Angular and Cygnite PHP Framework does awesome job together to build interactive applications. You may feel free to add more features to your application. In case if you don’t find more information about Cygnite PHP Framework or Angular JS you are looking for, take a look at &lt;a href=&quot;http://www.cygniteframework.com/2013/07/introduction.html&quot;&gt;Cygnite Framework&lt;/a&gt; and &lt;a href=&quot;https://docs.angularjs.org/tutorial&quot;&gt;Angular JS documentation &lt;/a&gt;. &lt;/p&gt;  &lt;p&gt; Got some idea? Send some love back. Please feel free to like, share or tweet. You will find more in coming days. Keep visiting. &lt;/p&gt;  &lt;p&gt;Good Day! &lt;/p&gt;   &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/8387981708181031976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2015/04/building-simple-product-management-app.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/8387981708181031976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/8387981708181031976'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2015/04/building-simple-product-management-app.html' title='Building A Simple Product Management App Using Angular JS + Cygnite PHP + Bootstrap'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-RjVlWxi4HKI/U1zthxx04oI/AAAAAAAAAgE/ByjnMtaE9ZY/s72-c/Cygnite_With_Angular_JS.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-7669916862498197714</id><published>2015-02-22T21:29:00.000+05:30</published><updated>2016-12-31T12:05:24.108+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Magento"/><category scheme="http://www.blogger.com/atom/ns#" term="Magento Custom Module"/><category scheme="http://www.blogger.com/atom/ns#" term="Magento Module"/><category scheme="http://www.blogger.com/atom/ns#" term="Magento module development"/><category scheme="http://www.blogger.com/atom/ns#" term="module creator"/><title type='text'>How to create custom module in Magento?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt; &lt;/br&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.appsntech.com/2015/02/how-to-create-custom-module-in-magento.html&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/--7z2vdZ2VF0/VOn-z-BA1rI/AAAAAAAAAwA/PnZ5iOqk8G8/s1600/magento_custom_module_development_by_appsntech.com.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;/br&gt; &lt;p&gt; In our last post we discussed about &lt;a href=&quot;http://www.appsntech.com/2015/01/how-to-install-custom-theme-in-magento.html&quot;&gt; “How to install custom theme in Magento”.&lt;/a&gt;.  In this post I will talk about creating a custom module in magento.&lt;/p&gt; &lt;p&gt;Though Magento community provides you lot of modules to download or install from various third party, but what if those built in modules or third party modules doesn’t fulfill your current requirement? In such case developers can create their own custom module by understanding the Magento architecture and building it to enhance existing functionalities.&lt;/p&gt; &lt;p&gt;  Many developers get stuck while creating their custom module into magento. That is the reason I thought to give you a sample example of creating custom module in magento with very few simple steps. It is not possible to explain everything about Magento custom module creation, so in this article I will just explain about simple custom module then next series of tutorial for the rest. &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Where to start with?&lt;/h2&gt; &lt;p&gt;I assume you have installed Magento already into your system if not you may follow &lt;a href=&quot;http://www.appsntech.com/2014/12/how-to-install-magento-step-by-step-in.html&quot;&gt;Magento step by step installation tutorial&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;All magento modules are located into &lt;b&gt;/app/code/&lt;/b&gt; directory. This directory consists of - &lt;/p&gt;  &lt;p&gt; &lt;b&gt; a. code:&lt;/b&gt; &lt;/p&gt; &lt;p&gt;   - &lt;b&gt;core&lt;/b&gt; &lt;/br&gt;- &lt;b&gt;community&lt;/b&gt; &lt;/br&gt;- &lt;b&gt;local&lt;/b&gt; &lt;/br&gt;&lt;/p&gt; &lt;p&gt;i.   &lt;b&gt;core:&lt;/b&gt; Consists of all core classes of Magento.&lt;/br&gt;ii.  &lt;b&gt;community:&lt;/b&gt; Consists of community modules of Magento. &lt;/br&gt;iii. &lt;b&gt;local:&lt;/b&gt; You may not find this directory on installation of latest Magento. You can manually create it, where our custom module will be placed.&lt;/br&gt;&lt;/p&gt; &lt;p&gt; We will call above three directories together as “code pool”.&lt;/p&gt; &lt;p&gt; Another two main directory we should know are: &lt;b&gt;“design”&lt;/b&gt; and &lt;b&gt;“etc”&lt;/b&gt; &lt;/p&gt; &lt;p&gt; &lt;b&gt; b. design:&lt;/b&gt; This folder consists of all your layout and view files. &lt;/p&gt;&lt;p&gt; &lt;b&gt; c. etc:&lt;/b&gt; Consists of module configuration files. &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Getting Started with Magento Module Development: &lt;/h2&gt;  &lt;h3 style=&quot;font-size:17px !important;&quot;&gt; Step1: Module Naming &lt;/h3&gt; &lt;p&gt; We need to give your custom module name as per the Magento standard. Your module name should be look as below.&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  &amp;#x3C;Namespace&amp;#x3E;_&amp;#x3C;Module&amp;#x3E;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; For example I am creating custom module &lt;pre&gt; &lt;code&gt; &amp;#x3C;Cygnite&amp;#x3E;_&amp;#x3C;HelloWorld&amp;#x3E; &lt;/code&gt;&lt;/pre&gt; &lt;/p&gt;   &lt;h3 style=&quot;font-size:17px !important;&quot;&gt; Step2: Custom Module Structure: &lt;/h3&gt; &lt;p&gt; Magento custom module consists of below.&lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-AvKB6mqUJpg/VOn4boIkk2I/AAAAAAAAAvs/QZb1sx5Gf4U/s1600/magento_custom_module_by_appsntech.com.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-AvKB6mqUJpg/VOn4boIkk2I/AAAAAAAAAvs/QZb1sx5Gf4U/s400/magento_custom_module_by_appsntech.com.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;      &lt;b&gt;Block:&lt;/b&gt; Consists of classes that are used to display data in view template file.  &lt;/p&gt;&lt;p&gt; &lt;b&gt;controllers:&lt;/b&gt; This folder consists of controller classes. Controllers are request handler (when user request url), used to define page layout, block etc. &lt;/p&gt; &lt;p&gt; &lt;b&gt;etc:&lt;/b&gt; Consists of module configurations files. It has config.xml file. It tells magento how many files module has and module version etc. &lt;/p&gt; &lt;p&gt; &lt;b&gt;Helper:&lt;/b&gt; Consist of helper classes. Helpers are act as utility class with functions, which can be used anywhere in the application. &lt;/p&gt; &lt;p&gt; &lt;b&gt;Model:&lt;/b&gt; Consists of business logic of the module. Generally models are to interact with the database and processing data. &lt;/p&gt; &lt;p&gt; &lt;b&gt;sql:&lt;/b&gt; This folder consists of sql script file, which is used to create, update or delete tables. &lt;/p&gt;  &lt;p&gt;Now go to &lt;b&gt;app/code/local/Cygnite/HelloWorld/controllers/&lt;/b&gt; and create controller class called &lt;b&gt;IndexController.php&lt;/b&gt; with below content. &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;class Cygnite_HelloWorld_IndexController extends Mage_Core_Controller_Front_Action&lt;br /&gt;{&lt;br /&gt;    public function indexAction()&lt;br /&gt;    {&lt;br /&gt;       echo &quot;Hello &#39;appsntech.com&#39; World!!&quot;;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Step3: Creating Frontend Module and Routing Mechanism: &lt;/h2&gt; &lt;p&gt; Now go to &lt;b&gt;etc&lt;/b&gt; folder inside the same &lt;b&gt;Cygnite &gt; HelloWorld&lt;/b&gt; module and create a file called &lt;b&gt;config.xml&lt;/b&gt; and paste below contents inside. &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;#x3C;?xml version=&amp;#x22;1.0&amp;#x22;?&amp;#x3E;&lt;br /&gt;&amp;#x3C;config&amp;#x3E;&lt;br /&gt;    &amp;#x3C;modules&amp;#x3E;&lt;br /&gt;        &amp;#x3C;Cygnite_HelloWorld&amp;#x3E;&lt;br /&gt;            &amp;#x3C;version&amp;#x3E;0.1.0&amp;#x3C;/version&amp;#x3E;&lt;br /&gt;        &amp;#x3C;/Cygnite_HelloWorld&amp;#x3E;&lt;br /&gt;    &amp;#x3C;/modules&amp;#x3E;&lt;br /&gt;&amp;#x9;&lt;br /&gt;    &amp;#x3C;frontend&amp;#x3E;&lt;br /&gt;        &amp;#x3C;routers&amp;#x3E;&lt;br /&gt;            &amp;#x3C;helloworld&amp;#x3E;&lt;br /&gt;                &amp;#x3C;use&amp;#x3E;standard&amp;#x3C;/use&amp;#x3E;&lt;br /&gt;                &amp;#x3C;args&amp;#x3E;&lt;br /&gt;                    &amp;#x3C;module&amp;#x3E;Cygnite_HelloWorld&amp;#x3C;/module&amp;#x3E;&lt;br /&gt;                    &amp;#x3C;frontName&amp;#x3E;cygnite&amp;#x3C;/frontName&amp;#x3E;&lt;br /&gt;                &amp;#x3C;/args&amp;#x3E;&lt;br /&gt;            &amp;#x3C;/helloworld&amp;#x3E;&lt;br /&gt;        &amp;#x3C;/routers&amp;#x3E;        &lt;br /&gt;    &amp;#x3C;/frontend&amp;#x3E;     &lt;br /&gt;&amp;#x3C;/config&amp;#x3E;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; In this above xml file in the &lt;modules&gt; tag we are defining module name and version. Inside &lt;b&gt;&lt;frontend&gt;&lt;/b&gt; tag we have &lt;b&gt;&lt;routers&gt;&lt;/b&gt; where we will define our routing to our module, by this magento will understand how to access our module via url. Inside the &lt;b&gt;&lt;frontname&gt;&lt;/b&gt; tag will define the front name by which we can access the controller. &lt;/p&gt; &lt;p&gt; Now we can access the IndexController using below url. &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;    http://localhost/index.php/cygnite/index&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;Before that we need to active our custom module.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Step4: Configure and Activating Custom Module: &lt;/h2&gt; &lt;p&gt;   We need to active our custom module in order to access it. We will create a config file inside &lt;b&gt;app/etc/modules/&lt;/b&gt; folder by naming it &lt;b&gt;“Cygnite_HelloWorld.xml”&lt;/b&gt; and paste below code. &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;#x3C;?xml version=&amp;#x22;1.0&amp;#x22;?&amp;#x3E;&lt;br /&gt;&amp;#x3C;config&amp;#x3E;&lt;br /&gt;    &amp;#x3C;modules&amp;#x3E;&lt;br /&gt;        &amp;#x3C;Cygnite_HelloWorld&amp;#x3E;&lt;br /&gt;            &amp;#x3C;active&amp;#x3E;true&amp;#x3C;/active&amp;#x3E;&lt;br /&gt;            &amp;#x3C;codePool&amp;#x3E;local&amp;#x3C;/codePool&amp;#x3E;&lt;br /&gt;        &amp;#x3C;/Cygnite_HelloWorld&amp;#x3E;&lt;br /&gt;    &amp;#x3C;/modules&amp;#x3E;&lt;br /&gt;&amp;#x3C;/config&amp;#x3E;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;  This configuration file will tell magento where our module is located. In the above &lt;active&gt; tag used to activate or deactivate the module. We have specified true inside &lt;active&gt; tag, meaning that our module is activated. To confirm you can also login into admin panel and go to System -&gt; Advance -&gt; Cygnite_HelloWorld and enable or disable it. &lt;/p&gt;  &lt;p&gt;Congrats! We are done with. Now go to url &lt;b&gt;http://localhost/index.php/cygnite/index&lt;/b&gt; and it will print &lt;b&gt; “Hello appsntech.com World!!”&lt;/b&gt;. We are done with our first hello world custom module.  &lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Conclusion: &lt;/h2&gt; &lt;p&gt;Hope you found this article helpful for step by step magento custom module creation.  If you are also interested to write tutorial for us you can post me. If this tutorial helps you then please don&#39;t forget to like, share with friends, or leave your comments below to share some love us back.  &lt;/p&gt; &lt;p&gt;Keep visiting for upcoming posts. Have a nice day.&lt;/p&gt;    &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/7669916862498197714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2015/02/how-to-create-custom-module-in-magento.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/7669916862498197714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/7669916862498197714'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2015/02/how-to-create-custom-module-in-magento.html' title='How to create custom module in Magento?'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/--7z2vdZ2VF0/VOn-z-BA1rI/AAAAAAAAAwA/PnZ5iOqk8G8/s72-c/magento_custom_module_development_by_appsntech.com.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-4986217669902047638</id><published>2015-01-19T03:08:00.000+05:30</published><updated>2015-01-19T03:12:47.755+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Magento"/><category scheme="http://www.blogger.com/atom/ns#" term="Magento Skinning"/><category scheme="http://www.blogger.com/atom/ns#" term="Megento Theme Customization"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>How to install custom theme in Magento?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt; &lt;p&gt;My last article was &lt;a href=&quot;http://www.appsntech.com/2014/12/how-to-install-magento-step-by-step-in.html&quot;&gt; “How to install Magento step by step in wamp server”. &lt;/a&gt;.  Recently I came across a task where I need to integrate a custom theme into Magento. I would like to share my experience with you step by step. Magento is another most demanded open source ecommerce platform by e-bay inc. Its modular structure, flexibility and robustness made it very well known in PHP world. In this article I will show you how to integrate custom theme in Magento.&lt;/p&gt; &lt;p&gt;To achieve this we will download any theme from online and install into magento. Magento uses “app/design/” and “skin” directory for enhancing visual experience of the store shortly we call theming / skinning. &lt;/p&gt; &lt;p&gt;    • app/design: used to render template and html into browser. &lt;/p&gt; &lt;p&gt;    • skin: used to hold all your CSS, JS, Images etc.  &lt;/p&gt; &lt;p&gt; I am using Magento 1.9 version and community edition. Below are the steps to install your custom theme into magento.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Download Magento Theme &amp; Save Into Magento Directory:&lt;/h2&gt; &lt;p&gt; &lt;b&gt;Step 1:&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Download the theme according to your application needs, I have downloaded ebajes theme from https://www.halothemes.com/theme/ebajes-free-responsive-electronics-magento-ce-theme and we will install it into our magento application. &lt;/p&gt;  &lt;p&gt; &lt;b&gt;Step 2:&lt;/b&gt; &lt;/p&gt; &lt;p&gt; I have created package name as myebajes into my &lt;b&gt;app/design/frontend&lt;/b&gt; and copy all files into it, from the downloaded theme. After copying my folder structure look like below. &lt;/p&gt; &lt;p&gt; &lt;b&gt;app/design/frontend/myebajes/ebajes/default/ &lt;/b&gt; &lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-QqtVqZDmBUA/VLwi7tV76vI/AAAAAAAAAuk/qoldmFGNAx4/s1600/magento_ebajes_theme.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-QqtVqZDmBUA/VLwi7tV76vI/AAAAAAAAAuk/qoldmFGNAx4/s400/magento_ebajes_theme.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;p&gt;I have copied layout, template, locale etc. folder from the downloaded theme into my custom theme ebajes directory. &lt;/p&gt; &lt;p&gt; &lt;b&gt;Step 3:&lt;/b&gt; &lt;/p&gt; &lt;p&gt;  Copy all files and folders to respective magento folder. I copied downloaded theme skin and paste it contents into magento skin directory, likewise you need to copy all respective contents into your magento local directory. Make sure you are following same folder structure while copying things. &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Directory Structure of Custom Package:&lt;/h2&gt; &lt;p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-L-D_c6aDXyA/VLwnmYKOfDI/AAAAAAAAAvU/4WEC5ew9lC8/s1600/magento_custom_theme_directory_structure.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-L-D_c6aDXyA/VLwnmYKOfDI/AAAAAAAAAvU/4WEC5ew9lC8/s400/magento_custom_theme_directory_structure.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;/p&gt;&lt;br /&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Switching Theme Using Magento Admin Panel:&lt;/h2&gt; &lt;p&gt; &lt;b&gt;Step 4:&lt;/b&gt; &lt;/p&gt; &lt;p&gt;Now login to magento admin panel and visit &lt;b&gt;design &lt;/b&gt;tab from &lt;b&gt;system/configuration&lt;/b&gt; link. &lt;/p&gt;  &lt;p&gt; &lt;b&gt;System &gt; Configuration &gt; Design&lt;/b&gt; &lt;/p&gt; &lt;p&gt;  From the upper left corner you will find drop down box called “Current Configuration Scope” by which you can select the store for which you are applying theme configurations. &lt;/p&gt;  &lt;p&gt; &lt;b&gt;Step 5:&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Now enter your package name (&lt;b&gt;“Current Package Name”&lt;/b&gt;) where your custom theme exists. In my case my package name is &lt;b&gt;“myebajes”&lt;/b&gt;. If Current Package Name left blank magento automatically take “default” one.  &lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-S7GBqVtdsy4/VLwjAArFWgI/AAAAAAAAAu4/qumS_kyZsMQ/s1600/magento_admin_theme_configuration.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-S7GBqVtdsy4/VLwjAArFWgI/AAAAAAAAAu4/qumS_kyZsMQ/s400/magento_admin_theme_configuration.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt; Some cases if only for home page you want different theme then you may go to &lt;b&gt;cms &gt; home &gt; design&lt;/b&gt; tab, in the “&lt;b&gt;Custom Design&lt;/b&gt;” select &quot;&lt;b&gt;Custom Theme&lt;/b&gt;&quot; to preferred one. Doing so you will be able to see different theme only for the home page.  &lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-z5kg4f7Faxg/VLwjAZBUMOI/AAAAAAAAAvA/h1AO44kzcxM/s1600/magento_change_theme_only_home_page.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-z5kg4f7Faxg/VLwjAZBUMOI/AAAAAAAAAvA/h1AO44kzcxM/s400/magento_change_theme_only_home_page.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt; &lt;b&gt;Step 6:&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Now click on &lt;b&gt;“Save Config”&lt;/b&gt; to save your configuration changes in order to reflect into out frontend pages. Reload your website and you will be able to see your new custom theme. &lt;/p&gt;  &lt;p&gt; If you wish to switch to your default theme then you need to change all configuration which we have changed above as “Current Package Name” to “default”, change “Templates”, “Skin (Images / CSS” name, “Layout” name etc. if you made changes. &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Conclusion:&lt;/h2&gt; &lt;p&gt;Hope you found this article helpful for step by step magento theme customization.  If you are also interested to write tutorial for us you can post me. Please don’t forget to like, share with friends, or leave your comments below.   &lt;/p&gt; &lt;p&gt;Keep visiting for upcoming posts. Have a nice day.  &lt;/p&gt;      &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/4986217669902047638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2015/01/how-to-install-custom-theme-in-magento.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/4986217669902047638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/4986217669902047638'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2015/01/how-to-install-custom-theme-in-magento.html' title='How to install custom theme in Magento?'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-QqtVqZDmBUA/VLwi7tV76vI/AAAAAAAAAuk/qoldmFGNAx4/s72-c/magento_ebajes_theme.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-3704317299693858241</id><published>2014-12-12T02:43:00.000+05:30</published><updated>2014-12-12T02:43:51.724+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Magento"/><category scheme="http://www.blogger.com/atom/ns#" term="Magento Installation and Configuration"/><category scheme="http://www.blogger.com/atom/ns#" term="WAMP server"/><title type='text'>How to install Magento Step by Step in WAMP server?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt; &lt;p&gt;My last article was &lt;a href=&quot;http://www.appsntech.com/2014/12/google-latest-update-recaptcha-are-you.html&quot; alt=&quot;Google No Captcha reCAPTCHA&quot;&gt; “Google No Captcha reCAPTCHA”. &lt;/a&gt;.  Magento is another most advance open source ecommerce platform. Its modular structure, flexibility and robustness made it very well known in PHP world. If you are beginner and wondering “How to install and configure Magento” then this article I will show you simple steps how to install Magento v1.9 into WAMP server.  &lt;/p&gt; &lt;p&gt;&lt;b&gt;Magento Installation &amp; Configuration - Step by Step guide&lt;/b&gt; &lt;/p&gt; &lt;p&gt;&lt;b&gt;Step 1: &lt;/b&gt; &lt;br /&gt; Go to Magento website (&lt;a href=&quot;http://www.magentocommerce.com/download&quot;&gt;http://www.magentocommerce.com/download&lt;/a&gt;) and download the magento community edition as your choiceble format. I have downloaded zip format.&lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-_zJbbAy4JuI/VIoGkITPqFI/AAAAAAAAAtY/1ndcEu5T7ko/s1600/magento_download.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot; alt=&quot;Download Magento&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-_zJbbAy4JuI/VIoGkITPqFI/AAAAAAAAAtY/1ndcEu5T7ko/s400/magento_download.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt; &lt;b&gt;Step 2: &lt;/b&gt; &lt;br /&gt;Extract the zip file and paste it inside your www root directory. We will rename folder to magento as below screenshot. &lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-uajq7IpzHWs/VIoGl46QZDI/AAAAAAAAAto/DM-1twwczQY/s1600/magento.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot; alt=&quot;Install and configuration of magento&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-uajq7IpzHWs/VIoGl46QZDI/AAAAAAAAAto/DM-1twwczQY/s400/magento.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt; &lt;b&gt;Step 3: &lt;/b&gt; &lt;br /&gt;Go to phpmyadmin and create a database called &lt;b&gt;“magento”&lt;/b&gt;. This is where all magento tables will generate. &lt;/p&gt; &lt;p&gt; &lt;b&gt;Step 4: &lt;/b&gt; &lt;br /&gt;Before next step make sure curl extension enabled and max_execution_time increased in your php.ini file. &lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-WK3GQdznblQ/VIoGpHCiDuI/AAAAAAAAAuM/ZCsVQjeIlcQ/s1600/wamp_server_curl_extension_enabled.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot; alt=&quot;configure php.ini enable curl extension&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-WK3GQdznblQ/VIoGpHCiDuI/AAAAAAAAAuM/ZCsVQjeIlcQ/s400/wamp_server_curl_extension_enabled.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt; &lt;b&gt;Step 5: &lt;/b&gt; &lt;br /&gt;Open your browser and enter &lt;b&gt;http://localhost/magento/&lt;/b&gt; will display below page, agree terms and condition and click continue. &lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-Be42EXMX6G4/VIoGo8e7Z9I/AAAAAAAAAuI/E3GtMZ3K6o8/s1600/magento_installation_wizard.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot; alt=&quot;configure magento&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-Be42EXMX6G4/VIoGo8e7Z9I/AAAAAAAAAuI/E3GtMZ3K6o8/s400/magento_installation_wizard.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;p&gt; &lt;b&gt;Step 6: &lt;/b&gt; &lt;br /&gt;Next screen you will find Localization, you can keep as it is or change it later on from the admin panel. Click continue and you will be landed on configuration screen where you are required to give your database connection details as screen below. In my case I have configured database name as magento, username root and no password. Once you filled click continue to proceed next. &lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-Gh_FFYKf7nE/VIoGmemvlDI/AAAAAAAAAt0/OkCWOkiSBDU/s1600/magento_database_configuration.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot; alt=&quot;magento database configuration&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-Gh_FFYKf7nE/VIoGmemvlDI/AAAAAAAAAt0/OkCWOkiSBDU/s400/magento_database_configuration.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt; &lt;b&gt;Step 7: &lt;/b&gt; &lt;br /&gt;Next screen you may create admin account. That’s it. We are done with the configuration. You will find two button end of the page called &lt;b&gt;“frontend”&lt;/b&gt; and &lt;b&gt;“backend”&lt;/b&gt; as screen below. Save the encryption key in safe place. &lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-zf1j8mukPpk/VIoGn9HICmI/AAAAAAAAAt8/Vujud51UFME/s1600/magento_install_complete.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot; alt=&quot;Magento installation in local system&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-zf1j8mukPpk/VIoGn9HICmI/AAAAAAAAAt8/Vujud51UFME/s400/magento_install_complete.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;You have successfully &lt;b&gt;installed magento in WAMP server&lt;/b&gt;. You can click visit frontend by clicking frontend button and admin panel to manage store.&lt;/p&gt;   &lt;h2 class=&quot;heading-class&quot;&gt;  Conclusion:&lt;/h2&gt; &lt;p&gt;Hope you found this article helpful. I will continue the magento series in my next posts. Upcoming tutorial you will find “How to do magento theme customization?”, “How to create custom module in Magento?” etc. Don&#39;t forget to like, share, or leave your comments below.  &lt;/p&gt; &lt;p&gt; Stay tuned! Keep visiting for upcoming posts. Have a nice day. &lt;/p&gt;    &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/3704317299693858241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2014/12/how-to-install-magento-step-by-step-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/3704317299693858241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/3704317299693858241'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2014/12/how-to-install-magento-step-by-step-in.html' title='How to install Magento Step by Step in WAMP server?'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-_zJbbAy4JuI/VIoGkITPqFI/AAAAAAAAAtY/1ndcEu5T7ko/s72-c/magento_download.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-1040434225699159256</id><published>2014-12-06T00:54:00.000+05:30</published><updated>2015-10-20T22:16:02.938+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="captcha"/><category scheme="http://www.blogger.com/atom/ns#" term="Form"/><category scheme="http://www.blogger.com/atom/ns#" term="google"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="No captcha reCAPTCHA"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="reCAPTCHA using javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><title type='text'>Google introduced reCaptcha-“Are you a Robot ?” app using PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt; &lt;p&gt;My last article was &lt;a href=&quot;http://www.appsntech.com/2014/12/facebook-style-profile-image-crop.html&quot;&gt; “Facebook style profile photo upload + Thumbnail Image + Saving into database”. &lt;/a&gt;&lt;/p&gt; &lt;p&gt;Bored looking at old Captcha test? &lt;/p&gt; &lt;a rel=&quot;No CAPTCHA reCAPTCHA API&quot; title=&#39;No CAPTCHA reCAPTCHA&#39;&gt; &lt;/a&gt; &lt;p&gt;Google introduced latest security update &lt;b&gt;“No CAPTCHA reCAPTCHA API”&lt;/b&gt; to protect your website from spam, robots and abuse. It is a complete redesign of Captcha system by Google. They made Captcha system very clear, easy to use. Simple checkbox to confirm they are human or not. Its sound very simple, but it is not, Google does all the magic behind the hood that makes this system more secure and reliable.   &lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-3x_LzL8FQtw/VIHyqz2lg9I/AAAAAAAAAsk/KkwSkfBWXpg/s1600/Google_reCaptcha.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-3x_LzL8FQtw/VIHyqz2lg9I/AAAAAAAAAsk/KkwSkfBWXpg/s400/Google_reCaptcha.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;  Impressive! I have implemented new API class with simple registration form using PHP and HTML. I would like to share with you all step by step.  &lt;/p&gt;  &lt;p&gt;You can have a look at the demo page, also can download the API class from below.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://demo-aapsntech.16mb.com/cygnite/reCaptcha/&quot; class=&quot;btn btn-primary btn-&quot; target=&quot;_blank&quot; style=&quot;margin:20px 10px;color:#fff;&quot;&gt;&lt;i class=&quot;glyphicon glyphicon-eye-open&quot;&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp;Live Demo&lt;/a&gt;   &lt;a href=&quot;https://app.box.com/s/yrkzbzwq4st0xklzv2ue&quot; class=&quot;pull-left btn btn-info btn-&quot; target=&quot;_blank&quot; style=&quot;margin:20px 10px;color:#fff;&quot;&gt;&lt;i class=&quot;glyphicon glyphicon-download&quot;&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp;Download&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Step 1:&lt;/b&gt; To get reCAPTCHA &lt;a href=&quot;https://www.google.com/recaptcha/intro/index.html&quot;&gt;Click Here&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;Step 2:&lt;/b&gt; Register your website domain to generate reCAPTCHA secret key as below. &lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-3EdN8ijQyn0/VIHzyHskKXI/AAAAAAAAAss/o6b1OADC2Fo/s1600/register_reCaptcha_appsntech.com.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-3EdN8ijQyn0/VIHzyHskKXI/AAAAAAAAAss/o6b1OADC2Fo/s400/register_reCaptcha_appsntech.com.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;   &lt;p&gt; &lt;b&gt;Step 3:&lt;/b&gt; Click register to get reCAPTCHA secret key and site key. Store and keep it safe. &lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-tyPcYGyO8Rc/VIH0QGN4wKI/AAAAAAAAAs0/Xq8suvxjKG8/s1600/Google_reCAPTCHA_secret_key.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-tyPcYGyO8Rc/VIH0QGN4wKI/AAAAAAAAAs0/Xq8suvxjKG8/s400/Google_reCAPTCHA_secret_key.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;br /&gt; &lt;p&gt;  i. Use &lt;b&gt;Site key&lt;/b&gt; in html code where you want reCAPTCHA should appear. &lt;br /&gt;ii. Google &lt;b&gt;Secret key&lt;/b&gt; to communicate with Google API service. Keep it safe place. &lt;/p&gt; &lt;br /&gt; &lt;p&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/jwslDn3ImM0&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Step 4:&lt;/b&gt; Create a new page called &lt;b&gt;index.php&lt;/b&gt; copy and paste below html code into it. &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot; style=&quot;height:400px;width:750px; overflow-y:scroll; &quot;&gt;&lt;br /&gt;&lt;br /&gt;&amp;#x3C;!doctype html&amp;#x3E;&lt;br /&gt;&amp;#x3C;html lang=&amp;#x22;en&amp;#x22;&amp;#x3E;&lt;br /&gt;  &amp;#x3C;head&amp;#x3E;&lt;br /&gt;  &amp;#x3C;meta charset=&amp;#x22;UTF-8&amp;#x22; /&amp;#x3E;&lt;br /&gt;    &amp;#x3C;title&amp;#x3E;Google reCAPTCHA Demo&amp;#x3C;/title&amp;#x3E;&amp;#x9;&lt;br /&gt;&amp;#x9;&amp;#x3C;script src=&amp;#x27;https://www.google.com/recaptcha/api.js&amp;#x27;&amp;#x3E;&amp;#x3C;/script&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x3C;!-- Latest compiled and minified CSS --&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x3C;link rel=&amp;#x22;stylesheet&amp;#x22; href=&amp;#x22;https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css&amp;#x22;&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x3C;link href=&amp;#x22;http://fonts.googleapis.com/css?family=Open+Sans:400,600,300,700&amp;#x22; rel=&amp;#x22;stylesheet&amp;#x22; type=&amp;#x22;text/css&amp;#x22;&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x3C;style type=&amp;#x22;text/css&amp;#x22;&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;.formbox { width:400px; height:auto;margin: 0px auto;padding: 20px;border: 1px solid #e5e5e5;box-shadow: rgba(200,200,200,0.7) 0 4px 10px -1px;margin-top:140px;}&lt;br /&gt;&amp;#x9;&amp;#x3C;/style&amp;#x3E;&amp;#x9;&lt;br /&gt;  &amp;#x3C;/head&amp;#x3E;  &lt;br /&gt;  &amp;#x3C;body&amp;#x3E;&lt;br /&gt;&amp;#x3C;?php&lt;br /&gt;include &amp;#x27;lib/ReCaptcha.php&amp;#x27;;&lt;br /&gt;include &amp;#x27;ActionController.php&amp;#x27;;&lt;br /&gt;include &amp;#x27;database.php&amp;#x27;;&lt;br /&gt;&lt;br /&gt;$dns = &amp;#x22;mysql:host=localhost;dbname=google&amp;#x22;;&lt;br /&gt;$username = &amp;#x27;root&amp;#x27;;&lt;br /&gt;$password = &amp;#x27;&amp;#x27;;&lt;br /&gt;$secretKey = &amp;#x27;6Lddzf4SAAAAALZFILTYX36qnXvKI3EQk3qDEIia&amp;#x27;;&lt;br /&gt;&lt;br /&gt;$app = new ActionController(new ReCaptcha, new Database($dns,  $username, $password));&lt;br /&gt;&lt;br /&gt;$error = &amp;#x22;&amp;#x22;;&lt;br /&gt;&lt;br /&gt;if($_SERVER[&amp;#x22;REQUEST_METHOD&amp;#x22;] == &amp;#x22;POST&amp;#x22;)&lt;br /&gt;{&lt;br /&gt;    if (isset($_POST[&amp;#x27;g-recaptcha-response&amp;#x27;]) &amp;#x26;&amp;#x26; $_POST[&amp;#x27;g-recaptcha-response&amp;#x27;] !=&amp;#x22;&amp;#x22;) {&lt;br /&gt;        $reCaptcha = $_POST[&amp;#x27;g-recaptcha-response&amp;#x27;];&lt;br /&gt;&lt;br /&gt;        $app-&amp;#x3E;setGoogleSecretKey($secretKey);&lt;br /&gt;    &lt;br /&gt;        if (!$app-&amp;#x3E;verify($reCaptcha)) {&lt;br /&gt;            $error =  &amp;#x22;Please enter your reCAPTCHA again!&amp;#x22;;&lt;br /&gt;        }  else {&lt;br /&gt;            $app-&amp;#x3E;saveRegistrationInfo($_POST);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    } else {&lt;br /&gt;        $error = &amp;#x22;Please check recaptcha before submiting form.&amp;#x22;;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;?&amp;#x3E;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;  &amp;#x3C;div class=&amp;#x22;container&amp;#x22; id=&amp;#x22;content&amp;#x22;&amp;#x3E;&lt;br /&gt;  &amp;#x3C;div class=&amp;#x22;row formbox&amp;#x22;&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x3C;form action=&amp;#x22;&amp;#x22; method=&amp;#x22;POST&amp;#x22; role=&amp;#x22;form&amp;#x22;&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x3C;div class=&amp;#x22;form-group&amp;#x22;&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x3C;label class=&amp;#x22;col-sm-2 control-label&amp;#x22;&amp;#x3E;Username &amp;#x3C;/label&amp;#x3E; &lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x3C;input type=&amp;#x22;text&amp;#x22; name=&amp;#x22;username&amp;#x22; class=&amp;#x22;form-control&amp;#x22; placeholder=&amp;#x22;Username&amp;#x22;/&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x3C;/div&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x3C;div class=&amp;#x22;form-group&amp;#x22;&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x3C;label class=&amp;#x22;col-sm-2 control-label&amp;#x22;&amp;#x3E;Password &amp;#x3C;/label&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x3C;input type=&amp;#x22;password&amp;#x22; name=&amp;#x22;password&amp;#x22; class=&amp;#x22;form-control&amp;#x22;  placeholder=&amp;#x22;Password&amp;#x22;/&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x3C;/div&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x3C;div class=&amp;#x22;form-group&amp;#x22;&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x3C;label class=&amp;#x22;col-sm-2 control-label&amp;#x22;&amp;#x3E;Phone&amp;#x3C;/label&amp;#x3E; &lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x3C;input type=&amp;#x22;text&amp;#x22; name=&amp;#x22;phone&amp;#x22; class=&amp;#x22;form-control&amp;#x22; placeholder=&amp;#x22;Phone&amp;#x22;/&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x3C;/div&amp;#x3E;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;  &amp;#x3C;!-- Your reCAPTCHA will appear here--&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;  &amp;#x3C;div class=&amp;#x22;g-recaptcha&amp;#x22; data-sitekey=&amp;#x22;6Lddzf4SAAAAAHDKXw0TOcJoG_h-0APraljsIh8W&amp;#x22;&amp;#x3E;&amp;#x3C;/div&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;  &lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;  &amp;#x3C;span class=&amp;#x27;msg&amp;#x27;&amp;#x3E;&amp;#x3C;?php echo $error; ?&amp;#x3E;&amp;#x3C;/span&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;  &amp;#x3C;br&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;  &amp;#x3C;input type=&amp;#x22;submit&amp;#x22; name=&amp;#x22;btnSubmit&amp;#x22; value=&amp;#x22;Submit&amp;#x22; class=&amp;#x22;btn btn-sm btn-success&amp;#x22;&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;  &lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x3C;/form&amp;#x3E;&lt;br /&gt;&amp;#x9;&lt;br /&gt;&amp;#x9;&amp;#x3C;/div&amp;#x3E;&lt;br /&gt;&amp;#x9;&lt;br /&gt;&amp;#x3C;!-- jQuery (necessary for Bootstrap&amp;#x27;s JavaScript plugins) --&amp;#x3E;&lt;br /&gt;&amp;#x3C;script src=&amp;#x22;https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js&amp;#x22;&amp;#x3E;&amp;#x3C;/script&amp;#x3E;&lt;br /&gt;&amp;#x3C;!-- Latest compiled and minified JavaScript --&amp;#x3E;&lt;br /&gt;&amp;#x3C;script src=&amp;#x22;https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js&amp;#x22;&amp;#x3E;&amp;#x3C;/script&amp;#x3E;&lt;br /&gt;&amp;#x3C;/div&amp;#x3E;&lt;br /&gt;&lt;br /&gt;  &amp;#x3C;/body&amp;#x3E;&lt;br /&gt;&amp;#x3C;/html&amp;#x3E;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;&lt;b&gt;Step 5:&lt;/b&gt; Create a PHP file called &lt;b&gt;/lib/ReCaptcha.php&lt;/b&gt; paste below code where we will validate reCAPTCHA  via Google API and receive response. &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot; style=&quot;height:400px;width:750px; overflow-y:scroll; &quot;&gt;&lt;br /&gt;&lt;br /&gt;class ReCaptcha&lt;br /&gt;{&lt;br /&gt;    public $captchaUrl = &quot;https://www.google.com/recaptcha/api/siteverify&quot;;&lt;br /&gt;&lt;br /&gt;    public $googleSecretKey;&lt;br /&gt;&lt;br /&gt;    public $remoteIp;&lt;br /&gt;&lt;br /&gt;    public function setReCaptchaSecretKey($key)&lt;br /&gt;    {&lt;br /&gt;        $this-&gt;googleSecretKey = $key;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public function getGoogleSecretKey()&lt;br /&gt;    {&lt;br /&gt;        return isset($this-&gt;googleSecretKey) ? $this-&gt;googleSecretKey : null;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public function validate($reCaptcha)&lt;br /&gt;    {&lt;br /&gt;        $url = null;&lt;br /&gt;        $curlInfo = array();&lt;br /&gt;        $url = $this-&gt;captchaUrl.&quot;?secret=&quot;.$this-&gt;getGoogleSecretKey().&quot;&amp;response=&quot;.$reCaptcha.&quot;&amp;remoteip=&quot;.$_SERVER[&#39;REMOTE_ADDR&#39;];&lt;br /&gt;&lt;br /&gt;        $curl = curl_init();&lt;br /&gt;        curl_setopt($curl, CURLOPT_URL, $url);&lt;br /&gt;        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;        curl_setopt($curl, CURLOPT_TIMEOUT, 10);&lt;br /&gt;&lt;br /&gt;        $curlInfo = curl_exec($curl);&lt;br /&gt;        curl_close($curl);&lt;br /&gt;&lt;br /&gt;        return $curlInfo;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public function process($reCaptcha)&lt;br /&gt;    {&lt;br /&gt;        $result =$this-&gt;validate($reCaptcha);&lt;br /&gt;        return json_decode($result, true);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;&lt;b&gt;Step 6:&lt;/b&gt; Create a file called &lt;b&gt;ActionController.php&lt;/b&gt; via which we will interact with ReCaptcha API. Paste below code into it. &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;class ActionController&lt;br /&gt;{&lt;br /&gt;    private $connection;&lt;br /&gt;&lt;br /&gt;    private $reCaptcha;&lt;br /&gt;&lt;br /&gt;    final public function __construct(ReCaptcha $reCaptcha, Database $connection)&lt;br /&gt;    {&lt;br /&gt;        $this-&gt;reCaptcha = $reCaptcha;&lt;br /&gt;        $this-&gt;connection = $connection;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public function setGoogleSecretKey($key)&lt;br /&gt;    {&lt;br /&gt;        $this-&gt;reCaptcha-&gt;setReCaptchaSecretKey($key);&lt;br /&gt;        return true;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public function verify($reCaptcha)&lt;br /&gt;    {&lt;br /&gt;        $response= array();&lt;br /&gt;        $response = $this-&gt;reCaptcha-&gt;process($reCaptcha);&lt;br /&gt;&lt;br /&gt;        return $response[&#39;success&#39;] ? true : false;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public function saveRegistrationInfo($data)&lt;br /&gt;    {&lt;br /&gt;        // Save information into database&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;&lt;b&gt;Step 7:&lt;/b&gt; Create a file &lt;b&gt;database.php&lt;/b&gt; paste below code into it. This class act as wrapper class to manipulate database operation.&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;class Database extends \PDO&lt;br /&gt;{&lt;br /&gt;    public $db;&lt;br /&gt;    &lt;br /&gt;    public function __construct($dns,  $username, $password)&lt;br /&gt;    {&lt;br /&gt;        $this-&gt;db = parent::__construct($dns,  $username, $password);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public function getConnection ()&lt;br /&gt;    {&lt;br /&gt;        return isset($this-&gt;db) ? $this-&gt;db : null;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-LvRf4jVZMqY/VIIC1_lD6HI/AAAAAAAAAtE/F4khXuq1AWo/s1600/reCAPTCHA_registration_page.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-LvRf4jVZMqY/VIIC1_lD6HI/AAAAAAAAAtE/F4khXuq1AWo/s400/reCAPTCHA_registration_page.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;blockquote&gt;[Note: Make sure curl extension enabled in your php.ini file.]&lt;/blockquote&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;  Using Javascript API for reCAPTCHA:&lt;/h2&gt;&lt;p&gt; Another easiest way to integrate reCAPTCHA into your website is using javascript API. You can simply include api.js and &lt;b&gt;div&lt;/b&gt; to render reCAPTCHA as below.  &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div&amp;nbsp;class=&amp;quot;g-recaptcha&amp;quot;&amp;nbsp;data-sitekey=&amp;quot;your_site_key&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Explicitly render using javascript onload&lt;/h2&gt; &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&amp;#x3C;html&amp;#x3E;&lt;br /&gt;  &amp;#x3C;head&amp;#x3E;&lt;br /&gt;    &amp;#x3C;title&amp;#x3E;reCAPTCHA demo: Explicit render after an onload callback&amp;#x3C;/title&amp;#x3E;&lt;br /&gt;    &amp;#x3C;script type=&amp;#x22;text/javascript&amp;#x22;&amp;#x3E;&lt;br /&gt;      var onloadCallback = function() {&lt;br /&gt;        grecaptcha.render(&amp;#x27;html_element&amp;#x27;, {&lt;br /&gt;          &amp;#x27;sitekey&amp;#x27; : &amp;#x27;your_site_key&amp;#x27;&lt;br /&gt;        });&lt;br /&gt;      };&lt;br /&gt;    &amp;#x3C;/script&amp;#x3E;&lt;br /&gt;  &amp;#x3C;/head&amp;#x3E;&lt;br /&gt;  &amp;#x3C;body&amp;#x3E;&lt;br /&gt;    &amp;#x3C;form action=&amp;#x22;&amp;#x22; method=&amp;#x22;POST&amp;#x22;&amp;#x3E;&lt;br /&gt;      &amp;#x3C;div id=&amp;#x22;html_element&amp;#x22;&amp;#x3E;&amp;#x3C;/div&amp;#x3E;&lt;br /&gt;      &amp;#x3C;br&amp;#x3E;&lt;br /&gt;      &amp;#x3C;input type=&amp;#x22;submit&amp;#x22; value=&amp;#x22;Submit&amp;#x22;&amp;#x3E;&lt;br /&gt;    &amp;#x3C;/form&amp;#x3E;&lt;br /&gt;    &amp;#x3C;script src=&amp;#x22;https://www.google.com/recaptcha/api.js?onload=onloadCallback&amp;#x26;render=explicit&amp;#x22; async defer&amp;#x3E;&amp;#x3C;/script&amp;#x3E;&lt;br /&gt;  &amp;#x3C;/body&amp;#x3E;&lt;br /&gt;&amp;#x3C;/html&amp;#x3E;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Minimum Browser Requirement:&lt;/h2&gt; &lt;p&gt;Chrome 3.0.195,  Firefox 3.0, Internet Explorer 7.0,  Opera 10.10, Safari 4.0 &lt;/p&gt;   &lt;h2 class=&quot;heading-class&quot;&gt;  Conclusion:&lt;/h2&gt; &lt;p&gt;Hope you found this article helpful. Don&#39;t forget to like, share with friends, or leave your comments below.  &lt;/p&gt; &lt;p&gt; Keep visiting for latest posts. Have a nice day. &lt;/p&gt;     &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/1040434225699159256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2014/12/google-latest-update-recaptcha-are-you.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/1040434225699159256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/1040434225699159256'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2014/12/google-latest-update-recaptcha-are-you.html' title='Google introduced reCaptcha-“Are you a Robot ?” app using PHP'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-3x_LzL8FQtw/VIHyqz2lg9I/AAAAAAAAAsk/KkwSkfBWXpg/s72-c/Google_reCaptcha.gif" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-912436945341763681</id><published>2014-12-02T04:07:00.000+05:30</published><updated>2014-12-06T10:23:30.838+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="AJax"/><category scheme="http://www.blogger.com/atom/ns#" term="Cygnite Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="facebook"/><category scheme="http://www.blogger.com/atom/ns#" term="image cropping"/><category scheme="http://www.blogger.com/atom/ns#" term="Mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="thumbnail image"/><category scheme="http://www.blogger.com/atom/ns#" term="web development"/><title type='text'>Facebook style profile photo upload + Resize Image + Saving into database</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt; &lt;p&gt;My last article was &lt;a href=&quot;http://www.appsntech.com/2014/11/facebook-style-profile-photo-upload.html&quot;&gt; “How to build Facebook style profile photo upload using PHP + JQuery + Ajax Part1”. &lt;/a&gt;.  This is continuation of my last article, last tutorial I show you how to upload profile picture using jquery, ajax, in this tutorial I will show you how to create thumbnail to fit the profile picture and saving into database.  &lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Profile Picture Upload and Thumbnail Creation:&lt;/h2&gt; &lt;p&gt;To achieve this I am using Cygnite PHP framework, if you had built application already, would like to use tiny component rather than using entire framework, you can use standalone Cygnite File component for image uploading and creating thumbnail image.   &lt;/p&gt;&lt;br /&gt;&lt;p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.appsntech.com/2014/12/facebook-style-profile-image-crop.html&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-2GZfayc3Bt0/VHzsRranwxI/AAAAAAAAAsY/bGCJ5Ul8I2E/s1600/crop-image-using-php.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;/p&gt;&lt;br /&gt; &lt;p&gt;  In previous tutorial we already created controller, view and js files. Open &lt;b&gt;apps/controllers/ProfileController.php&lt;/b&gt;, import namespace to include thumbnail component, and add below code after uploading the file upload success to generate thumbnail image. I am adding piece of code to upload, creating thumbnail image and saving into database below, you can update below code into our &lt;b&gt;&lt;a href=&quot;http://www.appsntech.com/2014/11/facebook-style-profile-photo-upload.html&quot;&gt;ProfileController.php uploadAction()&lt;/a&gt; as discussed in the part1 tutorial.&lt;/b&gt;&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;use Apps\Models\Profile;&lt;br /&gt;use Cygnite\Common\File\Thumbnail\Image; // available in dev-master &lt;br /&gt;use Apps\Components\Thumbnail\Image; //available in v1.2.4&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$status = Upload::process(function($upload)&lt;br /&gt;{&lt;br /&gt;    $upload-&gt;file = &#39;document&#39;; // Your file input element name&lt;br /&gt;    $upload-&gt;ext = array(&quot;JPG&quot;, &quot;PNG&quot;); // Add validation for image upload&lt;br /&gt;    //$upload-&gt;size = &#39;6144&#39;;// limit the size&lt;br /&gt;&lt;br /&gt;    if  (isset($_FILES[&#39;document&#39;]))  {&lt;br /&gt;&lt;br /&gt;        $fileArray = array();&lt;br /&gt;        $fileArray = pathinfo($_FILES[&#39;document&#39;][&#39;name&#39;]);&lt;br /&gt;&lt;br /&gt;        if ($upload-&gt;save(array(&quot;destination&quot;=&gt; &quot;upload&quot;,  &quot;fileName&quot;=&gt;$fileArray[&#39;filename&#39;])) ) {&lt;br /&gt;&lt;br /&gt;            // Create thumbnail object&lt;br /&gt;            $thumb = new Image();&lt;br /&gt;            $thumb-&gt;setRootDir(CYGNITE_BASE);&lt;br /&gt;            $thumb-&gt;directory = &#39;upload/&#39;.$_FILES[&#39;document&#39;][&#39;name&#39;];&lt;br /&gt;            $thumb-&gt;fixedWidth = 100;&lt;br /&gt;            $thumb-&gt;fixedHeight = 100;&lt;br /&gt;            $thumb-&gt;thumbPath = &#39;upload/thumbnail/&#39;;&lt;br /&gt;            $thumb-&gt;thumbName = $fileArray[&#39;filename&#39;];&lt;br /&gt;&lt;br /&gt;            if ( $thumb-&gt;resize() ) {&lt;br /&gt;&lt;br /&gt;                // Save profile information into database&lt;br /&gt;                 $profile = new Profile();&lt;br /&gt;                 $profile-&gt;name = &#39;Sanjoy Dey&#39;;&lt;br /&gt;                 $profile-&gt;original_image_path = CYGNITE_BASE.&#39;upload/&#39;;&lt;br /&gt;                 $profile-&gt;image = $_FILES[&#39;document&#39;][&#39;name&#39;];&lt;br /&gt;                 $profile-&gt;thumbnail_image_path = CYGNITE_BASE.&#39;upload/thumbnail/&#39;;&lt;br /&gt;                 $profile-&gt;save();&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            $response= array(&#39;status&#39; =&gt; true, &#39;msg&#39; =&gt; &#39;Profile Picture Uploaded Successfully!&#39; );&lt;br /&gt;        } else {&lt;br /&gt;            $response = array(&#39;status&#39; =&gt; false, &#39;msg&#39; =&gt; implode(&#39;, \n&#39;, $upload-&gt;getError()) );&lt;br /&gt;        }&lt;br /&gt;        header(&#39;Content-type: application/json&#39;);&lt;br /&gt;        return  json_encode($response);&lt;br /&gt;    }&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;echo $status ;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; We are storing the thumbnail image into &lt;b&gt;/cygnite/upload/thumbnail/&lt;/b&gt; directory and saving into &lt;b&gt;table &#39;profile&#39;&lt;/b&gt;.  &lt;/p&gt;  &lt;p&gt;   We will save the thumbnail image path and original image path into database as above. let me assume you have already set database connection into &lt;b&gt;apps/configs/database.php&lt;/b&gt;&lt;/p&gt; &lt;p&gt;If you are building session based application. You can simply check user session id to identify user profile image and display it. &lt;/p&gt;   &lt;h2 class=&quot;heading-class&quot;&gt; Using Standalone Cygnite File Thumbnail Component for creating thumbnail image: &lt;/h2&gt;  &lt;p&gt;  If you are using standalone file thumbnail component to create thumbnail image &lt;a href=&quot;http://www.appsntech.com/2014/11/facebook-style-profile-photo-upload.html&quot;&gt;(Discussed in previous post)&lt;/a&gt; than install file component from &lt;a href=&quot;https://packagist.org/packages/cygnite/file&quot;&gt;composer repository&lt;/a&gt; and below code to resize. &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt; require &#39;vendor/autoload.php&#39;;&lt;br /&gt;&lt;br /&gt; use Cygnite\Common\File\Thumbnail\Image;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; $thumb = new Image();&lt;br /&gt; $thumb-&gt;setRootDir(getcwd());&lt;br /&gt; $thumb-&gt;directory = getcwd().&#39;/upload/profile-picture.jpg&#39;;// your dynamic image path&lt;br /&gt; $thumb-&gt;fixedWidth = 100;&lt;br /&gt; $thumb-&gt;fixedHeight = 100;&lt;br /&gt; $thumb-&gt;thumbPath = &#39;upload/thumbnail/&#39;;&lt;br /&gt; $thumb-&gt;thumbName = &#39;profile_thumbnail_image&#39;;&lt;br /&gt;        &lt;br /&gt; if ( $thumb-&gt;resize() ) {&lt;br /&gt;    // success&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;     &lt;h2 class=&quot;heading-class&quot;&gt; Conclusion: &lt;/h2&gt; &lt;p&gt;  Hope you found this article helpful. If you are interested to write tutorial for us please post me. Please don’t forget to like, share with friends, or leave your comments below.  &lt;/p&gt; &lt;p&gt;Keep visiting for upcoming article. Have a nice day.  &lt;/p&gt;  &lt;/div&gt;</content><link rel="related" href="http://www.appsntech.com/2014/12/facebook-style-profile-image-crop.html" title="Facebook style profile photo upload + Resize Image + Saving into database"/><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/912436945341763681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2014/12/facebook-style-profile-image-crop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/912436945341763681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/912436945341763681'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2014/12/facebook-style-profile-image-crop.html' title='Facebook style profile photo upload + Resize Image + Saving into database'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-2GZfayc3Bt0/VHzsRranwxI/AAAAAAAAAsY/bGCJ5Ul8I2E/s72-c/crop-image-using-php.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-5258678184548344204</id><published>2014-11-24T00:14:00.001+05:30</published><updated>2015-06-29T21:38:57.066+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="AJax"/><category scheme="http://www.blogger.com/atom/ns#" term="facebook"/><category scheme="http://www.blogger.com/atom/ns#" term="File Upload"/><category scheme="http://www.blogger.com/atom/ns#" term="Jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Upload"/><category scheme="http://www.blogger.com/atom/ns#" term="web design"/><category scheme="http://www.blogger.com/atom/ns#" term="web development"/><title type='text'>Facebook style profile photo upload using PHP + JQuery +Ajax Part1</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt; &lt;p&gt;Hello guys, My last article was &lt;a href=&quot;http://www.appsntech.com/2014/11/facebook-style-autocomplete-using-angular-js-php.html&quot;&gt; “How to build Facebook style Autocomplete using Angular JS, Cygnite PHP, Mysql and Bootstrap template” &lt;/a&gt;. Recently I received a request from one of my reader that “How to build Facebook style profile photo upload, creating thumbnail and save into server ?”. I will write the same here today. You might have notice in many social network site, in profile page when you mouseover in your photo &quot;Update Picture&quot; or &quot;Upload Photo&quot; displays. It&#39;s looks cool, as it is not displaying such old type of file upload html element. In this post I will not be able to cover whole tutorial. So I decided to divide the post into part. This tutorial will show you how to create &quot;Facebook style profile photo upload using PHP, JQuery and Ajax.&quot;  &lt;/p&gt; &lt;p&gt;To build this app, I am using Cygnite PHP Framework, JQuery, Ajax, Bootstrap template etc. Using framework make my job easier (Since bootstrap theme, inbuilt libraries, MVC, Widget etc), well structured, also gives flexibility to maintain code. If you don&#39;t wish use entire framework you can also use &lt;a href=&quot;https://packagist.org/packages/cygnite/file&quot; alt=&quot;Cygnite File Component&quot;&gt;Cygnite File Component&lt;/a&gt; to do the same.  &lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Installing &lt;a href=&quot;https://getcomposer.org/download/&quot;&gt;Composer &lt;/a&gt;and &lt;a href=&quot;http://www.cygniteframework.com&quot;&gt;Cygnite Framework&lt;/a&gt;: &lt;/h2&gt; &lt;p&gt; So the first step is to install Cygnite framework to build our application, I will not write &lt;a href=&quot;&quot;&gt;&quot;How to install Cygnite into local machine&quot;&lt;/a&gt;, as it is covered in my &lt;a href=&quot;http://www.appsntech.com/2014/11/how-to-install-and-configure-cygnite.html&quot;&gt;previous article&lt;/a&gt;. Below links for Installation of Cygnite Framework but Cygnite v1.2.4 doesn&#39;t include File Upload feature, so please update composer.json to download latest framework code (dev-master) or manually update the framework core.&lt;/p&gt; &lt;p&gt;• &lt;a href=&quot;http://www.appsntech.com/2014/11/how-to-install-and-configure-cygnite.html&quot; &gt; Cygnite Framework- Composer Installation &lt;/a&gt; &lt;/p&gt;&lt;p&gt;• &lt;a href=&quot;https://github.com/sanjoydesk/cygniteframework/&quot; &gt; Manual Download from GITHUB &lt;/a&gt;&lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://demo-aapsntech.16mb.com/cygnite/index.php/profile/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-x3vBzcMtaGk/VHIs94CmQdI/AAAAAAAAArk/KDhkxWvk-d4/s400/facebook_style_profile_picture_upload.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;   &lt;p&gt;&lt;a href=&quot;http://demo-aapsntech.16mb.com/cygnite/index.php/profile/&quot; class=&quot;btn btn-primary btn-&quot; target=&quot;_blank&quot; style=&quot;margin:20px 10px;color:#fff;&quot;&gt;&lt;i class=&quot;glyphicon glyphicon-eye-open&quot;&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp;Live Demo&lt;/a&gt;   &lt;a href=&quot;https://app.box.com/s/j2a4lqffhyy46bl7bqvo&quot; class=&quot;pull-left btn btn-info btn-&quot; target=&quot;_blank&quot; style=&quot;margin:20px 10px;color:#fff;&quot;&gt;&lt;i class=&quot;glyphicon glyphicon-download&quot;&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp;Download&lt;/a&gt;&lt;/p&gt;   &lt;p&gt; &lt;b&gt;Step 1: &lt;/b&gt; &lt;br /&gt; Let me consider you have already &lt;a href=&quot;http://www.cygniteframework.com&quot; rel=&quot;nofollow&quot;&gt;Cygnite&lt;/a&gt; installed into your machine. I have installed it into &lt;b&gt;/www/cygnite/&lt;/b&gt; directory. Now create a controller called &lt;b&gt;ProfileController.php&lt;/b&gt; into your &lt;b&gt;/cygnite/apps/controllers/ProfileController.php&lt;/b&gt;. &lt;/p&gt; &lt;p&gt;We will render the default view page using &lt;b&gt;indexAction&lt;/b&gt;. We are not using &lt;b&gt;layout&lt;/b&gt; here, but you can also use layout to make your view page much modular, flexible. Paste below code into your controller to call your view page. &lt;/p&gt;  &lt;pre&gt; &lt;br /&gt;&lt;code class=&quot;php&quot; style=&quot;overflow:scroll;height:450px;&quot;&gt;&lt;br /&gt;&lt;br /&gt;namespace Apps\Controllers;&lt;br /&gt;&lt;br /&gt;use Cygnite\Foundation\Application;&lt;br /&gt;use Cygnite\Mvc\Controller\AbstractBaseController;&lt;br /&gt;use Apps\Models\Country;&lt;br /&gt;use Cygnite\Common\File\Upload\Upload;&lt;br /&gt;use Cygnite\Common\UrlManager\Url;&lt;br /&gt;use Cygnite\FormBuilder\Form;&lt;br /&gt;&lt;br /&gt;class ProfileController extends AbstractBaseController&lt;br /&gt;{&lt;br /&gt;   protected $templateEngine = false;&lt;br /&gt;&lt;br /&gt;   //Plain PHP layout&lt;br /&gt;   //protected $layout = &#39;layout.base&#39;;&lt;br /&gt;  /*&lt;br /&gt;   * Your constructor.&lt;br /&gt;   * @access public&lt;br /&gt;   *&lt;br /&gt;   */&lt;br /&gt;   public function __construct()&lt;br /&gt;   {&lt;br /&gt;      parent::__construct();&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;  /**&lt;br /&gt;   * Default method for your controller. Render welcome page to user&lt;br /&gt;   * @access public&lt;br /&gt;   *&lt;br /&gt;   */&lt;br /&gt;  public function indexAction()&lt;br /&gt;  { &lt;br /&gt;     $this-&gt;render(&#39;index&#39;);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   // Upload profile picture&lt;br /&gt;  public function uploadAction()&lt;br /&gt;  {&lt;br /&gt;    $status = Upload::process(function($upload)&lt;br /&gt;    {&lt;br /&gt;        $upload-&gt;file = &#39;document&#39;; // Your file input element name&lt;br /&gt;        $upload-&gt;ext = array(&quot;JPG&quot;, &quot;PNG&quot;); // Add validation for image upload&lt;br /&gt;        //$upload-&gt;size = &#39;6144&#39;;// limit the size&lt;br /&gt;&lt;br /&gt;        if  (isset($_FILES[&#39;document&#39;])) {&lt;br /&gt;&lt;br /&gt;            if ($upload-&gt;save(array(&quot;destination&quot;=&gt; &quot;upload&quot;,  &quot;fileName&quot;=&gt;&quot;user_profile_&quot;.time()))) {&lt;br /&gt;&lt;br /&gt;                $response= array(&#39;status&#39; =&gt; true, &#39;msg&#39; =&gt; &#39;Uploaded Successfully!&#39; );&lt;br /&gt;            } else {&lt;br /&gt;                $response = array(&#39;status&#39; =&gt; false, &#39;msg&#39; =&gt; implode(&#39;, \n&#39;, $upload-&gt;getError()) );&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            header(&#39;Content-type: application/json&#39;);&lt;br /&gt;            return  json_encode($response);&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;    });&lt;br /&gt;&lt;br /&gt;    echo $status ;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;&lt;b&gt;Step 2: &lt;/b&gt; &lt;br /&gt; When you create a new controller you also need to create a folder into &lt;b&gt;views/&lt;/b&gt; as same name as controller but lowercase inside &lt;b&gt;/cygnite/apps/views/&lt;/b&gt; directory. I am creating my view page called &lt;b&gt;index.view.php&lt;/b&gt; inside &lt;b&gt;/apps/views/profile/index.view.php&lt;/b&gt; and paste below code to render our profile default image. &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&amp;#x3C;script src=&amp;#x22;//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js&amp;#x22;&amp;#x3E;&amp;#x3C;/script&amp;#x3E;&lt;br /&gt;&lt;br /&gt;&amp;#x3C;div class=&amp;#x22;col-sm-9&amp;#x22;&amp;#x3E;&lt;br /&gt;    &amp;#x3C;form enctype=&amp;#x22;multipart/form-data&amp;#x22;&amp;#x3E;&lt;br /&gt;        &amp;#x3C;div id=&amp;#x22;profile&amp;#x22;&amp;#x3E;&lt;br /&gt;         &amp;#x3C;a href=&amp;#x22;javascript:void(0);&amp;#x22;&amp;#x3E;&lt;br /&gt;             &amp;#x3C;img src=&amp;#x22;&amp;#x3C;?php echo Url::getBase(); ?&amp;#x3E;/assets/img/no_image.jpg&amp;#x22; class=&amp;#x22;profile-image&amp;#x22;  id=&amp;#x22;profileImg&amp;#x22;/&amp;#x3E;&lt;br /&gt;               &amp;#x3C;span id=&amp;#x22;uploadTrigger&amp;#x22;&amp;#x3E;&amp;#x3C;b&amp;#x3E;Update Picture&amp;#x3C;/b&amp;#x3E;&amp;#x3C;/span&amp;#x3E;&lt;br /&gt;               &amp;#x3C;input name=&amp;#x22;document&amp;#x22;  type=&amp;#x22;file&amp;#x22;  id=&amp;#x22;file-id&amp;#x22; class=&amp;#x22;active&amp;#x22;/&amp;#x3E;&lt;br /&gt;             &amp;#x3C;/a&amp;#x3E;&lt;br /&gt;        &amp;#x3C;/div&amp;#x3E;&lt;br /&gt;        &amp;#x3C;div style=&amp;#x22;top:2px;&amp;#x22;&amp;#x3E; &amp;#x3C;/div&amp;#x3E;&lt;br /&gt;        &amp;#x3C;div id=&amp;#x22;status_msg&amp;#x22;&amp;#x3E; &amp;#x3C;/div&amp;#x3E;&lt;br /&gt;    &amp;#x3C;/form&amp;#x3E;&lt;br /&gt;&lt;br /&gt;&amp;#x3C;/div&amp;#x3E;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;   &lt;p&gt;&lt;b&gt;Step 3: &lt;/b&gt; &lt;br /&gt; Create a js file called profile.js into &lt;b&gt;cygnite/assets/js/profile.js&lt;/b&gt; and paste below code. Cygnite is shipped with bootstrap so you can use it or use cdn link. &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code style=&quot;overflow:scroll;height:450px;&quot;&gt;&lt;br /&gt;&lt;br /&gt;$(document).ready(function () {&lt;br /&gt;&lt;br /&gt;    $(&quot;#uploadTrigger&quot;).on(&#39;click&#39;, function(event) {&lt;br /&gt;        $(&quot;#file-id&quot;).trigger(&#39;click&#39;);&lt;br /&gt;    });&lt;br /&gt;&lt;br /&gt;//$(&#39;.hidden&#39;).removeClass(&#39;hidden&#39;).addClass( &#39;active&#39;);&lt;br /&gt;&lt;br /&gt;$(&quot;:file&quot;).change(function() {&lt;br /&gt;&lt;br /&gt;    var file = this.files[0],  name = file.name, size = file.size, type = file.type;&lt;br /&gt;    //Your validation&lt;br /&gt;    var imageType = new Array(&quot;image/png&quot;,&quot;image/jpeg&quot;, &quot;image/gif&quot;, &quot;image/bmp&quot;);&lt;br /&gt;&lt;br /&gt;    if(jQuery.inArray(type, imageType )  == -1) {&lt;br /&gt;        $(&quot;#status_msg&quot;).html(&quot;Valid file formats are: jpg, jpeg,png, gif&quot;).css(&#39;color&#39;, &#39;#F00000&#39;);&lt;br /&gt;        return false;&lt;br /&gt;    }  else {&lt;br /&gt;&lt;br /&gt;        $(&quot;#status_msg&quot;).html(&quot; &quot;);&lt;br /&gt;        if ($(&quot;#file-id&quot;).val() !== &#39;&#39;) {&lt;br /&gt;            var formData = new FormData($(&#39;form&#39;)[0]);&lt;br /&gt;&lt;br /&gt;            $.ajax({&lt;br /&gt;                url: &#39;upload&#39;,  //Server script to process data&lt;br /&gt;                type: &#39;POST&#39;,&lt;br /&gt;                //Ajax events&lt;br /&gt;                beforeSend: function () {&lt;br /&gt;                    $(&#39;#profileImg&#39;).addClass( &#39;profile-image-loading&#39;)&lt;br /&gt;                                    .removeClass(&#39;profile-image&#39;)&lt;br /&gt;                                    .attr(&#39;src&#39;, &#39;/assets/img/fb_loading.gif&#39;);&lt;br /&gt;                },&lt;br /&gt;                success: function (data) {&lt;br /&gt;&lt;br /&gt;                    if (data.status) {&lt;br /&gt;                        var reader = new FileReader();&lt;br /&gt;                        reader.onload = function (e) {&lt;br /&gt;&lt;br /&gt;                        $(&#39;.profile-image-loading&#39;)&lt;br /&gt;                            .addClass(&#39;profile-image&#39;)&lt;br /&gt;                            .removeClass(&#39;profile-image-loading&#39;)&lt;br /&gt;                            .attr(&#39;src&#39;, e.target.result);&lt;br /&gt;                           return false;&lt;br /&gt;                        }&lt;br /&gt;                        reader.readAsDataURL(file);&lt;br /&gt;&lt;br /&gt;                        $(&quot;#status_msg&quot;).html(data[&#39;msg&#39;]).css(&#39;color&#39;, &#39;#009900&#39;);&lt;br /&gt;                    } else {&lt;br /&gt;                        $(&quot;#status_msg&quot;).html(data[&#39;msg&#39;]).css(&#39;color&#39;, &#39;#F00000&#39;);&lt;br /&gt;                        return false;&lt;br /&gt;                    }&lt;br /&gt;                },&lt;br /&gt;                // Form data&lt;br /&gt;                data: formData,&lt;br /&gt;                //Options to tell jQuery not to process data or worry about content-type.&lt;br /&gt;                cache: false,&lt;br /&gt;                contentType: false,&lt;br /&gt;                processData: false&lt;br /&gt;            });&lt;br /&gt;        } else {&lt;br /&gt;        alert(&quot;Please select valid image.&quot;);&lt;br /&gt;        return false;&lt;br /&gt;        }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Using Standalone Cygnie File Component for File Upload: &lt;/h2&gt; &lt;p&gt;If you have already built an application and willing to use only standalone file component you can simply install Cygnite/File component using composer. I have installed composer globally in my system. &lt;/p&gt; &lt;p&gt;Create a composer.json file into your root directory where you want to install component, paste below code and save it. &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;{&lt;br /&gt;  &quot;require&quot;: {&lt;br /&gt;    &quot;php&quot;: &quot;&gt;=5.4.0&quot;,&lt;br /&gt;    &quot;cygnite/file&quot; : &quot;dev-master&quot;  &lt;br /&gt;  },&lt;br /&gt;  &quot;autoload&quot;: {&lt;br /&gt;    &quot;psr-0&quot;: {&lt;br /&gt;        &quot;Cygnite\\Common\\File&quot;: &quot;cygnite/file/&quot;&lt;br /&gt;     }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;Now open terminal/command prompt, change to your project directory where composer.json exists and issue below command to install File Upload Component to do the same stuff.&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;composer install &lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;I am creating index.php file to access Cygnite File component, and below code to access File Upload feature.&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;require &#39;vendor/autoload.php&#39;;&lt;br /&gt;&lt;br /&gt;use Cygnite\Common\File\Upload\Upload;&lt;br /&gt;&lt;br /&gt;$upload = new Upload();&lt;br /&gt;&lt;br /&gt;//$upload-&gt;setUploadSize(62092);&lt;br /&gt;$upload-&gt;file = &#39;document&#39;;&lt;br /&gt;$upload-&gt;ext = array(&quot;JPG&quot;);&lt;br /&gt;$upload-&gt;size = &#39;1024&#39;;&lt;br /&gt;&lt;br /&gt;if(isset($_FILES[&#39;document&#39;])) {&lt;br /&gt;&lt;br /&gt;    if ( $upload-&gt;save(array(&quot;destination&quot;=&gt; &quot;upload&quot;, /* &quot;fileName&quot;=&gt;&quot;demo_icon&quot;,&quot;multiUpload&quot;=&gt;true*/)) ) {&lt;br /&gt;        $response = json_encode(array(&#39;status&#39; =&gt; true, &#39;msg&#39; =&gt; &#39;Uploaded Successfully!&#39; ));&lt;br /&gt;    }  else {&lt;br /&gt;        $response = json_encode(array(&#39;status&#39; =&gt; false, &#39;msg&#39; =&gt; $upload-&gt;getError() ));&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    echo header(&#39;Content-type: application/json&#39;) .$response;exit;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; Or you can also use Closure beautiful syntax as below. &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;require &#39;vendor/autoload.php&#39;;&lt;br /&gt;&lt;br /&gt;use Cygnite\Common\File\Upload\Upload;&lt;br /&gt;&lt;br /&gt;function fileUpload()&lt;br /&gt;{&lt;br /&gt;    $status = Upload::process( function($upload)   {&lt;br /&gt;        $upload-&gt;file = &#39;document&#39;;&lt;br /&gt;        $upload-&gt;ext = array(&quot;JPG&quot;);&lt;br /&gt;        $upload-&gt;size = &#39;5000000&#39;;&lt;br /&gt;&lt;br /&gt;        if  (isset($_FILES[&#39;document&#39;])) {&lt;br /&gt;&lt;br /&gt;            if ( $upload-&gt;save(array(&quot;destination&quot;=&gt; &quot;upload&quot;,  &quot;fileName&quot;=&gt;&quot;demo_&quot;.time(),/*&quot;multiUpload&quot;=&gt;true*/)) ) {&lt;br /&gt;                $response= array(&#39;status&#39; =&gt; true, &#39;msg&#39; =&gt; &#39;Uploaded Successfully!&#39; );&lt;br /&gt;            }  else {&lt;br /&gt;                $response = array(&#39;status&#39; =&gt; false, &#39;msg&#39; =&gt; implode(&#39;, \n&#39;, $upload-&gt;getError()) );&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            header(&#39;Content-type: application/json&#39;);&lt;br /&gt;            return  json_encode($response);&lt;br /&gt;        }&lt;br /&gt;    });&lt;br /&gt;&lt;br /&gt;    echo $status ;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; Now you can call the fileUpload function  as usual in core php and calling this method in ajax url will process your ajax file upload. Don&#39;t forget to Include all above necessary css and jquery files in order to make the app work. &lt;/p&gt; &lt;p&gt; Finally go to browser and call the application by issuing below url.&lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;http://localhost/cygnite/index.php/profile/&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Conclusion: &lt;/h2&gt; &lt;p&gt;   We sincerely hope you found this article helpful. I will write “How to create thumbnail image / cropping to make image fit into profile area?” in my next post(part 2). If you would like to learn specific tutorial, you can also request tutorial or you are really interested to write tutorial for us please post me. Please don’t forget to like, share with friends, or leave your comments below.   &lt;/p&gt; &lt;p&gt;Keep visiting for upcoming posts. Have a nice day.  &lt;/p&gt;        &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/5258678184548344204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2014/11/facebook-style-profile-photo-upload.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/5258678184548344204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/5258678184548344204'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2014/11/facebook-style-profile-photo-upload.html' title='Facebook style profile photo upload using PHP + JQuery +Ajax Part1'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-x3vBzcMtaGk/VHIs94CmQdI/AAAAAAAAArk/KDhkxWvk-d4/s72-c/facebook_style_profile_picture_upload.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-4280651457901824317</id><published>2014-11-15T13:46:00.000+05:30</published><updated>2015-04-08T21:54:40.127+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular js with PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="bootstrap"/><category scheme="http://www.blogger.com/atom/ns#" term="Cygnite Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="facebook"/><category scheme="http://www.blogger.com/atom/ns#" term="Mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="web design"/><category scheme="http://www.blogger.com/atom/ns#" term="web development"/><title type='text'>Facebook Style Autocomplete Using Angular JS + PHP + MYSQL + Bootstrap</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt; &lt;p&gt;Hello guys, in my last article shown you  &lt;a href=&quot;http://www.appsntech.com/2014/11/generate-crud-application-within-2.html&quot;&gt; &quot;Generate CRUD application within 2 min&quot; &lt;/a&gt;.  Today I would like to share with you  &quot;How to build Facebook style Autocomplete using Angular JS, Cygnite PHP, Mysql and Bootstrap template”. Angular JS is awesome front end framework by Google used to build interactive web UI. Angular allow you to build clean structured, maintainable front end applications. This tutorial will help you to learn how to make autocomplete textbox using Angular JS, PHP, MySql, Bootstrap theme etc.  &lt;/p&gt; &lt;p&gt;To achieve this we will also use Bootstrap UI with Angular JS. To save our time from writing queries and build clean MVC architecture we are also using Cygnite PHP Framework. You may use core php and mysql functions.&lt;/p&gt; &lt;p&gt;After downloading and installing composer we are ready to set-up &lt;a href=&quot;http://www.cygniteframework.com&quot; rel=&quot;nofollow&quot;&gt;Cygnite &lt;/a&gt; into our local machine and configure database etc. to get started with our next project.&lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-tbcaB1uZIgE/VGZmLaYC0pI/AAAAAAAAArU/kuFm9NsFwpQ/s1600/facebook_style_autocomplete_using_angular_js.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-tbcaB1uZIgE/VGZmLaYC0pI/AAAAAAAAArU/kuFm9NsFwpQ/s400/facebook_style_autocomplete_using_angular_js.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;p&gt;&lt;button href=&quot;http://demo-aapsntech.16mb.com/cygnite/index.php/angular/&quot; class=&quot;btn btn-primary btn-&quot; target=&quot;_blank&quot; style=&quot;margin:20px 10px;color:#fff;&quot;&gt;&lt;i class=&quot;glyphicon glyphicon-eye-open&quot;&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp;Live Demo&lt;/button&gt;   &lt;button href=&quot;https://app.box.com/s/yqyq0toxuo5n7ton0vol&quot; class=&quot;pull-left btn btn-info btn-&quot; target=&quot;_blank&quot; style=&quot;margin:20px 10px;color:#fff;&quot;&gt;&lt;i class=&quot;glyphicon glyphicon-download&quot;&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp;Download&lt;/button&gt;&lt;/p&gt;  &lt;p&gt;      &lt;ul&gt;              &lt;li&gt;&lt;blockquote&gt; May be Interested, Check : &lt;a href=&quot;http://www.appsntech.com/2015/04/building-simple-product-management-app.html&quot;&gt; Building A Simple Product Management App Using Angular JS + Cygnite PHP + Bootstrap&lt;/a&gt;&lt;/blockquote&gt; &lt;/li&gt;       &lt;/ul&gt; &lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Step 1:&lt;/h2&gt; &lt;p&gt;First &lt;a href=&quot;http://www.appsntech.com/2014/11/how-to-install-and-configure-cygnite.html&quot;&gt;download the Cygnite either using composer &lt;/a&gt; or &lt;a href=&quot;https://github.com/sanjoydesk/cygniteframework/&quot;&gt;manually from GITHUB repository&lt;/a&gt;. You may also follow &lt;a href=&quot;http://www.appsntech.com/2014/11/how-to-install-and-configure-cygnite.html&quot;&gt;video tutorial to setup Cygnite into local system&lt;/a&gt;.  &lt;/p&gt; &lt;p&gt; &lt;blockquote&gt; &lt;span style=&quot;color:#888;&quot;&gt;You may be interested to read &lt;/span&gt; &lt;a href=&quot;http://www.appsntech.com/2015/04/building-simple-product-management-app.html&quot;&gt;Building A Simple Product Management App Using Angular JS + Cygnite PHP + Bootstrap &lt;/a&gt;&lt;/blockquote&gt; &lt;/p&gt;   &lt;h2 class=&quot;heading-class&quot;&gt; Step 2:&lt;/h2&gt; &lt;p&gt;Download Angular JS, ui-bootstrap.js and paste into &lt;b&gt;/assets/js/angular/&lt;/b&gt; path. Create a view page called &lt;b&gt;autocomplete.view.php&lt;/b&gt; into the &lt;b&gt;apps/views/angular/&lt;/b&gt; directory. Paste below code into your view page.&lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php html&quot; style=&quot;overflow:scroll;height:450px;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&amp;#x3C;!DOCTYPE html&amp;#x3E;&lt;br /&gt;&amp;#x3C;?php&lt;br /&gt;use Cygnite\AssetManager\Asset;&lt;br /&gt;use Cygnite\Common\UrlManager\Url;&lt;br /&gt;use Cygnite\AssetManager\AssetCollection;&lt;br /&gt;&lt;br /&gt;$asset =  AssetCollection::make(function($asset)&lt;br /&gt;{&lt;br /&gt;  $asset-&amp;#x3E;add(&amp;#x27;style&amp;#x27;, array(&amp;#x27;path&amp;#x27; =&amp;#x3E; &amp;#x27;assets/css/angular/bootstrap.min.css&amp;#x27;, &amp;#x27;media&amp;#x27; =&amp;#x3E; &amp;#x27;&amp;#x27;, &amp;#x27;title&amp;#x27; =&amp;#x3E; &amp;#x27;&amp;#x27;))                &lt;br /&gt;    /* -&amp;#x3E;add(&amp;#x27;script&amp;#x27;, array(&amp;#x27;path&amp;#x27; =&amp;#x3E; &amp;#x27;assets/js/cygnite/jquery.js&amp;#x27;))&lt;br /&gt;     -&amp;#x3E;add(&amp;#x27;script&amp;#x27;, array(&amp;#x27;path&amp;#x27; =&amp;#x3E; &amp;#x27;assets/js/angular/angular.min.js&amp;#x27;))*/&lt;br /&gt;     -&amp;#x3E;add(&amp;#x27;script&amp;#x27;, array(&amp;#x27;path&amp;#x27; =&amp;#x3E; &amp;#x27;assets/js/angular/ui-bootstrap.js&amp;#x27;))&lt;br /&gt;     -&amp;#x3E;add(&amp;#x27;script&amp;#x27;, array(&amp;#x27;path&amp;#x27; =&amp;#x3E; &amp;#x27;assets/js/angular/app.js&amp;#x27;));&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&lt;br /&gt;  return $asset;&lt;br /&gt;});&lt;br /&gt;?&amp;#x3E;&lt;br /&gt;&amp;#x3C;html ng-app=&amp;#x22;MyTutorialApp&amp;#x22;&amp;#x3E;&lt;br /&gt;&amp;#x3C;head&amp;#x3E;&lt;br /&gt;&amp;#x3C;title&amp;#x3E;Facebook Style Autocomplete Using AngularJS + PHP + MySQL&amp;#x3C;/title&amp;#x3E;&lt;br /&gt;&amp;#x9;&lt;br /&gt;&amp;#x3C;?php $asset-&amp;#x3E;dump(&amp;#x27;style&amp;#x27;);// Style block ?&amp;#x3E;&lt;br /&gt;&amp;#x3C;link href=&amp;#x22;http://fonts.googleapis.com/css?family=Open+Sans:400,600,300,700&amp;#x22; rel=&amp;#x22;stylesheet&amp;#x22; type=&amp;#x22;text/css&amp;#x22;&amp;#x3E; &amp;#x3C;/link&amp;#x3E;&lt;br /&gt;&amp;#x3C;link rel=&amp;#x22;shortcut icon&amp;#x22; href=&amp;#x22;&amp;#x3C;?php echo Url::getBase(); ?&amp;#x3E;assets/img/cygnite/fevicon.png&amp;#x22; &amp;#x3E; &amp;#x3C;/link&amp;#x3E;&lt;br /&gt;&lt;br /&gt; &amp;#x3C;/head&amp;#x3E;&lt;br /&gt; &amp;#x3C;body&amp;#x3E;&lt;br /&gt;&amp;#x9;&lt;br /&gt; &amp;#x3C;input type=&amp;#x22;hidden&amp;#x22; id=&amp;#x22;baseUrl&amp;#x22; value=&amp;#x22;&amp;#x3C;?php echo Url::getBase(); ?&amp;#x3E;&amp;#x22;/&amp;#x3E;&lt;br /&gt;    &lt;br /&gt; &amp;#x3C;div class=&amp;#x22;navbar navbar-default&amp;#x22; id=&amp;#x22;navbar&amp;#x22;&amp;#x3E;&lt;br /&gt; &amp;#x3C;div class=&amp;#x22;container&amp;#x22; id=&amp;#x22;navbar-container&amp;#x22;&amp;#x3E;&lt;br /&gt; &amp;#x3C;div class=&amp;#x22;navbar-header&amp;#x22;&amp;#x3E;&lt;br /&gt; &amp;#x3C;a href=&amp;#x22;#&amp;#x22; class=&amp;#x22;navbar-brand&amp;#x22;&amp;#x3E;&lt;br /&gt; &amp;#x3C;small&amp;#x3E;&lt;br /&gt; &amp;#x3C;i class=&amp;#x22;glyphicon glyphicon glyphicon-log-out&amp;#x22;&amp;#x3E;&amp;#x3C;/i&amp;#x3E;&lt;br /&gt;   Angular JS Demo&lt;br /&gt; &amp;#x3C;/small&amp;#x3E;&lt;br /&gt; &amp;#x3C;/a&amp;#x3E;&amp;#x3C;!-- Brand --&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&lt;br /&gt;&amp;#x3C;/div&amp;#x3E;&amp;#x3C;!-- /.navbar-header --&amp;#x3E;&lt;br /&gt;&lt;br /&gt;&amp;#x9;&amp;#x3C;div class=&amp;#x22;navbar-header pull-right&amp;#x22; role=&amp;#x22;navigation&amp;#x22;&amp;#x3E;&lt;br /&gt;        &amp;#x3C;a href=&amp;#x22;http://www.appsntech.com/2014/11/facebook-style-autocomplete-using-angular-js-php.html&amp;#x22; class=&amp;#x22;btn btn-sm btn-default nav-button-margin&amp;#x22;&amp;#x3E; &amp;#x3C;i class=&amp;#x22;glyphicon glyphicon-book&amp;#x22;&amp;#x3E;&amp;#x3C;/i&amp;#x3E;&amp;#x26;nbsp;Tutorial Link&amp;#x3C;/a&amp;#x3E;&lt;br /&gt;        &amp;#x3C;a href=&amp;#x22;https://app.box.com/s/yqyq0toxuo5n7ton0vol&amp;#x22; class=&amp;#x22;btn btn-sm btn-success nav-button-margin&amp;#x22;&amp;#x3E; &amp;#x3C;i class=&amp;#x22;glyphicon glyphicon-download&amp;#x22;&amp;#x3E;&amp;#x3C;/i&amp;#x3E;&amp;#x26;nbsp;Download Project&amp;#x3C;/a&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x3C;/div&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x3C;/div&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x3C;/div&amp;#x3E;&lt;br /&gt;&amp;#x3C;div class=&amp;#x22;row&amp;#x22;&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x3C;div class=&amp;#x22;container&amp;#x22;&amp;#x3E;&lt;br /&gt;&amp;#x9; &amp;#x3C;div class=&amp;#x22;col-sm-9&amp;#x22;&amp;#x3E; &lt;br /&gt;&amp;#x9;  &amp;#x3C;div&amp;#x3E;&lt;br /&gt;&amp;#x9; &amp;#x3C;!-- Bind the country into the template --&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x3C;script type=&amp;#x22;text/ng-template&amp;#x22; id=&amp;#x22;autocomplete-template&amp;#x22;&amp;#x3E;&lt;br /&gt;        &amp;#x3C;a&amp;#x3E;&lt;br /&gt;        &amp;#x3C;span bind-html-unsafe=&amp;#x22;match.label | typeaheadHighlight:query&amp;#x22;&amp;#x3E;&amp;#x3C;/span&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x3C;i&amp;#x3E;({{match.model.country_name}})&amp;#x3C;/i&amp;#x3E;&lt;br /&gt;        &amp;#x3C;/a&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x3C;/script&amp;#x3E;&lt;br /&gt;&lt;br /&gt;&amp;#x9;&amp;#x3C;blockquote&amp;#x3E;&amp;#x3C;h1&amp;#x3E;&amp;#x3C;a href=&amp;#x22;http://www.appsntech.com/2014/11/facebook-style-autocomplete-using-angular-js-php.html&amp;#x22;&amp;#x3E;Facebook Style Autocomplete Using AngularJS + PHP + MySQL&amp;#x3C;/a&amp;#x3E;&amp;#x3C;/h1&amp;#x3E;&amp;#x3C;/blockquote&amp;#x3E;&lt;br /&gt;&lt;br /&gt;&amp;#x9;&amp;#x3C;form class=&amp;#x22;form-search&amp;#x22; ng-controller=&amp;#x22;angularAutocompleteController&amp;#x22;&amp;#x3E;&lt;br /&gt;&amp;#x9;Selected Country: {{selectedCountries.country_name}}&lt;br /&gt;&amp;#x9;&amp;#x3C;br&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x3C;!-- Typehead to input field--&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x3C;input type=&amp;#x22;text&amp;#x22; ng-model=&amp;#x22;selectedCountries&amp;#x22; auto-complete ui-items=&amp;#x22;countries&amp;#x22;   &lt;br /&gt;&amp;#x9;placeholder=&amp;#x22;Search Countries&amp;#x22; typeahead=&amp;#x22;c as c.country_name for c in countries | filter:$viewValue | limitTo:10&amp;#x22; &lt;br /&gt;&amp;#x9;typeahead-min-length=&amp;#x27;1&amp;#x27; &lt;br /&gt;&amp;#x9;typeahead-on-select=&amp;#x27;onSelectPart($item, $model, $label)&amp;#x27; &lt;br /&gt;&amp;#x9;typeahead-template-url=&amp;#x22;autocomplete-template&amp;#x22; &lt;br /&gt;&amp;#x9;class=&amp;#x22;form-control&amp;#x22; style=&amp;#x22;width:350px;&amp;#x22;&amp;#x3E;&lt;br /&gt;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&lt;br /&gt;       &amp;#x3C;i class=&amp;#x22;icon-search nav-search-icon&amp;#x22;&amp;#x3E;&amp;#x3C;/i&amp;#x3E;&lt;br /&gt;      &amp;#x3C;/form&amp;#x3E;&lt;br /&gt;     &amp;#x3C;/div&amp;#x3E;&amp;#x9;&amp;#x9;&amp;#x9;&amp;#x9;&lt;br /&gt;    &amp;#x3C;/div&amp;#x3E;    &amp;#x9;&lt;br /&gt;   &amp;#x3C;/div&amp;#x3E;&lt;br /&gt;&amp;#x3C;/div&amp;#x3E;&lt;br /&gt;    &lt;br /&gt;&amp;#x3C;script src=&amp;#x22;//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js&amp;#x22;&amp;#x3E;&amp;#x3C;/script&amp;#x3E;&lt;br /&gt;&amp;#x3C;script src=&amp;#x22;//ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js&amp;#x22;&amp;#x3E;&amp;#x3C;/script&amp;#x3E;&lt;br /&gt;&lt;br /&gt; &amp;#x3C;?php&lt;br /&gt; //Script block. Scripts will render here&lt;br /&gt; $asset-&amp;#x3E;dump(&amp;#x27;script&amp;#x27;);&lt;br /&gt; ?&amp;#x3E;&lt;br /&gt;&amp;#x3C;style type=&amp;#x22;text/css&amp;#x22;&amp;#x3E;&lt;br /&gt;.navbar{border-radius: 0;background: #438EB9;color: #fff;}&lt;br /&gt;.navbar .navbar-brand {color: #FFF;font-size: 24px;text-shadow: none;}&amp;#x9;&lt;br /&gt;&amp;#x3C;/style&amp;#x3E;&amp;#x9;&lt;br /&gt;    &amp;#x3C;/body&amp;#x3E;&lt;br /&gt;&amp;#x3C;/html&amp;#x3E;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;We are binding the typehead into the input field.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Step 3:&lt;/h2&gt; &lt;p&gt;Create a model class called Country.php into &lt;b&gt;apps/models/Country.php&lt;/b&gt; and paste below code.&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;namespace Apps\Models;&lt;br /&gt;&lt;br /&gt;use Cygnite\Database\Schema;&lt;br /&gt;use Cygnite\Foundation\Application;&lt;br /&gt;use Cygnite\Common\UrlManager\Url;&lt;br /&gt;use Cygnite\Database\ActiveRecord;&lt;br /&gt;&lt;br /&gt;class Country extends ActiveRecord&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    //your database connection name&lt;br /&gt;    protected $database = &#39;tutorials&#39;;&lt;br /&gt;&lt;br /&gt;    // your table name here (Optional)&lt;br /&gt;    protected $tableName = &#39;countries&#39;;&lt;br /&gt;&lt;br /&gt;    protected $primaryKey = &#39;id&#39;;&lt;br /&gt;&lt;br /&gt;    public function __construct()&lt;br /&gt;    {&lt;br /&gt;        parent::__construct();&lt;br /&gt;    }&lt;br /&gt;}// End of the ShoppingProducts Model&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Step 4:&lt;/h2&gt; &lt;p&gt;Configure database connection into your &lt;b&gt;apps/configs/database.php&lt;/b&gt;. Than Create a controller called &lt;b&gt;AngularController.php&lt;/b&gt; inside your &lt;b&gt;apps/controllers/&lt;/b&gt; directory and paste below code.&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;namespace Apps\Controllers;&lt;br /&gt;&lt;br /&gt;use Cygnite\Foundation\Application;&lt;br /&gt;use Cygnite\Mvc\Controller\AbstractBaseController;&lt;br /&gt;use Apps\Models\Country;&lt;br /&gt;&lt;br /&gt;class AngularController extends AbstractBaseController&lt;br /&gt;{&lt;br /&gt;    protected $templateEngine = false;&lt;br /&gt;     /*&lt;br /&gt;     * Your constructor.&lt;br /&gt;     * @access public&lt;br /&gt;     *&lt;br /&gt;     */&lt;br /&gt;    public function __construct()&lt;br /&gt;    {&lt;br /&gt;        parent::__construct();&lt;br /&gt;    }&lt;br /&gt;    /**&lt;br /&gt;     * Default method for your controller. Render welcome page to user.&lt;br /&gt;     * @access public&lt;br /&gt;     *&lt;br /&gt;     */&lt;br /&gt;   public function indexAction()&lt;br /&gt;   {    &lt;br /&gt;        $this-&gt;render(&#39;autocomplete&#39;);//Render view page&lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;   public function countryListAction()&lt;br /&gt;   {&lt;br /&gt;      $countryList = array();&lt;br /&gt;      $country = new Country();&lt;br /&gt;      $countryList = $country-&gt;select(&quot;*&quot;)-&gt;findAll(&#39;ASSOC&#39;);&lt;br /&gt;  &lt;br /&gt;       if (count($countryList) &gt; 0 ) {&lt;br /&gt;    # JSON-encode the response&lt;br /&gt;    echo  json_encode($countryList);&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;}//End of your controller&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Step 5:&lt;/h2&gt; &lt;p&gt;Create a table called &lt;b&gt;“countries”&lt;/b&gt; and &lt;a href=&quot;https://app.box.com/s/81n9661a9g70g8g4zew0&quot;&gt;import countries.sql from here&lt;/a&gt;.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Step 6:&lt;/h2&gt; &lt;p&gt;Now create a js inside your &lt;b&gt;/assets/js/angular/app.js&lt;/b&gt; and paste below code. In this file we will inject bootstrap ui module and use ajax to fetch countries from the database and we will bind the countries into the input field.&lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;js&quot;&gt; &lt;br /&gt;&lt;br /&gt;var app = angular.module(&#39;MyTutorialApp&#39;,  [&#39;ui.bootstrap&#39;]);&lt;br /&gt;&lt;br /&gt;app.controller(&#39;angularAutocompleteController&#39;, function($scope, $http) {&lt;br /&gt;&lt;br /&gt;var baseUrl = $(&quot;#baseUrl&quot;).val();&lt;br /&gt; &lt;br /&gt; getCountryList(); // Load all countries with capitals&lt;br /&gt;  &lt;br /&gt;  function getCountryList(){  &lt;br /&gt;  &lt;br /&gt;  $http.get(baseUrl+&quot;angular/country-list&quot;).success(function(data){&lt;br /&gt;      &lt;br /&gt;        $scope.countries = data; // set the data into the countries&lt;br /&gt;  &lt;br /&gt;    });&lt;br /&gt;    &lt;br /&gt;  };&lt;br /&gt;  &lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Step 7:&lt;/h2&gt; &lt;p&gt;Go to browser and enter the url &lt;b&gt;http://localhost/cygnite/angular/&lt;/b&gt; type the country name and you will see countries are populating into the textbox. &lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Conclusion:&lt;/h2&gt; &lt;p&gt;We sincerely hope you found this article helpful. I will write more about angular coming days. If you would like to see specific you can also request tutorial. Please don&#39;t forget to like, share with friends, or leave your comments below.  &lt;/p&gt; &lt;p&gt;Keep visiting for upcoming articles. Have a nice day. &lt;/p&gt;  &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/4280651457901824317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2014/11/facebook-style-autocomplete-using-angular-js-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/4280651457901824317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/4280651457901824317'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2014/11/facebook-style-autocomplete-using-angular-js-php.html' title='Facebook Style Autocomplete Using Angular JS + PHP + MYSQL + Bootstrap'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-tbcaB1uZIgE/VGZmLaYC0pI/AAAAAAAAArU/kuFm9NsFwpQ/s72-c/facebook_style_autocomplete_using_angular_js.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-5525398995842178343</id><published>2014-11-06T00:28:00.000+05:30</published><updated>2014-11-17T00:18:31.310+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="bootstrap"/><category scheme="http://www.blogger.com/atom/ns#" term="CRUD"/><category scheme="http://www.blogger.com/atom/ns#" term="Cygnite Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="Cygnite framework Code Generator"/><category scheme="http://www.blogger.com/atom/ns#" term="Pagination"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="validation in php"/><category scheme="http://www.blogger.com/atom/ns#" term="web application"/><title type='text'>Generate CRUD application within 2 minute</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt; &lt;p&gt;Hello guys, my last article was about &lt;a href =&quot;http://www.appsntech.com/2014/11/how-to-install-and-configure-cygnite.html&quot;&gt; &quot;How to install and configure Cygnite PHP Framework using Composer&quot;&lt;/a&gt;.  Today I would like to share a tutorial which will help you day to day activity, also boost up your development. Generating &lt;a href=&quot;http://en.wikipedia.org/wiki/Create,_read,_update_and_delete&quot;&gt;CRUD&lt;/a&gt; application is day to day task for almost every developer. Why to spend numerous times on writing CRUD when it is just a 2 minute job to boost up your productivity. Generate you all necessary code for your project as like – INSERT, UPDATE, DELETE, Pagination, Sorting and Field Validation with &lt;a href=&quot;http://getbootstrap.com/&quot;&gt;bootstrap theme&lt;/a&gt; etc within just 2 minute. &lt;/p&gt; &lt;p&gt; Sound Interesting? Yes. &lt;/p&gt; &lt;p&gt;Cygnite PHP Framework makes your job easier with fun at working. Learning new framework is fun and gives you learning curve.  So let me show you how you can generate all above functionalities with in just 2 minute. &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Step 1: &lt;/h2&gt; &lt;p&gt;&lt;a href=&quot;http://www.appsntech.com/2014/11/how-to-install-and-configure-cygnite.html&quot;&gt; Install Cygnite Framework into your local machine&lt;/a&gt;. Set up your database into apps/configs/database.php file&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Step 2: &lt;/h2&gt; &lt;p&gt; Cygnite CRUD is fully model based. So have your table ready against which you would like to generate CRUD. Or you can use Cygnite Migration to create table schema. Migration is the best practice to build schema but let me not go into Migration in this tutorial. I will explain Migration and seeding another post.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Step 3: &lt;/h2&gt; &lt;p&gt;Open your command prompt or terminal. Change the directory to your project root. For example (I am using Windows) if we have installed cygnite into G:\\wamp\www\cygnite\ then you need to enter&lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt; cd wamp/www/cygnite&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; We are going to use Cygnite CLI to generate CRUD application so now we need to change directory to &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt; cd console/bin&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Okay cool! Now we are inside cygnite/console/bin then run below command to generate your CRUD application. Let us assume we are generating crud for table called “user_info”, database name &quot;directory&quot; and we want the controller name as “User”. So our command should be as follows.&lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt; php cygnite generate:crud user user_info directory&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;iframe width=&quot;730&quot; height=&quot;385&quot; src=&quot;//www.youtube.com/embed/VKuKUvalQHE&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;    &lt;p&gt;The above command will generate you CRUD application as Controller, Model, Views, Form Component etc. You can find the files corresponding directories as below.&lt;/p&gt; &lt;p&gt;&lt;b&gt; Controller:&lt;/b&gt;&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;     • cygnite/apps/controllers/UserController.php&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;&lt;b&gt; Model:&lt;/b&gt;&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;     • cygnite/apps/models/UserInfo.php&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;&lt;b&gt; Views:&lt;/b&gt;&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;     • cygnite/apps/views/user/index.view.php&lt;br /&gt;     • cygnite/apps/views/user/create.view.php&lt;br /&gt;     • cygnite/apps/views/user/update.view.php&lt;br /&gt;     • cygnite/apps/views/user/view.view.php&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;&lt;b&gt; Form Component: &lt;/b&gt;&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;     • cygnite/apps/components/form/UserForm.php&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt; You can alter any code to make it fit for your project. That’s all! You are ready to see your application. Go to your browser and type http://localhost/cygnite/user/ you will find your application. &lt;/p&gt; &lt;p&gt;The complete code generation even takes less time if you have configured everything and simply to run crud command.&lt;/p&gt;    &lt;h2 class=&quot;heading-class&quot;&gt; Conclusion: &lt;/h2&gt; &lt;p&gt;Hope you found this article useful and make your life easier. Please post me if you have any queries. If you find above tutorial helpful, please don&#39;t forget to give a small like or share with friends, also leave your comments below. I really appreciate feedback regarding this CRUD generator from my readers.&lt;/p&gt; &lt;p&gt; Keep visiting for upcoming articles. Cheers! Have a nice day. &lt;/p&gt;  &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/5525398995842178343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2014/11/generate-crud-application-within-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/5525398995842178343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/5525398995842178343'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2014/11/generate-crud-application-within-2.html' title='Generate CRUD application within 2 minute'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-6028865430329128085</id><published>2014-11-02T22:50:00.000+05:30</published><updated>2014-11-04T00:27:16.728+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Composer PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Cygnite Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="Install and Configuration of Cygnite"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>How to install and configure Cygnite PHP Framework using Composer</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt; &lt;p&gt;Hello guys, my last article was about &lt;a href=&quot;http://www.appsntech.com/2014/10/facebook-style-wall-posting-using.html&quot;&gt; &quot;Facebook style wall posting using Cygnite PHP Framework, JQuery, Ajax&quot; &lt;/a&gt;.  Today I would like to share with you guys &quot;&lt;b&gt;How to install and Configure Cygnite PHP Framework using Composer&lt;/b&gt;&quot;. Composer is the awesome tool to manage your dependencies.  Learning new framework is always adventurous and gives you a big learning curve.  &lt;/p&gt;  &lt;p&gt;Before going into the installation you should have composer installed in your local system. There is a &lt;a href=&quot;https://getcomposer.org/download/&quot;&gt;beautiful documentation of Installation&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;After downloading and installing composer we are ready to setup Cygnite into our local machine and configure database etc. to get started with our next project. You can watch the video embedded below.&lt;/p&gt; &lt;iframe width=&quot;590&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/f-tPM17mzgI?list=UUCTfZwaRCaPJ_270Z5Hh0VA&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;   &lt;h2 class=&quot;heading-class&quot;&gt; Conclusion:&lt;/h2&gt; &lt;p&gt;Hope you found this article useful. Please don’t forget to give a small like or share with friends, also leave your comments below.  &lt;/p&gt;&lt;p&gt;Keep visiting for upcoming articles. Cheers! Have a nice day. &lt;/p&gt;  &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/6028865430329128085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2014/11/how-to-install-and-configure-cygnite.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/6028865430329128085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/6028865430329128085'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2014/11/how-to-install-and-configure-cygnite.html' title='How to install and configure Cygnite PHP Framework using Composer'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-7092118428256786254</id><published>2014-10-25T03:00:00.001+05:30</published><updated>2016-12-31T11:49:22.390+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="AJax"/><category scheme="http://www.blogger.com/atom/ns#" term="Cygnite Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="facebook"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="Jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="web design"/><category scheme="http://www.blogger.com/atom/ns#" term="web development"/><title type='text'>Facebook style wall posting using Cygnite PHP Framework, Jquery, Ajax</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Introduction:&lt;/h2&gt; &lt;p&gt;The last article was about &lt;a href=&quot;https://www.blogger.com/%E2%80%9Dhttp://www.appsntech.com/2014/10/reading-and-importing-csv-file-into.htm%E2%80%9D&quot;&gt; “Reading and importing CSV file into database using PHP” &lt;/a&gt;. Today I have interesting thing for you guys. Are you looking for social script as facebook comment posting with MVC architecture? Which contains share thoughts on wall, comment posting, delete using jquery, load more, ajax, you want to share Facebook like video. You may get many script from different sites but mostly paid and not modular MVC architecture and you will end up restructuring into MVC. So I thought to share with you the application where you will find all these features and many more on coming days. Also you can find the script hosted on &lt;a href=&quot;https://github.com/&quot;&gt;GITHUB&lt;/a&gt;. &lt;/p&gt;  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://demo-aapsntech.16mb.com/wallscript/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-VHfsEGGo5aM/VF6GT7lV2SI/AAAAAAAAAq4/iKgvmgmJqPA/s320/wallscript-demo-button.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;   &lt;h2 class=&quot;heading-class&quot;&gt; Step 1: &lt;/h2&gt; &lt;p&gt; &lt;a href=&quot;https://github.com/sanjoydesk/wallscript&quot;&gt;Download&lt;/a&gt; and extract (wallscript-master.zip) the code from GITHUB. Rename &lt;b&gt;wallscript-master&lt;/b&gt; to &lt;b&gt;wallscript&lt;/b&gt;.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Step 2: &lt;/h2&gt; &lt;p&gt; Configure your database name into &lt;b&gt;/wallscript/apps/configs/database.php&lt;/b&gt;. I have configured database: “tutorials” localhost with empty password, you can change if you have different.&lt;/p&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Step 3: &lt;/h2&gt; &lt;p&gt;Find the demo sql script inside &lt;b&gt;/wallscript/apps/database/wallscript.sql&lt;/b&gt;. Run the sql file into your database using phpmyadmin or Mysql Workbench.&lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt; Step 4: &lt;/h2&gt; &lt;p&gt; That&#39;s all. You are done. Now go to your browser and type url : &lt;b&gt;http://localhost/wallscript/&lt;/b&gt; You can see the screen as below. &lt;/p&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.appsntech.com/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-9qqU_1HRz5U/VErB6GNxiHI/AAAAAAAAAp4/fg7BmFgmlYY/s1600/facebook_style_wallpost_script.png&quot; height=&quot;508&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt; &lt;p&gt;Extract video from url:&lt;/p&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.cygniteframework.com/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-_OqsfjA5mXg/VErBr_Tu4jI/AAAAAAAAAps/flgWC8OMXUI/s1600/sample_facebook_wallscript_.png&quot; height=&quot;578&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt; &amp;nbsp;&lt;br /&gt;&lt;br /&gt; &lt;h2 class=&quot;heading-class&quot;&gt; Conclusion: &lt;/h2&gt; &lt;p&gt;Hope you will like the small app. Top of this script you can build implement much modular features as Facebook or any other social network has. Will add more features. Stay tuned! &lt;/p&gt; &lt;p&gt;If you find above tutorial helpful, please dont forget to give a small like or share with friends, also leave your comments below.  Have a nice day. Keep visiting for interesting articles.&lt;/p&gt;  &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/7092118428256786254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2014/10/facebook-style-wall-posting-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/7092118428256786254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/7092118428256786254'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2014/10/facebook-style-wall-posting-using.html' title='Facebook style wall posting using Cygnite PHP Framework, Jquery, Ajax'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-VHfsEGGo5aM/VF6GT7lV2SI/AAAAAAAAAq4/iKgvmgmJqPA/s72-c/wallscript-demo-button.jpg" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry><entry><id>tag:blogger.com,1999:blog-2945702370683669100.post-7328627741326203268</id><published>2014-10-18T18:19:00.000+05:30</published><updated>2014-10-23T02:36:24.108+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSV Import"/><category scheme="http://www.blogger.com/atom/ns#" term="CSV Reader"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Read CSV file"/><title type='text'>Reading and importing CSV file into database using PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Introduction:&lt;/h2&gt; &lt;p&gt; Hi guys, my last article was about &lt;a href=&quot;http://www.appsntech.com/2014/07/building-restful-web-service-using.html&quot;&gt; &quot;Building RESTful Web Service using Cygnite PHP Framework, MySQL&quot; &lt;/a&gt;. Today I would like to write about “Reading csv file using php”. This article may be useful for beginners or if you are willing to write flexible CSVReader library. Let me show you how you can read and return simple array as Column and value pair using simple line of code. &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Step 1: Reading CSV file:&lt;/h2&gt; &lt;p&gt;Create a file call CsvReader.php and paste below code. &lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt; function readCsvToArray($path, $delimiter = &#39;;&#39;)&lt;br /&gt;    {&lt;br /&gt;        $csvArray = $headerArray = $csvFilledArray = array();&lt;br /&gt;&lt;br /&gt;        if (($handle = fopen($path, &quot;r&quot;)) !== FALSE) {&lt;br /&gt;            $i = 0;&lt;br /&gt;            while (($dataArray = fgetcsv($handle, 4000, $delimiter)) !== FALSE) {&lt;br /&gt;&lt;br /&gt;                $count = count($dataArray);&lt;br /&gt;&lt;br /&gt;                for ($j=0; $j&lt; $count; $j++) {&lt;br /&gt;&lt;br /&gt;                    if ($i ==0) {&lt;br /&gt;                        $headerArray[$i][$j] = str_replace(&#39; &#39;, &#39;_&#39;, $dataArray[$j]);&lt;br /&gt;                    } else {&lt;br /&gt;                        $csvArray[$i][$j] = $dataArray[$j];&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;                if ($i != 0) {&lt;br /&gt;                    $csvFilledArray[$i] = array_combine($headerArray[0], $csvArray[$i]);&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;                $i++;&lt;br /&gt;            }&lt;br /&gt;            fclose($handle);&lt;br /&gt;&lt;br /&gt;            return $csvFilledArray;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Step 2 : Returning output as Array:&lt;/h2&gt; &lt;p&gt;Now include the library file and call the function. &lt;a href=&quot;https://app.box.com/s/ezh6i12aij423mxr3zkt&quot;&gt;Find the demo CSV file here.&lt;/a&gt; &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;require &#39;CsvReader.php&#39;;&lt;br /&gt;$path = &#39;country_csv_reading_using_php.csv&#39;;&lt;br /&gt;&lt;br /&gt;$csvArray = array(); &lt;br /&gt;$csvArray =  readCsvToArray($path, ‘;’);&lt;br /&gt;&lt;br /&gt;echo &quot;&lt;pre&gt;&quot;;&lt;br /&gt;print_r($csvArray);&lt;br /&gt;echo &quot;&lt;/pre&gt;&quot;;   &lt;/code&gt;&lt;/pre&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Step3: Importing data into Mysql Database:&lt;/h2&gt; &lt;p&gt;Let us consider our table is “CountryInfo” and table has columns as follows.&lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;&quot;Sort_Order&quot;, &quot;Common_Name&quot;, &quot;Formal_Name&quot;, &quot;Type&quot;,&lt;br /&gt;&quot;Sub_Type&quot;, &quot;Sovereignty&quot;, &quot;Capital&quot;, &quot;ISO_4217_Currency_Code&quot;,&lt;br /&gt; &quot;ISO_4217_Currency_Name&quot;, &quot;ITU-T_Telephone_Code&quot;, &quot;ISO_3166-1_2_Letter_Code&quot;, &lt;br /&gt;&quot;ISO_3166-1_3_Letter_Code&quot;, &quot;ISO_3166-1_Number&quot;, &quot;IANA_Country_Code_TLD&quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; Now we can loop throw the array and insert values into the database. &lt;/p&gt;&lt;p&gt; Paste below code to prepare all queries together and execute it. &lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;$sql = &#39;&#39;;&lt;br /&gt;&lt;br /&gt;$sql = &#39;INSERT INTO `CountryInfo` (`Sort_Order, `Common_Name`, `Formal_Name`, `Type`,&lt;br /&gt;      `Sub_Type`, `Sovereignty`, `Capital`, `ISO_4217_Currency_Code`,&lt;br /&gt;      `ISO_4217_Currency_Name`, `ITU-T_Telephone_Code`, `ISO_3166-1_2_Letter_Code`, `ISO_3166-1_3_Letter_Code`,&lt;br /&gt;      `ISO_3166-1_Number`, `IANA_Country_Code_TLD`) VALUES&#39;;&lt;br /&gt;&lt;br /&gt;$data = array();&lt;br /&gt;&lt;br /&gt;foreach ($csvFormatedArray as $key =&gt; $value) {&lt;br /&gt;&lt;br /&gt;    $data[] = &quot; VALUES ( &#39;&quot;.$value[&#39;Sort_Order&#39;].&quot;&#39;, &#39;&quot;.&lt;br /&gt;                  $value[&#39;Common_Name&#39;].&quot;&#39;, &#39;&quot;.&lt;br /&gt;                  $value[&#39;Formal_Name&#39;].&quot;&#39;, &#39;&quot;.&lt;br /&gt;                  $value[&#39;Type&#39;].&quot;&#39;, &#39;&quot;.&lt;br /&gt;                  $value[&#39;Sub_Type&#39;].&quot;&#39;, &#39;&quot;.&lt;br /&gt;                  $value[&#39;Sovereignty&#39;].&quot;&#39;, &#39;&quot;.&lt;br /&gt;                  $value[&#39;Capital&#39;].&quot;&#39;, &#39;&quot;.&lt;br /&gt;                  $value[&#39;ISO_4217_Currency_Code&#39;].&quot;&#39;, &#39;&quot;.&lt;br /&gt;                  $value[&#39;ISO_4217_Currency_Name&#39;].&quot;&#39;, &#39;&quot;.&lt;br /&gt;                  $value[&#39;ITU-T_Telephone_Code&#39;].&quot;&#39;, &#39;&quot;.&lt;br /&gt;                  $value[&#39;ISO_3166-1_2_Letter_Code&#39;].&quot;&#39;, &#39;&quot;.&lt;br /&gt;                  $value[&#39;ISO_3166-1_3_Letter_Code&#39;].&quot;&#39;, &#39;&quot;.&lt;br /&gt;                  $value[&#39;ISO_3166-1_Number&#39;].&quot;&#39;, &#39;&quot;.&lt;br /&gt;                  $value[&#39;IANA_Country_Code_TLD&#39;].&quot;&#39; )&quot;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if (count($values)) {&lt;br /&gt;    $sql = $sql.implode(&#39;,&#39;, $data);&lt;br /&gt;    # build query&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; As the &quot;Best Coding Practice&quot; you can see we are not doing any database operation inside the loop, building the query and finally executing as single query. By doing this you are not running n number of queries instead single optimised query to save all. &lt;/p&gt;  &lt;h2 class=&quot;heading-class&quot;&gt;Step 4: Inserting into database:&lt;/h2&gt; &lt;p&gt;Let us now connect with the database and import csv content into database.&lt;/p&gt;  &lt;pre&gt;&lt;br /&gt;&lt;code class=&quot;php&quot;&gt;&lt;br /&gt;&lt;br /&gt;try {&lt;br /&gt;    $conn = new PDO(&quot;mysql:host=localhost;dbname=tutorials&quot;, &#39;root&#39;, &#39;&#39;);&lt;br /&gt;    $conn-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // &lt;== add this line&lt;br /&gt;    $q = $conn-&gt;prepare($query);&lt;br /&gt;    $q-&gt;execute();&lt;br /&gt;} catch(PDOException $e) {&lt;br /&gt;    echo $e-&gt;getMessage();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;h2 class=&quot;heading-class&quot;&gt;Conclusion:&lt;/h2&gt; &lt;p&gt;Hope enjoyed the post and you can build modular library on the top of this small step by step article. &lt;/p&gt; &lt;p&gt;If you find above tutorial helpful, please don’t forget to give a small like or share with friends, also leave your comments below. &lt;/p&gt; &lt;p&gt;Have a nice day. Keep visiting for interesting articles.&lt;/p&gt;       &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.appsntech.com/feeds/7328627741326203268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.appsntech.com/2014/10/reading-and-importing-csv-file-into.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/7328627741326203268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2945702370683669100/posts/default/7328627741326203268'/><link rel='alternate' type='text/html' href='http://www.appsntech.com/2014/10/reading-and-importing-csv-file-into.html' title='Reading and importing CSV file into database using PHP'/><author><name>Sanjoy Dey</name><uri>https://plus.google.com/116679848208147953128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-0Cu38K-kbGY/AAAAAAAAAAI/AAAAAAAABEY/bXlVjtjNqo8/s512-c/photo.jpg'/></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></entry></feed>