yiinitializr Maximum acceleration for your Yii project start!

Introduction

The history... we remember the days when we thought that YiiBoilerplate was a good fit for any project. They were good days, but we were being naive.

Every project has different needs, and it’s those needs that set the requirements. Also, lets be realistic, if you were to develop a project where only the frontend UI with a small admin section was needed, YiiBoilerplate was overkill. In the end, people had to remove unneeded folders, the configuration was unnecessarily complex, a lot of people were not certain where to place the components and there were many other issues.

At 2amigOS! we were slamming our heads down on our keyboards trying to figure out what was the best way to provide a project boilerplate that could fit everyones needs. We soon realized and agreed that composer was the best way to go as a dependency manager (special shout-out thanks to Mr Tobias Schmunk, the guy behind Phundament for his great work and ideas), but we did not want to provide a fixed structure nor a set of extensions, again. Otherwise, we would just be putting a fresh coat of paint on the same problems. We wanted to give the power back to the developer to pick and choose based on their own needs. You know your project the most, so you should be able to set your own desired folder structure. You should be able to select which extensions you want to have pre-installed. And that, my amigos, is how Yiinitializr was born!

Yiinitializr is technically still in beta (?). Why? Because we believe that we need your feedback, yes you, from the Yii community, to make Yiinitializr right for all of us. You’re going to be using it, often (c’mon, you know you will...), so why not have a say in whether it’s enough or not... in what else it should or should not provide.

Okay, okay.. enough talk... now, let’s see how this baby works!

Yiinitializr is extremely easy to use. It is composed of only one page that will ask you three simple things:

  1. What template type do you want to use? Basic, Intermediate or Advanced
  2. Which extensions do you want pre-installed? Just search and select... really.. that’s all... no kidding... cool, huh?
  3. Okay... maybe we misspoke... it’s really 3 steps; not questions. Download your finished project boilerplate!
  4. What? Step 4? Maybe we can’t count, but you need to know what to do with the file you just downloaded, right? Well, here’s what you need to do:

Unzip, wherever you want your project to be, then (no, we are not going to tell you how to setup your database configuration. This is just a gentle reminder that you need to do that next...). Ahem... make your database configurations. Now, run the following commands inside the unzipped project’s root:

// make sure you have the latest version of composer
php composer.phar self-update 
// run install
php composer.phar install 

Now, relax and love it! (or hate us, but keep it to yourself... really, all that negativity focused on us? We’re amigos! Come and share in the enchiladas... click on the docs below the templates to go to that github place and vent there...)

So, now you’re saying, “yeah, man... that is simple, but what are the template differences?”. We thought you’d never ask:

  • Basic: The small in scope project. Is your project just a frontend, or maybe a frontend with an admin interface? Well, this is the basic one, and it contains only /app and /www. Yes, you can still choose the extensions you want.
  • Intermediate: Your needs are maybe a little more complex than the basic offers, but you don’t want to go crazy. This one is closest to the structure you might be familiar with from YiiBoilerplate, but it’s much much lighter.
  • Intermediate has a good solid structure. It contains: /backend, /common, /console and /frontend, and this structure will work for most of your robust applications. Need more?
  • Advanced: Now you’re talking! The advanced structure adds on the /api directory for your web services. Need we say more? Got ideas of world domination? It starts here! ;)

“But I want more details!” Yes, we agree, and this a great point to start the share of some knowledge. We know that once you download any of the template boilerplates you’ll start wondering what’s going on here. What the heck is this way of initializing applications? Check out the yiic.php or the index.php scripts within any of the application’s folder. See what we are doing. There is another surprise extension within, the Yiinitializr components. A set of classes that makes for a really easy way you can configure and install a project.

More documentation and discussion will be coming... we promise. We just wanted to let you play and react a little, first.

References

Change Log

  • 15/04/2013 Fixed typo bug and improved initializing
  • 11/04/2013 Initial Release

2amigOS!
web development has never been so fun
www.2amigos.us

15 0
30 followers
0 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Others
Developed by: Antonio Ramirez
Created on: Apr 12, 2013
Last updated: 10 years ago

Related Extensions