|

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

  • | | |

    OMG MySpace!?

    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! As many of you might know, I was a big hater of MySpace. This was because of all the emo,…

  • | |

    The Switch: Week 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! About 10 days in and I am enjoying my Mac experience more and more. I don’t know if it was…

  • |

    Use your browser when ports are blocked.

    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!Since being back on campus, I have been doing a lot of my work on the school’s LAN and WiFi networks,…

  • | |

    Facebook Photo Virus

    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 couple of days, a Facebook virus has been going around, cropping up in user’s notifications that someone has,…

  • |

    Google I/O: Day 1

    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 to Google I/O I made note of a few things. “It’s like 85% male,” “Wow there…