Featured Posts

Supreme Court Rules Against FCC, Net Neutrality Not a good day for net neutrality... A federal court threw the future of Internet regulations into doubt Tuesday with a far-reaching decision that went against the Federal...

Read More »

The Fog Machine has Arrived My Chauvet Hurricane 1300 arrived today. First thing's first--immediately unpack it, add some fog juice, and play! [caption id="attachment_81" align="aligncenter" width="225"...

Read More »

Realestate Manager 2.0 Picture Preview Since Real Estate Manager 2.0 is now almost ready for release, I figured I would share the differences between the current version (1.1) and 2.0. To start things off, the...

Read More »

Automotive Manager Photo Update It's been less than 2 months since I started on Automotive Manager. In that time, I've taken the thing from next to nothing to an almost complete product. I'm not sure how...

Read More »

The New GreeneCountyIndiana.com Since about March I have been working (rather slowly) on a new content management system for GreeneCountyIndiana.com. Along with it comes a new layout and many new features. The...

Read More »

Chuck’s Blog Rss A scary bee!!!

Realestate Manager 2.0

Posted on : 14-06-2009 | By : Chuck | In : Programming

0

The past few days I have been working on version 2.0 of our Realestate Manager software. It is a complete re-write from previous versions and is based off of the same code-base as Automotive Manager 1.0.

By having both Realestate Manager and Automotive Manager based off of the same code, it will be much easier to release updates for both pieces of software. This doesn’t mean that they are two versions of the same software, but they do share a rather large amount of code.

Since they are based off of the same code, most updates to one piece of software could easily be applied to the other. For example, the first release of Automotive Manager doesn’t include usergroups. Realestate Manager 2.0 will include usergroups. The same code that enables usergroups to function on Realestate Manager can be copied to Automotive Manager and function with a few small modifications.

Software updates have been rather sporadic since we started with them. They have been composed mostly of bug fixes and fewer new features. Once Realestate Manager 2.0 is released, I intend to do a better job at keeping them updated with both bugfixes and new features.

I guess I should quit writing and get back to work.

The Past Week..

Posted on : 09-06-2009 | By : Chuck | In : Uncategorized

0

A week from today I woke up having pains in my lower abdominal area.. right around the place your appendix is. After not having any appetite what-so-ever and the pain persisting¬† through the afternoon, I decided to have it checked out, thinking it could be appendicitis. Cue two hospital visits on monday, visiting my doctor on wednesday, and getting a CT scan thursday. Turns out it wasn’t my appendix, but something’s up with my small intestine. Wonderful. I have to go see a specialist on the 18th.

I started my online classes to finish my Network Administration major at the beginning of the month. Hopefully the workload won’t be *too* bad when I start getting into them more.

In other news, New Deal Multimedia has a number of new sites we are preparing to release in the next few weeks. I can’t say any specifics, but be checking our portfolio occasionally.

Changes over the years…

Posted on : 28-05-2009 | By : Chuck | In : HTML/CSS, MySQL, PHP, Programming

0

Never has a random IRC quote been so true…

<@Logan> I spent a minute looking at my own code by accident.
<@Logan> I was thinking “What the hell is this guy doing?”

Me and Kegan (well, mostly Kegan) have been working on moving client sites over to our new web server. We’ve also taken the time to go through the old websites and ensure that the little blurb in the footer reflects our new name, New Deal Multimedia, LLC, instead of the old Kegans Kandy name.

During this, I have looked at quite a bit of my old code, both PHP and HTMl/CSS. I wont lie, on more than one occasion I found myself thinking “what in the world was I doing?”

Its really interesting looking at how my coding habits have changed over the past 3-4 years. I have seen more than my fair share of code that I am amazed still works.

Perhaps this is why when I go through and do updates for software (Realestate Manager, Automotive Manager, etc) I usually want to start from scratch.

I wonder if in a few years I will look back at what I am writing now and wonder “what in the world was I doing?”

Complex Associations and Access Control

Posted on : 12-04-2009 | By : Chuck | In : Uncategorized

0

Decided to get back to work some on the new Content Management System for GreeneCountyIndiana.com. Last time I left off, I was in the process of implementing access control with the News system.

The news system (and lots of other parts of the site) are composed of a variety of associations.

  • News belongsTo NewsCategory
  • News HABTM Tag
  • NewsCategory is an ACO

Access is controlled at the NewsCategory level. You must have read access to the NewsCategory to view the articles in that category. This is easy if you simply want to view articles by category. However, it gets considerably more complicated if you want to browse-by-tag or other criteria.

How in the world can you do a permissions check without requiring an extra query for every single article?

It also doesn’t help that pagination is used, so most means of removing records the user doesn’t have access at the controller level will screw up pagination. In theory you could have empty pages if a user had very limited read access.

Man, access control is complicated.

Automotive Manager Photo Update

Posted on : 08-04-2009 | By : Chuck | In : HTML/CSS, MySQL, PHP, Programming

0

It’s been less than 2 months since I started on Automotive Manager. In that time, I’ve taken the thing from next to nothing to an almost complete product. I’m not sure how I did any coding without using frameworks before. It makes everything go so much quicker.

So, here’s the screenshots!

listingsindex

The listings index page. This shows all of the categories and the number of listings in each category.

view-all-listings

The listings view. This shows all of the listings, along with an image. The information that is shown can be modified by editing the view file.

view-listings

Viewing the details for a listing. Each picture can be clicked on to be enlarged in a Lightbox window.

admin-add-listing

Part of the Add Listing form. For added flexibility, listings can be placed in multiple categories.

admin-add-photos

The photo uploader. Multiple photos can be queued for upload by using the SWFUpload library.  A description can be given to each picture before it is uploaded.

admin-delete-listing

Deleting a listing. If you have javascript enabled, you get this modal popup. Automotive Manager will be the first of my software to make use of modal delete windows. When you delete the listing it will be removed from the page using all of that fancy web two point oh ajax stuff.

That’s all the pictures for now. I’m still in the process of testing the software and adding the finishing touches. I have to have it ready to turn in as my class project in a couple weeks, so a live demo should be available around that time.

Automotive Manager

Posted on : 17-02-2009 | By : Chuck | In : MySQL, PHP

0

Back in 2006, I created an application called Realestate Manager, which is essentially a realestate listings system. I had always talked about doing a similar system for car dealerships, but I never seemed to get around to actually doing it.

Until now.

One of the classes I have to take for my major is called “Systems Development.” Throughout the course of the class you must plan and develop a software project. Automotive Manager would be a perfect project for this class. I already had experience with listings systems from Realestate Manager, so this would be an easy project.

Unlike Realestate Manager, Automotive Manager is being built on the CakePHP framework. I eventually have plans to convert Realestate Manager over to Cake as well. this will allow me to easily share a large portion of the codebase between the two systems. When I make an update to one system, it will be fairly simple to make the same update to the other system.

for those of you questioning if a framework makes things easier, get this… The first line of code for Automotive Manager was written February 3rd. I had a nearly fully functional admin panel in under two weeks of working on it in my spare time. All that’s left on the admin-side is some picture uploading work and a static page editor.

Look for more news on it in the coming weeks. I have to have it fully functional in about 8 weeks, so there will probably be some updates around that time.

CakePHP: Associate the same models twice

Posted on : 05-08-2008 | By : Chuck | In : Uncategorized

1

The new GreeneCountyIndiana.com CMS allows users to post comments on News articles. Of course, when you let users post comments, you need a good method of moderation. It would be very difficult for the site admins to moderate every single comment, so we are adding a “Report this comment” button so regular users can report comments for administrators to review.

When a user clicks the Report comment button it sets a ‘reported’ field in the database to true, and sets a ‘reported_by’ field to the id of the user that reported it.

Comment already belongsTo Users once, as it stores the user that posted the comment. Comment needs another belongsTo User association for grabbing the username and other details of the person who reported the comment.

The solution is actually very simple.

var $belongsTo = array(
'User' => array('className' => 'User', 'foreignKey' => 'user_id'),
'Reporter' => array('className' => 'User', 'foreignKey' => 'reporter_id')
);

The first association:
'User' => array('className' => 'User', 'foreignKey' => 'user_id'),
associates each Comment with the User that posted it.

The second association:
'Reporter' => array('className' => 'User', 'foreignKey' => 'reporter_id')
associates each comment with the User that reported it.

Essentially, all it does is copy the User model under the name “Reporter.” Simple, and it works like a charm.

New GreeneCountyIndiana.com CMS: Modularity

Posted on : 08-07-2008 | By : Chuck | In : HTML/CSS, MySQL, PHP, Programming

0

Modularity is a very important part of writing software. A modular program will contain various ‘modules’ for different functions used throughout the projects.

The CakePHP framework (which the CMS is being built on) makes it easy to write modular code, by use of helpers, components, behaviors, and elements. For those unfamiliar with Cake, it is a MVC framework written for PHP. Helpers and elements are used for views, behaviors for models, and components for controllers.

The past few days have been spent writing various modules for the new CMS. The Tagging system makes use of the Tag Helper, which handles displaying tag lists and the adding/deleting of tags. The Basics Helper has convenience functions for pre-configured pagination and various dialog boxes.

The greatest advantage of helpers is the re-usability in code. For example, the following code:
<php
echo $basics->setupDeleteDialog(array('elementToDelete' => 'div.newsitem'));
?>

is all that is needed to handle the Delete Item dialog. I just add that to the view for each controller (News, Pages, Photos, etc), change the elementToDelete, and viola! I now have a functional delete dialog. If I want to make changes to the way the dialog functions, I merely have to edit the code in the helper file, as opposed to editing code in every single file that contains a delete dialog.

The current CMS makes little to no use of helpers, which makes it extremely difficult to update parts of the website. Fortunately, the new CMS is actually being built with modularity in mind.

The New GreeneCountyIndiana.com

Posted on : 06-07-2008 | By : Chuck | In : Uncategorized

0

Since about March I have been working (rather slowly) on a new content management system for GreeneCountyIndiana.com. Along with it comes a new layout and many new features.

The current CMS was written over a year ago with the CakePHP framework. It was the first application I had ever written using the cake framework, and I have some code to prove it. I can remember saying during the development process that I was going to write it so that it never had to be rewritten from scratch. Unfortunately, deadlines and lack of experience saw to it that that was not possible.

So now the website is left with something that:

  • Doesn’t scale
  • Is not easily expandable
  • Requires code edits to change minor settings
  • Has bits of code copied/pasted all over the place, as opposed to using Helpers and Components

I’m sure you can see why I decided to start from scratch.

The new CMS plans to fix all of these problems. It will also implement many new features and user interface updates. More about that will be posted at a later date.

LaptopKiosk Progress

Posted on : 31-05-2008 | By : Chuck | In : C#, Programming

0

Work has been progressing rather smoothly on the LaptopKiosk project mentioned in the previous post.

The state system is now functional with two states, Main and Weather.

The Main state has a functioning clock and rotating background images. This all works fine on my development machine, but the changing background images seem to freeze the program for about 5 seconds on the laptops. I know why it does this, and i know what needs to be done to fix it, but i’m still working on getting that fix translated into code.

The Weather state currently grabs weather information every minute from a local weather station using the WeatherBug API. Its GUI is certainly far from complete, but I plan to do more work on it after I get the problems fixed with the rotating background images.

Overall, for being the first program I have ever written using WPF, and only the second program I have done using C, progress has been going extremely well. I plan to write up more code-based posts in the future.