<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WEB and development</title>
	<atom:link href="http://www.web-and-development.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.web-and-development.com</link>
	<description>We make it easy for you</description>
	<lastBuildDate>Sun, 09 Jun 2013 08:34:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Codeigniter Simplicity &#8211; A simple template library</title>
		<link>http://www.web-and-development.com/codeigniter-simplicity-a-simple-template-library/</link>
		<comments>http://www.web-and-development.com/codeigniter-simplicity-a-simple-template-library/#comments</comments>
		<pubDate>Sat, 11 May 2013 07:46:34 +0000</pubDate>
		<dc:creator>John Skoumbourdis</dc:creator>
				<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.web-and-development.com/?p=1025</guid>
		<description><![CDATA[Have you ever noticed that Codeigniter although a powerful framework is lacking of an important built-in library? Apparently the most famous PHP frameworks has a built-in layout library (many of us call it as template library). In the web they are plenty of template libraries for Codeigniter, but what about a different&#8230; simple approach? Well [...]]]></description>
				<content:encoded><![CDATA[<p>Have you ever noticed that Codeigniter although a powerful framework is lacking of an important built-in library? Apparently the most famous PHP frameworks has a built-in layout library (many of us call it as template library). In the web they are plenty of template libraries for Codeigniter, but what about a different&#8230; simple approach? </p>
<p><a href="http://www.grocerycrud.com/codeigniter-simplicity"><img src="http://www.web-and-development.com/wp-content/uploads/2013/02/Selection_001.png" alt="Selection_001" width="100%" class="alignnone size-full wp-image-1119" /></a></p>
<p>Well Codeigniter Simplicity is exactly that! A simple layout library that I wanted to share with you. Visit <a href="http://www.grocerycrud.com/codeigniter-simplicity" title="http://www.grocerycrud.com/codeigniter-simplicity">Codeigniter Simplicity Website</a> for more.<br />
<span id="more-1025"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.web-and-development.com/codeigniter-simplicity-a-simple-template-library/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Twitter Bower &#8211; A really simple to use package manager</title>
		<link>http://www.web-and-development.com/twitter-bower-browser-package-manager/</link>
		<comments>http://www.web-and-development.com/twitter-bower-browser-package-manager/#comments</comments>
		<pubDate>Mon, 07 Jan 2013 07:30:09 +0000</pubDate>
		<dc:creator>John Skoumbourdis</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.web-and-development.com/?p=920</guid>
		<description><![CDATA[Have you ever noticed that you are repeating yourself by updating one by one JavaScript, CSS and images for your customers when there is an update at a JavaScript plugin? Also how many times did you forgot to update a JavaScript plugin, a CSS or even an image at the plugin and the browser crashes [...]]]></description>
				<content:encoded><![CDATA[<p>Have you ever noticed that you are repeating yourself by updating one by one JavaScript, CSS and images for your customers when there is an update at a JavaScript plugin?</p>
<p><a href="http://www.web-and-development.com/twitter-bower-browser-package-manager/"><img src="http://www.web-and-development.com/wp-content/uploads/2013/01/Screen-Shot-2012-09-24-at-11.58.30.png" alt="Screen-Shot-2012-09-24-at-11.58.30" width="100%" class="alignnone size-full wp-image-1122" /></a></p>
<p>Also how many times did you forgot to update a JavaScript plugin, a CSS or even an image  at the plugin and the browser crashes because of that? Don&#8217;t you prefer to just type an update command and all the JavaScripts, CSS and images to upgrade automatically for you? Well&#8230; for all that kind of things the Twitter&#8217;s engineering group is here to make our life a bit easier. Let&#8217;s welcome <a href="http://twitter.github.com/bower/" target="_blank">Twitter Bower</a>, a really easy to use browser package manager.<br />
<span id="more-920"></span></p>
<h2>Why I like Twitter Bower?</h2>
<p>In general there are plenty modern workflows (e.g. <a href="http://yeoman.io" target="_blank">yeoman</a>, <a href="http://jamjs.org/" target="_blank">Jam</a>) that they are really brilliant and you can do really many complicated things with them. However what about having only a browser package manager? Well Twitter Bower is exactly that&#8230; just a package manager! If you are a person like me that like to use <strong>simple tools</strong> that you can easy remember the commands even without documentation, then twitter bower is the right tool for you.</p>
<h2>Install twitter Bower</h2>
<p>The installation of twitter bower is simple. The only thing that you need to have to your machine is <a href="http://nodejs.org/">NodeJS</a> and <a href="https://npmjs.org/">npm</a> (if you don&#8217;t already have it!). With only these two requirement you are now ready to install bower with one simple line of code:</p>
<div class="code">
<pre>npm install -g bower</pre>
</div>
<p>That&#8217;s it! You can now start using twitter bower.</p>
<h2>Install/Update a Package</h2>
<p>To use it is really simple (I think I already mention that!). For example let&#8217;s say that we want to add the jquery at our project. We only need to add this line of code:</p>
<div class="code">
<pre>bower install jquery</pre>
</div>
<p>They are plenty of your favorites packages as a bower, such as:</p>
<div class="code">
<pre>
bower install backbone
bower install jquery-ui
...
</pre>
</div>
<p>What about an update? If you want for example to update the jquery version and all the other dependencies to update automatically you can simply do this:</p>
<div class="code">
<pre>bower update</pre>
</div>
<p>or</p>
<div class="code">
<pre>bower update jquery</pre>
</div>
<p>That&#8217;s it! Now all the libraries/images/css/javascript files are the latest with their dependencies included.</p>
<p>You want to uninstall a package? It is easy as well:</p>
<div class="code">
<pre>bower uninstall jquery-ui</pre>
</div>
<p>This article is more about to show you how easy it is to use twitter bower. If you want to read more about twitter bower here is a <a href="http://net.tutsplus.com/tutorials/tools-and-tips/meet-bower-a-package-manager-for-the-web/" target="_blank">very good article</a> that it can help you understand more things of how to use it and how to create your own package in the future. It is a time saver package manager, so it is worth it to learn it as it can make your programming life easier in just 5 minutes!</p>
<p><b>Website and documentation:</b> <a href="http://twitter.github.com/bower/" target="_blank">http://twitter.github.com/bower/</a><br />
<b>Source code:</b> <a href="https://github.com/twitter/bower">https://github.com/twitter/bower</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.web-and-development.com/twitter-bower-browser-package-manager/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Framework or a CMS? What is better to choose?</title>
		<link>http://www.web-and-development.com/a-framework-or-a-cms-what-is-better-to-choose/</link>
		<comments>http://www.web-and-development.com/a-framework-or-a-cms-what-is-better-to-choose/#comments</comments>
		<pubDate>Mon, 17 Sep 2012 05:13:12 +0000</pubDate>
		<dc:creator>John Skoumbourdis</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.web-and-development.com/?p=800</guid>
		<description><![CDATA[There are lot of articles who are talking about Frameworks and CMS systems. What to choose? Which is the best? However I wanted to write an article from a totally different perspective. First of all I want to make sure that developers and customers understand the difference between the terminology &#8220;CMS&#8221; and &#8220;Framework&#8221; nowadays. Some [...]]]></description>
				<content:encoded><![CDATA[<p>There are lot of articles who are talking about Frameworks and CMS systems. What to choose? Which is the best?<br />
<a href="http://www.web-and-development.com/a-framework-or-a-cms-what-is-better-to-choose/"><img src="http://www.web-and-development.com/wp-content/uploads/2012/08/frameworks-vs-cms.png" alt="" title="frameworks-vs-cms" /></a><br />
However I wanted to write an article from a totally different perspective. First of all I want to make sure that developers and customers understand the difference between the terminology &#8220;CMS&#8221; and &#8220;Framework&#8221; nowadays. </p>
<p><span id="more-800"></span></p>
<h2>Some theory first</h2>
<p>When we use the terminology &#8220;Framework&#8221; we are more often talking about <a href="http://en.wikipedia.org/wiki/Web_application_framework" target="_blank">Web application framework</a> . A web application framework is simply based on coding. If you are a programmer or a web developer that loves coding you often choose a Web application framework for your projects.</p>
<p>A CMS is a <a href="http://en.wikipedia.org/wiki/List_of_content_management_frameworks">Content management framework</a> and it is based on the modules rather than code. Anyone can handle a CMS as it doesn&#8217;t require any coding knowledge. Of course programmers can also choose a CMS as they can do their job faster. </p>
<h2>There are lot of fights&#8230;</h2>
<p>There are lot of misunderstandings about what a framework and what a CMS can do. Lot of fans that use CMS they are saying that &#8220;We can do everything with a CMS&#8221; and the fans of the frameworks are &#8220;No <b>we</b> can do everything with a framework&#8221; and so on&#8230; As a fan of frameworks of course I will have the same opinion but actually this is not true! The truth is that as we use the <b>same base</b> (PHP,RoR,python,. NET&#8230; e.t.c.), we all can do everything (well almost everything, but still). Even the myth that CMS doesn&#8217;t use a good structure isn&#8217;t truth. For example the Drupal 8 is based on Symfony framework, a very good object oriented web application framework.</p>
<h2>So what do I choose?</h2>
<p>Nowadays the CMS is more popular that the Web application Framework as it is really easy to use it. Even if you don&#8217;t have programming knowledge you can install and create a whole website with just a CMS. So what to choose?</p>
<p><b>It is always about four basic things</b>  that you have to think before you choose a framework or a CMS in my personal experience:<br />
1. How much time you want to spend?<br />
2. What do you want to do and how flexible has to be this project in the future?<br />
3. How much money (if it matters) you will take after the end of the project.<br />
4. What the hosting environment will be</p>
<p>For the customer it doesn&#8217;t really matter what tools you will use. The thing that matters is to have their job done. So let&#8217;s have an example:</p>
<p>I will explain to you my choices about two personal projects and one normal project. This blog and <a href="http://www.grocerycrud.com">www.grocerycrud.com</a>. First of all I am a PHP web developer so I can choose either a PHP framework, either a PHP CMS. </p>
<p>So for this blog that you are reading right now, I used WordPress as:<br />
1. I wanted to spend as less time as I could as it is a simple blog<br />
2. I didn&#8217;t want to do anything extreme. Just the usual. SEO, caching, comments, nice design and less spams!<br />
3. I will not take any money for creating mine project. So I don&#8217;t have as a criteria the money<br />
4. Free to choose</p>
<p>For grocerycrud.com I choose Codeigniter framework as:<br />
1. I wanted to spend a normal time to do it. Not too much as this is a personal project<br />
2. I wanted to be 100% extendable as I am changing the structure all the time with new ideas. For example now I am preparing a new mini website inside the grocerycrud.com (<a href="http://www.grocerycrud.com/image-crud">www.grocerycrud.com/image-crud</a>).<br />
3. Still the money doesn&#8217;t count here as it is a personal project<br />
4. Free to choose</p>
<p>For <a href="http://www.dailyfx.gr">www.dailyfx.gr</a> I chose Codeigniter framework as</p>
<p>1. I had only 1 month deadline for me to do it from scratch<br />
2. It was a system that the clients wanted some extremely custom webpages (such as with an internal connection with java applet charts). I didn&#8217;t choose wordpress or drupal as it would require much more time to customize all of these unique needs.<br />
3. For money nothing more than my normal monthly salary. So the money was not something to motivate me<br />
4. Just another shared hosting</p>
<h2>I want to investigate more</h2>
<p>As I said only <b>in my personal experience</b> are 4 simple things that I have in mind but this is only because the outsource projects that I have are often small projects so that&#8217;s why I have only these four things in mind. Of course if I want to investigate more time I think a Web Application framework is the solution and I can give you much more criteria to have in mind. As the <a href="http://symfony.com/ten-criteria" target="_blank">Symfony webpage</a> says: </p>
<blockquote><p>You&#8217;re making progress and that&#8217;s a good thing! You already know that you are going to use a framework to develop your site or your application. But which one? Here is a checklist that you can use to avoid making a mistake: </p></blockquote>
<p>&nbsp;</p>
<p>
So there are <a href="http://symfony.com/ten-criteria" target="_blank">10 criteria for choosing the correct framework</a>. You can take a look at this article as it is really straight forward about what are the real criteria to actually choose a framework. So if you really want to investigate to a framework for your big projects, have in mind that it is a long-term commitment, so make sure that you make the right selection&#8230; for you!
</p>
<h2>What about a CMS?</h2>
<p>On the other side it is not so bad to know programming and also be a &#8220;CMS guy&#8221;. The bad think about it, is that they are many &#8220;CMS guys&#8221; that don&#8217;t have any programming knowledge and think that they can do everything with a CMS. This is also a myth. When I told before that with a CMS you can do everything as you have the same base it also depends if you have some basic programming skills of course. If not then you can do everything as far as <b>the programmers/web developers</b> let you have it. </p>
<p>So let&#8217;s face it when you <b>are developing a CMS</b> without writing any line of code, then you <b>are not a programmer</b> . So I am tired to have similar conversation like this<br />
- &#8220;Oh I am a designer and I know programming too&#8221;<br />
- &#8220;Really what tools do you use?&#8221;<br />
- &#8220;WordPress!&#8221;<br />
- &#8220;So do you write any plugin?!&#8221;<br />
- &#8220;No&#8221;<br />
- &#8220;Ok!! so what makes you a &#8230; programmer&#8221;<br />
- &#8220;I can take a ready template and change the html to fit to my content&#8221;<br />
- &#8220;Agrrrrr, this doesn&#8217;t make you a programmer!! Just face it.&#8221;</p>
<p>The right terminology to use is &#8220;I am a web designer&#8221;, that&#8217;s it. Even if you change a bit the PHP code to a plugin you are still a Web designer.</p>
<p>If you can only handle CMS without writing a line of code then you are an &#8220;Advanced Web User&#8221;, not &#8220;Developer&#8221; and especially not a &#8220;Programmer&#8221;</p>
<p>If you only know how to develop a WordPress Website this makes you a &#8220;WordPress Developer&#8221;</p>
<p>If you only know how to develop a Drupal Website this makes you a &#8220;Drupal Developer&#8221; and so on&#8230;</p>
<p>Even if you know only to develop PHP and PHP websites that makes you &#8220;A PHP Developer&#8221;. </p>
<p>To call yourself a <b>&#8220;Smashing Web Developer&#8221;</b> this means that you know to handle many tools, frameworks and  many web languages (you know PHP,RoR,.NET,Python java or any other web language you like)</p>
<p>Nowadays they are all starting with PHP because it is easy and they named themselves &#8220;programmers&#8221;. No! A programmer is someone who has demonstrable knowledge in coding in at least one major language (Java, J2EE, C, C++) or even a PHP programmer if you can handle Classes, Object Oriented relations and Web Services like a peace of cake then yes. Knowing only HTML or CSS  and some PHP functions is not something that will make you a programmer&#8230; it is a good start thought <img src='http://www.web-and-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>And finally a conclusion&#8230;</h2>
<p>So as a conclusion I have to say that it always depends of what you want to do and how much time you have to deal with it. I believe that every tool is build for a reason so as many tools you know (frameworks or CMS), so flexible you are as a professional developer. So it doesn&#8217;t worth it to be a CMS or a Framework fan. Just choose the best tool for you situation and that&#8217;s it. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.web-and-development.com/a-framework-or-a-cms-what-is-better-to-choose/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Minimize your URLs at Codeigniter Framework</title>
		<link>http://www.web-and-development.com/codeigniter-minimize-url-and-remove-index-php/</link>
		<comments>http://www.web-and-development.com/codeigniter-minimize-url-and-remove-index-php/#comments</comments>
		<pubDate>Thu, 02 Aug 2012 08:46:07 +0000</pubDate>
		<dc:creator>John Skoumbourdis</dc:creator>
				<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.web-and-development.com/?p=558</guid>
		<description><![CDATA[Don&#8217;t wait until your customer or &#8230; your browser(!) start to mention that your URL is way to big from the usually title. Well the first thing that you realize when you install Codeigntier is that the URLs are really huge, not SEO friendly and not user friendly. Let&#8217;s try to minimize as much as [...]]]></description>
				<content:encoded><![CDATA[<p>Don&#8217;t wait until your customer or &#8230; your browser(!) start to mention that your URL is way to big from the usually title.</p>
<p><img src="http://www.web-and-development.com/wp-content/uploads/2012/07/codeigniter-and-better-urls.png" alt="" title="codeigniter and-better URLs" width="510" height="280" /></p>
<p>Well the first thing that you realize when you install Codeigntier is that the URLs are really huge,  not SEO friendly and not user friendly.</p>
<p>Let&#8217;s try to minimize as much as we can for your dynamic created URLs. Below we will explain and give solutions to minimize the URLs as much as possible with htaccess, some route tricks and the _remap() method of Codeigniter.</p>
<p><span id="more-558"></span></p>
<h2>1. Removing the index.php</h2>
<p><img src="http://www.web-and-development.com/wp-content/uploads/2012/07/codeigniter-remove-url-index1.png" alt="" title="codeigniter-remove-url-index" width="502" height="41" /></p>
<p>Let&#8217;s start with our big URL:</p>
<p><b>http://mycustomproject.com/index.php/webpages/view/my-url-title-of-the-post</b></p>
<p>The first thing that you usually do for your Codeigniter project is to remove the index.php file from the URL. To do it so, it&#8217;s really easy:</p>
<p><b>1st step</b></p>
<p>Add this code to your .htaccess file to your root of your project.</p>
<div class="code">
<pre>
&lt;IfModule mod_rewrite.c&gt;
# Turn on URL rewriting
RewriteEngine On

# If your website begins from a folder e.g localhost/my_project then 
# you have to change it to: RewriteBase /my_project/
# If your site begins from the root e.g. example.local/ then
# let it as it is
RewriteBase /

# Protect application and system files from being viewed when the index.php is missing
RewriteCond $1 ^(application|system|private|logs)

# Rewrite to index.php/access_denied/URL
RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L]

# Allow these directories and files to be displayed directly:
RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|public|assets|css|js|images)

# No rewriting
RewriteRule ^(.*)$ - [PT,L]

# Rewrite to index.php/URL
RewriteRule ^(.*)$ index.php/$1 [PT,L]
&lt;/IfModule&gt;
</pre>
</div>
<p>After the creation of the .htaccess file your project structure will have to look like this:</p>
<div class="code">
<pre>website_folder/ 
–––– application/ 
–––– assets/ 
–––– system/ 
–––– user_guide/ 
---- .htaccess <-------------------------
–––– index.php 
–––– license.txt</pre>
</div>
<p><b>2nd step</b></p>
<p>Now go to : application/config/config.php and change the: </p>
<div class="code">
$config['index_page'] = 'index.php';
</div>
<p>to </p>
<div class="code">
$config['index_page'] = '';
</div>
<p>So now your URL will look like this:</p>
<p>http://mycustomproject.com/webpages/view/my-url-title-of-the-post</p>
<p><b>Note 1:</b> If you are running in your local machine and your don't have configured the virtual host for example to be :<br />
<b>http://mycustomproject.com/webpages/view/my-url-title-of-the-post</b><br />
but your URLs looks more than this:<br />
<b>http://localhost/website_folder/webpages/view/my-url-title-of-the-post</b></p>
<p>don't forget to change your RewriteBase from:</p>
<div class="code">RewriteBase /</div>
<p>to</p>
<div class="code">RewriteBase /mycustomproject/</div>
<p>or something similar it depends of where your Codeigniter project starts.</p>
<p><b>Note 2:</b> In some cases perhaps you will realize that your .htaccess simply doesn't work and all the webpages URLs show the index webpage. If this happens to you then go to application/config/config.php and change the:</p>
<div class="code">$config['uri_protocol']	= 'AUTO';</div>
<p>to:</p>
<div class="code">$config['uri_protocol']	= 'PATH_INFO';</div>
<p>or:</p>
<div class="code">$config['uri_protocol']	= 'REQUEST_URI';</div>
<p>it depends of your server's configuration. To try it just change it and see if the URL works for you correctly</p>
<p><b>Note 3:</b> If you prefer to add a less secure .htaccess for your project, much more minimal and you don't want to write each time the exceptions of the files that you don't want to included them to the rules, you can simply use this code:</p>
<div class="code">
<pre>&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
&lt;/IfModule&gt;</pre>
</div>
<p>This is the most common .htaccess (it is also used from the default installation of WordPress) thought it is not suggested as you don't protect your folders if the index.php is missing or a new file/folder is added to your project without knowing it. </p>
<h2 id="removing-first-url-segment">2. Removing 1st URL segment</h2>
<p><img src="http://www.web-and-development.com/wp-content/uploads/2012/07/codeigniter-remove-1st-segment.png" alt="" title="codeigniter-remove-1st-segment" width="502" height="41" class="alignnone size-full wp-image-694" /></p>
<p>So now that we removed the annoying index.php from URL let's minimize our URLs with the routes.</p>
<p>Our basic example that we will work with is the below:</p>
<div class="code">
<pre>
&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Webpages extends CI_Controller {
	
	function __construct()
	{
		parent::__construct();
	}	
	
	function index()
	{
	
	}
	
	function about()
	{
	
	}
	
	function blog($url_title = '')
	{
	
	}
	
	function view($url_title = '')
	{
	
	}	
	
}</pre>
</div>
<p>To remove our first segment we have to choose which our base Controller will be. In our case we will choose that <i>Webpages</i> will be our basic Controller. The Controllers <i>Admin</i> and <i>Forums</i> will be our secondary let's say Controllers</p>
<p>There are two ways to minimize your URLs:</p>
<ul>
<li>Routing by hand</li>
<li>Routing automatically (I always prefer this one)</li>
</ul>
<h2>Routing by hand</h2>
<p>So let's see how we can can minimize our URLs by hand. This means that everytime we add or edit a function at our Controller we have to go to : application/config/routes.php<br />
and change the routes in each case. So let's have an example of our basic controller:</p>
<p>Go to application/config/routes.php and add something like this:</p>
<div class="code">
<pre>
$route['default_controller'] = 'webpages'; //Our default Controller

//Get rid of the first segment (in our case we get rid of webpages)
$route["about"] = 'webpages/about'; 
$route["blog/(.*)"] = 'webpages/blog/$1';
$route["view/(.*)"] = 'webpages/view/$1';
</pre>
</div>
<p>So now with this simple code we have get rid of the first controller name from our basic webpages. </p>
<h2>Routing automatically</h2>
<p>Many of you probably already know it but it is really boring to create the routes every time by hand. So that's why I created an automatically routing that actually removes the controller of your default controller. The below code is written to handle all the scenarions. Simple URLs and multilingual URLs. Let's go and take a look  of our routes how it will look like. </p>
<p>If you don't have a multilingual website the routes are easy. You can simply copy the below code to application/config/routes.php:</p>
<div class="code" style="width:850px;">
<pre>
$default_controller = "webpages";
$controller_exceptions = array('admin','forums');

$route['default_controller'] = $default_controller;
$route["^((?!\b".implode('\b|\b', $controller_exceptions)."\b).*)$"] = $default_controller.'/$1';
$route['404_override'] = '';</pre>
</div>
<p>If you are having a multilingual website, it is a bit more complicated as you have lot of scenarios to cover. However don't worry about it as you can simply copy the below lines of code to application/config/routes.php:</p>
<div class="code" style="width:850px;">
<pre>
$default_controller = "webpages";
$language_alias = array('gr','fr');
$controller_exceptions = array('admin','forums');

$route['default_controller'] = $default_controller;
$route["^(".implode('|', $language_alias).")/(".implode('|', $controller_exceptions).")(.*)"] = '$2';
$route["^(".implode('|', $language_alias).")?/(.*)"] = $default_controller.'/$2';
$route["^((?!\b".implode('\b|\b', $controller_exceptions)."\b).*)$"] = $default_controller.'/$1';
foreach($language_alias as $language)
	$route[$language] = $default_controller.'/index';
$route['404_override'] = '';</pre>
</div>
<p>So let me explain how it works.</p>
<p>The only thing that you will actually care to change is the first three lines of code:</p>
<div class="code">
<pre>
$default_controller = "webpages";
$language_alias = array('gr','fr');
$controller_exceptions = array('admin','forums');
</pre>
</div>
<p>As it is the only one that you actually need to change. So how it works? It's really easy.<br />
You add your default controller to your variable $default_contoller.  </p>
<p>The $language_alias is the language element that you want to add if you have a multilingual website for example:</p>
<p><b>http://mycustomproject.com/blog</b><br />
<b>http://mycustomproject.com/gr/blog</b><br />
<b>http://mycustomproject.com/fr/blog</b></p>
<p>And of course the http://mycustomproject.com/gr and http://mycustomproject.com/fr are routing to the index of your basic Controller.</p>
<p>The $controller_exceptions are the controllers that will NOT follow this routing structure. For example:</p>
<p><strong>http://mycustomproject.com/admin/</strong><br />
<strong>http://mycustomproject.com/forums/</strong></p>
<p>So you can easily use the controller with name Admin and controller with name Forums with the same way as you used it before.</p>
<p>Now we removed our first segment so our dynamic URLs will look like this:</p>
<ul>
<li><b>http://mycustomproject.com/about</b></li>
<li><b>http://mycustomproject.com/view/my-url-title-of-the-post</b></li>
<li><b>http://mycustomproject.com/blog/url-title-of-post</b></li>
</ul>
<h2>3. Removing 2nd URL segment</h2>
<p><img src="http://www.web-and-development.com/wp-content/uploads/2012/08/codeigniter-remove-2nd-segment.png" alt="" title="codeigniter-remove-2nd-segment" width="502" height="41"/></p>
<p>One way to do it is by using the _remap() method of Codeigniter. For more go to <a href="http://codeigniter.com/user_guide/general/controllers.html" target="_blank">Controllers User Guide </a> and search for the _remap() method. Let's have an example of how to use it:</p>
<div class="code">
<pre>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Webpages extends CI_Controller {
	
	function __construct()
	{
		parent::__construct();
	}

function _remap()
{		
	$segment_1 = $this->uri->segment(1);

	switch ($segment_1) {
		case null:
		case false:
		case '':
			$this->index();
		break;

		case 'about':
			$this->about();
		break;
		
		case 'blog':
			$this->blog($this->uri->segment(2));
		break;			
	
	default:
		//This is just an example to show 
		//the 404 page if the page doesn't exist
		$this->db->where('url_title',$segment_1);
		$db_result = $this->db->get('webpages');
		
		if($db_result->num_rows() == 1)
		{
			$this->view($segment_1);
		}
		else
		{
			show_404();
		}
	break;
	}
}	

	function index()
	{

	}

	function about()
	{

	}

	function blog($url_title = '')
	{

	}

	function view($url_title = '')
	{

	}	
	
}</pre>
</div>
<p>So when you are using the _remap function of Codeigniter you have to decide which method will use every time. The good part is that you will have full control of what to do with each method. However it can take lot of time if you have many functions in your controller. So now your URLs will look like this:</p>
<ul>
<li><b>http://mycustomproject.com/my-url-title</b></li>
<li><b>http://mycustomproject.com/about</b></li>
<li><b>http://mycustomproject.com/blog/url-title-of-post</b></li>
</ul>
<p>&nbsp;</p>
<p>Are you done with reading? Well you can now <a href="https://github.com/scoumbourdis/codeigniter-minimize-url/archive/master.zip">download the files</a> that we used at this post or you can <a href="https://github.com/scoumbourdis/codeigniter-minimize-url">view the files from github </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.web-and-development.com/codeigniter-minimize-url-and-remove-index-php/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>5 reasons to NOT use csrf_protection in Codeigniter</title>
		<link>http://www.web-and-development.com/5-reasons-to-not-use-csrf_protection-in-codeigniter/</link>
		<comments>http://www.web-and-development.com/5-reasons-to-not-use-csrf_protection-in-codeigniter/#comments</comments>
		<pubDate>Thu, 26 Jul 2012 00:00:53 +0000</pubDate>
		<dc:creator>John Skoumbourdis</dc:creator>
				<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.web-and-development.com/?p=459</guid>
		<description><![CDATA[I just wanted to tell a small funny story as an introduction of the reasons why to not use csrf_protection in Codeigniter. If you though just want to read the reasons why, go straight away to 5 simple reasons for why not to use csrf_protection of Codeigniter&#8230; For the other users just keep reading &#8230; [...]]]></description>
				<content:encoded><![CDATA[<p>I just wanted to tell a small funny story as an introduction of the reasons why to not use csrf_protection in Codeigniter. If you though just want to read the reasons why, go straight away to <a href="/5-reasons-to-not-use-csrf_protection-in-codeigniter/#5-reasons-of-why-not-using">5 simple reasons for why not to use csrf_protection of Codeigniter&#8230;</a><br />
<img src="http://www.web-and-development.com/wp-content/uploads/2012/06/unexpected-error.png" alt="" title="unexpected-error" width="510" height="148" /><br />
For the other users just keep reading &#8230;</p>
<p><span id="more-459"></span></p>
<h2>A small story first</h2>
<p>You are using PHP Codegniter Framework and you are really happy about the tools that it offers to you.You have created a whole website in just few days and you are really proud of it. Last time there was an article about security in Codeigniter? With a quick google search you just found csrf_protection has to be set to true for hacks attacks. They also mentioned that you have to use form_open for your forms. </p>
<p>WOW! This is not a problem for you as you already use form_open and form_close for the set_rules. So really happy that your website is also secure now, you tweet it , you write it on facebook, you also tell it to your customer that the system now it is even more secure for future hack attacks&#8230;</p>
<p>and the problems just started&#8230; an unexpected error out of nowhere!!!</p>
<p>Next day, your customer called you angry and telling you about a weird error in his screen.</p>
<p><img src="http://www.web-and-development.com/wp-content/uploads/2012/06/unexpected-error.png" alt="" title="unexpected-error" width="510" height="148" /></p>
<p>Then you realize that you cannot understand where the problem is. After lot of searching you realized that the csrf_protection doesn&#8217;t support AJAX forms. As always &#8230; google search and yes you finally find an article (eg. <a target="_blank" href="http://aymsystems.com/ajax-csrf-protection-codeigniter-20/">AJAX with CSRF Protection in Codeigniter 2.0</a>) that tell you about the cookies  and other stuff like this. You don&#8217;t really understand why it will work like this, so&#8230; you just copy the code to your project and TADA it works!</p>
<p>It&#8217;s been a while that your customer didn&#8217;t tell anything and everything seems to works fine. Then the same customer again realized that some users that using internet explorer (not the old one, the new IE9) they have the same error.</p>
<p>And then you realize that the csrf_protection has the problem. You also mentioned that even some forms in the backend system didn&#8217;t work properly but at least the customer didn&#8217;t know it, so that&#8217;s fine. So after 1 day researching you understood that you cannot find a solution for all the forms and you just set csrf_protection back to false as you didn&#8217;t understand at the first place what hack attacks you could prevent.</p>
<div id="5-reasons-of-why-not-using">If this story sounds familiar with yours then I suggest to not use the default CSRF protection of Codeigniter. Why?</div>
<h2>There are 5 simple reasons&#8230;</h2>
<p>1. You don&#8217;t prevent hack attacks. Only some automated bots.</p>
<p>2. It works fine only for simple forms. It is unstable for AJAX forms.</p>
<p>3. It doesn&#8217;t work when the cookies are disabled.</p>
<p>4. There is a general error (The action you have requested is not allowed.) that a simple user cannot understand what is going on and neither the developer can understand where the problem is!</p>
<p>5. It is not IE 7 and Opera compatible for AJAX requests as far as I tested</p>
<p>I will not explain further my reasons as I think that I will have long discussions with people that don&#8217;t have the same opinion with me and this is not the point of this article. I will try to give some small solutions of what to do instead of setting csrf_protection to true.</p>
<h2>Solutions?</h2>
<p>I liked an article that I have read about crsf protection <a target="_blank" href="http://net.tutsplus.com/tutorials/php/protect-a-codeigniter-application-against-csrf/">Protect a CodeIgniter Application Against CSRF</a> . At the end of the article they say that:</p>
<blockquote><p>Alternatively, as of CodeIgniter v2.0, protection against CSRF attacks is now built into the framework! </p></blockquote>
<p>but I prefer to use this one as it use session rather than the $_COOKIE of Codeigniter default one. You can even understand the logic and create your own hook for csrf protection.</p>
<p>First of all let&#8217;s start of what is the Cross-Site Request Forgery protection and why you should protect your forms from attacks:</p>
<h2>What is the CSRF protection?</h2>
<p><img src="http://www.web-and-development.com/wp-content/uploads/2012/06/csrf-diagram.png" alt="" /></p>
<p>An attacker could create a bogus form on his site – for example a search form. This form could have hidden inputs that contain malicious data. Now the form isn’t actually sent to the attacker’s site to perform the search; in reality, the form points to your site! Since your website will trust that the form is genuine, it goes through and executes the requested (and perhaps malicious) actions.</p>
<p>Imagine that a user is logged into your site, and is redirected to the attacker’s site for some reason (phishing, XSS, you name it). The attacker’s form could point to your account deletion form on your site. If the user performs a “search” on the attackers site, his account will then be deleted without him knowing! </p>
<p>For more read the <a href="http://net.tutsplus.com/tutorials/php/protect-a-codeigniter-application-against-csrf/" target="_blank">full article here</a></p>
<h2>Advices</h2>
<p>Don&#8217;t expect to have just one line of code and have all the security that is needed. Even the most powerful PHP frameworks need time to improve the security. The knownledge of security is very important and it prevents you from long term problems. Also as many things you really know about security the better. So my advice is to read the article of <a target="_blank" href="http://net.tutsplus.com/tutorials/php/protect-a-codeigniter-application-against-csrf/">Application Against CSRF</a> or similar articles for form protections and learn what is going on and then create your own custom hook.</p>
<p>In my experience is more important to actually make things work rather than block every form with the risk of not sending the message to the admin or user and doesn&#8217;t even realize it. </p>
<p>So general advices for the forms to be more secure:</p>
<ul>
<li>Log your forms. Just log all the requests of the forms in the database or in files.</li>
<li>Don&#8217;t name your admin controller <em>admin</em> or <em>administrator</em>.</li>
<li>Use a captcha authorisation for all your frontend forms unless the user is logged in.</li>
<li>Use your own custom security library for the forms to prevent attacks.</li>
<li>Don&#8217;t have dump passwords neither on testing mode. Passwords such as password,123456, admin, e.t.c. can cause big problems if you have by mistake a dump password on production mode without realizing it.</li>
<li>Always escape your input values and be careful to validate and trim any data that comes from the frontend website.</li>
<li>Always try to use tokens for your forms to check if the submit is coming from your site or not. For example a hidden input.</li>
</ul>
<p><br/><br />
I think with those small security advices you can prevent the most hack attacks from the frontend website.</p>
<p>And don&#8217;t forget : <img src='http://www.web-and-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="code">
<pre>$config['csrf_protection'] = FALSE;</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.web-and-development.com/5-reasons-to-not-use-csrf_protection-in-codeigniter/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Laravel vs Codeigniter</title>
		<link>http://www.web-and-development.com/laravel-vs-codeigniter/</link>
		<comments>http://www.web-and-development.com/laravel-vs-codeigniter/#comments</comments>
		<pubDate>Fri, 13 Jul 2012 09:02:35 +0000</pubDate>
		<dc:creator>John Skoumbourdis</dc:creator>
				<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.web-and-development.com/?p=475</guid>
		<description><![CDATA[&#160; I just came across with two posts for Laravel Framework with two different opinions Laravel is awesome and Laravel &#8211; a beautiful PHP framework that does not make me feel stupid but with the same conclusion (Laravel is awesome!). As both blog posts where intrested, I would like to have my opinion too with [...]]]></description>
				<content:encoded><![CDATA[<div style="text-align: center;"><img title="Laravel vs Codeigntier" src="http://www.web-and-development.com/wp-content/uploads/2012/07/laravel-vs-ci.png" alt="Laravel vs Codeigntier" /></div>
<p>&nbsp;</p>
<p>I just came across with two posts for Laravel Framework with two different opinions<br />
<a href="http://philsturgeon.co.uk/blog/2012/05/laravel-is-awesome" target="_blank">Laravel is awesome</a> and <a href="http://www.vladstudio.com/blog/entry.php?124" target="_blank">Laravel &#8211; a beautiful PHP framework that does not make me feel stupid</a> but with the same conclusion (Laravel is awesome!). As both blog posts where intrested, I would like to have my opinion too with the Laravel framework and Codeigniter.</p>
<div style="height: 10px;"></div>
<p><span id="more-475"></span></p>
<p>&nbsp;</p>
<h2>So which is more awesome?</h2>
<p><strong>Laravel indeed!</strong> I think Phil and Vladstudio gave enough reasons to move to Laravel and I don&#8217;t want to say more.<br />
As you already perhaps know I am now actively developing 2 libraries in Codeigniter and all my projects at my portfolio are all made in Codeigntiter Framework. So the question is <strong> did I</strong> move to a different framework? Well &#8230; I already done it long time ago&#8230; I am using for my big projects Zend Framework as it has really lot of libraries such as Amazon Services, Advance Memcache, really advanced db active record, e.t.c. However for all the small/medium projects I am still using Codeigniter as I am familiar with the code and I&#8217;ve already created extensions for CI . For example I don&#8217;t care if Codeigniter doesn&#8217;t have a Layout controller I have created mine. I don&#8217;t mind if it has not an Authorization library (with full database structure e.t.c.) I have already created mine and so on. However I was looking forward for a brand new framework that has these functionalities in the <strong>Core</strong> system and not as external libraries. I have to say that I am more &#8220;stack&#8221; to Codeigntiter framework rather than &#8220;like&#8221; Codeigniter Framework. I work with Codeigniter for 4 years and I have created my own libraries and my custom CMS is based on Codeigniter so it is difficult for me to move to a different framework if I don&#8217;t have a good reason to do it.</p>
<h2>So Codeigniter is dead??</h2>
<p>To tell you the truth I thought that actually CI will die someday but this will simply never happen. Why?<br />
1. The large community will never let Codeigniter to die! You really cannot realize how many people are using Codeigniter for small but also large projects right now.<br />
2. It is stable enough and tested from many users. This means that even if a new version have something unstable (e.g. 2.0.3) I am sure that the users have already mentioned it and solve it. If you don&#8217;t care about changing the core of CI for fixing small bugs that&#8217;s fine.<br />
3. It is really well documented. I think is the best documented framework that exists in PHP right now.<br />
4. Very easy to use even if you don&#8217;t know about MVC architecture. A really good start especially for Newbies that only used pure PHP to their projects as I was one time before using CI.<br />
5. Really 0 configuration to start working with CI<br />
6. CI 3 is promising more stability and more organized unit tests.</p>
<p>But this are not enough reasons for me anymore! I need more features as things runs so fast and we need more and more. I don&#8217;t like to look for external libaries for obvious things . Laravel can support really lot of stuff that in my opinion every modern framework should have. To be more specific some small things that I liked in Laravel:</p>
<ul>
<li>Templates with basic webpages layout with sections&#8230; e.t.c. [Please tell me which website DOESN'T have a basic layout?]</li>
<li>Exceptions with detailed stack trace. [CI doesn't have it!]</li>
<li>Authorization library</li>
<li>Object Oriented Libraries with autocomplete. I don&#8217;t know when CI will get rid of the $this-&gt;library_name-&gt;library_function(); and $this-&gt;load-&gt;library thing. In laravel it is simple &#8220;Libraries and Models are very easy to use thanks to the Laravel auto-loader&#8221;</li>
<li>Widgets with assets (such as JS and CSS). Lavarel has bundles that it is great and with a very good structure.</li>
</ul>
<div style="height: 10px;"></div>
<p>and really many more reasons but especially I like that it makes me feel.. happy! I don&#8217;t want to be more specific about the two frameworks. If you want to read more you can go to <a href="http://www.vladstudio.com/blog/entry.php?124" target="_blank">Laravel &#8211; a beautiful PHP framework that does not make me feel stupid</a> and read why to choose Laravel instead of other frameworks. I agree with the person who wrote it but not for &#8230; Zend (come on monster???) I just wanted to mention 2-3 things about Laravel and tell my opinion about Laravel and Codeigniter. The Laravel is still in an experimental stage for me so perhaps I will change my mind in the future. But till now&#8230; I LOVE IT.</p>
<h2>Table Comparison</h2>
<table width="100%">
<tbody>
<tr>
<th>Module</th>
<th>Laravel</th>
<th>Codeigniter</th>
</tr>
<tr>
<td>Layout Control</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td>ORM</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td>Error Stack Trace</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td>Class Auto Loading</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td>&#8211;Database mySQL</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>&#8211;Database SQLite</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>&#8211;Database MSSQL</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>&#8211;Database PostgreSQL</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>&#8211;Database Cubrid</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td>&#8211;ODBC drivers</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td>&#8211;Database MariaDB</td>
<td>No</td>
<td>No</td>
</tr>
<tr>
<td>Authentication Library</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td>External Modules</td>
<td>Yes (Bundles)</td>
<td>No</td>
</tr>
<tr>
<td>Form Validation Rules</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Internationalization</td>
<td>Yes</td>
<td>Yes</td>
</tr>
</tbody>
</table>
<p>For more you can go straight away to <a href="http://laravel.com/" target="_blank">laravel.com/</a></p>
<p>Not convinced yet? Check out what this guy from <a href="http://envato.com/" target="_blank">envato</a> is saying:</p>
<p><iframe width="500" height="315" src="http://www.youtube.com/embed/CTUfmokK1FU" frameborder="0" allowfullscreen></iframe></p>
<p>So what do you think? I am curious to see what is your opinion about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.web-and-development.com/laravel-vs-codeigniter/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Image CRUD for Codeigniter</title>
		<link>http://www.web-and-development.com/image-crud-an-automatic-multiple-image-uploader-for-codeigniter/</link>
		<comments>http://www.web-and-development.com/image-crud-an-automatic-multiple-image-uploader-for-codeigniter/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 21:21:58 +0000</pubDate>
		<dc:creator>John Skoumbourdis</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.web-and-development.com/?p=395</guid>
		<description><![CDATA[Image CRUD is an automatic multiple image uploader for Codeigniter. With the same philoshopy of grocery CRUD library. Just simple line of codes and you have all the functionality that you need. Some of the main features of Image CRUD are: multiple selection of photos to upload the same time auto thumbnail croping auto croping [...]]]></description>
				<content:encoded><![CDATA[<p>Image CRUD is an automatic multiple image uploader for Codeigniter. With the same philoshopy of <a href="http://www.grocerycrud.com" title="" target="_blank">grocery CRUD</a> library. Just simple line of codes and you have all the functionality that you need.</p>
<p><img style="border:1px dashed #666666;" src="http://www.web-and-development.com/wp-content/uploads/2012/04/image-crud.png" alt="" title="image-crud" width="510" height="286" class="alignnone size-full wp-image-405" /></p>
<p>Some of the main features of Image CRUD are:
<ul>
<li>multiple selection of photos to upload the same time</li>
<li>auto thumbnail croping</li>
<li>auto croping for max size image (800px X 600px max)</li>
<li>reordering the photos after the upload</li>
<li>delete image</li>
<li>auto renaming special characters</li>
<li>adding a relation and automatically adding id from the url</li>
</ul>
<p><br/></p>
<p>For more you can visit the : <a href="http://www.grocerycrud.com/image-crud"><b style="font-size:16px">official image CRUD website</b></a></p>
<p><span id="more-395"></span></p>
<p><a href="https://github.com/scoumbourdis/image-crud/zipball/master" rel="nofollow">&raquo; Download version 0.5 here &laquo;</a></p>
<p><a href="https://github.com/scoumbourdis/image-crud" target="_blank">Image CRUD on github &raquo;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.web-and-development.com/image-crud-an-automatic-multiple-image-uploader-for-codeigniter/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>grocery CRUD for codeigniter</title>
		<link>http://www.web-and-development.com/grocery-crud/</link>
		<comments>http://www.web-and-development.com/grocery-crud/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 23:09:44 +0000</pubDate>
		<dc:creator>John Skoumbourdis</dc:creator>
				<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.web-and-development.com/?p=247</guid>
		<description><![CDATA[This is a codeigniter CRUD. It is fully tested in codeigniter 2.0 and in 1.7.x. It is simple and has many features . The main feauture is that a customer can easily use this crud, not only a developer!! The installation is really simple , you just copy the files into your project and run [...]]]></description>
				<content:encoded><![CDATA[<div>
This is a codeigniter CRUD. It is fully tested in codeigniter 2.0 and in 1.7.x. It is simple and  has many features . The main feauture is that a customer can easily use  this crud, not only a developer!!
</div>
<div style='margin-bottom:10px;margin-top: 10px;'>
<p>
<a href='http://www.grocerycrud.com/' target='_blank'><img src="http://www.web-and-development.com/wp-content/uploads/2010/12/grocerycrud-list.png" alt="" title="crud-image" width="510" height="280" style='border:1px dashed #666666'  /></a>
</p>
</div>
<p><span id="more-247"></span></p>
<div>
The installation is really simple , you just copy the files into your  project and run the controller examples to see the results of the CRUD.  You can name your controller whatever you like. </p>
<p>You can donwload the zip file and you can see the user guide with working examples by clicking the link below .</p>
<p><a href="http://www.web-and-development.com/grocery_crud" target='_blank'>View user guide and donwnload the CRUD</a></p>
<p>Enjoy…</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.web-and-development.com/grocery-crud/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>CodeIgniter Autocomplete</title>
		<link>http://www.web-and-development.com/codeigniter-and-eclipse-autocomplete/</link>
		<comments>http://www.web-and-development.com/codeigniter-and-eclipse-autocomplete/#comments</comments>
		<pubDate>Sat, 18 Dec 2010 14:49:31 +0000</pubDate>
		<dc:creator>John Skoumbourdis</dc:creator>
				<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP and Eclipse]]></category>

		<guid isPermaLink="false">http://www.web-and-development.com/?p=210</guid>
		<description><![CDATA[Codeigniter is a great framework for php . It is simple and already helps lot of people to write faster code. The documentation is very good with examples for all the classes &#8211; functions. But (there is always a but&#8230;!) in eclipse we used to have our own classes and when we write the &#8220;magic [...]]]></description>
				<content:encoded><![CDATA[<p>Codeigniter is a great framework for php . It is simple and already helps lot of people to write faster code. The documentation is very good with examples for all the classes &#8211; functions.</p>
<p>But (there is always a but&#8230;!) in eclipse we used to have our own classes and when we write the &#8220;magic arrow&#8221; -&gt; we are waiting to have a dropdown list with the functions/variables that the class have .</p>
<div><img style="border: 1px dashed #666;" title="autocomplete" src="http://www.web-and-development.com/wp-content/uploads/2010/12/autocomplete.png" alt="" width="441" height="98" /></div>
<p>In Codeigniter till now we write for example $this-&gt;session-&gt; &#8230; and then we go to the codeigiter website just to see what was the name of the function .</p>
<p>For that reason I created a fake Controller. This is only a fake Controller and it used ONLY for the autocomplete. You can copy paste it WHEREVER you like in the project (because is fake).<br />
<span id="more-210"></span><br />
Ok lets see it how it works .</p>
<p><strong>1st Step</strong></p>
<p>Download the zip file :<br/></p>
<p><a href="https://github.com/scoumbourdis/codeigniter-autocomplete/archive/master.zip" style="font-size:18px">Download the zip file for CI 2.x</a> (recommended)<br/></p>
<p>or</p>
<p><a href="http://www.web-and-development.com/downloads/fakeController.zip">Download the zip file for CI 1.7.x</a></p>
<p>or</p>
<p>Download the latest development edition from github repository: <a href="https://github.com/scoumbourdis/codeigniter-autocomplete" target="_blank">https://github.com/scoumbourdis/codeigniter-autocomplete</a></p>
<p><strong>2nd Step</strong></p>
<p>Copy it somewhere in your project (I&#8217;ve copy it into libraries in a folder named fake)</p>
<div><a href="http://www.web-and-development.com/wp-content/uploads/2010/12/2010-12-18_162809.png"><img style="border: 1px dashed #666;" title="2010-12-18_162809" src="http://www.web-and-development.com/wp-content/uploads/2010/12/2010-12-18_162809.png" alt="" width="274" height="220" /></a></div>
<p><strong>3rd Step</strong></p>
<p>Start typing in your Controller <img src='http://www.web-and-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . That&#8217;s it. Pretty easy right? Below there are some images to show what you are be able to do.</p>
<p><a href="http://www.web-and-development.com/wp-content/uploads/2010/12/image-1.png"><img style="border: 1px dashed #666;" title="image-1" src="http://www.web-and-development.com/wp-content/uploads/2010/12/image-1.png" alt="" width="501" height="312" /></a></p>
<p><a href="http://www.web-and-development.com/wp-content/uploads/2010/12/last.png"><img class="wp-image-242" style="border: 1px dashed #666;" title="last" src="http://www.web-and-development.com/wp-content/uploads/2010/12/last.png" alt="" width="512" height="249" /></a></p>
<p><a href="http://www.web-and-development.com/wp-content/uploads/2010/12/image-3.png"><img class="wp-image-220" style="border: 1px dashed #666;" title="image-3" src="http://www.web-and-development.com/wp-content/uploads/2010/12/image-3.png" alt="" width="498" height="66" /></a></p>
<p><a href="http://www.web-and-development.com/wp-content/uploads/2010/12/image-4.png"><img class="wp-image-221" style="border: 1px dashed #666;" title="image-4" src="http://www.web-and-development.com/wp-content/uploads/2010/12/image-4.png" alt="" width="516" height="192" /></a></p>
<div>It works fine in eclipse,netbeans and Aptana.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.web-and-development.com/codeigniter-and-eclipse-autocomplete/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  www.web-and-development.com/feed/ ) in 0.39879 seconds, on Jun 16th, 2013 at 9:32 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Jun 23rd, 2013 at 9:32 am UTC -->
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<!-- Quick Cache Is Fully Functional :-) ... A Quick Cache file was just served for (  www.web-and-development.com/feed/ ) in 0.00051 seconds, on Jun 19th, 2013 at 9:13 am UTC. -->