Current Interests

Right now I am working with two great PHP frameworks for two different application: Zend Framework and Orchid. Although I'm a huge fan of CodeIgniter, I'm finding ZF to be robust and really solid for becoming the #1 choice of enterprises very soon.

In addition to them, I am also having a good look on Dojo - as it became Zend Framework's official JavaScript toolkit. I have to agree that there a few gems in it which I like, but I'm yet to discover its full potential. In the meantime, jQuery is helping me a lot.

Latest reading

powered by LibraryThing
 
Mar
06

jQuery Essentials - Round 3

Comments   Trackback 
1 Star2 Stars3 Stars4 Stars5 Stars (8 votes, average: 3.88 out of 5)
Loading ... Loading ...

I still receive a good number of hits to my first (10 jQuery Essentials) and second (jQuery Essentials - Round 2) collection of jQuery plugins. So, I have been thinking about making the next post in the series for quite some time. Time has always been the killer of ideas, along with the fact that not too many plugins found way to my list of favorites.

Now that I have some fresh essentials, this post was inevitable.

Should there be a 4th installment in the "jQuery Essentials" series?

View Results

Loading ... Loading ...

18. jQuery UI

ui

This is the official big boss with a number of core interactions (drag, dropping, sorting, selecting, resizing) and few great widgets (accordions, date pickers, dialogs, sliders, tabs) built on top of those. Although its a great collection, I somehow haven’t been able to use it in any real projects yet. It seems small plugins always get a favor than big collections :)

19. Facebox

facebox

This is a cute, little plugin that shows Facebook style dialog boxes using jQuery. It supports nearly all the possible contents you might want to show in a dialog box: image, div, remote pages. It has both automatic behavior and manual invoking. Simple and fun to me.

more…

Mar
06

Cross-Domain AJAX calls using PHP

Comments   Trackback 
1 Star2 Stars3 Stars4 Stars5 Stars (7 votes, average: 3.86 out of 5)
Loading ... Loading ...

AJAX has become the core component of many web applications around us. And its fairly easy to handle AJAX now a days, with the help of various javascript libraries (ex: jQuery, Prototype, Mootools, YUI, etc). But there is one security issue that web browsers impose in doing AJAX calls - they don’t let you do AJAX calls in web servers different than yours. That means, if your script is in www.mydomain.com and you’re trying to do AJAX call to www.anotherdomain.com/get.php, then the browser will through error like: “Error: uncaught exception: Permission denied to call method XMLHttpRequest.open”.

Now, there are a number of solutions to this problem. Instead of explaining them all to you, lemme provide you the simplest one: using a PHP transport file. If you already know the thing and just need the script, download from here.

Others, let’s see an example implementation first.

Example use

   1: xmlHttp.onreadystatechange=function()
   2: {
   3:     if(xmlHttp.readyState==4)
   4:     {
   5:         alert(xmlHttp.responseText);
   6:     }
   7: }
   8:  
   9: xmlHttp.open("GET", 'http://myserver.com/transport.php?action=' + 
  10:                     urlencode('different-server.com/return_call.php') +
  11:                     '&method=get&data1=101&data2=pass', true );
  12:  
  13: xmlHttp.send(null);

Now, lets see how it works:

  1. The script makes an AJAX call to the myserver.com/transport.php with a few parameters:
    • action = the target URL you need to fetch, from a different domain
    • method = the HTTP method (post/get)
    • data1, data2 = sample parameters for using as either query-string or POST fields
  2. When the request is received by transport.php, it uses cURL to make a call to the page mentioned in action.
  3. Based on the method, it either makes a GET request or a POST request. In both cases, it sends the extra parameters that are sent.
  4. After the response is received, transport.php echoes it. So, you have what you need!

Download

transport.php
Cross-Domain AJAX call transporter.
Downloaded: 2074 times

Comments and suggestions are most welcomed :)

Nov
06

Trippert, here I come!

Comments   Trackback 
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Trippert Inc

I am going to take some of my time out from my regular job as CTO of Right Brain Solution Ltd. and will work at Trippert, Inc. as Development Manager, starting from this month. My primary responsibilities will include software development and project management on various company projects.

I am very excited about working with Trippert as many of the developers there are known to me and I highly regard their work. Also, teaming up again with Hasin is a great thing (we worked together before in Somewhere in… and Pageflakes). I hope to enjoy this journey a lot !

Cheers!

Apr
21

Cake PHP : The ‘right’ framework!

Comments   Trackback 
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

My search for the right framework has ended today, when I discovered the Cake PHP framework ! By right framework, I am meaning the one:

  • having an easy learning curve,
  • facilitating the MVC pattern,
  • seperating display and business logic in a ‘meaningful’ way, and
  • with which making web apps is possible in considerably low time.

Well, to my surprise, Cake gives me all these and goes beyond my expectation. Maybe becauz the idea of Cake has come from the growingly popular Ruby on Rails. Nevertheless, to me the most important thing is that I am not going to switch to other language frequently (as I’ve built my competency in PHP for some time).

So, whats so special with Cake ? Lemme tell you some:

  • MVC pattern
  • Almost zero configuration (you just need to tell you db config to start)
  • Various application helper (Html, JavaScript, Date, etc)
  • Support for Ajax (using the famous prototype library)
  • In-built validation
  • Access Control Lists (ACL)
  • Security, sanitization, session handler, etc.
  • A very active community !

I hope you’re impressed enough. No, no….don’t take it as other frameworks you’ve tried already….test it out !! You wont regret.

Ok, cya you in the kitchen !! We’re baking yummy cakes !