CakePHP Foursquare Plugin

Foursquare LogoCakePHP is a huge framework with a bunch of cool stuff, and as you may know, the best way of grasping those concepts is by putting them into practice.

I’ve been learning about Social Network APIs and how they manage user authentication. Most of them are based on the OAuth Standard, which allows APIs to publish their users content with very high security levels over the information.

In the other hand, i’ve been playing a bit with CakePHP datasources so i can get the information and do a lot of fun stuff. It’s amazing how much you can learn when you face a challenge in which you don’t know nothing about a technology and you have to start researching from the very beginning.

Well, i have APIs and Datasources. So the new challenge to face is to create a CakePHP plugin that allows people to connect their CakePHP apps to a social network API based on OAuth. The choosen network is Foursquare, due to i couldn’t find a good plugin, but just a datasource (which plays with the old api).

And finally i’m also learning GIT, so i hosted the plugin on Github. You may want to download the code and give it a try. Every kind of help is welcome.

Github Plugin URL: https://github.com/asmerkin/CakePHP-Foursquare-Plugin

Modernizr and Selectivizr – Two Javascript libraries to improve our work in web development

I was looking for some Javascript tools, and reading some books, like “Hardboiled Web Design”, by Andy Clarke, and i found these two wonderful tools to improve our web designs and our developments, using the latest web technologies, getting more control over how are our sites rendered in less capable browsers.

Modernizr

Modernizr is a javascript library that allows us to have more control over the use of CSS3 and HTML5. This library detects browser CSS3 and HTML5 support and add classes to the <html> tag in our web documents. This way we can reference any element inside the document and modify it using CSS styles so it will be shown fine in web browsers that doesn’t have support for these new tecnologies.

For instance, at the moment i’m writing this article, i’m using Firefox 3.6.13. Thanks to Modernizr, the html tag of the webpage i’m looking for is the following:

 
<html lang="en" dir="ltr" id="modernizr-com" class=" js flexbox canvas canvastext 
no-webgl no-touch geolocation postmessage no-websqldatabase no-indexeddb 
hashchange no-history draganddrop no-websockets rgba hsla multiplebgs 
backgroundsize borderimage borderradius boxshadow textshadow opacity 
no-cssanimations csscolumns cssgradients no-cssreflections csstransforms 
no-csstransforms3d no-csstransitions fontface video audio localstorage 
sessionstorage webworkers applicationcache svg no-inlinesvg no-smil svgclippaths">

In this case, we can see that Firefox supports CSS3 colums (csscolums) but it does not support reflections (no-cssreflections).

So let’s suppose we are designing a webpage with CSS gradients, but we want to show a particular background color for those people using olders browser lacking of CSS3 support. The css style would be the following:

 
.no-cssgradients #elemento {
     background-color: color;
}

So if the browser doesn’t support CSS3 gradients, Modernizr wil add .no-cssgradients to the html tag and this selector will be validated. Finally, this style will be rendered.

Sitio oficial: http://www.modernizr.org

Selectivizr

Some browsers, like Internet Explorer (6 to 8) don’t have complete support for CSS selectors, but thanks to this library we’ll be able to apply those selectors without much troubles. This way we can make use of all the benefits that CSS3 selectors and pseudoselectors give us.

To enable selectors support, Selectivizr uses almost any Javascript framework available, such as JQuery, Mootools or Prototype. Depending of what framework are we using it will be the support that Selectivzr enables. In the official website we can find a comparative table about this issue.

Sitio oficial: http://selectivizr.com/

Some Apps for syncing your digital life

It’s not weird that nowadays people use more than one device such as a computer, mobile phones, etc, having all the info shared among all the devices. For many of us this becomes a problem, but thank to some free applications we can sync all those devices and to have all the info available for any of them. There are many alternatives for achieving the same result, but i want to comment about two of them that have given excellent results to me: Dropbox and Mozilla Sync.

Dropbox

DropboxThis service gives us the chance of having a shared directory among all the computers and mobile phones or other devices we use. We can have 2GB space (in free version) for us to sync the information and to have it backuped in the cloud. Dropbox also comes with an online interface that becomes useful if we are using a computer which doesn’t have Dropbox software installed.

Besides, the service allows us to share directories among many users. When an user adds something into the directory the others can see what he added. This is an amazing alternative when we think about team working.

Even if free service give us only 2GB, we can increase the allowed space inviting  people to join Dropbox. For each person that registers with our referral link we’ll receive 250MB additional space.

For being able to synchronize the devices we’ll need to install a small application which is available for Windows, Linux, Mac OS, Iphone, Ipad, Blackberry and Android.

Link: Dropbox.com

Mozilla Sync

This is a special application for those who use Mozilla Firefox. Mozilla Sync is a complement that allows bookmarks, history and passwords syncronization among many browser installations. Once installed we’ll need to create an account in a service provided by Mozilla for the syncing to work properly.

The system allows to merge information from all the machines or just receive data from the others computers. This makes synchronization flexible enough to be adapted to different needs.

Link: https://mozillalabs.com/sync/

Assembla and PBworks – Free quality resources for team development

When we start a new open source project, there are lots of companies that provide us free solutions (like Google Code), but when we want to develop some small private project the quality of free solutions decreases considerably.

After searching useful resources for private development projects i found two companies that looked really interesting to me. I’m talking about a SVN and GIT repositories service and another one which provides very simple but powerful wikis.

Assembla.com

This website gives us free SVN and GIT repositories for using in our projects. The limits for the Free version are up to 2 GB of space, unlimited projects and users. This is an awesome quality choice considering it’s a free service. Obviously there are restrictions, like the impossibility of using a ticket service and other tools, but we can make up for them using other services.

URL: http://www.assembla.com

PBworks


This is a free Wiki service for our projects. Free wikis have non commercial use and comes with some customization and exportation restrictions, but if we are looking for a tool set for solving problems of private nature this wouldn’t be a problem. Besides, our wiki will be hosted in PBWorks servers, allowing the wiki to be accessed from anywhere.

The Wiki edition interface is excellent. It has a WYSIWYG editor with built-in key shortcuts. This is a great point if is needed to introduce novice people to wiki edition.

Free wikis support multiple users and different permissions for each of them. The only thing needed by an user for editing the wiki is an user account.

URL: http://pbworks.com