 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Court Ewing's Blog: Create and Validate a Choice List in a Symfony 2 Form
by Chris Cornutt August 17, 2011 @ 08:28:21
Court Ewing has written up a new post to his blog about creating a "choice" list (a select list as defined by Symfony 2) with dynamic options and validating the resulting submission. His example uses Doctrine 2 entities to work with most of the data handling.
A standard select list can be created using Symfony's choice field type; it is pretty clear how to create a new choice field with simple, non-dynamic options (e.g. gender), but it gets a little more complicated when you want to create and validate a dynamically generated choice list.
He includes the code for a simple entity, a Post model to fetch the category information and the set up of the form element - a select list of post types/categories. He also includes a bonus section showing how you can achieve the same thing without a model to bind to.
The code's a little bit more complex than the previous example, but it's basically just reproducing some of the validation and fetching logic manually.
voice your opinion now!
create validate tutorial symfony2 form select choice dynamic
PHPBuilder.com: Creating and Manipulating PDFs with PHP and FPDF
by Chris Cornutt March 11, 2011 @ 10:13:07
On PHPBuilder.com today there's a new tutorial about creating editing PDFs with the help of the FPDF library.
Because the Web has become the primary mechanism for distributing PDF documents, it's common to encounter questions on various web development forums pertinent to the dynamic creation of PDF documents using languages such as PHP. [...] Thankfully, such a demand for PDF manipulation capabilities exists within the PHP community that numerous alternative open source solutions have long been available, including notably FPDF.
They help you get the library installed and show you how to create a basic PDF with some simple text inside. They build on this and show how to add multiple text sections, images and watermarks.
voice your opinion now!
manipulate pdf fpdf create tutorial
Chris Jones' Blog: More on PHP and Oracle 11gR2 Improvements to Client Result Caching
by Chris Cornutt March 04, 2011 @ 09:56:33
Chris Jones has posted more information to his Oracle blog about the caching and other improvements that come along with the Oracle 11gR2 release that can be used in PHP applications.
Oracle 11.2 brought several improvements to Client Result Caching. CRC is way for the results of queries to be cached in the database client process for reuse. [...] PHP OCI8 as a "client" of the database can use CRC. The cache is per-process, so plan carefully before caching large data sets. Tables that are candidates for caching are look-up tables where the network transfer cost dominates.
Like many of the other server-side tools Oracle has to offer, it's pretty simple to enable this caching. Before you had to add a custom bit to your query to tell it to enable the caching. Now it's as simple as setting it up on the CREATE or ALTER for the table - nothing extra for the developer to do.
voice your opinion now!
oracle caching client result create alter
Dan Scott's Blog: Creating a MARC record from scratch in PHP using File_MARC
by Chris Cornutt March 04, 2011 @ 08:40:08
Dan Scott has posted an example of how to create a MARC record (machine-readable cataloging, more details here) from scratch with the help of the File_MARC PEAR package.
In the past couple of days, two people have written me email essentially saying: "Dan, this File_MARC library sounds great - but I can't figure out how to create a record from scratch with it! Can you please help me? Yes, when you're dealing with MARC, you'll quickly get all weepy and get help from anyone you can.
His example code is pretty simple - load the PEAR package into the script, create the record object and start adding fields to it. He shows various output methods ("pretty print", writing the raw data to a file, etc.) and the output to various other data structures like JSON and XML.
voice your opinion now!
marc record create filemarc pear package tutorial
NetTuts.com: Create your First Tiny MVC Boilerplate with PHP
by Chris Cornutt February 24, 2011 @ 12:20:30
If you ever find yourself in need of a basic MVC structure for your application but don't want to get involved with a full framework to do it, you should try out this new screencast from NetTuts.com. It shows you the creation of a simple "tiny MVC" implementation.
It's important for me to note that I'm not advocating that you shouldn't use large frameworks. They absolutely have their places, and I use them often. That said, there are definitely times when they can be overkill for smaller projects. When your only requirement is code organization, it's typically better to scrape together your own MVC boilerplate.
The screencast's about 15 minutes long and it walks you through each step of the way - making the routing, setting up controller handling and working with views. For the impatient, you can also download the source and get started quickly.
voice your opinion now!
tutorial mvc tiny framework custom create
SpeckBoy.com: Getting Started with CRUD In PHP
by Chris Cornutt February 18, 2011 @ 12:10:10
On SpeckBoy.com there's a new tutorial posted that introduces you to the concept of CRUD - Create, Read, Update, Delete - in the database interface for your application. Technically CRUD can be applied to any sort of data store, but they chose to go with a MySQL-based example.
It has become a common necessity for website owners to collect data and manage it properly. Creating a MySQL CRUD class allows you to conveniently create, read, update and delete entries for any of your projects, indifferent of how the database is devised. CRUD allows us to generate pages to list and edit database records.
So, in this tutorial I will show you how to build a simple CRUD web app, that will empower you with the basic functions of database management.
They briefly walk you through the setup of a XAMPP server to use as a base and give you the settings needed to create a simple users table. The rest of the post is the code you'll need to make the connection from your PHP script, insert data into the table, update them, remove the rows and display their contents. They've wrapped it all up in a single "index.php" file to make it simpler.
voice your opinion now!
crud database mysql tutorial create read update delete
Jim Plush's Blog: How to Auto Create Issues in Jira From PHP
by Chris Cornutt February 07, 2011 @ 08:06:52
Jim Plush has a new post to his blog today that points out a bit of code you can use to auto-create issues in Jira from your PHP application.
We use Jira at Gravity for tracking issues and bugs. Since I'm not always on VPN or have access to our network managing my todos has been cumbersome. I've tried every Todo app out there and always fail to use them for more than 2 days. I finally saw a great article on just using a simple Todo.txt file in your Dropbox folder and working from that. It's been a dream and working out great.
His tool lets him use the Todo list example to push its contents out to the PHP script that connects to the Jira instance and make a new issue. The code is included in the post, ready for cut-and-pasting.
voice your opinion now!
jira create issue todo list script
Nefarious Designs Blog: On Coding Standards
by Chris Cornutt February 02, 2011 @ 10:15:46
On the Nefarious Designs blog today there's a new post looking at something that can be a key in the strategy of a development group - creating a coding standard.
In my time as a web developer, I have been involved in the definition, implementation, and maintenance of several different coding standards, across various web-based languages. In my experience, this process is not as straightforward as it first seems, and can lead to a great deal of headaches if not handled in a very specific manner.
He talks about why a coding standard is even important and some of the first steps you and your team can take towards creating them. He breaks it up into a few different sections:
- Comments
- Naming conventions
- Style (ex. tabs versus spaces)
- Already accepted standards
- Expressions
- Concerns over file size
voice your opinion now!
coding standard create opinion
TutToaster.com: How to create a forum in PHP from scratch
by Chris Cornutt August 11, 2010 @ 11:08:51
On the TutToaster site today there's a new tutorial showing you how to create an entire PHP forum completely from scratch using PHP and a MySQL backend.
The code I'll show is exactly the same than the one you can download, except for some comments. In the original project you'll have everything well documented (using phpDocumentor). [...] This project doesn't follow a MVC pattern, but we'll use classes and try to separate the different functionalities.
They walk you through the creation of the database (a "posts" table) and how to organize the file structure, configuration, making the header and footer as well as the classes to do things like database connections, validation and creating the output (view) as well as working with the posts itself.
voice your opinion now!
forum create tutorial mysql
NETTUTS.com: Working with RESTful Services in CodeIgniter
by Chris Cornutt February 04, 2010 @ 13:03:58
Phil Sturgeon has posted a new tutorial over on the NETTUTS.com site about working with REST services in CodeIgniter. He shows both sides of things - using REST services and making them.
CodeIgniter is becoming well known for its power as a PHP based web application framework, but it's not often that we see examples of it being used for anything else. Today we'll learn how we can use CodeIgniter to create a RESTful API for your existing web applications, and demonstrate how to interact with your own API or other RESTful web-services, such as Facebook and Twitter.
He has the sample code hosted over on his github account where you can pull down the source and follow along from the beginning. His application is created to be flexible enough for multiple output formats (xml, json, html) and respond correctly to the HTTP request types like GET, POST, PUT, DELETE. On the other side he shows how to consume the services via different methods like file_get_contents and cURL.
voice your opinion now!
rest webservice codeigniter tutorial consume create
|
Community Events
Don't see your event here? Let us know!
|