Top 10 PHP Tips for Developers - PowerPoint PPT Presentation

About This Presentation
Title:

Top 10 PHP Tips for Developers

Description:

BesantTechnologies provides #PHPTraining in Chennai with excellent placements. Our training program is very much mixed both practical and interview point of questions – PowerPoint PPT presentation

Number of Views:12
Slides: 10
Provided by: inigojoseph
Tags:

less

Transcript and Presenter's Notes

Title: Top 10 PHP Tips for Developers


1
Top 10 PHP Tips for Developers
2
  • INTRODUCTION
  • I have for the longest time been itching to
    compose an article this way, since I consider
    everything the time - what 10 things would I
    regard the most critical to pass on to another
    person?

3
  • Go OOP
  • On the off chance that you have not yet entered
    the domain of Object Oriented Programming, at
    that point you are off guard, and you are falling
    behind quick.
  • OOP is basically a technique for
    programming with the utilization of classes, or
    Objects, which entwine like things, evacuate the
    requirement for reiteration of code and play out
    the fundamental errands of generation just.

4
  • 2) Stay Away from Anything Ending With _once()
  • What we keep in mind is that include_once()
    and require_once() is to a great degree hard on
    server assets. There is nothing we can do about
    it, it's the way PHP is set up.

5
  • 3) Develop With Error Reporting
  • The main thing you do when beginning another task
    is to turn mistake answering to E_ALL, and you
    should just turn it off ten seconds previously
    going to generation mode

6
  • 4) Use A Framework If You Need One
  • Ok, so you shouldn't use a framework
    because he could quite conclusively prove that a
    framework is much slower than normal PHP code
    when it came to printing a simple "Hello World"
    application.
  • Two things to mention here though you
    are not Rasmus Lerdorf and I bet you won't be
    building a "Hello World" application every time
    you program something.

7
  • 5) Use PHP's Inbuilt Functions
  • PHP has many built-in functions that can
    do what you need them to, so check out the manual
    to make sure you are doing it in the best way
    possible.
  • 6) Protect Your Database
  • The best and safest way is to use
    mysql_real_escape_string() for all database
    before it is added to the database. This function
    makes all strings safe in terms of quotes and
    other functions that can harm your database or
    contain malicious code.

8
  • 7) Use POST Not GET
  • Ok, this isn't always possible, but when its
    really not necessary, don't use GET, use POST.
    The reason is simple - GET is simple to emulate,
    all I need to do is add something to my address
    bar and I can hack your project.
  •  
  • 8) Draw Before You Code
  • A good practice to get into is to
    wireframe your projects, even if you are just
    scribbling a few notes on a piece of paper. It is
    very important to actually give the mechanics of
    you php application some thought before sitting
    down to start coding.
  •  

9
  • 9) Understand Your Project
  • A craftsman can't draw something that he
    has not seen some time recently. An artist can't
    sing a tune that he has not heard some time
    recently.
  •  
  • 10) Code
  • On the off chance that I could make them
    thing through to anybody perusing this, this is
    it. You can't turn into a decent engineer by
    perusing. You can't turn into a decent engineer
    by watching somebody create.
Write a Comment
User Comments (0)
About PowerShow.com