Categories
Work

Campus Webcams (C#)

A simple site that reconstitutes single JPEG images from within the UCF firewall for outside consumption via Motion-JPEG

Purpose

We got an urgent request to recreate UCF’s Campus Webcams site, as UCF Marketing was replacing the main UCF site with a WordPress install (thus removing all of the various sub sites of that legacy implementation). We had no contact with the original developers nor any glimpse of the code that powered the previous Webcams site. In addition to reproducing the original site, it was requested that the new site also double the number of cameras viewable.

Method

I got to work quickly on an .NET C# MVC3 application, building out a default Area for the public and an admin Area for a front-end to a database that stored webcam information. I gathered data manuals on all the various camera manufacturers represented throughout our departments and discovered ways to pull single-frame data at specific resolutions from each. I wrote an Action that composes constant snapshot data into a Motion-JPG stream. Finally, after some research, I pulled down a Nuget package for an image processor to do Gaussian blurs on the images (for legal reasons).

Highlights

There is nothing quite as bizarrely satisfying as writing the raw response output of a Motion-JPG stream. It’s too bad that no version of Internet Explorer (through 10) supports Motion-JPG; any IE visitors get redirected to the raw Frame output (and a basic JavaScript refresh every eight or so seconds). It was also fairly satisfying to get into the groove of making all of my applications responsive for browsers and devices smaller than our minimum window size. Finally, just because I could, it was a blast to develop a KML feed that could display the cameras on Google Maps.

Categories
Work

SDES Directory (C#)

  • Type: Website
  • Language: C#
  • Framework: MVC 3 and Entity Framework 4
  • Authentication: None
  • Data Source: SQL Database

Purpose

In collaboration with UCF Marketing, I developed a JSON model to store basic directory information on all our division’s departments and offices, including hours of operation, location, phone, fax, etc. JSON, however, was not designed to be stored in a flat file, so I got clearance to recreate the model as a SQL database and .NET MVC application.

Method

I designed a SQL schema to match the existing JSON model and migrated the data to the database. I then developed an MVC3 application (with a default and admin Area) to allow edits to the data, allow the public to view the data in an ordered fashion (and submit changes via an email form), and allow any public developer to read a generated JSON feed of the data.

Highlights

The app itself is pretty simple, but the definite takeaway from this application was the implementation of OutputCache on the controllers. Knowing that the JSON would be consumed by UCF Marketing and most of our sites, I was able to easily implement an application-level cache of the feed so that it loaded instantly and structured updates to the data at a set interval.

Takeaway

Small, good ideas work! Sometimes a full-on application seems like overkill for a simple idea, but if that simple idea saves hours a week, then it’s clearly worth it.

SDES Directory (C#)

Categories
Work

SDES Template Engine

  • Type: Class
  • Language: PHP

Purpose

In our division, there are various entities we consider customers. Most of those customers cede support of their web environment to us, but some retain the right to have a full-time “developer” on staff to make edits. Unfortunately, there is crossover between sites we’ve developed and sites that these developers feel belong to them. This has been a problem for years; only now am I taking action programmatically. I got clearance to develop a simple PHP class/framework/engine to structure the basic data each of our sites require (title, subtitle, navigation, social networks, etc.).

Method

I wrote everything by hand, top to bottom, imagining our basic PHP sites as objects. These objects needed many small pieces, like the title, the associated department, and the contact phone number, but I considered larger items, like database connections, the page requested, and the layout/design of the site. I wrapped most of this data in a straightforward class that accepted changes to its properties exclusively via setter methods, exposed data exclusively via getter methods, and farmed settings out to a config.ini file.

Highlights

As every site was converted to this simple engine, it gave me the ability to wrap simple HTML blocks into helper methods. Now, every site has a standard way to print contact information, social networking URIs and buttons, footer information, and so on. It has been an easy bridge between design and development to save time and preserve a standard.

It also gave me a chance to develop a database class that preserves a single database connection via the singleton method (only allowing a single instance of the database object).

Takeaway

It feels like I’m creeping a little too far into custom-PHP land; I know we should be using something like Symphony or CodeIgniter and a templating framework like Twig or Smarty, but for this environment, where access to production is treated like a right and not something to be protected and given out sparingly, I needed something a bit more customized and esoteric. But rest assured this custom implementation will be trashed and swapped for some open-source framework as soon as our environment makes sense.

Categories
Work

LINK

  • Type: Website
  • Language: PHP
  • Framework: None
  • Authentication: Integrated
  • Data Source: SQL Database

Purpose

This project was largely self-initiated. As with many problems at UCF, my task arose from a former student assistant’s bad and incomplete code. Rather than tip-toe around it and poke and prod as necessary, I decided to take up a sprint to rewrite the database front-end and accompanying student-facing site.

Method

As we had yet to adopt a PHP framework, the CRUD for each table was developed by hand, with a few helper functions that matched httpPost values with SQL table columns for create and edit pushes.

Highlights

For the public event submission form, I was able to discover an API to UCF’s campus map, consume it as JSON, parse out the list of buildings, and make that a required choice for the event. Once the event was approved and posted, public users could then discover the location of the event through a link to the campus map.

As each event was displayable as both a master event and a single session of a master event, I was able to integrate each with a “Post to Facebook” and “Post to Twitter” button, allowing a social layer of connection to the program’s social networking presences.

Finally, we developed some icons that allowed event categories to be associated with a color, allowing users to quickly determine differences.

Takeaway

Sometimes, throwing away the remnants of a bad idea and starting fresh is the best way to go, despite the time commitment. The resulting application has survived with no changes for years now–a testament to the customer’s satisfaction with the user experience.

Categories
Work

SDES IT: Training Application

  • Type: Website
  • Language: C#
  • Framework: MVC 2
  • Authentication: Integrated
  • Data Source: SQL Database

Purpose

Our training situation at SDES IT developed into a full-time training position. Once hired, this trainer requested a way to have users discover classes, sign up for said classes, and be sent reminders for said classes.

Method

For this application, I wanted to dip my toes in .NET MVC (then at version 2). The resulting app absorbed the existing PHP site (including videos, text copies, and links) and introduced a Windows-Auth-protected section that allowed users to sign up for available classes and fill out a profile (which would be pulled up on subsequent visits). After each submission, an iCal-formatted ICS file would be dispatched to their email address, allowing them to track their own class signups.

Highlights

The delineation of access levels is so painless in MVC, as each controller can easily be filtered to a certain Active Directory user or role/group. This allowed the app to cover public users, domain users, and administrators in one project with ease. Also, building an ICS file from scratch was exciting and highly effective.

Takeaway

While we were not quite prepared for the volatility the trainer position would exhibit over the next few years, the application ran into very few problems during its tenure as a class-signup solution. It is currently on hold for a redesign to match future needs.