Skip to main content

Using MavensMate and SublimeText For Apex and Visualforce Development



Recently i tried the mavensmate open source IDE for the force.com mentioned in the site and was quite impressed on windows .It hardly took time for me to understand and start using it .Thanks to excellent UI and its support with sublime text editor .

Let me document few initial settings i did to get this up and running and there is lot to speak on how to use this .I will highlight major points in this blog and that should be good enough to start using this .

Lets begin with how to set this up

For IOS and Linux i have no experience configuring this but looks like documentation for the same is very clear in User Guide

For windows i did configure it and was stuck at a place and i will elaborate at this step so that some one dont pull out hair searching and googling lot 

Following things needed to be downloaded

1)Git Download
2)Sublime Text 3
3)MavensMate.exe file

One by one we need to download the above and keep installing on windows machine .Please note i have provided the link .And hence clicking on above hyperlinks should help you to find location from where to get installed 

I was stuck on how to provide path form my local machine

The screenshot of the error i received when i first tried creating project





















So the error is [ mm property] is not set so lets resolve this .



The error can be resolved by setting your local path on the default settings file .

mm_workspace was empty and i have given my file patch here as "mm_workspace" : ":\\Users\\mshrivasta002\\Mavensmate" and now we are ready to create projects

     {
	//set to absolute location where you wish your MavensMate project to reside
	//if the location does not exist, MavensMate will attempt to create it
	//for example: "/Users/username/Documents/workspaces/mavensmate" (notice the absolute path)
	//WINDOWS USERS: it's probably best to set this like so: C:\\path\\to\\your\\workspace
	"mm_workspace" : "C:\\Users\\mshrivasta002\\Mavensmate",

	//set to desired Salesforce.com API version (tooling api functionality requires 27.0+)
	"mm_api_version" : "28.0",

	//if true, MavensMate will automatically hide the debug panel upon a successful operation
	"mm_hide_panel_on_success" : true,
         --------
         ----------
         -----------------
     }


To create projects just navigate  to Mavensmate>NewProject and a screen comes up to enter credentials and create the project

A sample screen shot on how this comes up is below


The deployment interface is really good as well and works good for chrome browser(Not yet tried with other browsers)

A small screen shot on how this looks is below


The major features that are really significant and give an edge over eclipse are as below

1)Auto complete for the visualforce is supported (In eclipse we may need separate plugins )
2)Debug logs obtained from the server are pretty 
3)Performance and speed of data fetch from server  is not so bad (OK but i feel needs improvement)
4)There are already templates available for most of common scenarios like batch apex,visual force controlers,email services ,etc
5)The tooling API is used and hence everything is JSON based and there are also commands for compiling and creating and editing files  everything can be done from command line .The API documentation is really good

http://mavensmate.com/API/Overview

6)Syntax highlighting is bonus and sublime text editor is really good one .

Frankly speaking a single blog-post is not sufficient but this will just motivate to try this IDE for a change.Happy coding !!!


Popular posts from this blog

TLS 1.0 has been disabled For Sandbox - Salesforce

Salesforce has finally disabled TLS 1.0 in sandboxes .This is in preparation for disablement later in 2017 for PRODUCTION instances .

Now this would have not impacted your integrations in PRODUCTION org but if your integration is broken in your sandbox ,this means you have only few months to sort this and fix before this affects your integration for PROD live users .
Before we deep drive on how to possibly fix this and work with your external systems to figure solution ,lets first understand what is TLS and why did SFDC moved to 1.x and had to disable TLS 1.0
TLS 1.0 Explained























TLS 1.1 Improvements 
Added protection against cipher-block chaining (CBC) attacks. Support for IANA registration of parameters.

Clearly TLS 1.1 is more secure(Compared to 1.0) and protects salesforce resources against CBC attacks .
Identify if this change broke anything .The things that can be affected in your instances are as below Web requests to Salesforce URLs that require authenticationWeb requests to the login pag…

Opening Modal Using Lightning Component Framework of SFDC

One of my friend from India threw a challenge .The challenge was to open a modal by using latest and greatest lightning components framework and modals design from SLDS .For the love of community I thought of sharing the entire code base that I did .

So here we start ..

Business Use Case - Need a handy SalesLeader board component that can be used to display the Sales revenue generated by each sales rep for current year in the order of decreasing total revenue .On click of the tile ,we will show detail opportunity list aggregating the revenue .

The component can be dragged in lightning design experience or in App builder lightning Page .

Video Demonstration-



SalesLeaderBoard from Mohith Kumar Shrivastava on Vimeo.








Frameworks Used -
Lightning Design Systems (SLDS) for CSSLightning Component Framework for client side logicApex aura enabled class for backend logicApproach
The component hierarchy is very important to imagine or mindmap before we dig deeper- SalesLeaderMain
    -SalesLeaderBoard
    …

Invoking Apex Callout From Process Builder

Process builder is GA in Spring 15 and one of the queries I came across was around how to invoke apex callouts from Process builder .

Before process builder came we had two common approaches of calling webservice 

1)We have outbound messages as one of the Actions for workflows.This works if other party implements the WSDL that is generated once Outbound messaging is defined with appropriate end point .

2)Most of times future method invoked through triggers allowed to do apex callouts and invoke external web service provided the future method is annotated with @future(callout=true).This provides lot of flexibility and one of the best approaches .

3)Flow triggers was in BETA and this was also one of the ways we could invoke callouts provided the Flow implements process plugin .To understand in detail how to implement process plugin refer to the below example

The purpose of this blogpost is to demonstrate the new possibility of invoking apex callout through Process Builder 

I tried initi…