Sunday, June 10, 2012
A few month ago I wrote a post about “Search Facebook Friends With Jquery Autocomplete”. The problem that after a while it become not relevant due to the changes in the jquery autocomplete API. Due to many requests that I got (in comments,emails, facebook, twitter) I decided to update it. So here we go...Before I start I have to admit that I don’t like the new API it is too hacky to make a custom autocomplete and it is not documented!.Before we implements "Search Facebook Friends With jQuery" we need to look at the jQuery autocomplete source code, https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.autocomplete.js#L507....
Monday, April 2, 2012
Ruby on Rails and Heroku is a great match! Heroku is a great platform for any startup that wants to develop fast and without spending a lot money
Heroku is a platform that allows you to think about servers as a service.
I am using Heroku with Rails (and Node.js) for a long time. But in my current startup the only servers that we have (so far) are on Heroku. It is much more easy that you don't need to think about your servers. I got much more time to handle the important stuff. It is so easy and simple that...
Thursday, February 2, 2012
Today we had our 1st developers meet-up @conduit. I made a session on node.js Socket.IO and the Real-time web. You can find the slides here: http://www.slideshare.net/alonnativ/nodejs-socketio It was fun! Keep Writing, Compiling, and Debugging Alon Nativ
Wednesday, October 5, 2011
As you know you can’t make an Ajax cross domain request. The browser block this kind of requests. To enable Cross-Origin Requests (CORS) you need to add some headers to the server response: “Access-Control-Allow-Origin” and “Access-Control-Allow-Methods”. So I made a MVC filter that will allow cross domain calls: public class AllowCrossDomain : ActionFilterAttribute
public const string AllDomains = "*";
private readonly string _allowMethods;
Monday, August 8, 2011
Recently I was asked question how to get the image or the comment when using Facebook FQL API to get notification. http://developers.facebook.com/docs/reference/fql/notification/ It is very easy to make an application that will show the basic notification like that looks like: “David has comment on your link” “James liked your photo” You can see more samples at this link: http://www.facebook.com/notifications.php Well there is no documentation of how to do it (and there is not even a clean way to do it) there is no column that points the the original link\image\comment. So… do we...
Sunday, July 10, 2011
Just wanted to create a web logger in MVC. The idea is the same as Google analytics that a client will send data from the "client side" to the server. The server will save the data and return “Image Pixel” just like any other normal web logger. In order to do that I have created an ImagePixel ActionResult. The server logger method will look something like that: public ActionResult Logger(string trackingData)
Monday, May 30, 2011
Just made a small autocomplete textbox that search a user friends from Facebook. it is a pretty simple implementation that allow the user to search for his friends. In order to use it you will need to get a valid access_token from Facebook (but you can read more in how to use the Facebook graph API at http://developers.facebook.com/docs/reference/api/ – or get a sample one). There are a few tricks in the implantation Use dataType: ‘jsonp’ – undocumented option that allow us to use jsonp instead of json Use Facebook...
Monday, May 16, 2011
A few weeks ago redgate announced that the lovely .NET reflector is going to cost money, that was a very sad news for every .NET developer out there. But the good news are that a few days after JetBrains announced that they are releasing there own reflector called dotPeek. I personally hate the name but It is a great tool! Much faster great UI and the best thing it has all of the ReSharper shortcuts! So even if you decided to pay for the .NET reflector I think that you should throw it away and start...
Monday, February 21, 2011
Hi, I wanted to create an application that will allow users to pick there own urls just like twitter (http://twitter.com/anativ). It seems that there is a very simple way for doing it using MVC. I saw many solution to this problem that catch the 404 and handle it. I personally didn’t like that solution it was too complicated and had many small issues that you need to solve. Here is the sample controller that handle the custom urls: public class UsersController : Controller
Tuesday, February 1, 2011
Hi, I am creating windows services using Topshelf for a while and I forget how “hard” (not that hard but harder) it was to create a windows service without Topshelf. Topshelf is a lightweight framework for building Windows services using the .NET framework. The idea is to create a console application and “publishing” it as a service with command line. No more dedicated window service project and an installer. So, how does it work? here is a simple example: 1. Create new “console application” 2. Create your service class ...