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:
Autogenerate CRUD Apps with Phreeze
May 30, 2014 @ 12:45:02

On the SitePoint PHP blog today Taylor Ren has shared a tutorial about using Phreeze to easily create CRUD applications for a MySQL backend. Phreeze is made up of three parts: an MVC handler, an ORM for database interaction and the "Phreeze Builder" to generate the application code.

Back in the times of Symfony 1.x, the framework had a powerful backend module to help the developers and site administrators create a good enough app and provide necessary CRUD features to manage the database (and save us from using PHPMyAdmin). [...] In this article, we will take a look at Phreeze, a simple and easy to use PHP framework that can help us generate a MySQL CRUD backend app. I will use my book collection test site as the underlying database. Please refer to my Data Fixtures in Symfony2 article for more details on the database structure.

He walks you through the installation of Phreeze (downloaded from GitHub) and what the first page should look like when pulled up in a browser. The wizard helps with the database setup and lets you pick the tables to generate models for as well as a few other application options. He shows how to integrate this generated code with a simple Symfony2-based application and easily allow for working with the database contents. He modifies the Symfony2 code to handle some additional options to pass into the generated code and talks some about the API interface Phreeze generates automatically.

0 comments voice your opinion now!
phreeze generate code application symfony2 integration

Link: http://www.sitepoint.com/autogenerate-crud-apps-phreeze/

Lorna Mitchell:
GitHub-Powered Changelog Scripts
January 28, 2014 @ 09:29:20

In her latest post Lorna Mitchell has shared some scripts she uses to automate the creation of a changelog based on the GitHub issue comments and fixes.

My current project does periodic releases, we build a few things, then we work on getting a bunch of user feedback and changing/fixing things before we actually release. [...] When a branch merges in to the main line, we use the "fixes #42" notation to simultaneously close off the issue that it relates to. This has been working pretty well, and today I got the question "what's new since I last saw this project?" - so I created a changelog. It's rather rough-and-ready but I had fun so I thought I'd share.

The script operates off of a local git cloned version of the repository and grabs all commit messages with the tern "fixes" in it. The script then takes the log file, matches the issue ID and then makes a cur call out to the GitHub API to get that issue's description. This is then taken, formatted and dropped into the output.

0 comments voice your opinion now!
changelog script automate changelog generate issue

Link: http://www.lornajane.net/posts/2014/github-powered-changelog-scripts

Gonzalo Ayuso:
Using the event dispatcher in a Silex application
October 14, 2013 @ 13:03:26

Gonzalo Ayuso has a new post today showing you how to use the Symfony event dispatcher in a Silex-based application. His example involves a simple image processing example.

Symfony has one component called The Event Dispatcher. This component is one implementation of Mediator pattern and it's widely used in modern frameworks, such as Symfony. Silex, as a part of Symfony, also uses this component and we can easily use it in our projects.

His example creates a Silex endpoint that creates an image with a given string. He notes that handling it all at once and then unlinking at the end of the request is one way to handle it. The other is to use the event dispatcher to add an event lister (as a closure) to happen "on terminate" to unlink the path it's been given.

0 comments voice your opinion now!
event dispatcher symfony2 silex image generate

Link: http://gonzalo123.com/2013/10/14/using-the-event-dispatcher-in-a-silex-application/

Lorna Mitchell:
OAuth Middleware for Slim
October 09, 2013 @ 11:53:37

Lorna Mitchell has posted about some middleware for the popular Slim (micro)framework that helps with OAuth functionality.

OAuth can be anything you want it to be, the standards are lax and give you plenty of room for getting the right implementation for your system. However you proceed, though, you'll need to check an access token on every request - and in a Slim application, a middleware can help enormously since it hooks in to every request by design. I've recently implemented this and thought I would share.

She's created a basic middleware component that can be easily dropped into the framework to handle the checking of the tokens via an "AuthService" object. She also includes a brief snippet of how she generates the codes, combining the output of bin2hex and openssl_random_pseudo_bytes.

0 comments voice your opinion now!
oauth middleware slim access token validation generate

Link: http://www.lornajane.net/posts/2013/oauth-middleware-for-slim

Gonzalo Ayuso:
Creating QR codes with PHP and Silex
September 03, 2013 @ 10:46:53

Gonzalo Ayuso has posted a tutorial showing you how to use Silex and the endroid/qrcode library to make a simple QR code generation site.

Today we're going to play with QR codes and how to use them within a Silex application using one Service Provider. First we need a QR code generator. If we find in Packagist we can see various libraries. We are going to use the library: endroid/qrcode. We are not going to modify endroid/qrcode, because of that we will create a wrapper. This wrapper will receive in the constructor one instance of endroid/qrcode.

His example includes both the code for the endpoint and a unit test for the "QrWrapper" class. The Silex structure has two endpoints - register

0 comments voice your opinion now!
qrcode tutorial silex generate

Link: http://gonzalo123.com/2013/09/02/creating-qr-codes-with-php-and-silex

WebDeveloperJuice.com:
Best in Class Libraries to Generate Excel Reports
August 14, 2013 @ 09:18:55

WebDeveloperJuice.com has posted a list of several PHP tools that you can use to create Microsfot Excel reports from your data (some a bit more feature-packed than others).

Every time somebody does something unique with PHP that is far beyond the standards and norms of PHP applications. One must say you will truly be overwhelmed by the capabilities and features of PHP language. Microsoft Excel is widely used by most of the companies as a report generation tool and data analysis tool. [...] In this post we will have a look at the various Libraries that the PHP developers can use for generating Excel Reports in any PHP Application and for exporting the data to Microsoft Excel Spreadsheets.

The tools that made their list are:

  • PHP Export Data
  • PHP Excel Library
  • Excel Writer (XML) PHP Library
  • Php-Excel
  • Pear Excel Writer Library
0 comments voice your opinion now!
microsoft excel report generate library project

Link: http://www.webdeveloperjuice.com/2013/07/05/best-in-class-libraries-to-generate-excel-reports-in-php-applications/

PHPMaster.com:
Generating One-Time Use URLs
April 10, 2013 @ 11:18:56

On PHPMaster.com there's a new tutorial posted showing you how to generate one-time use URLs that could be used for various things across an application, including things like account verification links.

A one-time URL is a specially crafted address that is valid for one use only. It's usually provided to a user to gain privileged access to a file for a limited time or as part of a particular activity, such as user account validation. In this article I'll show how to generate, implement, and expire one-time URLs.

Included in the post is the SQL to create a sample "pending_users" table that includes a "token" column for storing the generated hash. Code is also included for generating the hash and checking the incoming URL to see if it matches the requested user (and hasn't expired).

As a matter of general house keeping you could write a secondary script to keep expired tokens from accumulating in the database if a user never follows them. The script could be run periodically by an administrator, or preferably set up as a scheduled task or cron job and run automatically.
0 comments voice your opinion now!
onetime url tutorial generate unique

Link: http://phpmaster.com/generating-one-time-use-urls

Gonzalo Ayuso:
Building a Silex application from one Behat/Gherkin feature file
October 22, 2012 @ 08:55:18

Gonzalo Ayuso has an interesting post showing how you can use a Gherkin file (used in tools like Behat) to generate a Silex-based application.

Last days I've playing with Behat. Behat is a behavior driven development (BDD) framework based on Ruby's Cucumber. Basically with Behat we defenie features within one feature file. I'm not going to crate a Behat tutorial (you can read more about Behat here). Behat use Gherkin to write the features files. When I was playing with Behat I had one idea. The idea is simple: Can we use Gherking to build a Silex application?. It was a good excuse to study Gherking, indeed.

He includes the example feature file - one that builds an API that lets you list users, get the information for a specific user and update the user's information. Also included are two simple requests to be made to the API and the actual script that makes the Gherkinn-to-Silex translation possible. You can find the full code on github.

0 comments voice your opinion now!
silex gherkin api generate tutorial feature file


Fabien Potencier's Blog:
Sami Yet another PHP API documentation generator
May 15, 2012 @ 09:18:49

Fabien Potencier has released a new tool to the open source community today - a documentation generation tool called Sami.

Nowadays, phpDocumentor version 2 is probably the best option out there as it has a good architecture, it works fine, it is extensible, and quite a few big PHP projects is already using it. And that's fine. I don't want to compete with it, I don't want to replace it, I'm just open sourcing some code used by Symfony, Twig, and Silex because I'm not comfortable with closed-source software. And to be totally honest and transparent, I have not released the code before because it was not "good enough".

He gives an example of how to install and use Sami - configuring the directories to parse and setting up a custom theme for the resulting generated documentation (using regular CSS and HTML definitions).

0 comments voice your opinion now!
sami generate documentation tool opensource


PHPClasses.org:
Using DaDaBIK to create a PHP CRUD Database Front-End without coding
May 10, 2012 @ 09:16:23

On the PHPClasses.org blog there's a recent post about using the DaDaBIK project to automatically generate a database CRUD frontend without having to code any of it by hand.

Writing CRUD database front-ends and simple database applications is a very common task that almost all PHP developers need to implement. It is usually a simple job to accomplish, but is also time consuming, boring and error-prone to implement. Software developer's tend to avoid time wasting and repetitive tasks in favor of more challenging tasks. This lead to the development of applications with the goal to automate front-end development. DaDaBIK is one of the precursors of this kind of applications for automated creation of PHP front-ends. Released initially in the year 2000 by myself, Eugenio Tacchini, the project continues to be actively developed until today.

Included in the post are a few screenshots of the interface and a screencast showing it in use. You can find out more about the project on the DaDaBIK website.

0 comments voice your opinion now!
dadabik project crud database frontend generate code



Community Events





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


introduction wordpress code interview podcast bugfix community framework api developer configure library threedevsandamaybe laravel release list series language project application

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