Default Base For First Project

Starting my first real world (paid :) ) yii project today. I’m following the Packt Web Application Development book to build a crm app. Any advice at this stage re: file structure, base extensions to use (yiibootstrap?) and whether is worth using the yii boilerplate at this stage?

Thanks, peas, sausages, respect and bigup.

You’re being a bit sparse with aht you are trying to do, so it’s hard to give good and/or useful advice. Only you can know if it’s really worth to include Yii Bootstrap. If you feel it is, it’s worth to include it from the very start (Yii Bootstrap includes a set of modified templates for gii, easing development).

If you’re looking for inspiration, have a look at X2 Engine which is a quite advanced CRM written in Yii. The design is debatable but it surely shows what is technically possible with Yii ::)

You will very likely hit the problem of saving related models in your Yii app. This is something that Yii itself cannot do, so you either need to solve this problem manually or use an extension for that purpose. I’m using (and hence recommending) the with-related-behavior which is developed and maintained by some of the Yii core devs.

If you are using git for version control, it might be worth to experiment a bit with git modules and subtrees. If you’re pulling in 3rd-party extensions and modules, they greatly improve maintenance.

One last bit of advice: Ask about the hosting situation. If your software will finally be deployed on its own server (or at least a managed hosting system), it might be worth the effort to re-arrange the filesystem layout of your project in a way that all your web-facing code ends up in one directory. This could be a dedicated html (RedHat, CentOS, *SuSE) or htdocs (Debian, Ubuntu) directory containing your index.php and the assets dir. This is improving the security situation greatly and will ultimately help the webserver a bit as it won’t need to check on every request if a file from runtime or protected should be served or not.

Have fun B)