Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

ZFort.com:
The Mexican Standoff of PHP Frameworks
Jan 26, 2018 @ 18:24:09

On the ZFort.com blog there's a new post that talks about the "Mexican standoff" between PHP frameworks, covering some of the background behind some of the more popular ones and some of the main differences between them.

PHP is one of the most widely known and potent programming languages used today. However, despite the popularity of PHP, there are many businesses using PHP without making use of a quality PHP framework. This approach slows production time and increases costs. A PHP framework is advantageous because it provides you with modules and codebase to help structure and accelerate the web development process.

[...] For CEOs, CTOs, product owners and those in the tech industry, choosing the right PHP framework can help cut production time and costs. However, every PHP framework is unique. [...] Given the wealth of PHP frameworks available, it is important to conduct solid research in order to find the platform that’s right for you. [We'll] take a look at three of the most popular PHP frameworks (Symfony, Laravel and Yii) and break down which is the best, and why.

The article then goes on to cover three of the more widely used frameworks:

  • Symfony
  • Laravel
  • Yii Framework

For each the author covers some of the origins of the framework and some of the things that it's best at. Following these there's a section that briefly compares them and how approachable they are for developers new to frameworks. While they all have their strengths the author recommends Symfony as the framework with "the most long term potential" over the others.

tagged: framework comparison symfony laravel yii opinion

Link: https://www.zfort.com/blog/php-frameworks-standoff/

FormaPro Blog:
Yii PHP Framework has adopted AMQP Interop.
Dec 06, 2017 @ 15:20:16

On the FormaPro blog Maskim has written up a tutorial introducing you to a new feature that's been integrated into the Yii2 framework: AMPQ Interop, a standard structure for the handling of MQ messages (queuing).

Great News! Queue Interop is one step closer to PHP world domination.

Yii PHP Framework is the first of major frameworks that has placed a bet on AMQP Interop. A corresponding pull request “Add AMQP interop based driver.” has been merged to yiisoft/yii2-queue repository.

With this integration, the Yii framework now natively supports many AMPQ packages without having to create a custom interface layer. This includes enqueue/amqp-lib, enqueue/amqp-ext and enqueue/amqp-bunny.

tagged: formapro yii framework adoption ampq interoperability structure

Link: https://blog.forma-pro.com/yii-php-framework-has-adopted-amqp-interop-85ab47c9869f

TutsPlus.com:
How to Install Yii on Windows or a Mac
Jun 05, 2017 @ 19:14:09

The TutsPlus.com site has posted another tutorial in their "Introduction to the Yii Framework series" showing you how to install the framework on Windows and Mac. The usual instructions walk you through installation on a unix-based system, so this helps those without access to a system like that.

In today's tutorial, we'll explain how to install Yii in a local development environment for both Windows and macOS. For the Windows guide, we'll rely on WAMP Server, a Windows web development environment for Apache, PHP and Mac, and for the Mac guide, we'll use its cousin, MAMP. Although Rod uses WAMP in today's tutorial, there is also a Windows version of MAMP.

There's a brief section at the start describing the Yii framework for those who aren't familiar with it (including what "Yii Advanced" is). Next, comes the installation instructions for Mac using MAMP including the install of the MAMP software and the configuration to change to get Yii up and running. Following this comes to Windows installation using WAMP and the configuration changes needed there. The remainder of the post shows the configuration of the Yii framework application itself and how to ensure everything is working correctly.

tagged: instllation yii framework tutorial series windows mac

Link: https://code.tutsplus.com/tutorials/how-to-install-yii-on-windows-or-a-mac--cms-28530

TutsPlus.com:
Building Your Startup With PHP: Email Commands
Sep 15, 2016 @ 16:22:40

TutsPlus.com has continued their "Building Your Startup with PHP" series in this latest tutorial covering the use of email commands in their "Meeting Planner" example application.

This tutorial is part of the Building Your Startup With PHP series on Envato Tuts+. In this series, I'm guiding you through launching a startup from concept to reality using my Meeting Planner app as a real-life example. [...] In the last tutorial, we began emailing meeting invitations which included numerous links for participants to respond, i.e. view the meeting page, accept all places and times, reject a place or time, etc.

In this tutorial, I'll review how I chose to construct and process those links in a secure, functional manner.

He then starts in on the idea of "commands" explaining a bit about what they are and what kind of commands are needed for the planner application. Code is included to create some of these commands and how to integrate them into the rest of the Yii-framework based application.

tagged: startup build tutorial series email command yii framework

Link: https://code.tutsplus.com/tutorials/building-your-startup-with-php-email-commands--cms-23288

NetTuts.com:
Localize Your Web Application for Any Country With the Google Translate API
May 04, 2015 @ 15:56:34

In this new tutorial to the NetTuts.com site author Jeff Reifman shows you how to use the Google Translate API to translate the content in your application/website to the language of your choosing. In his examples, he shows how to integrate it with a Yii framework application.

In this tutorial, I'll walk you through my extensions to the Yii I18n extract script which do exactly this. And I'll demonstrate translating my startup application, Meeting Planner, into a handful of languages. Keep in mind, Google Translate isn't perfect and it doesn't address issues related to time and date formats and currencies. But for a quick and affordable (free) way to build default translations for your web application into 50+ languages, this is an ideal solution.

He starts with a brief introduction to the Google Translate API, the languages it supports and how to install the library he's chosen to make the connection. He then gets into the internationalization (i18n) functionality that Yii has (an introduction to that is here) and how to define the "messages" files with the different content strings. These files are defined to there's no need to call out to the API for every piece of content that loads. He shows how to extend the message extraction handling to add in the API request and parsing the result. This information is then added to the current message information files, making it simpler to add in new strings. He then integrates this into the Meeting Planner application and shows how to run the script to call the Google API and switch the language with image results in several different languages of the finished output.

tagged: tutorial internationalization i18n googletranslate api yii framework messages

Link: http://code.tutsplus.com/tutorials/localize-your-web-application-for-any-country-with-the-google-translate-api--cms-23126

NetTuts.com:
Building Your Startup With PHP: Localization With I18n
Mar 09, 2015 @ 15:43:08

In the latest part of their series of "building a startup" application in PHP, NetTuts.com looks at supporting internationalization with the functionality of the Yii framework.

This is part four of the Building Your Startup With PHP series on Tuts+. In this series, I'm guiding you through launching a startup from concept to reality using my Meeting Planner app as a real life example. Every step along the way, we'll release the Meeting Planner code as open source examples you can learn from. We'll also address startup-related business issues as they arise. In this tutorial, I wanted to step back and add I18n internationalization support to our application before we build more and more code.

They start off with a look at some of the overall goals of internationalization (i18n) and about how it works in the Yii system. It uses placeholders with a key/value system to replace the data based on which language is selected. They show you how to configure Yii's support including default language, sorting of the data and files to exclude when looking for i18n configurations. With this configuration in place they show how to use the command line tool to extract these messages out into separate folders for easier management and faster reference. Finally they show how to select a language and use the Yii code generator together with the translations to create models and forms.

tagged: build startup series part4 internationalization i18n localization language yii framework

Link: http://code.tutsplus.com/tutorials/building-your-startup-with-php-localization-with-i18n--cms-23102

NetTuts.com:
Building With the Twitter API: Tweet Storms
Jan 07, 2015 @ 18:49:22

NetTuts.com has posted the second part of their series about creating a Twitter client on top of the Yii framework. In this new tutorial they focus on "tweet storms", the use of a series of tweets to share a thought rather than just cramming it into one.

In April, investor and Netscape founder Marc Andreessen began expanding on the natural 140 character limits of Twitter by publishing his thoughts in sequences of tweets, which some have dubbed tweet storms. [...] A few services arose to make it easier for mere mortals like ourselves to publish tweet storms but they seemed a bit unreliable and inconsistent. I decided to build the feature myself and I think there's value in doing this with your own app.

He outlines the features that the "tweet storm" feature needs to support and the database models/migrations that you'll need to store the related data. He uses Yii's generators to create the needed skeleton classes for the models and controllers. He moves on to the code needed to handle the group tweets management and to compose the tweets that will make up the "storm". Finally, he includes the code you'll need to create the publishing feature, pushing it into both the models/database and out to the Twitter API. You can then use the "OEmbed" information provided by Twitter to view the series of tweets via another simple page (code included here too).

tagged: tutorial twitter storm multiple tweet yii framework series part2

Link: http://code.tutsplus.com/tutorials/building-with-the-twitter-api-tweet-storms--cms-22459

SitePoint PHP Blog:
What to Expect from Yii 2.0
Sep 22, 2014 @ 17:32:17

The SitePoint PHP blog has a new post today from Arno Slatius that talks about some of the features coming in Yii 2.0, a PHP-based MVC framework with a target for a stable release coming very soon.

Yii 2.0 was released into beta last April and the goal for a first stable release was set for the middle of 2014. The GitHub issue list has 300 open issues and 2913 closed while I’m writing this and both numbers are still increasing. The progress to the 2.0RC milestone was at 99%. My guess is that the team is close, but we’ll probably have to wait just a little bit longer. While we’re all waiting, lets take a look at what we can expect by looking at an already available example.

He starts with a "tiny bit of history" about the framework (its origins, the work done on 2.0) and talks about some of the requirements to get it installed and working. He helps you set up a sample project and shows off the Twitter Bootstrap integration, the debug bar and the "Gii" tool that can help generate code automatically (following the conventions of the framework). He finishes off the post with a look at some of the main things that changed in the 2.0 release including moving some method calls to properties, datetime handling, behavior definitions and model/view updates.

tagged: yii v2 introduction tutorial changes requirement install gii history

Link: http://www.sitepoint.com/expect-yii-2-0/

SitePoint PHP Blog:
Yii Routing, Active Record and Caching
Nov 07, 2013 @ 15:37:31

On the SitePoint PHP blog today Sandeep Panda has a new article looking at routing, using Active Record and caching with the Yii Framework. The Yii framework is a " a high-performance PHP framework best for developing Web 2.0 applications".

Almost all modern web apps have 3 major concerns: Retrieving data from a database easily and effectively, caching the web content and URL rewriting to create user friendly URLs. Yii, like any other good framework, offers simple and easy solutions to all of the above. [...] In this tutorial we will look at how Yii greatly simplifies the development of database driven websites with its Active Record support. Additionally, Yii lets you further improve your websites by implementing user friendly URLs and powerful caching techniques.

He creates a simple application based on the Yii framework skeleton called "gadgetstore" that works with fictional phone data. He shows how to set up a few sample routes and adding the "phone" table to the database. He then uses the framework's tools to auto-generate the model and shows the save/delete operations. He then creates the "Phone" controller and an add action to handle the create submissions. Finally, he gets into caching the response data and uses the built-in "cache" function for the models to store the results of a "findAll" request.

tagged: yii framework caching activerecord routing

Link: http://www.sitepoint.com/yii-routing-active-record-caching/

Community News:
Yii Framework Project Joins PHP-FIG
Sep 17, 2013 @ 17:18:28

According to this recent discussion on the PHP-FIG mailing list, the Yii framework project has tossed their hat into the ring and joined the PHP-FIG.

As Alexander Makarov writes in his post:

I'd like to apply for voting membership because I feel that fig is very important and that I have enough experience to make the final result better.

All of the votes from current members have been "+1" for the project's inclusion into the standards group including ones from several other well-known projects (like Zend Framework, PEAR and Doctrine).

tagged: yii framework phpfig project voting membership

Link: https://groups.google.com/forum/#!topic/php-fig/8cNsxj0YhGs


Trending Topics: