While building Lightning Components in Salesforce, how to effectively use Google chrome developer tools to troubleshoot and analyze issue
Web based applications are dominating the software industry and various frameworks like Angular 2, React, polymer and Lightning are on rise. From movie Spider man, this dialogue stands very true – With great power comes great responsibility.
As a web developer, its our job to make sure the application implemented by us, stands on performance benchmark and at the same time development time is reduced. To achieve this, fast and effective troubleshooting of web application becomes integral part of project development. One of the best tool to troubleshoot web applications are available freely – Google chrome developer tools.
In this blog post, we will uncover lots of tips and tricks about using chrome developer tools.
we will start with console API of chrome developer tool first.
console.error('Google chrome dev tools - error');
console.warn('Google chrome dev tools - warn');
console.info('Google chrome dev tools - info');
console.debug('Google chrome dev tools - debug');
console.log('Google chrome dev tools - log');
Below is output, how its displayed in chrome
As shown in above image, different log levels of console method printed in different color. error log level even prints complete stack trace of methods showing origin of error.
Using Symbolic Link to move high storage folders to new location like moving Google Chrome AppData folder to other location
Few months back I bought a new high end laptop with i7 processor and 16GB of RAM. Decided to give a shot to “SSD hard disc” over conventional hard disc. Performance of my system is incredibly fast, I have SQL Server, Jenkins, Command line Dataloader jobs, Apex static code analyzer all running almost at same time. Windows OS boots up in almost 2-3 seconds only, as compared to 15-25 sec previously. However because of decision of “SSD Drive” I had to compromise storage capacity. My “C” drive is only around 150 GB however D drive has lot of space. After analyzing many folders, I found that google chrome browser creates its temporary folder in “C” drive even though I have installed it explicitly in “D” drive. I wanted to move “Appdata” folder of google chrome to “D” drive to make sure I have enough space in “c” drive.
Does it takes a lot to view debug logs i.e. via setup area or dev console. This extension is an attempt to make this use case simple, by making debug logs visible in 2 clicks, without leaving the current Salesforce tab. Plus, you get a better hierarchical view of debug logs, which are better to analyse.
I have lots of expectation from this extension as this is the one of extension which takes feedback actively (You can find discussion tab just inside app) and frequently releases new capabilities. More features, like Execute Anonymous, Code Coverage, Test Cases are in pipe, will be released soon.
Second in my list is “Salesforce Navigator” and I cant live without it a single day. On average, it saves more than 50% of my clicks needed for administration. My shortcut for this utility is “Ctrl + Alt + Space” and I guess this most used combination on my system. Using this utility, you can directly navigate to any setup page like Object, Apex class, Pages, Workflow rule etc.
Servlet, Hibernate, jQuery and Ajax based google like chat with source code
Hi, In this article, my aim is to create an application which uses the concept of Hibernate in Servlet with Ajax support of Jquery.
Below figure can give you the idea of final look and feel of the complete application:
How to earn more money using google adsense. Tips and tricks used to get more revenue from google.
Match your Adsense colors with your site colors.
Do not use borders to your text ads.
Use link units in your site. Link units near site navigation links can perform well. also link units don’t need too much Ad space on your site and link units are not annoying to users.
Use Google site-specific search box with Adsense. This is the best option other than content targeted ads. You have option to select ad location on your site search result page. Put Adsense ads at the top and bottom of search result page. The best location of Google search box is – top right corner of your site.
Prefer Text ads instead of image ads. This will increase probability of more user interested ads. I will to suggest keep the text and image ad formats for your site. Use text and image ad format for following type of ad formats:
160í—600 wide skyscraper
336í—280 large rectangle
300í—250 medium rectangle. These are best performing ad units and will also increase your ad inventory.
Use section targeting to target ads relevant to your site or page content. Section targeting code is nothing but code tag provided by Google to direct their crawler to show relevant ads to page content. Use section targeting code on each page.
Ad placement is important. Place the Adsense ads above the main fold, means user should see your top performing ad units without scrolling down on your site. This will increase Ad CTR.
Use Google Adsense ad preview tool can help you to view all ads showing on your site and also helpful for blocking irrelevant ads.
Study your keywords. Target ads to these keywords. If you are not using section targeting Adsense feature then don’t forget to add your page-targeted keywords in the beginning of your post. Google Adsense crawler generally searches for first one or two paragraphs to target ads to that page.
Placing images above or next to the ad units will increase ad visibility and more chances of click on such ads increasing your CTR.
You can use “heatmap“ provided by Google to analyze other top performing ad placement slots. See the Image below. Ad slots with dark color are hot spots than the faint ones.
Track all ad performance using Channels. Channels are nothing but individual ad units, which you can track for performance. Study the Adsense revenue report in detail. Don’t keep on changing ad formats, colors and placements every one or two days. Track the ad unit placement at least for 2 weeks to judge the ad slot performance.
Optimize your site for search engines. SEO is the key point for high traffic websites. Moreover traffic from search engines can convert well in case of Adsense ads. Users coming from search engines are clicking more on your Adsense ads than regular readers.
Ads placed in-between the content perform well. But keep in mind this can be annoying to your site readers. So avoid too much of blended ads in content.