Integrating Boilerplate and Bootstrap with CodeIgniter or Yii Integrating Boilerplate and Bootstrap with CodeIgniter or Yii codeigniter codeigniter

Integrating Boilerplate and Bootstrap with CodeIgniter or Yii


CodeIgniter and Yii are server-side frameworks. The libraries in question (with the exception of SASS), live on the client-side. Whether you choose CodeIgniter or Yii, the basic integration will be the same. Because I'm a CodeIgniter developer, I can give you one-half of the story:

I urge you to read everything under the Introduction section of the documentation and take a few days to fly through the tutorials and set your brain straight on MVC. Only then, check out a previous answer of mine that explains how to create modular layouts. Once you're comfortable with this, including jQuery and Bootstrap into your project is trivial.

As for Boilerplate - please pick and choose the sections that are relevant to your project and plug-them-into the right 'view' as per linked answer. There are some parts of Boilerplate that will step on Bootstrap's toes (specifically CSS resets, be careful).

Paul Irish gave an excellent talk on HTML5 Boilerplate last year. The Boilerplate itself has probably been updated significantly, but it should get you started.

CodeIgniter has unparalleled documentation and a fantastic community. If you choose this route - welcome!


Take a look at the Yii Boilerplate system available here (and put out by the main Yii devs):https://github.com/clevertech/YiiBoilerplate

They have already integrated HTML5 Boilerplate, Twitter Bootstrap, Yii, some basic Behat configs and a bunch of Yii best practices into one place. It's made life much easier on our end.

More info on it here:http://www.yiiframework.com/wiki/374/yiiboilerplate-setup-a-professional-project-structure-in-seconds/


jQuery is just a Javascript Library, so you just need to include it above to your javascript files in this way and in your <head> or in your footer:

<script type="text/javascript" src="yourFolder/jQuery.js"></script>

HTML5Boilerplate and Bootstrap are just StarterKit, they provide few folders and files to organize better your work.

Bootstrap add also few plugins and components as you can see on the website and is Responsive.

So I suggest you to choose just one of these.

For Less or Sass you need a compiler. You can write your "nested" CSS syntax but then you need to compile it otherwise browsers can not read it.

So, the answer is that you can use any php Framework and integrate this tools / libs inside your project.