Showing posts with label everything. Show all posts
Showing posts with label everything. Show all posts

Friday, 2 May 2014

How to Test Website across Multiple Browsers and Devices Synchronously


Welcome back!  I, Anubhav Sachan, am here again with another guide “How to Test Website across Multiple Browsers and Devices Synchronously”.


Responsive Web Design (RWD) is now a common approach in building a mobile friendly website. But building a responsive website can be quite irritating when you have to test the website in multiple devices and screen-sizes.

Say you have three devices to run the test on, you may end up having to constantly refresh each browser in every of those devices, which is cumbersome, to say the least.

So the idea of “synchronized testing” has emerged to address this situation and make the workflow more streamlined. There is a Grunt plugin called Browser Sync  to perform this, and Iam going to show you how to deploy it in your project, in this post.


 Why use Browser Sync?
First off, I’m not saying that Browser Sync is the perfect tool. There are also a number of GUI Applications such as Adobe Edge Inspect and Ghostlab which are great tools as well. They both have a nice GUI, but here’s why I think Browser Sync is better than these Applications:

1) Browser Sync (as well as Grunt) is free which helps if you have little to no budget to work with.

2) It is open-source. Depending on your JavaScript and Node.js proficiency you can extend it to cater to your own specific requirements.

3) It is cross-platform. You can use it in Windows, OS X and Linux. Ghostlab, on the other hand, is only available in OS X and Windows.


Installation
 To start off, you would install the Grunt plugin called Browser Sync. I’m sure the name says it all; this plugin syncs a number of interactions that occur on the website including page scrolling, populating form fields, and clicking on links.

All these actions will be reflected in the other browsers and devices as they are happening. Type the following command to install Browser Sync in your working directory:


npm install grunt --save-dev
npm install grunt-browser-sync --save-dev



Configuration

Once installed, Browser Sync can be loaded within the Gruntfile.js, this way.





  module.exports = function(grunt) {  
     grunt.initConfig({  
         browser_sync: {  
             dev: {  
                 bsFiles: {  
                     src : 'navbar-fixed-top.css',  
                 },  
                 ghostMode: {  
                    clicks: true,  
                    scroll: true,  
                    links: true,  
                    forms: true,  
                 },  
             },  
         },  
     });  
     grunt.loadNpmTasks('grunt-browser-sync');  
 }; 



This configuration will monitor the navbar-fixed-top.css file and automatically refresh the browser when it’s changed. We should also enable ghostMode to keep track of interactions on the website.

Note: Browser Sync also provides a number of other configurations, you can check them out in detail on this page. For the time being, the above configuration should suffice for the project example in this article.

Once the configuration is set, go to Terminal (or Command Prompt) and run the task using the following command:

grunt browser_sync

After running the command, you will be prompted to add three line of scripts within the <head> tag.

Also, when you view your website in multiple browsers, it also records those browsers, and notifies you in Terminal. In this case, I opened the website in Chrome, Safari, and Mobile Safari (through iPhone Simulator).


Check It Out

Now, as you can see from the following animated GIF, all updates, changes, and interactions are synced in real time in all the browsers.

I would be happy to hear from you. You may send your Suggestions,Advices etc. on contac ifo at Developers page.
Thank You !

Monday, 28 April 2014

How to Click a Quality Selfie?


These days smart phone users are developing the interest on “Selfie”. Selfie fever is not mere an affliction which has spread among youth but even U.S. President Barack Obama, Vatican’s Pope Francis, and BJP’s Prime Ministerial candidate Narendra Modi are afflicted with it. All the Selfies are popular and have the tendency to find place in News Headlines. 
 
Earlier it wasn’t easy to capture your photo but the introduction of front camera in the smart phone has made it really very easy to capture a Selfie. So I,Anubhav Sachan, am here to give some tips on clicking a good Selfie.

To capture a great photograph of yours the first thing which needs to be best is the Camera. If your camera is not so advanced you can use some of apps for iOS, Windows and Android’s AppStores. More are the Pixels of your camera, quality of image will be more. Camera should have a light sensor, Flash or LED. If these are not available then it’s not possible to click a good Selfie.Love them or hate them, Selfie’s are here to stay.

Oxford Dictionaries named Selfie the Word of the Year 2013. Selfie is defined by Oxford as “a photograph that one has taken of oneself, typically one taken with a smartphone or webcam and uploaded to a social media website.”

1. Check your lighting
Pictures in general turn out better when the subject is facing the light. Avoid the creepiness below by taking a selfie in good lighting.

2. Be genuine
If you’re happy, smile! If you’re sad, frown. Whatever you do, don’t pretend to not be looking at the camera when you are clearly aware that you are taking a photo of yourself.

3. Avoid/Don’t Avoid Photobombers
Intentional photobombers can ruin a very cute, bestie Selfie. They can also turn a not so special ‘don’t’ I look good today Selfie’ into a piece of socially shareable magic.

4. Keep your hand still
Avoid the total amateur move of a blurry Selfie. Using the photo timer on your phone is a big help. It removes the accidental blurry image, caused by pressing your camera button too hard.

5. Make it interesting
We’re past the plain Selfie. Get creative! Selfie on the ground, Selfie on a swing, Selfie with a Selfie, give people a reason to click that ‘Like’ button.

6. Get a great front facing camera phone.
A great front facing camera will ensure the best quality selfie. The front facing camera also helps you frame yourself so you avoid the super close up. 

7. Above all else, embrace the Selfie.
You didn’t get that new high res camera cell phone for nothing! Don’t be ashamed that you want to get in on the Selfie game.

  Sorry Readers I was at New York sometime ago for a short piece of work but i will not disappoint you again.