News Feed
Sections




News Archive
feed this:

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

SitePoint PHP Blog:
Bootstrapping a Laravel CRUD Project
May 21, 2015 @ 11:18:27

The SitePoint PHP blog has kicked off a new series about using the Laravel framework to create a basic CRUD application relatively easily.

In this tutorial, we're going to build and run a simple CRUD application from scratch using Laravel 5.

The target audience for the tutorial are those completely new to the world of Laravel so they start at the beginning. He walks you through the creation of a new Laravel project and the database setup and configuration. He goes through the creation of "resourceful routing" and using the Laravel "artisan" command line tool to generate the matching controller. From there he talks about views and Blade templating followed by the creation and execution of the needed database migrations. The tutorial wraps up with a look at the model system included with Laravel and how they fit in with the Eloquent ORM.

0 comments voice your opinion now!
bootstrap crud project laravel tutorial series part1 introduction

Link: http://www.sitepoint.com/bootstrapping-laravel-crud-project/

PMG Blog:
Symfony from Scratch
May 21, 2015 @ 08:41:15

In the latest post to the PMG blog Chris Davis shows us how to create a Symfony application from scratch, that is without using the Symfony Standard repository/skeleton application.

The end goal here is to have an application that will send a simple Hello World message. So we're going to cover the core framework stuff, but save things like templating, database access, ORMs, and forms for later. The goal here to see how to scaffold a Symfony app to better understand why symfony standard does what it does and where to deviate. We'll end up with an app that uses the Symfony 3 directory structure.

Starting with the smallest "composer.json" he can (just symfony/symfony) he walks through the creation of the application one step at a time:

  • The Application Kernel
  • Handling Web Requests
  • What's in a Bundle?
  • Stepping into Configuration
  • AppBundle
  • Hello, World

The end result is a simple page outputting a "Hello, World" message, but it gives you a good foundation to work from and understanding of the simplest pieces needed to make a Symfony application.

0 comments voice your opinion now!
symfony scratch introduction simple application standard

Link: https://www.pmg.com/blog/symfony-from-scratch/

SitePoint PHP Blog:
Getting Started with eZ Platform on Vagrant
May 13, 2015 @ 09:54:48

The SitePoint PHP blog has a new post about getting eZ platform set up and running on a Vagrant VM relatively painlessly. eZ Publish (and the newer eZ Platform) are a content management system aimed at the digital marketing space.

Last year, I had a somewhat negative experience with installing eZ Publish on a Vagrant box. Since then, they've significantly improved both the software and the VM-friendliness by, well, flat out removing the legacy stack. The VM setup we'll be using in this tutorial comes from the labs of NetGen and the mind of @vranac, and is followed by the installation procedure on our very own Homestead Improved modified by yours truly.

Author Bruno Skvorc walks you through the entire process, using Vranac (Vagrant, Anisble and VirtualBox) to get the VM instance set up and running. He then shows how to clone the latest eZ installation and build the demo application. He follows this with the instructions on getting the same setup running on a Homestead Improved instance, requiring a few more steps but it can be a bit faster overall. He finishes off the post by mentioning an upcoming event, PHPSummerCamp, a conference that will include sessions and in-depth looks at the eZ Publish and Platform functionality (happening in Croatia in August).

0 comments voice your opinion now!
ezplatform introduction vagrant homestead improved install configure

Link: http://www.sitepoint.com/getting-started-ez-platform-vagrant/

Semaphore Software Blog:
Getting Started with Symfony 2
May 11, 2015 @ 10:35:57

The Semaphore Software blog has posted a new tutorial for those wanting to get into the Symfony2 framework and find out what it's all about. In this new tutorial they walk you through some of the basics of the framework and shows you how to get a basic first site up and running.

Symfony 2 has seemingly gained the attention of developers in recent times. Owing to the growing hype surrounding this framework, it is something that you ought to know about. A web application framework formed of reusable PHP components has been termed as Symfony. Symfony 2 is an updated version of this framework, and it enables developers to create websites and web applications with ease and convenience. The individual PHP components that set out to form this framework can be selected as per your design and development requirements. Let's understand why Symfony is gaining popularity and why it should be used by you.

They start with the download and installation of the current version and where to place the resulting files. They briefly cover each of the main directories in the framework setup including a bit of sample code to illustrate. They then get into the bundling system and how it fits it with the overall ecosystem of your application, diving it up into functional "chunks". They show you how to register, configure and extend a bundle with some of your own functionality. Finally, the tutorial shows how to configure the database connection and run Doctrine to generate the table mappings.

0 comments voice your opinion now!
gettingstarted introduction symfony2 beginner walkthrough

Link: http://blog.semaphore-software.com/getting-started-symfony-2.html

Propser Otemuyiwa:
Developing a Micro-Service with Lumen
May 07, 2015 @ 09:55:57

Propser Otemuyiwa has a quick new post to his site showing you how to make a micro-service with Lumen, the recently introduced microframework from the creators of Laravel.

I introduced Lumen to you all in my previous post. Today we'll be creating a simple microservice with Lumen. [...] So, the idea is to build a microservice that showcases your Developer Evangelist status based on the number of public repos you have on Github. The assumption here is that the more publicly available repos you have on github, the more you support the idea of Open source..giving back to the community.

He walks you through the full process:

  • Creating the Lumen project
  • Serving up the new application
  • Enabling Eloquent and the .env handling
  • Adding a single index route

He then fills in the route handling with a bit of code to pull from GitHub and get the number of public repositories a user has and assigns them a "rank" based on that.

0 comments voice your opinion now!
microservice microframework lumen tutorial github example introduction project

Link: http://prosperotemuyiwa.com/developing-a-micro-service-with-lumen/

Knp University:
Symfony Service Expressions Do things you thought Impossible
May 06, 2015 @ 12:50:13

The Knp University site there's a new post showing you an interesting thing you can do with Symfony2 service definitions - use more complex expressions to load and supply service dependencies.

[Using] the @= means that you're using Symfony's Expression Language, which let's you mix dynamic logically into your normally-static service definitions. Normally, if you want to inject a repository, you need to register it as a service first, using a factory. And while that's fine (and probably better if you're injecting the factory a lot), using the expression language is well, kinda cool.

They include an example of the compiled container code that would be produced from the example expression. They also show how to use the same expression language to read configuration information and pass it in as an argument to the created service. The show the pull of a configuration setting "email_from_username" and how to inject it via the expression language.

0 comments voice your opinion now!
service expression language tutorial introduction configuration example

Link: http://knpuniversity.com/blog/service-expressions

Tech.MyBuilder.com:
Dependency Injection tutorial
May 06, 2015 @ 11:16:25

If you've heard the term "dependency injection" but are still a little fuzzy on the concept, you should check out this new post to the MyBuilder.com site introducing you to some of the basic concepts and using it in some PHP-based examples. They focus on the use of a dependency injection container in this tutorial (versus something like constructor or setter injection).

A lot has been written about dependency injection or DI (for short) in PHP, but it's a bit difficult to find a tutorial showing how a DI container actually works. The objective of this post is to show the internals and concepts of a DI container.

They start with a brief look at what a dependency injection container is and how it's different from a service locator or regular autoloading. They mention some of the benefits it provides and get into the simple example. They start with a class that creates a hard dependency in the constructor and show how to refactor that out to constructor injection. They then take the next step and replace the constructor injection with a DI container injection and how its internals are set up to provide new instances of requested objects (via a services definition).

0 comments voice your opinion now!
dependency injection di container tutorial introduction

Link: http://tech.mybuilder.com/dependency-injection-tutorial/

SitePoint PHP Blog:
Automated Testing of Drupal 8 Modules
May 04, 2015 @ 11:06:08

The SitePoint PHP blog has a tutorial posted talking about the automated testing of Drupal 8 modules, the components of the popular PHP-based content management system. In it author Daniel Sipos shows how to create a few tests for some functionality created in previous articles.

In this article we are going to look at automated testing in Drupal 8. More specifically, we are going to write a few integration tests for some of the business logic we wrote in the previous Sitepoint articles on Drupal 8 module development. [...] But before doing that, we will talk a bit about what kinds of tests we can write in Drupal 8 and how they actually work.

He makes use of the SimpleTest unit testing tool for PHP (versus something like PHPUnit) as it has become a standard for Drupal's own testing. He talks briefly about what SimpleTest is, how it integrates with Drupal and what kinds of tests already exist. He then gets into testing his own functionality - checking route information, that the page exists, the contents of the resulting page and the addition of a custom block plugin. He shows how to create these simple tests, extending the WebTestBase class, and checking each item on the list. He also includes an example of the resulting output of the successful testing, including time to execute and the detailed results of each test.

0 comments voice your opinion now!
drupal8 automated testing tutorial simpletest introduction exists form custom plugin

Link: http://www.sitepoint.com/automated-testing-drupal-8-modules/

SitePoint PHP Blog:
Generating PHP Documentation with Sami
April 28, 2015 @ 09:55:31

The SitePoint PHP blog has a new tutorial posted today showing you how to generate API documentation with Sami, a "Friends of PHP" project that's currently used to generate API documentation similar to what the Symfony project provides. In this case "API" refers to your class and method structures, not something like a REST API.

Documenting your methods, classes, and functions is becoming second nature for everyone, so it makes sense to have a way to generate a separate documentation instead of navigating through the source code. In this article, I'm going to introduce you to Sami, the new API documentation generator.

He starts with a brief introduction to the DocBlock commenting methods and why you might want to choose Sami over other document generation tools (like phpDocumentor). He then helps you get Sami installed as a phar archive and how to use it to generate the document output for the Laravel Illuminate package. He includes the code you can use to set up the Sami configuration and an example of the output from the command execution. He then includes a bit about the versioning of the documentation, using themes and customizing the look and feel through custom assets and markup changes.

0 comments voice your opinion now!
sami api documentation generate tutorial symfony introduction

Link: http://www.sitepoint.com/generating-php-documentation-sami/

Christoph Rumpel:
Hello world, I am Laravel (5)
April 24, 2015 @ 12:46:22

With Laravel 5 out in the wild, you may be wondering what this new version has to offer either as someone already using the framework or brand new. In this recent post from Christoph Rumpel you can find out some of the highlights of this new release along with some code samples to illustrate.

So there is this thing called Laravel. You may have heard of it already, but you're not sure what it is actually about? Or you do, but want to know more about it and its great new features in version 5? Great, this post is especially for you! Laravel is at the same time one of the youngest and most popular PHP frameworks out there. So how does this work together? Let us take a closer look at why it is that popular and how it could be of use for you too. We will go through the main functionalities and talk about brand new features in version 5.

He touches on several different topics including: routing, use of the Eloquent ORM, the "artisan" command line tool, controllers, migrations and form request handling. Each section has some example code and a brief description of the feature. Obviously the Laravel documentation is a much more complete resource for each of these topics, but at least this gives you a feel for the framework and what it can do.

0 comments voice your opinion now!
introduction laravel5 framework version features overview

Link: http://christoph-rumpel.com/2015/04/hello-world-i-am-laravel/


Community Events

Don't see your event here?
Let us know!


example symfony2 conference application voicesoftheelephpant podcast laravel performance introduction configure series part2 release api interview framework opinion community composer php7

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework