Web Design & Marketing Blog


Learning PHP the Right Way From the Start Part 2 - Best Practices

Most people who start to get the hang of PHP feel like they can do anything. It literally took me 5 days until I was writing PHP professionally. That's how fast and easy it is to get great results with PHP. But there's a distinction between the developer who could get the job done poorly with some Googling and 5 hours of time and the true professional who spent the extra time developing the habits that set him apart from the herd.

Programming should always be results oriented, and with PHP that's easy because it's so simple to get results. However, if you're writing more than an about page it's important to realize how your results are going to suffer if you don't put in the effort to make flexible, stable code that other developers can work on or take over. That's why you haven't learned PHP if you haven't learned how to do it right.

Read more: Learning PHP the Right Way From the Start Part 2 - Best Practices

Learning PHP The Right Way From The Start

Starting to make websites is easy, powerful, and scalable with PHP.  PHP was designed from the ground up to be easy, and has since evolved into a fully object-oriented language that has been successfully used in many large scale web applications.  PHP is wonderfully flexible, and can easily be added to any JavaScript or HTML just by putting PHP code between the tages “<?php ” and “?>”.  Some critics accuse PHP's lenient code of being a reason to not use the language, but I strongly disagree.  Still, it's important to learn PHP the right way from the start.

Get PHP

The first thing you need to do is get PHP.  The easiest solution for a beginner is to get XAMPP which has a version for all major operating systems, and easily installs everything you need to start writing PHP.  Then you just run the XAMPP control panel and click the start button next to the words Apache and MySQL.  Then you can make files with with the .php extension in the folder called htdocs where you installed XAMPP, and see them run in your web browser by typing “localhost/” followed by the name of your file.

The only way to learn how to do it is to try it.  So if you don't have it installed already, do so now.  Once you have started Apache, find the folder called htdocs which will probably be located somewhere like C:\xampp\htdocs on Windows.  Then, open up Notepad

Read more: Learning PHP The Right Way From The Start

Speed Matters Part 2 - More Basic Tips To Keep The Impatient Citizens Of Cyberspace On Your Page

Does it take more than a few seconds to load the main content of a page on your site?  If so you're almost certainly doing something wrong.  Sure there are a few exceptions that can't really deliver the content they absolutely need on a page any quicker, but chances are you're losing visitors, resources, and conversions if a visitor doesn't see what they want in the flash of an eye.  I've said it before, but it can't be said enough: speed makes or breaks a good website, and a good website shows.

It may seem hard to believe, but in my years of experience over half of any necessary speed optimizations can be accomplished simply by using indexes and minimizing queries in your web sites SQL.  Following are some other vital basics to getting your information to the world fast, and speed matters.

Read more: Speed Matters Part 2 - More Basic Tips To Keep The Impatient Citizens Of Cyberspace On Your Page

Speed Matters - Why You Need To Optimize Your SQL & How To Get Started

 

Few people think about their website once it's up and running, but a good website will always have to be worked on, and a good website shows.  Speed is a huge factor in website conversions and revisits; the two holy grails every website strives for.  Speed on the web is measured in fractions of a second.  You'll set yourself apart from your competitors if you save them a half second delay, and getting started isn't as intimidating as you may think.

The biggest speed bump your web site is going to have to get over is talking to the database.  Because of this, the first thing I would strongly recommend that any developer do is hone his SQL skills.

Read more: Speed Matters - Why You Need To Optimize Your SQL & How To Get Started

Page 1 of 15


We encourage you to take a look at our affordable website design package called LEXY. Our LEXY Sites offer style, affordablity, and a strong back-end system that will give you a website that you are proud to own. CLICK HERE to learn more. Also, if you're interested in our website design agency services, feel free to contact us.

01

OUR LATEST TWEETS

Testimonials

VivaNet2.0 constructed website, myUSAi.org according to our exact technical specifications and with our required timeframe and budget. We liked VivaNet2.0...

Steve Wilson, myUSAi.org

GET SOCIAL
  • Facebook
  • Twitter
  • Linkedin
  • Feed