codeigniter
Ease of Wordpress, Documentation of CodeIgniter, and Support of NuSphere
Although I have yet to formally introduce WapSnap and release a Beta version, I have been thinking fairly in depth about how I would like a software company to be run if I decided to push WapSnap or any other project into the main stream. I have worked for multiple software companies and used enough products to believe that I can at a minimum spot what should and shouldn’t be done. Anything I miss will be an educational ride.
Ease of Use
When it comes to web based applications I do not know of any application that is as easy to use as WordPress. Wordpress has always been well known for a straight forward installation that can get you blogging quickly. Although I cannot speak for myself, I have friends that have switched from developing websites and applications in Joomla and Drupal over to WordPress because it is said to be very logical and easy to customize. With the introduction of the one click upgrade I can see how that would be so. One of the biggest problems I have seen in using open source solutions is that the script kiddies get the security updates when you do and usually they can write an exploit script before you can upgrade and test an application along with all of it’s 3rd party components.
With this information in hand I have decided that when my application rolls out that I would like it to have the ease of use of Wordpress.
Documentation
Having to work on a poorly documented project or application has to be one of the biggest time waisters. When something isn’t documented well you spend most of your time debugging and chasing down answers in a forum instead of moving forward with what needs to get completed.
This is why I want documentation like CodeIgniter. When I started searching for a PHP framework to pick up, I started by looking in the documentation section of each. First stop, the getting started guide, then to the full docs, and then to the forums to see the amount of threads that go without a response. When I got to CodeIgniter I started with the first video tutorial which actually worked and was easy to follow. Wow what a concept, I say this sarcastically because this was not the case with many other frameworks that I tried.
Another positive of the CodeIgniter documentation is that it is easy to follow. Everything is separated out and named logically, this way if you do a search you are likely to find what you are looking for. I also enjoy that it doesn’t read like a 500 page manual and it isn’t a huge PDF that has to be churned through page by page. The CodeIgniter guide makes use of simple elements like line separators, code boxing, and bolding that makes the entire guide easy to read and follow.
With this information in hand I have decided that when my application rolls out that I would like it to have the documentation of CodeIgniter.
Support
I think that anyone who has been in the IT arena for any length of time understands what I mean by poor support.
This is when every time to call with a problem you only get a message machine.
This is when your SLA’s are never met and nobody seems to care.
This is when you post to a forum and nobody answers.
These all constitute poor support.
Nusphere is one company that I have dealt with recently that has fantastic support. To start with, even before I bought PHPed I posted to the forum and quickly had a response. This has been the case for every forum post that I have added to the Nusphere site. Nobody ever asked if I was a customer,how many licenses I had, or did the tiered support two step. Another honorable mention from a recent voyage is Slicehost. Slicehost provided multiple support routes where I didn’t even need to open a ticket. I went to their chat channel and had a solution within minutes.
With this information in hand I have decided that when my application rolls out that I would like it to have support like NuSphere.
First Steps with CodeIgniter and JQuery
When it came time to start adding some required AJAX functionality to WapSnap, I knew that hunting down and learning an AJAX/Javascript framework was going to be one of my most daunting tasks. I had played with YUI in the past with little success, likely due to my limited Javascript experience. After speaking with a few friends that are javascript experts I decided to start with JQuery.
To start with all I needed was callback functionality. Since the only tutorial on the JQuery tutorials page with callback in the title was AJAX Callbacks with JQuery, naturally that is where I started. In this tutorial there is a get method that looks like this:
-
$.get(“giveMeSomething.php”, { number1: number1, number2: number2 },
-
function(data){
-
alert(“Data Loaded: “ + data);
The problem with the way this is written is that like the page the tutorial is hosted on, it generates ugly URLs.
WapSnap is built on the CodeIgniter framework which in the default installation means that you do not use hideously formatted parameters in the URL such as ?id=1&type=2. In CI ( CodeIgniter ) the example just given could look like /1/2 or /id/1/type/2. This structure which I find more enjoyble and visually appealing became my first problem with the mentioned article.
The code snippet shown automatically adds a question mark after the GET url and then formats and appends the data in the second parameter. This instantly caused a problem which lead me to a good bit of searching. After Google didn’t return enough entry level help for my searches I turned to the JQuery IRC channel which resulted in a solution.
For anyone else that may be looking for a solution to searches like “remove ? from get request in JQuery” or “remove question mark from get request in JQuery” The solution for me was to append the variable in the first parameter and leave out the second parameter. Which resulted in the following:
var db_id = $(‘#db_server’).attr(‘value’);
$.get(“ajax/getdatabases/” + db_id, function(data)
{
Now that the URL was being requested correctly I needed to parse the data returned. More searching lead to a funkatron article: Safely Parsing JSON In Javascript. For those of you who don’t know Funkatron, he is a well know PHP speaker, creator of Spaz the open source Twitter client, and a hilarious and helpful guy. He actually gave me my first CodeIgniter lesson on the floor at PHP | Works 08. With this article I was able to quickly and easily parse the JSON data sent back from my PHP page, something that wasn’t so easy when I first tried YUI a few months ago.
While I was debugging with Firebug I noticed that as a Javascript noob the errors weren’t as helpful as they could have been so I searched for a Javascript syntax checker. I immediately found JSLint which gave a little more in depth errors.
First Days with CodeIgniter and MVC
I have begun the research and studying that will be required to rewrite SecurityDistro.com. This research has lead me to believe that the most efficient way to start would be with a PHP framework.
I started by looking through a few common frameworks, their install process, and their documentation. The search began with Zend, CodeIgniter, and Symfony. I installed each one and started looking into what it would take for someone like myself to learn MVC using these frameworks. My requirements were that it needed to be an easy introduction to MVC and that it wouldn’t require me to start from scratch on SecurityDistro.com. I wanted to make incremental improvements to the site as I learned the framework.
At first glance Zend appeared to be a hodge podge of different libraries which would require me to do a good bit of work just to start playing with it. I could be wrong but this was my first impression.
Symfony was actually my first choice in frameworks but when I started going through the Propel ORM setup which appears to be required for Symfony I decided that I didn’t want to spend the next 2 weeks learning an ORM tool before I got started in the framework.
Last on the list was CodeIgniter. From the description it was lightweight and would require little setup to get going. The description of the framework was oddly accurate. I installed CodeIgniter in a subdirectory on my test box and was viewing the default index page in just a few minutes. CodeIgniter also offers two “getting started” style video tutorials that are fairly short and very helpful. After watching the videos and playing around a bit I started looking through the documentation. The documentation provided was straight forward and gave easy to understand instructions on how to use the various resources provided by the framework.
After watching the tutorials and browsing the documentation I started to write a little code. This quickly led me to more questions including how to get the index.php segment out of the middle of my URL. A little searching provided this tutorial which was exactly what I was looking for. The tutorial walked through the best way to rewrite the URL in order to have a nice clean URL.
My next issue was MVC structure. Since I have never worked on an MVC application I was in the dark about the structure and how things were supposed to be designed. I knew what the M, V, and C stood for and did but had no idea how the data flowed between them. Turning back to the CodeIgniter documentation I found a nice little diagram to get me started. This got me moving in the correct direction but after more coding I can already tell that MVC application structure will need to be added to my required reading list.
I have now started reading an older CodeIgniter book called CodeIgniter for Rapid PHP Application Development. So far it has been very informative even though it is somewhat out of date.
SugarCRM Tutorials and Modules
SugarCRM Consulting
Feedburner RSS
- Balance Progress between CRM UI and CRM Code Development
- Be A Confirmation Emailer
- Levels of Social CRM are as Vast as CRM Itself
- Jeff Jarvis and The Link Economy Opened My Eyes
- Tips to Start Screencating: The Time Commitment
- Tips To Start Screencasting: Software and Equipment
- Factors for Choosing a CRM
- Custom Logo: 99Designs or A Graphic Designer
- April Atlanta SugarCRM Meetup
- Open Source: Contribution Based Upgrades
Categories
JoshSweeney Twitter
- @eggsurplus Please put all recyclable ammo casings in your checked luggage and move to the security line sir. Thank you.
- @mparks What is the link for Azure bootcamp?
SugarCRMAtlanta Twitter
- Atlanta SugarCRM Meetup tomorrow. http://opensource.meetup.com/72/calendar/8936307/
- SugarCRM Telemarketr 0.61 Module Released - http://tinyurl.com/dlg3u5


