2

I've always been a PHP programmer, but until now without any framework. Now I've a nice project to start and I'd like to introduce some PHP framework: Yii or CodeIgniter.

I don't know yet which one is best for me. I'd like to integrate this project with these 'tools':

  • JQuery
  • HTML5 Boilerplate
  • Twitter Bootstrap
  • CSS SASS

Do you know which framework is more easy to integrate with these tools? And, do you know where I can find a good tutorial for this integration?

Thx

Dimas
  • 331
  • 1
  • 5
  • 15

4 Answers4

4

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!

Community
  • 1
  • 1
Jordan Arsenault
  • 7,100
  • 8
  • 53
  • 96
  • Thx Jordan, amazing links and instructions! As I thought it doesn't exist a fast way to integrate these libraries, but I think I could afford that :) I'll wait for a Yii developer response too, but that's a good start if I choose Code Igniter. Thx. – Dimas Oct 01 '12 at 20:25
2

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/

acorncom
  • 5,975
  • 1
  • 19
  • 31
1

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.

Andrea Turri
  • 6,480
  • 7
  • 37
  • 63
  • Thx. Maybe I'm wrong, but I think HTML5Boilerplate and Bootstrap are very combinable, as one is more about the HTLM5 structure and the other with CSS and javascript ui. I suppose it's possible to integrate this tools inside any framework, but maybe one of them are more "friendly". – Dimas Oct 01 '12 at 20:16
  • No mate, both are very friendly because are just few files. Bootstrap has an UI and you can customize it. Html5 is just a reset with few resources to start. But basically are the same, I prefere start always with Bootstrap. – Andrea Turri Oct 02 '12 at 08:17
0

You can use this Sass and Compass extension for the Yii framework:
Sass (SCSS) and Compass support for the Yii framework
Composer package