Thursday, May 29, 2014

Working with impress.js to create presentations using HTML & CSS3 - impress.js

Impress.js was awesome plugin to create awesome presentation because it uses HTML and CSS3 to animate and make the presentation still more lively for users.at the sametime the Author of impress.js warns about the usage of the presentation will be nice only if it is interesting and it's not suitable for the official meets presentations.however it is easy to set up the plugin environment and start our presentation slides.I hope it works only on modern browsers.i have already used Fathom.js but it was regular for official purpose but this one is quite interesting to display interesting streams.
preview img from presentation slide impress.js
  


Browser compatibility: 

Currently impress.js works fine in latest Chrome/Chromium browser, Safari 5.1 and Firefox 10. With addition of some HTML5 polyfills (see below for details) it should work in Internet Explorer 10 (currently available as Developers Preview). It doesn't work in Opera, as it doesn't support CSS 3D transforms.As a presentation tool it was not developed with mobile browsers in mind, but some tablets are good enough to run it, so it should work quite well on iPad (iOS 5, or iOS 4 with HTML5 polyfills) and Blackberry Playbook.


Installation:

just like other javascript just include both impress.js and demo-impress.js in your html file in between <head></head> tags.get the orginal source from here.



<link href="/demo-css.css" rel="stylesheet" /> 
<script src="/impress.js" ></script>


Usage :

Lets start with normal Html tags below

<html lang="en">
    <head>
        <meta charset="utf-8" />
           <!-- your CSS and JS files can be included here. --> 
</head>

now lets dive into slides where i have made them in to div tags and mentioned them with classes and ID's.

check browser issues:

before that we must check the browser support if it supports then we could proceed normally! or else we must highlight by showing them Error message and try in latest browsers.

<div id="impress" class="impress-not-supported">

    <div class="fallback-message"> <!-- this fallback message shows when issues exist -->
        <p>Your browser <b>doesn't support the features required</b> by impress.js, so you are presented with a simplified version of this presentation.</p>
        <p>For the best experience please use the latest <b>Chrome</b> or <b>Safari</b> browser. Firefox 10 (to be released soon) will also handle it.</p>
    </div> 

  <!-- your slides div can go here -->


</div> <!-- end of div class="impress-not-supported" -->


slides as div tag : 

before directly creating tags,just imagine a graph sheet in which you reference with X,Y,Z axis in which our div slides are going to be placed.our javascript plugin takes the value from div and moves around accordingly with CSS3.
it is mandatory to use Class step in each of our div slides.and you can mention other options if you want.

General Approach of Div slide:

<div class="step" data-x="Preferred_value" data-y="Preferred_value" data-z="Preferred_valuedata-rotate="Preferred_option" data-scale="Preferred_option">

  <!-- here you could use your own style of HTML coding for contents --> 

</div>


Example for Div slide:
options:
data-x : which moves along x-axis slide
data-y : which moves along y-axis slide
data-z : which moves along z-axis slide
data-rotate : which rotates around and reach your slide normally
data-scale : which scales above the slide(zoom level)

<div class="stepdata-x="200data-y="200data-z="100data-rotate="45data-scale="5">

  <!-- here you could use your own style of HTML coding for contents --> 
<p>welcome to i-visionblog.com</p>
<p>i love to create and share my ideas through my blog </p>
<p>i love to create web/mobile apps as a hobby and my interest is to work with Bigdata and analytics</p>

</div>


additional to this we could add some extra effects 3D with id="its-in-3d" and giving option to rotate in their axis 
data-rotate-x & data-rotate-y & data-rotate-z : which rotates when sliding on their axis corresponding, can be a 3D view.however it is simple and easy to code.


<div class="stepdata-rotate-x="200data-y="200data-z="100data-rotate="45data-scale="-5" id="its-in-3d">

  <!-- here you could use your own style of HTML coding for contents --> 
<p>it's a 3d view here..</p>

</div>

<!-- this is the last slide of the presentation mentioned with id="return" to go back to our first slide -->

<div id="return" class="step" data-rotate="0" data-y="2000" data-x="2000">
<p>join us ! code with us or create ideas | visit www.github.com/shivasurya</p>
    </div>

<!-- this can be hint for users to naviagte with spacebar or arrow keys -->

<div class="hint">
    <p>Use a spacebar or arrow keys to navigate</p>

</div>



contributors have added some audio and other specific functions go through them in Github official impress.js.if you can find more options and bugs in my demo/code comment below!

This can be more innovative and interesting when you can think logically using graphs.other can simply use the template provided.I have mentioned options which i have used in this presentation,if i had missed out or any bugs,comment and notify me via E-mail.share is care.

Tuesday, May 20, 2014

working with ibm bluemix for deploying PHP application on cloud - cloud foundry

As i mentioned about my cloud experience in Heroku and attended a workshop on IBM cloud ,i had an opportunity to deploy my php application on +IBM.I got success in deploying my PHP application instant manner from my windows platform.i am so thankful to +vikas sir for introducing the bluemix through workshop session,as i mentioned in my last post.bluemix is under beta version and open to all till june.





Scope:

we could deploy php application on cloud,Create services and run database.Since i am currently using Windows 8 i would show commands and screenshot from Command Prompt.

Requirements:

> IBM ID (mandatory) with developer registration(may be useful for forums)
> Sign Up for Beta Bluemix with IBM ID (Click Here)
> Constant Internet Connection ;)
> A small php project

Installation:

Go to Official Download page for cloud foundry tool for connecting with cloud.

1) It's better to download the Stable version.
2) Select the appropriate OS and download the zip and extract.
3) Run the installer with Admin Permissions only then You won't get errors.

After Installation:

Just it will be installed In Program files in your Windows Local Disk.
1) Now open your Command prompt with Administrative Permission.
2) And type "cf" and space "-v" (option)

    C:/>cf -v   // it must output with version number of the Cloud foundry tool Application


thus CF tool is working in your command prompt.lets start initial steps to deploy our application.


manifest.yml:

This is the important step in deploying app.This is the basic app settings ,it speaks with the cloud that you need the particular setup to run your corresponding app.Simply saying it is going to initialize cloud environment for deploying.So,let us concentrate on creating manifest.yml file.note this file must be with your project files while uploading.


---
applications:
- name: NAME-OF-YOUR-FOLDER-APP
  memory: 256M
  instances: 1 
  host: WEBSITE_ADDRESS_FOR_YOUR_APP(host)
  buildpack: https://github.com/dmikusa-pivotal/cf-php-build-pack


Actual manifest.yml of my app (note that above three hyphens must be mandatory and hyphen before name is also must)

don't change Buildpack(pulling it from git php built pack),memory(actual RAM memory limit) and instance(balance load using instance).if you change it you may be charged accordingly as per price plans.



---
applications:
- name: myapp
  memory: 256M
  instances: 1 
  host: shivamyapp
  buildpack: https://github.com/dmikusa-pivotal/cf-php-build-pack


see through that your host must be unique(app web address).may be in future you can make it your custom domain.

Deployment of app:

1) Just point your API .type this in your command prompt(ADMIN)
C:/> cf api https://api.ng.bluemix.net

2) and change directory where your project file to be uploaded.
C:/> cf login

3) Enter your E-Mail ID and Password of IBM ID
just click on it and view cf login
4) after changing directory where your project exisit.(move inside where manifest.yml present) and type the command
$ cf push myapp

since i had named my folder project name i had written as myapp(replace with your app project folder name and must be same as application name in manifest.yml)

5) by executing above command just you must get like this below image.That your upload works and moving to cloud foundry.
your project file uploading via CMD
6) After that it executes many configuration and restarts the application.this mean that your Host name is correct and working.
go to Provided_Host_name.ng.bluemix.net (hostname provided in manifest.yml)
eg: myapp.ng.bleumix.net

7) While updating your application just use step number 4,5.

note: Work with caution because cloud may costs you money for over usages and scalling instance.And you can use HTTPS connections too.

I have deployed my application on Bluemix.just have a try since it is free till june month 2014.just share your experience with comments and post errors.Contact with me in [email protected].Share is care.

Monday, May 19, 2014

working with qrcode.js for generating qr code - powerful chrome app by varun raj

Learning programming language doesn't matters at all.Because applying it real world for the end users comfort matters here.The same way last week i was learning with QR code to generate from javascript code and i was wondering where to use it and how users could easily benefited.at the same time +Varun Raj was working with QR code generator javascript and successfully create the application which helps sync between desktop to mobile phones with this QR code generator.

QR code it javascript.

   








Installation of qrcode.js:

just like other javascript include just include the script in to the web page or ur preferred projects.

<!--- include this in your header -->
<script src="qrcode.js">
</script>

Generate the QR code :

so what do we need for QR code is URL alone.this QR code.js gives to create new object for developers to just pass the url to the process the function.

<script>
new QRCode(document.getElementById("YOUR_DESIRED_ID_TO GENERATE_QR")
   , "http://www.i-visionblog.com/");
</script>

thus running this script will generate the QR code instant manner for your webpage in the given ID.

so,now how could we make user friendly for other users.and comes here is Chrome App. +Varun Raj had just created the simple extension for chrome browser and which could work with Chrome API to interact with browser Title and URL.then it is processed using popup.html of the app and generate the QR code for the users to capture it and use it later in their smartphones.

Chrome App Structure:

 APP Extension
 |
 |---------- manifest.json //initalize app with permissions,icons and other API mentions
 |
 |---------- popup.js //handles the extension events,clicks and responds in chrome
 |
 |---------- Jquery.min.js //here just to append the title text in extension
 |
 |----------  popup.html //our extension html markup where we generate QR code
 |
 |----------  qrcode.js //Javascript main file to generate the QR code.it acts like library.
 |
 |----------  icon.png //our extension icon

Live Demo for non Chrome Users:


new QRCode(document.getElementById("qrcode")
   , "http://www.i-visionblog.com/");
See the Pen working with QR code.js ~ i-visionblog by s.shivasurya (@shivasurya) on CodePen.

Snapshot:


Snapshot on the chrome app.

about developer:


Developer : +Varun Raj , skcript.com
CHENNAI - INDIA
facebook  | Google | Twitter 




Thus we had seen the qrcode.js make our life easier without typing long urls and makes easy transfer for smartphones.report for bug and share is care.

Thursday, May 15, 2014

introduction to cloud computing - new way approach for business by IT industry - post snippet by @nancy joslin

workshop

+SHIVA SURYA , (author of @i-visionblog) myself attended the recent workshop on cloud computing and big data analytics with my department members +siddarth velmurugan , +venkat raman , +SRIRAMAMOORTHY S & +Varshi Ramesh.

a video that explains very well on cloud computing.
The team from +IBM , +Vikas Manoria ,sir was explaining in awesome manner about the usage,needs and other aspects technically about #cloud computing and it's working and last we had a great demo on Bluemix,a cloud based application deployment startup from IBM with J2EE simple application running on cloud integrating with Twitter API.I had previously guided you guys deploying the web application on cloud.the same way IBM provides excellent solution to deploy apps on cloud with many configuration.I will be writing a post within a week to deploy a PHP based web application with mongoDB as database on Bluemix.

so let us see about some basic concepts on cloud concept :

When a new business is started, they spend time and money to build IT infrastructures which provide hardware, software, services and they need power, larger data center, storage, servers, networks etc. But their growth get slower. In this case Cloud Computing can be implemented. It provides virtual data centers with software, and hardware and information resources, reduces money spending and avoids huge capital investments. 

Cloud computing is simply a service in which computers are connected to 

• connected to larger data centers with lot of software so they need not spend money to buy individual license 

• connected to hardware sources so they need not build, upgrade, maintain infrastructure 

• connected to information resources so they need not go all around the world for collecting information 

This doesn’t require much, all it need is internet and an account as we create in Gmail for example. But the serious problem is the security data to be stored in data centers go through networks and are sometimes hacked by black hats and lot more.however we have SSL(priavate/public key encryption) and other algorithms to encrypt data and data protection by particular operating systems.

To rectify this, cloud computing is available in three models as

Private - secure, to one company alone, not much efficient.

Public - not much secure, highly efficient.

Hybrid - combination of private and public models, secure and more efficient.

Cloud computing provides all service as 


IaaSInfrastructure as a service(demanding infrastructure particularly).

PaaSPlatform as a service(demanding platform such as OS particularly).

SaasSoftware as a service(instant for testers to include add-ons like mysql,mongodb).

More than half of US are pulled into this. By the 3rd into Everything as a Service (EaaS) instead of infrastructure, platform, software as individual service. They are expecting that the total market of cloud will reach $158.8 billion. In forth coming years Hybrid cloud will be more adopted and total market rises to great extends.

so which industry,application needs cloud storage,hosting ?


> Applications such as pinterest runs on cloud based service where the traffic would be quite large and to manage them.

> Industries such as logistics and other industries which need real time statistics and data to manage customers and provide opt services on time.

> growing industry for big data analysis to challenge their opponents with present data.

> finally marketing feedbacks,data etc for products a needs a huge storage where they can be stored and retrieved without loss of data and perfomance.

and where the industry could handle large amount of data.

And finally cloud is vast concept to describe ,and only you can experience it when you really work it on by deploying small applications and experiencing how cloud manages the and traffic.share is care.

Sunday, May 11, 2014

Login system v1.0 - i-visionblog

you have been using Google,Facebook Twitter with login system with recaptcha and recover system to maintain and enable privacy for users.Recaptcha enables the user to slow down the too many login attempts on a login page.I have enables access tokens to handle only genuine request from the genuine forms from PHP.since i got too many response on my last post Simple login system and OOPS approach i had made this in github for everyone to notify errors and optimize the script.

login system v1.0 i-visionblog.com














   
 App structure:
  |
  |-------- css
  |               |------- bootstrap.min.css
  |               |------- bootstrap.css
  |               |------- validator
  |                              |---css
  |                              |       | --- bootstrapvalidator.css
  |                              |       | --- bootstrapvalidator.min.css
  |                              |----js
  |                                      | --- bootstrapValidator.js
  |                                      | --- bootstrapValidator.min.js
  |
  |--------- js
  |               | --- bootstrap.js
  |               | --- bootstrap.min.js
  |               | --- jquery.js
  |               | --- jquery.min.js
  |
  |--------- fonts
  |                | - normal font files from bootstrap
  |
  |--------- index.php //checks for session and create forms accordingly
  |
  |--------- home.php //checks for session and shows the data of login user
  |
  |--------- login.php //to check db,session,login access token,attempts,recaptcha
  |
  |--------- logout.php //check for session and access key for session destroy
  |
  |--------- recaptchalib.php //script from google to show recaptcha form and verfiy
  |
  |--------- user.sql //populate your database with this file using import


features:

1)bootstrap validation with framework

2)complete login/logout with fixed sessions

3)pdo queries from db (to avoid sql injection/hacks  )

4)functions to check sessions

5)hope this will work like facebook logout enabled with session and access tokens

6)recaptcha from google to prevent more than 4 login attempts

7)no cross site post attempts(hope :p )

p.s report for bugs!! or open issues on github repo
i will be giving constant updates & social media syncing with access tokens settings for sharing,commenting and other stories on facebook,twitter.share is care

Sunday, May 04, 2014

Setting up virtual host in local server in XAMPP for simultaneous projects

virtual hosting is method of hosting on a single server with different domain name [your website address].It is also popularly known for shared hostings in web hosting industry.Mean while they handle too many techniques to handle request and on single server or set of connected ones,sharing mean here memory storage,processor cycles and many factors here are shared by many users those who host websites.i don't like shared web hosting but it is cheap and free to use for demos/test sites on original servers.i always recommend you for separate cloud/dedicated server or paid hosting server can be reliable for apps and business based websites which makes money! ;)


so i would like to explain setting virtual host on XAMPP locally on windows platform.

1) you have installed XAMPP server on your machine. or just download from official site and run the msi file.
2) first let us go through httpd-vhost.conf file entries

    go to C:\xampp\apache\conf\extra

3) we need to add some entries in httpd-vhost.conf file .better open it notepad or your favorite editor

add the follow codings at bottom of your file.(back your file and work)

NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>

and in the same file add code to customize your virtual host

<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/router/*within this you can point valid directory */
ServerName test.dev
ServerAlias www.test.dev
<Directory "c:/xampp/htdocs/router"> /* within this you can point valid directory */
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

please remove comments from above coding.
save it and go to host file in windows C:/Windows/System32/drivers/etc/hosts
now open the notepad with Administrative rights to change the host file.an add the entry in it,add as last file entry.
127.0.0.1             www.test.dev

and save the file!!
4) restart your web server httpd service in your laptop/pc. you must get like this below here.
check out my url and it is my index.php

5) thats fine now you can access it from new url with your local websever given in host files.

though it is common tutorial here.it is valuable because when we work on different project this come handy and i was very sad to use same directory when i didnt approach this technique.share is care.report bugs as comments.dont play with host files better work with back up!.