Force.com Tooling API IDE

Cloudsole Developer is an easy way to develop Salesforce apex classes, triggers, components and visualforce pages. It uses the salesforce API to access your code in a safe and secure way.

Some of the functionality of the IDE:

  • Create new Apex Triggers Classes, Visualforce Pages & Components
  • Select from a list of predefined templates to create class stubs
  • Code debugger
  • Run Anonymous Apex Code
  • Run SOQL queries
  • Run Batch queries
  • Metadata viewer and download
  • Code Metrics Dashboard

Force.com API Used:

  • Force.com OAuth
  • Force.com Tooling API
  • Force.com REST API
  • Force.com Batch API
  • Force.com Metadata API

Create new Triggers, Apex Classes, Visualforce Pages and Components:

CloudSoleApexClasses

Code Editor:

CloudSoleCodeEditor

Run Anonymous Apex Code:

CloudSoleAnonApex

Code Dashboard:

CloudSoleDashboard

Run SOQL Queries:

CloudSoleDataManagement

Create Force.com Batch Jobs:

CloudSoleBatchJob

Salesforce Streaming Api using Spring MVC

Check out my Salesforce Streaming Spring MVC project
http://cloudsole-streaming.herokuapp.com/

Find the code here:
https://github.com/thysmichels/cloudsole-force.com-streaming-web

Using Salesforce Streaming in Java project:
Push Topic Factory

package com.example.service;

import com.force.sdk.streaming.client.ForceBayeuxClient;
import com.force.sdk.streaming.client.ForceStreamingClientModule;
import com.force.sdk.streaming.client.PushTopicManager;
import com.force.sdk.streaming.exception.ForceStreamingException;
import com.force.sdk.streaming.model.PushTopic;
import com.google.inject.Guice;
import com.google.inject.Injector;

public class PushTopicFactory {

	public Injector createInjector(){
		Injector injector = Guice.createInjector(new ForceStreamingClientModule());
		return injector;
	}

	public ForceBayeuxClient createClient(Injector injector){
		  ForceBayeuxClient client = injector.getInstance(ForceBayeuxClient.class);
		  return client;
	}
	
	public PushTopicManager createPushTopManager(Injector injector){
		PushTopicManager pushTopicManager = injector.getInstance(PushTopicManager.class);
		return pushTopicManager;
	}
	
	public PushTopic getTopicByName(PushTopicManager pushTopicManager, String topicName) throws ForceStreamingException{
		PushTopic topic = pushTopicManager.getTopicByName(topicName);
		return topic;
	}
	
	public PushTopic createPushTopic(PushTopicManager pushTopicManager, String name, Double apiVersion, String query, String description){
		PushTopic createTopic = pushTopicManager.createPushTopic(new PushTopic(name, apiVersion, query, description));
		return createTopic;
	}
	
	public PushTopic pushTopicFactory(String topicName) throws ForceStreamingException{
		PushTopicFactory pushTopicFactory = new PushTopicFactory();
		Injector injector = pushTopicFactory.createInjector();
		pushTopicFactory.createClient(injector);
		PushTopicManager publicTopicManager = pushTopicFactory.createPushTopManager(injector);
		
		return pushTopicFactory.getTopicByName(publicTopicManager, topicName); 
	}
	
	public ForceBayeuxClient createPushTopicClientFactory(){
		PushTopicFactory pushTopicClientFactory = new PushTopicFactory();
		ForceBayeuxClient fbClient = pushTopicClientFactory.createClient(pushTopicClientFactory.createInjector());
		return fbClient;
	}	
}

Streaming Service

package com.example.service;

import java.io.IOException;

import org.cometd.bayeux.Message;
import org.cometd.bayeux.client.ClientSessionChannel;
import org.eclipse.jetty.util.log.Log;

import com.example.service.PushTopicFactory;
import com.force.sdk.streaming.client.ForceBayeuxClient;
import com.force.sdk.streaming.client.PushTopicManager;
import com.force.sdk.streaming.exception.ForceStreamingException;
import com.force.sdk.streaming.model.PushTopic;
import com.google.inject.Injector;

public class StreamingService {
	
	public void pushTopicSubScriber(){

		PushTopicFactory pushTopicFactory = new PushTopicFactory();
		Injector injector = pushTopicFactory.createInjector();
		ForceBayeuxClient client = pushTopicFactory.createClient(injector);
		PushTopicManager publicTopicManager = pushTopicFactory.createPushTopManager(injector);
		PushTopic createTopic = pushTopicFactory.createPushTopic(publicTopicManager, "NewAccountPushTopic", 27.0, "select Id, Name from Account", "New Push Topic");

		PushTopic topic = null;
		try {
			topic = pushTopicFactory.getTopicByName(publicTopicManager, createTopic.getName());
		} catch (ForceStreamingException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		} 
		
		try {
			client.subscribeTo(topic, new ClientSessionChannel.MessageListener() 
			{   
				public void onMessage(ClientSessionChannel channel, Message message) 
				{
					Log.info(message.getJSON());
				}
			});
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}

Developing Web applications with the Java Persistence API and JavaServer Faces

The Java™ Persistence API (JPA) provides an easy mechanism to use with relational databases when you need applications to persist data. Although it is traditionally used with Enterprise Java™Beans (EJBs), JPA works quite well directly with Web applications. This article describes the simplified programming model and tools that IBM® Rational® Application Developer for WebSphere® Software Version 7.5 provides for easily building Web applications that use JPA.

http://www.ibm.com/developerworks/rational/library/08/0819_mutdosch/index.html