Category: Development

  • StringExtractComponent for CakePHP

    Hi folks, I have just finished creating my first CakePHP component and I wanted to share it with the community.  After I finish writing this article, I will be submitting it to CakePHP for inclusion.

    The component is called StringExtractComponent.  As you may guess, it extracts content from a piece of content.  I have created this component to mimic the STREXTRACT function in Microsoft Visual FoxPro.  I have come to fall in love with this function because it makes retrieving data from a string with a start and end delimiter. I’ve also created two other examples with SQL substring between two characters SQL substring between two characters as well as a String Extract Extension Method with C#.

    To help you understand how it is used, I read the contents of one of my articles into a string.  I then proceed to extract a specific section that is contained within the code syntaxes that exist in the article and it is important to truncate a string.
    (more…)

  • Fixing slow drag and drop with scriptaculous

    Recently on a project I was working on, I was tasked with fixing drag and drop that was terribly slow.  The drag and drop was implemented with scriptaculous on a calendar system.  When you clicked an event to drag it it took about 5 seconds before the page would actually let you drag it!  This was clearly unacceptable and it has to be possible because Google Calendar is lightening fast.

     The first thing I did was download and setup jquery to see if it was related to how scriptaculous was created.  After setting up jquery, it was just as slow.  This lead me to believe that it was a fundamental problem with how the drag and drop was set up in both libraries. (more…)

  • Why Frameworks Are Better

    Are you a person who dislikes frameworks?  Or are you a person who loves frameworks?  Or are you even a person who isn’t quite sure what a framework is?  The following article will discuss the pros and cons of frameworks and the common downfalls that people fall into.

    I’m not sure if it’s only people I meet or a world-wide thing, but it seems people do not like to use frameworks (at least at first).  At my work, we use them on every new project.  So, when a new hot shot developer joins our team, we inevitable get to have the battle of “Ugghh, I don’t want to use a framework I want to code my way and only my way”.

    If this is your typical response to frameworks, I suggest you continue to read and let me enlighten you on why we live and die by our frameworks. (more…)

  • Facebook Development and $_SERVER[‘HTTP_REFERER’]

    If you are new to creating Facebook applications or even if you’re not.  When you go to use $_SERVER[‘HTTP_REFERER’] you might be in for a surprise when this _SERVER variable does not exist!

    Just recently I encountered this problem, when I thought about it for a few seconds it made sense why the variable wasn’t there.  Your server cannot properly track the history because every page request in your Facebook application occurs through a request from a Facebook server, not the user them self. (more…)

  • Drag and Drop with AJAX Example

    At my work it’s quite clear to me that a lot of people have difficulty with both AJAX and Javascript drag and drop event functionality.  In this article, I thought I would provide a realistic and simplistic example of how to accomplish both AJAX and drag and drop together.

    By the end of this article you will be able to create an extremely slick content management system that works really smoothly. (more…)