Inheritance in PHP

I hope my last post about interfaces didn’t make anyone cry. Even if you didn’t understand it; I hope you keep reading. You may have an “aha!” moment when you least expect it. The last post ran a little longer than I originally wanted, so I’ll try to keep this post briefer. Inheritance is something you get from a rich aunt or uncle when they pass away, but it’s also something that objects can get from another object.

Interfaces in PHP

If you’ve read my post about classes in PHP, then you should have a fair understanding of how those work. I didn’t go into too much detail because I would like to build upon what you read previously. Hopefully, we can get a good foundation for you to continue to learn. I was at our Beckley office today, telling a co-worker about my previous post, and what instantiation meant. Her knowing it comes from the word instance, helped her understand it’s definition and how I was using it.

Classes in PHP

While arguments more dramatic than the Hatfield-McCoy feud continue to happen over “suggestions” for how you should style/format your PHP; I think we should get more people writing it. Everyone has a preference on how they like their code formatted, even I do, but learning the language is more important. There are plenty of big words that we could use, but honestly, for the longest time, I didn’t know the proper names for a lot of things.

DigitalOcean API Client

When I went to Davis, WV for Thanksgiving with my family, I started working on a DigitalOcean API Client. I have since started over twice in an attempt to make it better. Getting it to work is not a problem, but making it easy to use can be a challenge. I am using interfaces, abstract classes, traits, and concrete classes to help organize the code and make each part replaceable. Any request made will need a request object, which is similar to a DTO (Data Transfer Object).

hii

The new design is up and running. I still have to pull the data from the old pages; I’ll probably do that tomorrow. I’ve been a little under the weather, so I’ve been resting most of the day, but I did manage to get this almost finished. I did all the HTML/CSS, as you can probably tell. I’m using Silex, Twig, and Doctrine. I’m not sure how I can get the ‘here’ class added to the page you are currently on using this setup, but I’m sure I’ll figure it out.

I’m Back!

Welcome to 2017! I have been working on my PHP DigitalOcean library. It has come a long way, and it uses some interesting design patterns to solve some common challenges. It will work as-is, but I have not completed all the possible features. I had written a lot of the code before I decided to restructure the library to make it more organized. The library documentation still needs to be written, as well as the PHPUnit tests.

High Availability

Websites are fun to make. When I first learned how to build a website, it was an awesome feeling, the world being able to see my page. I still enjoy making websites, and I’m fortunate to have a job doing just that. One of the most frustrating times of any web developers job is when their site goes down, and they don’t have control over bringing it back up. Bluehost (Endurance International Group) could be a lot better, but they overload their servers and see a lot of down time.