Posted inProgramming / Yii

Yii Framework Introduction and Hello World Tutorial

Yii Framework Introduction and Hello World Tutorial

Today, We want to share with you Yii Framework Introduction and Hello World Tutorial.
In this post we will show you Yii Framework Introduction and hello world example, hear for Yii First Hello World Tutorial we will give you demo and example for implement.
In this post, we will learn about Simple Yii Hello World Example Application with an example.

Basic Steps for some Yii framework

  • Prerequisities
  • Creating an Action
  • Creating a View
  • Trying it Out

Simple Prerequisities for Yii Framework using PHP

-PHP and databases (DB)
-SQL query
-simple web using PHP, HTML, CSS and DB.
-important is OOP (Object oriented programming)
Like as
+ actionSay classes
+ overriding functions
+ using constructor
+ public and private methods
+ Some propertie

Download the Yii Framework

Download

The directory structure of the Yii project site | Yii PHP Framework

 
 /
    backend/
    common/
        components/
        config/
            params.php
            params-local.php *
        lib/
            Pear/
            yii/
            Zend/
        migrations/
        models/
            Comment.php
            Extension.php
            ...some files
    console/
        commands/
            SitemapCommand.php
            ...some files
        config/
            main.php
            main-local.php *
            params.php
            params-local.php *
        runtime/
        yiic.php *
    frontend/
        components/
        config/
            main.php
            main-local.php *
            params.php
            params-local.php *
        controllers/
            SiteController.php
            ...some files
        lib/
        models/ 
            ContactForm.php
            SearchForm.php      
        runtime/
        views/
            layouts/
            site/
        www/
            assets/
            css/
            js/
            index.php *
    yiic
    yiic.bat
 

Yii framework : Creating an Action

controllers/SiteController.php

render('say', ['message' => $message]);
    }
}

Simple Creating a View



Simple Trying it Out

http://yourhostname/index.php?r=site%2Fsay&message=Hello+World

Some Important Points for Yii framework

The Controllers should −

  • In controller,Be very thin.
  • In controller,Each action should contain only most a few lines of code useful.
  • In controller,Use Views for all responses data.
  • In controller,Not embed HTML.
  • In controller,Access the request data.
  • In controller,Call methods of used of models.
  • In controller,Not process the request some data.
  • In controller,These should be every processed in the model.

We hope you get an idea about Yii Hello World Application
We would like to have feedback on my Information blog .
Your valuable any feedback, Good question, Inspirational Quotes, or Motivational comments about this article are always welcome.
If you liked this post, Please don’t forget to share this as Well as Like FaceBook Page for Yii First Example Program.

We hope This Post can help you…….Good Luck!.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

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

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype