Code Walhalla ... Avatar

Table of content

The Early Release of Heroku Salesforce Playbook will only contain the first section of the book. However, as we are already writing next sections we can give you an overview of what the book will look like in few months.

TABLE OF CONTENT

SECTION 1:…

View Post

shared via WordPress.com

Sencha App with Salesforce API using a Sinatra Proxy

In my last article, I have presented Sencha Framework and some advantages this product got over other Mobile solutions. Convinced that I had a wonderful tool into my hands I have decided to create a simple app. The aim is to have two tabs. First one with an intro page, second one with a list of Leads retrieved through the Salesforce REST API. The list must be sorted and provide basic interaction by displaying additional details of a selected Lead.

As soon as you start playing with mobile application and a remote API you have to face a common javascript limitation: the Same Origin Policy. I invite you to read the Wikipedia article if you want to know more about that rule. Briefly, “The policy permits scripts running on pages originating from the same site to access each other’s methods and properties with no specific restrictions, but prevents access to most methods and properties across pages on different sites”. Said differently, you’re cute javascript mobile application hosted under xyz.com domain _can not_ request any data from salesforce.com domain. Such a shame but so imperative to keep the web safer.

Continue reading…

Sencha Touch, more than a trendy Mobile JS Framework

Few weeks ago, I started to think about my next project, a mobile dashboard app for Salesforce. As I am not an IOS dev but rather a Ruby/Javascript one, I investigated a bit wondering what framework could fit the best my expectations:

  • ability to generate IOS/Android app to remains device agnostic
  • using a language I know and improve my skills rather than diluting them
  • not requiring to install an heavy env cause otherwise it’s never as simple than they pretend
  • well documented to avoid hitting my head against the wall to often looking into a raw source code of thousand of lines
  • promising future cause I don’t like to waste my time learning already obsolete technologies 

Other candidates were RubyMotion, PhoneGap - Cordova, JqueryMobile, Titanium, RhoMobile. My final conclusions are not based on intensive trials but more on web investigations and personal intuitions. Here are the pros and cons of those different solutions.

Continue reading…

Ruby External CRON manager for Salesforce on Heroku

In todays post we’ll have look at task scheduling using Heroku and the famous Resque gem. I have presented it at last London Skillsmatter Salesforce Dev Meetup. Watch the video: Delayed tasks on Salesforce have some well known weaknesses. For example: “Use extreme care if you are planning to schedule a class from a trigger. You must be able to guarantee that the trigger will not add more scheduled classes than the 25 that are allowed”. With the help of Heroku, most of your background tasks might be externalized and delegated to a dedicated app on Heroku. To build that solution we’ll be using 4 different gems. The objective is to create a simple web app that is able to create, handle and monitor tasks build by registered users. To be really functional, that web app should be reachable through an API (coming in a future post).

  1. Sinatra to build a basic web app
  2. Databasedotcom: to get the secure connection to Salesforce API
  3. Omniauth to get the authorization token from your ORG
  4. Resque to handle Job Queues and monitor them

Continue reading…

So you want to play with Ruby?

I heard last week two people complaining about the difficulty to install ruby on a mac and start coding with all our precious gems. They deserve explanations.

Alright let’s have a quick look at that and let’s install our Ruby env with all tools required to code and deploy on heroku.

Being able to compile:

First of all you need GCC aka the compiler. It was previously coming along with XCode but it’s not the case anymore. You can get GCC from github. Download it and just unpack it as usual.

New packaging system:

If you’re bored by macport or if you dont know it already try homebrew. Homebrew is a package installer based on recipes. To install it:

Continue reading…

Create geek slideshows

I heard one day that consultant finish to see the world into bullet points. Abusing of ppt everyday, their brain slowly mutate and they finish them self to behve as a continuous slideshow of concepts. Funny or scarring. It depends.

However, since 1 or 2 years, we observe people making js presentation, homemade or not. This might be a continuation of Google doc presentation growth or simply a consequence of people getting bored by ppt. To build them, you’ll find on internet libraries like impress.js, deck,js or scrollorama. Some website like prezi.com even offer now a real alternative to ppt based on js. To have an overview of available libraries check favbulous website

However, as this might sound unnecessarily complicated to create a slideshow, share it and publish it using js compared to ppt, I built a small mashup of Sinatra, deck.js and haml hosted on Heroku.

The principle is SIMPLICITY.

Sinatra let me publish and organize my slideshows on Heroku. A new slideshow is just a file with multiple sections. Each section is a slide. As I have extracted all the surrounding css/js call in a layout and added haml syntax, a visually impacting slide might be as simple than:

%section

  %h1 you wont believe it !!!

Neat, isnt it ?

To try the go on Geek slideshow, fork it on Github and start using it.

Monolithic Databases are dead

It’s today a common statement to affirm that hegemony of monolithic relational database system is ending.

ORM, Object Relation Model, were the last trial to perpetuate that pattern born in the 70’s. ORM bring to software development specialist the sweet feeling of directly interacting with objects. In Ruby on Rails world, Active Record was a wonderful implementation imposing its conventional relational approach on all web developer. In “Java world”, Hibernate has still a massive user base but controversy about its performance and ability to handle some complex situation are numerous.

Long story made short, Relational Databases persist data. That’s a fact as for all storage systems but they also structure the way we represent and organize our data model. They oblige us to think them through principles such as cardinality, relation entity, foreign keys and all those typical normalized form concept Entity Relationship Model. Furthermore, well know performance might quickly be an issue when mixing ORM and relational Databases. You want to make a query with 15 joins to display a deeply structured data set with few conditions and limit? You should rethink it.

Continue reading…

_Why Travis?

_Why?

August 19th 2007, _Why the lucky stiff, anonymous author of “Why’s poignant guide to Ruby” book and various OpenSource project such as Camping, Shoes or hpricot disappear from web radar. Since then August 19th is commemorated every year, all over the world and developers offer their strength, knowledge and will to help building Free content and applications.

This year, in France, Jérémy Lecour offered to host a hacking WE in his place, a charming house on Marseilles’s hills. We met there, during 2 days, with Thibault Barrère and Gregory Colpart, well decided to bring also our small contribution to the OpenSource world.

Travis ?

I started to look into Travis project after RuLu 2011 conference. Sven Fuchs and Josh Kalderimis came to present their idea and invite the french community to use, speak, love or hate Travis-CI application.

Continue reading…

The Netocrats

Title: “Les nétocrates” (in french)

 

Author: Alexander Bard, Jan Söderqvist

Edition: Léo Scheer

Abstract:Feudal lords, capitalist bourgeoisie then knowledge netocrats. Three historical eras, three ways to structure the society. In netocraty, the last paradigm, netocrats architect their power on contacts and knowledge sharing. No more fields and castles or industries and funds. Only matter relevant informations, spread cautiously with the righ people. 

As barbars, netocrats are coming with new rules, objectives, ambitions. Conservative positions are swept without. In that society secret management is more important than money. Real and virtual networks are invisible kingdoms where power links are redefined.

Curators, nexialists and eternalists are the three nodes typologies authors introduce to describe the netocrats network.

Continue reading…

When Salesforce meets awesome Ruby gems

There are multiple ways to connect your app to a SalesForce account but this one is pretty elegant and modern as it uses the new Winter ‘11 release with support of OAuth2 authorization standard through Omniauth. This article also describe the built of a REST API using HTTParty awesome gem.