|

Reuseability

Note: This article was published while I was in my early 20s. I was much younger and dumber. Please don't hold it against me. One of the perils of having a 20+ year old website!
Code

A few months ago I developed a Scrubs Quotes application for Facebook. This is a simple app that displays a random quote from the show on your profile. One of the first lessons/ideas being taught to me in the Software Engineering Masters program here at the University of Scranton is that when you develop software, you should make it as abstract and general as possible. Reusable code is key. With that in mind, I set out to make my quotes app a little more reusable.

As far as the scope of the project goes, it wasn’t that daunting of a task. When programming in PHP, I usually make everything a function anyway because of the ease of use. But there were some things I needed to clean up. The first thing I did was create a config file with all of the application specific information- database connection info, application title, links to include in the app, etc. This makes changing the app as easy as changing a single file. Other files that I felt could be edited I placed in separate files as well. This includes the style sheet, which up until that point was included in the header file.

Once that was done, there was not a heck of a lot more to do. In an upcoming version of this software, I want to include an SQL file to generate the databases, and an easy switch to make the app sightly different if there is a single person being quoted, or multiple people.

My first use of this reusable version of the app manifests itself in a Demetri Martin Quotes application. The set up was really easy and I was able to have the app up and running in just minutes. This is a pretty exciting little project for me because it’s a great practice in system design and software development. As time goes on I hope to grow this engine and possibly make releases of the software for others to use. I would like to learn how to make this easily updateable as far as adding features go and see how scalable it really is.

Similar Posts

  • | |

    The Basics of Twitter

    Note: This article was published while I was in my early 20s. I was much younger and dumber. Please don’t hold it against me. One of the perils of having a 20+ year old website! Now that I’ve convinced you to join Twitter, I wanted to talk about the basics of how to use it-…

  • Types of classes

    Note: This article was published while I was in my early 20s. I was much younger and dumber. Please don’t hold it against me. One of the perils of having a 20+ year old website!Today and over the last couple of days we have been talking about classes in Java. I’m fairly certain I understand…

  • |

    Solve Actual Problems

    Imagine you are taking a test. You are presented with several word problems and are instructed to pick one to solve. Instead what you do is write your own problem – one that you think is a good one to solve, and answer that one. You’re so confident that the teacher will be impressed because…

  • |

    Setting All Videos To Show Controls In LearnDash

    One of the biggest pieces of feedback I’ve gotten on my course videos in recent weeks was that the controls on my videos were hidden. To be honest, I didn’t realize students couldn’t scrub through videos, or rewind – I assumed everything was working! After looking through the LearnDash settings and not finding a global…

  • |

    QuickSilver

    Note: This article was published while I was in my early 20s. I was much younger and dumber. Please don’t hold it against me. One of the perils of having a 20+ year old website! When I first got my Mac, my friend told me to immediately download QuickSilver, citing it will ‘change the way…

  • 4/5- Picasa 2

    Note: This article was published while I was in my early 20s. I was much younger and dumber. Please don’t hold it against me. One of the perils of having a 20+ year old website! Ahh, yes, Google’s Picasa. It is a free photo editor/manager from Google- and it is simple wonderful. Basically what it…