News Feed
Jobs Feed
Sections




News Archive
feed this:

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

Procurios Tech Blog:
Autocompleting a lot of parameters
October 16, 2013 @ 11:14:05

Pim Elshoff has a recent post on the Procurios tech blog looking at autocompletion on function calls and an alternative to the "too many parameters" problem.

Some methods have many parameters. Sometimes they start out like that, sometimes they grow like that over time. Even though a maximum of two parameters is preferable, configuration for a method that does a big thing is difficult. Take curl for example; curl has a lot of options and so several wrappers around curl have arisen to deal with configuring it in a more humane manner. How can we keep the clutter of many parameters as low as possible, while maintaining autocompletion?

He gives an example of a function that takes too many arguments and how it's difficult to read (and remember the right order/types to give). He does mention one way that's sometimes used - arrays - but you lose typing checks with that. His best recommendation is to use a fluent interface instead. Not only does it make it more readable but it also works with the autocompletion in most IDEs.

0 comments voice your opinion now!
autocomplete parameters suggestion array fluent interface

Link: http://tech.procurios.nl/archief/2013/10/11/Autocompleting-a-lot-of-parameters

Zumba Engineering Blog:
Creating bash completion to your console application
August 21, 2012 @ 09:47:52

On the Zumba Engineering blog there's a new post showing you how to implement bash shell "autocomplete" with a special option for a second argument.

This weekend I saw the bash completion for CakePHP from Andy Dawson and had an idea to do the same for our service application, because we frequently forget the exactly job class or method name and add extra steps to verify these names before execute the job. I read his code, made some research and finally get our bash completion working fine.

In his case he wanted to see what things a module in the application had to offer, so he implemented a "__check__" argument that looked at the third argument and used reflection to get the methods allowed for it. Also included in the post is the bash alias you'll need to set up to get it working (and where to put it to make it cooperate).

0 comments voice your opinion now!
bash autocomplete console tutorial reflection


DZone.com:
2 years of Vim and PHP distilled
April 06, 2012 @ 09:50:35

On DZone.com there's a new post from Giorgio Sironi with some of his tips for PHP developers that want to use VIM in their development - some handy tricks to help make you a more effective developer.

In the case of PHP development, you'll need to add some configuration and plugins to speed up your activities. Most of the responsibilities of an IDE - like testing and version control - are outsourced to the terminal while running Vim; however, there are some tweaks that make writing and editing code faster, along with aiding in discovery classes and methods in a PHP codebase.

He includes settings for your .vimrc to detect and load the right PHP functionality, using Command-T, functionality for autocompletion and the snipMate plugin for managing and using reusable code snippets.

0 comments voice your opinion now!
vim editor tips vimrc commandt snipmate autocomplete


Script-Tutorials.com:
Autocomplete with PHP, jQuery, MySQL and XML
October 12, 2011 @ 08:54:40

In this new tutorial from Script-Tutorials.com they show you how to combine PHP, jQuery, MySQL and XML to create an auto-complete box with drop-down suggestions.

Today I have new article for PHP. I will tell you about implementation autocomplete for your sites. Data can be located in different sources - directly in the JS code, in the database, and even in the XML file.

All of the code and markup you'll need is included - the HTML for the page containing the field, CSS to style it, the Javascript (jQuery) to make the field work and the SQL/PHP/XML for the backend. You can check out a live demo of the script in action here or download the source in a single package and get started.

0 comments voice your opinion now!
tutorial xml jquery javascript autocomplete mysql dropdown


Martin Sikora's Blog:
Google Chrome Extension PHP Ninja Manual
July 08, 2011 @ 09:38:23

In a new post today Martin Sikora has points out a Google Chrome extension he's created that lets you view some of the basics of the PHP manual without leaving the browser.

Finally, I released my extension for Google Chrome called PHP Ninja Manual (Ninja - because I like Avinash Kaushik'sblog and he always call people who are very skilled in something as "Ninjas"). I was always lazy to open PHP documentation every time I had to look at some method definition and its parameters so I made this extension which is actually preparsed official PHP manual available instantly in a popup window.

You can see a screenshot of it in action here including the auto-complete searching and the example of the function's summary details. If you try it out and have feedback, go over to the forum for it and leave your comments.

0 comments voice your opinion now!
chrome extension google manual autocomplete search


Gonzalo Ayuso's Blog:
Building an ORM with PHP
September 13, 2010 @ 12:44:14

In this new post to his blog Gonzalo Ayuso looks at building an ORM (don't worry, he recommends something like Doctrine first) as an exercise to understand how they're constructed and how one could fit his goals.

What's the motivation for me to build this ORM? The answer is a bit ambiguous. I like SQL. It allows us to speak with the database in a very easy way. [...] So the idea I figured out was to create a set of classes based on my tables, in a similar way than traditional ORMs to help me to autocomplete the fields and table names.

He creates a simple example with a "test" table with three columns with a mapped class (in the "Orm" namespace) that will allow IDEs to follow down the path to fetch the data from the "id", "field1" and "field3" columns. The complete code listing for his example is at the end of the post - PHP 5.3 friendly, of course. Some trigger and scaffolding examples are also included.

1 comment voice your opinion now!
orm tutorial example database doctrine autocomplete


ZendCasts.com:
Autocomplete Control with ZendX_JQuery
July 27, 2010 @ 09:48:57

New from ZendCasts.com today there's a new screencast taking their integration of jQuery with the Zend Framework to the next level - creating an autocomplete control.

In the last video, I discussed ZendX_JQuery integration. Now we're going to take it a step further by developing our own jQuery autocomplete control, using a country list, PHP 5.3 and anonymous functions.

You can watch the video via the in-page player and you can download either a copy of just the project or browse the whole repository for this and other projects.

0 comments voice your opinion now!
zendcast screencast autocomplete jquery zendxjquery zendframework tutorial


Matt Curry's Blog:
Programming CakePHP Apps with Komodo IDE
February 26, 2009 @ 10:27:16

For those Komodo users that are working with CakePHP and have thought "there has to be a better way", Matt Curry has created a screencast showing a few helpful hints on developing in popular IDE.

I suck at screencasts; I know this. If I keep doing them, I'm bound to get better, right? Is it possible to get worse at something the more you do it? Anyway, I made a quick screencast showing off some CakePHP features with Komodo IDE. Leave a comment with your favorite CakePHP related IDE trick.

He talks about the "automatic" auto-completion the IDE can do once its scanned the CakePHP source, how Komodo knows about properties in the classes as well as helpers and how to set up the Bake and Cake commands as shortcuts for quick access.

3 comments voice your opinion now!
cakephp komodo ide tip autocomplete screencast property bake cake


Zend Developer Zone:
Building AutoComplete Inputs with PHP, PEAR, Dojo and YUI
February 04, 2009 @ 15:29:25

The Zend Developer Zone has a new tutorial posted (from Vikram Vaswani) about adding in an auto-complete input field to your site. His example uses a PEAR class, Dojo and some components of the YUI libraries.

Fortunately, modern programming toolkits like Dojo provide ready-made widgets that have the necessary client-side functions for autocomplete. Add a little bit of server-side glue, in the form of a PHP script that talks to a database to generate valid suggestions, and enabling this functionality in a Web application now becomes a matter of hours, rather than days. In this article, I'll show you how to do this using three different libraries: PEAR HTML_QuickForm, YUI, and Dojo. Come on in, and find out more!

He shows how to combine Dojo, YUI and the HTML_QuickForm PEAR package to create a field that, based on what they enter into the input field, searches a database to find values in that table.

0 comments voice your opinion now!
autocomplete input field tutorial yui dojo pear htmlquickform


SitePoint PHP Blog:
PHP Support in NetBeans 6.5
December 16, 2008 @ 07:57:21

On the SitePoint PHP blog today Kevin Yank takes a look at a recent version of the NetBeans IDE (version 6.5) that comes bundled with improved PHP support.

Long dismissed as a "toy Java IDE", NetBeans - Sun's open source Integrated Development Evironment (IDE)-has really grown up in recent years. No longer is it just for Java, either: for web developers, NetBeans 6.5 now supports Ruby and PHP out of the box. Surprisingly, that support is so good that it now compares favourably to more established competitors like Eclipse, Komodo IDE, and Zend Studio.

He mentions the built-in/user-defined auto-complete the has built in as well as code templates, support for phpdoc documentation blocks, and other functionality for helping with Javascript, HTML and CSS.

0 comments voice your opinion now!
netbeans sun ide autocomplete java eclipse komodo zendstudio



Community Events











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


release symfony2 facebook example language podcast opinion security composer application hhvm series component hack install code unittest package framework introduction

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