Why you should not use @ sign in PHP

Written on October 22, 2010 – 8:05 am | by Stan Kuhn |

For those who don’t know @ is error control operator. Taken from PHP documentation “When prepended to an expression in PHP, any error messages that might be generated by that expression will be ignored”. In other words error message won’t be printed out. There are some situations when  @ sign might be helpful e.g. include() [...]

Learning LAMP web developement – 7. User session management and cookies

Written on July 21, 2010 – 2:33 pm | by Stan Kuhn |

What the session is for… Session data is suppose to hold some information about one particular visitor during his browsing session or even longer. Session data is right place where to store identification information or user after log in, information about his preferences how or what to show on the website, to store some information [...]

Tags: ,

Learning LAMP web developement – 6. PHP project organization, framework, libraries and third party code

Written on June 14, 2010 – 3:52 pm | by Stan Kuhn |

Source code re-usability is one of the most important things if you plan to keep developing applications for longer. All Internet applications have set of functionalities that are common. These are for example, User management, permissions management, CMS functionality, forums, categories, menus, profiles etc. Therefore you don’t have to write a lot of code from [...]

Learning LAMP web developement – 5. coding style

Written on May 12, 2010 – 12:23 pm | by Stan Kuhn |

As many opinions as many people. I don’t want to talk here about which coding style is good and which is bad. I’ll tell you what coding habits are good for team development and what are not. If you look at the code of someone you can tell a lot from it. Mainly whether author [...]

Tags: ,

SEO links in Apache

Written on April 12, 2010 – 5:54 am | by Stan Kuhn |

Nice search engine optimized links may look something like this http://www.mydomain.com/products/home-garden/Patio-Glass-Coffee-Table.html To create e.g. online shop with such formatted  real pages would be crazy. Althoug it would be possibly doable to autogenerate cache pages as real files, this is not how these links are being done. To create dynamic pages with such structure you use [...]

Learning LAMP web developement – 4. Templating systems. Back-end and front-end separation

Written on March 5, 2010 – 6:05 am | by Stan Kuhn |

HTML templates are used in projects for simple reason to separate front-end static html pages from background functionality that delivers those pages to the user. This concept brings many benefits, one of them is possibility to independently maintain front-end a back-end of the application. Main benefits of using the templating systems are Clean code. To [...]

PHP Static variables – Object factory

Written on February 24, 2010 – 7:34 pm | by Stan Kuhn |

On large busy projects where server resources do matter it is good idea to reuse object which is used several times during script execution in different scopes. There are more options. One is to use global keyword on top of each function where object is needed but you must make always sure object really exist [...]

Learning LAMP web developement – 3. Object oriented programming

Written on February 22, 2010 – 5:09 pm | by Stan Kuhn |

If we look to the history of scripting preprocessors such as PHP used to develop Internet applications we can see that from very beginning they were plain procedural languages. Over the time object oriented functionality was introduced and nowadays the object oriented support is pretty good. So what makes it interesting? Why the object programming [...]

Learning LAMP web developement – 2. Appropriate development tools for web application development

Written on February 18, 2010 – 4:42 pm | by Stan Kuhn |

You certainly can use simple text editor, simple FTP client and command line utility to manage your database, so why should you care? Well, the same way as you can build a house with just a shovel and trowel, but how long it will take you? So lets get real and lets see what we [...]

Learning LAMP web developement – 1. Introduction

Written on February 17, 2010 – 7:47 pm | by Stan Kuhn |

PHP gained its popularity mainly because of its intuitiveness and easy use. Practically anyone who can think logically can create a program in php. Starting is about reading few articles on Internet doing some simple install and you are ready to go. This is great because it creates large base of potentially good programmers. On [...]