Skip to main content

Using MavensMate and SublimeText For Apex and Visualforce Development

Recently i tried the mavensmate open source IDE for the 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 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

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

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…

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

Writing Test Classes For Apex Rest Service

I came across a question in a developer community on how to write Unit Test Classes for the Rest API service for POST HTTP calls

Unit Test Classes for REST API following link is very useful and inspired by this jeff had an article on his blog on how to write the test method for same .

Here is the Jeff Blog Link Test Class for REST API(Good reference for GET Rest Services)

In one of my previous blog post i demonstrated how to use native parsing technique for Rest api for User Defined Type
I wrote the Test class for the same and this post is helpful for all those searching for how to write test classes for apex rest service annotated with POST Call
Here is the Rest Service Class for which i attempted the test class
@RestResource(urlMapping='/DemoUrl/*') global with sharing class MyRestResourcedemo { global class RequestWrapper{ public Account acct; public Contact[] cons; } global class ResponseWrapper { public String StatusCode; …