Yii MVC PHP Framework Hello World Tutorial

Yii MVC PHP Framework Hello World Primer Tutorial

Yii MVC PHP Framework Hello World Tutorial

Today’s tutorial is a Hello World tutorial for Yii, to quote Wikipedia

Yii is an open source, object-oriented, component-based MVC PHP web application framework. Yii is pronounced as “Yee” or [ji:] and in Chinese it means “simple and evolutionary” and it can be acronym for “Yes It Is!”.

The MVC stands for Model View Controller … (from Wikipedia again) …

Model–view–controller (MVC) is a software architectural pattern mostly for implementing user interfaces.

It makes a fair bit of difference what version you talk about with Yii, and we are talking about Yii 2 today.

You can get up and going with a Hello World level of Yii usage really quickly (especially with the great advice of How to Program with Yii2: Getting Started – Envato Tuts+ Code Tutorial … thanks), and we can say, basically that the major steps for us, integrating it with MAMP (Mac Apache local web server) and a Linux operating system involved …

  1. installing composer, a tool for dependency management in PHP, via …

    curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin
    composer global require "fxp/composer-asset-plugin:~1.1.1"
    composer require yiisoft/yii2
    sudo ln -s /usr/bin/composer.phar /usr/bin/composer

    … that can also be found on the GitHub source repository
  2. composer setup specific to Hello World project …

    cd ~/Sites
    composer global require "fxp/composer-asset-plugin:1.0.0-beta2"
    composer create-project --prefer-dist yiisoft/yii2-app-basic hello

    … in addition we found that we needed to …

    mkdir ~/Sites/hello/vendor/bower/bootstrap
    mkdir ~/Sites/hello/vendor/bower/bootstrap/dist
    mkdir ~/Sites/hello/vendor/bower/jquery
    mkdir ~/Sites/hello/vendor/bower/jquery/dist

  3. create software to help out MAMP via …

    cd /Applications/MAMP/htdocs
    ln -s ~/Sites/hello/ /Applications/MAMP/htdocs/hello

  4. point your web browser at …
    HTTP://localhost:8888/hello/web

You can do great organizational and fast and guaranteed and consistent PHP web work using Yii Framework. Just imagine a CRUD idea you have, and Yii could be a great option for you. Here’s a slideshow of highlights of today’s Hello World website create using the Yii 2 MVC PHP framework.

If this was interesting you may be interested in this too.

This entry was posted in eLearning, Software, Tutorials and tagged , , , , , , , , , , , , , , , . Bookmark the permalink.

7 Responses to Yii MVC PHP Framework Hello World Tutorial

  1. I am fascinated this informative article. There are so numerous items mentioned here I had never thought of before. You’ve made me realize there is more than 1 approach to take into consideration these points.

  2. Following research quite a few of the weblog posts on your web website now, and I genuinely like your manner of blogging. I bookmarked it to my bookmark website record and will likely be checking back soon. Pls try my internet web site as effectively and let me know what you feel.

  3. Thank you for sharing with us, I believe this site truly stands out : D.

  4. eliquids says:

    Hi my friend! I choose to say that this post is remarkable, good written and include around all important infos. I’d like to see more posts like this.

  5. Truck Repair says:

    I precisely wished to thank you so much again. I do not know what I would’ve sorted out in the absence of those tricks documented by you over my area. It seemed to be an absolute intimidating condition for me personally, nevertheless understanding a new well-written fashion you processed it made me to leap with contentment. Now i am happy for this assistance and in addition wish you realize what an amazing job you were putting in educating some other people with the aid of your webblog. I’m certain you have never met any of us.

  6. Great site! I am loving it!! Will be back later to read some more. I am bookmarking your feeds also

  7. Only wanna comment that you have a very decent website , I love the design and style it actually stands out.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>