You are here: Re: PHP "speed coding" tips « PHP Programming Language « IT news, forums, messages
Re: PHP "speed coding" tips

Posted by SterLo on 05/09/07 14:42

Well when it comes to speeding up the development process people will
generally say that it's better to take your time and get it right the
first time.
This is true, but once you have succeeded in perfecting a peice of
code (such as connecting to a database) - you should save that code
and turn it into a snippet.

I use DreamWeaver 8, this program has built in snippet manager so if I
write a login system that I think should work for just about anyone, I
can save the code and depending on how you write it - you can simply
set variables at the top of the code.

For example, let's say I have a long login script with many options -
my options could be something like the following:

$userName = 1; // Ask for a username.
$userPass = 1; // Ask for a password.
$randImg = 0; // Don't generate random image verifcation.
$storeSession = 1; // Keep a session going for this login.
$storeCookie = 0; // Don't store a cookie for this login.
$rememberUser = 0; // Don't remember this user.
$formAction = "main.php"' // Where this form will be submitted.

This may be a little crude but this is the general concept. You have a
module that works - and all it needs are simple flags, and after this
is done you can generate an entire user management system in minutes.

I have written a script or two that I simply setup the INI file and
then run the script and it creates directories and files and sets up a
standard 5 page website with a content management system.

These are just some ideas.

On May 8, 3:42 am, Tyno Gendo <you@localhost> wrote:
> Hi everyone
>
> I wondered what if any methods people here use to speed up their PHP
> code (ie. speed at which you produce your code).
>
> Things like 'code templates', 'base objects' for this and that?
>
> I thought it would be interesting to find out if I'm missing out any
> anything cool that could aid in speeding up development.
>
> Thanks.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация