|

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

  • | |

    What Developers can learn from Home Improvement

    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! It’s no secret that I love the show Home Improvement, especially if you know me personally or follow me on…

  • |

    Quick Tip: Add a Widget to WordPress

    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!A couple of weeks ago I was working on a WordPress site and thought it might be nice to add a…

  • | |

    Apps You Should Follow on 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! Over the last few months I’ve been using Twitter a lot more to get updates from people and fill others…

  • | |

    My ‘System’

    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! Over at College V2, Sean has an ongoing series called What’s Your System, where various people talk about how they…

  • |

    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…

  • |

    On Buying Jeans and App Subscriptions

    It seems that increasingly, more software companies are moving to a subscription model, where instead of paying once to own the software (or app), you pay monthly, or annually, to keep using it at the latest features. Adobe was perhaps one of the first major companies to do it with Creative Cloud. Now we see…