Wednesday, 28 December 2016

MVC-Model View Contrioller


MVC(Model-View-Controller) is a software architecture/design pattern, which is used in software engineering, whose fundamental principle is based on idea that the logic of an application should be separated from its presentation. MVC is a better way of separating the logic of your application from the display.

MVC was originally designed for personal computing, it has been adapted and is widely used by web developers due to its emphasis on separation of concerns, and thus indirectly, reusable code. The pattern encourages the development of modular systems, allowing developers to quickly update, add, or even remove functionality.
First we crate the model:
class Modelex
    public $str;
    public fun__constex()
        $this->str = "We got mvc with php!!";

Npw we will create the view for model:
class Viewex
    private $mod;
    private $contr;
    public func__constex($contr,$mod)
        $this->contr = $contr;
        $this->mod = $mod;
    public func_optex()
        return "<p>" . $this->mod->string . "</p>";

Now we will create a controller for view and model:
class Contrex
    private $mod;
    public fun__const($mod)
        $this->mod = $mod;

We have our project started with some very basic classes for each part of the pattern. Now we need to set up the relationships between them:
$model = new Modex();
$controller = new Contrex($mod);
$view = new Viewex($contr, $mod);
echo $view->opt();

As you can see in the example above, we don’t have any Controller-specific functionality because we don’t have any user interactions defined with our application. The View holds all of the functionality as the example is purely for display purposes.
Let’s now expand the example to show how we would add functionality to the controller, thereby adding interactivity to the application:
class Modelex1
    public $string;
    public fun__construct1()
        $this->string = “MVC + PHP = Awesome, click here!”;

class Viewex
    private $model;
    private $controller;
    public fun__construct1($contr,$mod)
        $this->controller = $contr;
        $this->model = $mod;
    public function output()
        return '<p><a href="mvc.php?action=clicked"' . $this->model->string . "</a></p>";

class Controllerex
    private $mod;
    public fun__construct1($mod)
        $this->model = $mod;
    public function clicked()
        $this->model->string = “Updated Data, thanks to MVC and PHP!”

We’ve enhanced the application with some basic functionality. Setting up the relationship between our components now looks like this:

$model = new Modelex();
$controller = new Controllerex($mod);
$view = new Viewex($contr, $mod);
if (isset($_GET['action']) && !empty($_GET['action']))
echo $view->output();

Monday, 26 December 2016

White screen of death


We all developers love CMS platforms. It gives a platform which is configurable and well designed. We manually have to reuse the elements and blocks. Loads of extensions and plugins are available and they are easy to configure. But can you imagine your site is showing all white blank pages.
White Screen of Death is one of the worst thing you can face in web development. This error is can be caused by many possible reasons and it is very hard to debug what is cause of this if you face this.
Different causes of WSOD can be,
1.      Whitespace at the End of a PHP File
2.      PHP4 Syntax Errors and Incompatibility
3.      Multiple versions of PHP
4.      Invisible Errors for Developers
5.      Implement Hook Twice
6.      Output Buffering for modules
7.      PHP Memory Limits

Some unwanted changes in core of module, Code can be main cause of this. If you don’t have well document changes that it is better to check the log file. If undo changes does not work for you try,
1.      Ensure you have proper PHP Configuration, no PHP syntax errors or memory limit
2.    Renaming directory name of bad module can temporary ignore that module
3.    Clearing the Cache Table
4.    Restarting Web server
5.    Increase default PHP timeout

For Drupal, Any changes in Drupal’s default module or code must be avoided.
You can read more about this issue on
There are multiple solutions for these kind of situations on web choose wisely.

Saturday, 24 December 2016

HTTP-Hyper Text Tansfer Protocol


The Hypertext Transfer Protocol (HTTP) is stateless protocol. It is  an application protocol that use  for distributed, collaborative, hypermedia information systems.
HTTP is used in the World Wide Web, and it is the foundation of data communication
Hypertext is the structured text. It uses logical links (hyperlinks) between nodes that contains text.
HTTP is the protocol that use logical links to exchange or transfer hypertext.

Development of HTTP was done by Tim Berners-Lee at CERN in 1989. Standards development of HTTP was done by the W3C and the IETF. The first version of HTTP was HTTP/1.1.
HTTP protocol working as a request - response protocol in the client - server computing model. A web browser may be working as client  and an application running on a computer hosting a web site may be working as the server. The client submits an HTTP request message through web browser to the server. The server responds to clients, which provides resources such as HTML files, documents and other content, or performs other functions on behalf of the client, send  a response message to the client’s web browser. The response contains completion status information about the request and also contains requested content in its message body.
HTTP Methods
The GET method requests a server to representation of the specified resource in client side. Requests using GET by web browser should only retrieve data and should have no other effect.

The Post Method is used for requesting to the server accepts the entity enclosed in the request as a new subordinate of the web resource identified by the URI. The data Posted might be, for example, an annotation for existing resources; a message for a bulletin board, newsgroup, mailing list, or comment thread; a block of data that is the result of submitting a web form to a data-handling process; or an item to add to a database.
The HEAD method using for asks for a response identical to that of a GET request, but it has no response body. This is useful for retrieve the meta-information written in response headers, without having to transport the entire content.

The OPTIONS method is using for returns the HTTP methods that the server supports for the specified URL. That be used to check the functionality of a web server by request made  '*' instead of a specific resource.

The PUT method is used for requests that the enclosed entity be stored under the supplied URI. It is modified, If the URI refers to an already existing resource. If the URI does not point to an existing resource, then the server can create the resource with that URI

The DELETE method used for delete a specified resource.

The TRACE method using for echoes the received request so that a client can see the status that what changes or additions have been made by intermediate servers.

The CONNECT method is using to converts the request connection to a transparent TCP/IP tunnel, usually used to facilitated SSL encrypted communications (HTTPS) through an unencrypted HTTP proxy.
The PATCH method is using to applies partial modifications to a resource

Thursday, 22 December 2016

Importance of LinkedIn to the future of the Internet of things


I hope that everybody knows that what is LinkedIn and Internet of Things basically. To know more about Internet of Things Please do Click: Hereby considering this we are moving further towards the actual topic.
As google, facebook  are the technological giant in today’s life but LinkedIn is not often thought by the people. But when it’s comes to any business and the Jobs then LinkedIn is the pioneer of it. Hence people rushes towards it.

Some networking professionals has made some significant analysis to the way industries analyse the whatever data they are generating. The biggest Open Source technology Called “KAFKA” is basically developed to pass the messages to n from the LinkedIn’s sprawling web Application which is now becoming a basic component of the Internet of Things.
At the high preference KAFKA is used to send information from one system to the other system which would be real time information. This thing is like sending data into database and at the other end it would be fetched from that other system, which would be called as standard database processing .And the LinkedIn’s system powers this feature. It’s a simple function which helps to fetch huge volumes of fast moving data.

Wednesday, 21 December 2016

Spring Framework


Spring is developed by Rod B. Johnson  and he is an Australian computer specialist so spring was created the Spring Framework and co-founded SpringSource company  . Spring framework does the easy development of Java Enterprise Edition (Java EE) application
It is easy to use and understand and also helpful for beginners and experienced persons for developing JavaEE application.

Spring Framework
Spring is also called as lightweight framework of java and also spring is knows as a framework of frameworks because it provides support or helpful to various frameworks such as JSF, EJB, Tapestry , Hibernate, Struts etc. The framework means in broader sense, defined a structure where we find solution and comfortable technical environment of the various technical problems.
Spring framework contains several modules such as WEB MVC, ORM, DAO, IOC, AOP, Context etc. Let's  start with first module of spring that is IOC and Dependency Injection first.

Inversion Of Control (IOC) and Dependency Injection
We are uses the design patterns to remove dependency from the code. That makes the code easier to maintain and test.
class Student

    Collage collage; 
    Student ()
        student =new Student (); 

In above case, here is dependency between the Student and collage it is also called tight coupling and first we have to create the object of Collage and than only we will work on Student only.  So in Inversion of Control module, we do to remove dependency like below code.
class Student

    Collage  collage; 
    Student (Collage  collage )
        this. collage = collage;

So, Inversion Of Control makes the code loosely coupled because of that one code is not depend on another code. In such case, In new environment no need to modify the code if our logic is moved.
So in Spring framework, Inversion Of Control Module is responsible to inject the dependency. developer provide metadata to the IOC module either by annotation or XML file.

Dependency Injection Advantage -
•makes the code loosely coupled so easy to maintain
•makes the code easy to test

Advantages of Spring Framework
1) Fast Development :Spring Framework support to various frameworks. So makes the easy development of Java Enterprise Edition application.
2) Lightweight :Spring framework is lightweight because of its POJO implementation.
3) Loose Coupling :Because of dependency injection Spring applications are loosely coupled.
4) Easy to test :The Struts or EJB application require server to run the application but Spring framework doesn't require server.
5) Predefined Templates :It (Spring) provides templates for JPA, Hibernate, JDBC etc. technologies. So there is no need to write too much code.

Tuesday, 20 December 2016

C Data Types


Data types are used for declaring different types of variables and functions. This type of variable determines that how much space it taking in storage.
The types in C can be classified as follows −

Types & Description
 .Basic Types: - This is arithmetic type.
It is classified into 2 types –
a.Integer types
b.Floating point Types
2.Enumerated types: - This is also arithmetic types and used to define variables that used to assign certain type of discrete integer values.

3.Void type:- This type of data type indicates that there is no value available for return.
4.Derived types :- Derived types list are
(a) Pointer types,
(b) Array types,
(c) Structure types,
(d) Union types and
(e) Function types.   
Integer Types:
Following Table showing standard integer types and size with their range –     Type                    Size in bytes                      Range
1           Char                            1                      -128   to  127
2           unsigned char              1                           0   to  255
3           signed char                  1                      -128   to  127
4           int                               2                  -32,768   to  32,767
5           unsigned int                 2                           0   to  65,535
6           short                           2                  -32,768   to  32,767
7           unsigned short             2                           0   to  65,535
8           long                            4       -2,147,483,648   to   2,147,483,647
9           unsigned long              4                           0   to  4,294,967,295
Sizeof() operator :
To get the size of a type, sizeof() operator is used.
#include <stdio.h>
#include <limits.h>
int main()
    int a=5;
    printf("size for int is : %d ", sizeof(int));
    return 0;
Output : size for int is : 2
Floating-Point Types
Following Table showing standard floating-point types and size with their range –
S. no    Type              Size in bytes                 Range                   Precision
1           float                     4                 1.2E-38  to  3.4E+38             6
2          double                  8                2.3E-308  to  1.7E+308          15
3         long double           10             3.4E-4932  to  1.1E+4932         19
The header file <float.h> is used to allow to use values and other details of  binary representation of real numbers in programs.
The following example show that the storage space taken by a float type and its range values −
#include <stdio.h>
#include <float.h>
int main()
    float min,max,dig;
    printf("size for float : %d \n", sizeof(float));
    printf("Minimum float positive value: %f\n", min );
    printf("Maximum float positive value: %f\n", max );
    printf("float place value: %d\n", dig );
    return 0;
The void Type
This void type used to specify that there is no value available to return.
Three kinds of situations of void type –
1.Function returns as void: There are various functions, they don’t return any value or return void. A function has no return value, has the return type as void.
Ex. void exit (int a);
2.Function arguments as void: A function that do not accept any parameter. This function accepts a void.
Ex. int rand(void);
3.Pointers to void: This (pointer of type void *) represents the address of an object, but not its type.
EX.  a memory allocation function void *malloc( size_t size );
returns a pointer to void .

Friday, 16 December 2016

Computer Animation


Computer Animation is the art of creating moving images via the use of computers. It is a subfield of computer graphics and animation. Increasingly it is created by means of 3D computer graphics, through 2D computer graphics are still widely used for low bandwidth and faster real time rendering needs. The common applications of computer animations are entertainment (computer games, motion picture and cartoons) advertising, scientific and engineering studies and training and education.

In computer animation to create the illusion of movement, an image is displayed on the computer screen, then quickly replaced by a new image that is similar to the previous image, but slightly shifted. This technique is identical to how the illusion of movement is achieved with television and motion pictures.
The various applications of computer animation are cartoons, advertisement, motion pictures, and some other entertainment or scientific and engineering studies. Animations are applying object motions. Therefore the team computer animation usually refers to any time sequence of visual changes in scene. Generally we see the animation in advertisement. There is a transition of one object shape into another for example transforming a car to a tiger. Computer animation are also be generated by changing the various parameter of camera; Also the computer animations are produced by changing lighting effects or other parameters and procedure of rendering and illuminations. Most of computer animations requires realistic displays. For the simulation the accuracy is more important whereas entertainment and advertising applications are more interested in visual effects.
There are three different kind of devices used to produce moving pictures: CRT screens in which pixels are rapidly changed, conventional movie projector, and LCD displays that are fast enough to serve as TV displays.
A film/movie projector is a device that continuously moves film along a path so that each picture frame of the film is stopped for a fraction of second in front of light source. The light source is a white light beam which provides extremely bright illumination that casts the image on the film through a lens onto a screen. During the change of one picture frame the next picture frame the light is temporarily blocked off. It is necessary to move the picture frames, at least 30 picture/second to visualize smooth animation.

Tuesday, 13 December 2016

RMI:(Remote Method Innovation)


The Remote Method Invocation (RMI) is an application programming interface that provides a functionality to create distributed application in java. The Remote Method Invocation (RMI) allows an object to invoke method running in another Java virtual machine.
The Remote Method Invocation (RMI) provides remote communication / interaction between the applications using two objects stub and skeleton.
stub and skeleton
Remote Method Invocation (RMI) uses stub and skeleton object for communication/interaction with the remote.

A remote object is an object whose method can be invoked from another java virtual machine. Brief details of stub and skeleton objects:
It is a gateway for the client side. All outgoing requests are gone through it. It place at the client side and represents the remote object.  caller invokes method on the stub object, it gone through the following tasks:
1. Connection with remote Virtual Machine,
2. Transmits the veriables to the remote Virtual Machine,
3.  Waits for result
4.  Return value or exception, and
5.  Finally returns value to caller.
it is a gateway for the server side object. All incoming requests are gone through it. receives the incoming request, it gone through the following tasks:
1. Reads parameter for the remote method
2. Invokes the method on the actual remote object
3. Writes and transmits the result to caller.
Requirements for the distributed applications
1. The application need to locate the remote method
2. It need to provide the communication with the remote objects, and
3. The application need to load the class definitions for the objects.
Java RMI
steps to write the RMI program.
Create the remote interface
Implementation for the remote interface
Compile the implementation class and create the stub and skeleton objects
Start the registry service by rmiregistry tool
Start the remote application
Start the client application
Create the remote interface
creating and extend the remote interface, then declare the RemoteException with all methods of remote interface. Here, we are going to creating a remote interface which extends the Remote interface. There is only one method div() and it declares RemoteException.
import java.rmi.*;
public interface Division extends Remote
    public int div(int a, int b)throws RemoteException;
Provide the implementation of the remote interface
Now provide the implementation of the remote interface. For providing the implementation of the Remote interface, we require
• One is extend the UnicastRemoteObject class,
• Second one is use the exportObject() method of the UnicastRemoteObject class
import java.rmi.*;
import java.rmi.server.*;
public class DivisionRemote extends UnicastRemoteObject implements Division
    DivisionRemote()throws RemoteException
    public int div(int a, int b)
        return a+b;

Saturday, 10 December 2016

Local SEO leads to conversions


Now we come up with the sub-verticals of it i.e. LOCAL SEO.
The difference is that it helps with your business's digital conversions from potential and real customers asking for solutions to their problems or answers to their questions.
Understanding the Purpose of Local SEO
It focuses on improving your website's authority for local searches. These are the type of searches that tend to produce walk-in visitors to stores, and the type that promotes your business as a leading authority in your given field.

The primary benefit of local SEO by a professional company is that it allows you to rank higher for certain keywords, which causes your website to receive more traffic.
How does this work?   
Imagine that you were trying to drive customers to your website, but you only want that, the customers who were interested in buying your services instead of performing a certain fix for themselves.
This allows you to bypass optimizing for broad keywords that people searching for information, rather than products. Local SEO focuses on people in a certain physical area, rather than global traffic, to understand how it can drive more conversions for businesses local to a certain place.
The end result is that your website becomes a leading authority for all matters related to your field of business. This is beneficial to plumbers, dentists, grocery stores and any other business that focuses on serving customers in a select area.
So, Local search engine optimization builds your business as an authority, and provides several indirect benefits like more referrals, and allows you to receive more customers.
The trends in SEO shift like a clock. Several years ago, internet companies worked hard to generate traffic. Today, high traffic is not a long-run objective and it doesn’t always bring you high ROI. With a new generation of big data players, the stakes are high in SEO industry. SEO gurus and internet marketers spread themselves out to build a strong online presence and create an effective conversion funnel. Lead generation is the critical point in any conversion funnel, the liaison between traffic generation and customer acquisition.
There are 6 main factors that improve lead generation:

1. User-friendly interface and user experience
2.  Page layout
3.  Call-to-action
4.  Images and icons
5.  Titles and headers
6.  Anchor text
You can easily measure the engagement and the behavior of users on your pages with the help of Google Analytics insights on Audience Behavior, Landing Page's performance etc.

If the bounce rate is high then try to rethink your content marketing strategy.  Try content experiments: promote free useful content offers like eBooks, infographics, and discounts to ask for contact information, registration, and newsletter submission in return. This is what SEO leads built on.

Thursday, 8 December 2016

Internet of Things(IOT)


After Data sharing, Online shopping, and SM Platforms, the next generation of the internet is connecting Electronic devices with internet this is called as the Internet of Things (IOT). The device range is from sensors and IP cameras to vehicles and production machines – IN next most electronic things will be connected through internet.
This will to grow business in future. And provide lots of ease will also be in the work.
How internet of thing works: - Internet of things is a technology concept and  which is an
aggregation of already available technologies.

Similar to the means during which web has modified the means we have a tendency to work & communicate by connecting US (humans) through World Wide net, IoT aims to require this property to next level by connecting numerous devices to the web – facilitating human-machine, machine-machine interactions conjointly.
The visionaries have conjointly realised that this IoT system has business applications in areas of Home Automation, Automotive, Factory/assembly line automation, Retail, Medical/Preventive aid and additional.

1)Sensors & Sensor technology – They will sniff a large kind of info starting from Location,Weather/Environment conditions, Grid parameters, Movement on assembly lines, reaction engine maintenance knowledge to Health necessities of a patient.

2)IoT Gateways – IoT Gateways, because the name justifiedly suggests, square measure the gateways to net for all the things/devices that we would like to move with. Gateways facilitate to bridge the interior network of sensing element nodes with the external net or World Wide net. they are doing this by assembling the information from sensing element nodes &sending it to the web infrastructure.

3)Cloud/server infrastructure & Big Data - The data which is transmitted through gateway is stored & processed securely within the cloud infrastructure by using Big Data analytics engine. This processed data is then used to perform intelligent actions that make all our devices ‘Smart Devices’!

4)End-user Mobile apps – The intuitive mobile apps can facilitate finish users to regulate & monitor their devices remote locations. These apps push the vital data on your hand-held devices & facilitate to send commands to your good Devices!

5) IPv6 – IP addresses is the one of the most important to the whole IoT system. Internet is concerned about the IP only. with IPv4 we get 232 combination of IP Address. But with IPv6 we get 2128 no of combination.

Wednesday, 7 December 2016

Insider Threats and Their Importance


Firms around the globe are now confirming that insider threats are a growing occurrence. While this comes as an amaze to few, the absence of concentrate on this issue is by all accounts shared by more IT experts than anticipated. As big business level change is started, it is normal for firms to assess dangers first from outside sources initially, then from inside. While the significance all together of security sending is debatable, the most risky kind of assault may as of now have entry to your frameworks. Another time of insider dangers incorporates careless or malignant workers, contractual workers and subsidiaries. The more noteworthy the quantity of firms required with the change of a venture's frameworks security, the more noteworthy the danger of insider dangers.

Insider dangers frequently go unnoticed, with as much as 70% of assaults going unchecked. In spite of the fact that this number may appear to be high, the general multifaceted nature of frameworks makes this a developing issue. Without appropriate discovery instruments an association may have lost exclusive information without getting to be distinctly mindful of it. To keep this circumstance, non-specialized organizations contract specialized firms to handle their frameworks security. The cost brought about through the contracting of IT administrations far exceeds that of the cost identified with recuperating a harmed customer relationship. Current market pioneers have a desire of innovative magnificence, which enhances business all in all.

How Insider Threats Emerge
The most widely recognized case of an insider danger is that of a careless representative, conferring an authentic mistake with unintended results. In spite of the fact that your staff may have the most elevated of moral benchmarks, an arrangement of checks (i.e. a security strategy) must be executed to maintain a strategic distance from examples of information misfortune. The high part uncertainty among specialized players inside new companies can likewise represent an issue as these educated on-screen characters tend to get to zones of the foundation without the benefits to do as such. Through the characterizing of parts and execution of security arrangements most carelessness can be kept away from out and out.

The more obvious of insider threats, malicious employees, are the technical employees of an organization which have decided to cause damage to their firm’s resources as a means of retribution. While it is inalienably hard to bring up possibly noxious representatives, concentrating on safeguard measures is an a great deal more successful system as opposed to assessing engineer exercises post-event. The simplest path for an association to do this is to build up the framework's design in a way that restricts an individual's perceivability; hence, diminishing their capacity to do harm.
Numerous organizations depend upon information to work, whether it's a patient's medicinal history or a customer's property evaluation reports, the misfortune or appropriation of this data can be calamitous. The way to keeping up full control of this data lays with the framework overseers responsible for customer information. Ordinary administration level assentions (SLAs) from information driven organizations ought to incorporate how they plan of ensuring customer information. This progression may appear to be inconsequential to numerous organizations; be that as it may, it remains a key part in the thought of planned business accomplices.

Tuesday, 6 December 2016

PHP Framework: Laravel


Need Of  Framework:
1.Reusability : The main reason to use a framework is to improve code reusability. The framework separates UI from backend which improves flexibility of the code (separation of concerns).
2.Stability      :   The PHP framework gives large stability to the code.
3.Security     : PHP is very forgiving language, so it keeps loose end in the code. So a framework assures you to improve from those loose ends.

History: Taylor Otwell, a .net developer in Arkansas, was using CodeIgniter when the first seeds of Laravel were planted. “I couldn’t add all the features I wanted,” he says, “without mangling the internal code of the framework.” He wanted something leaner, simpler, and more flexible and he found the way for it by inventing Laravel framework.
The laravel frame work is based on MVC(Model View Controller) Structure.
1.Model:  Model is based on real world scenario like car model or product of specific category. Models are permanent i.e. they are not going to change. The models are stored in databases. The model acts as a gatekeeper and a data store.
2.View: The View performs normal representation of data. After views work is done data is displayed.  The only purpose of view is to display the processed data.
3.Controller:The intermediate between Model and View is known as Controller. The controller does all the actions between model and view. It takes input and processes model and gives its output through view for display.

Key Features of Laravel:
Laravel 5 is discovered in  November 2014 with additional features compared with other frameworks of PHP.
New Directory Structure:  In new directory structure all classes are fully name structured and well placed without effecting working as of previous versions.
Route caching:You can manage route caching if you are working on big projects increase the speed.
Multiple File Structure:Laravel supports multiple file structure. It uses Flysystem to suite multiple file structures.

  Artisan CLI:
Command Line Interface known as Artisan supports various operations to be done through CLI, which provides user friendly.  The Artisan gives availability to add new custom commands used for application specific recurring tasks.

Comparison of Laravel Vs Codeigniter
             Laravel                                                                                 Codeigniter
a)  Routing is Simple                                                       a) Routing is comparatively difficult
b)  It is developed on PHPs latest versions                      b) Compatible with PHPs previous versions  
    so it does not support PHPs previous versions
c) It offers modular separation.                                       C) It does not offer modular separation.

The framework can be selected as per requirement whether it may be E-commerce site or it may be informative site. 

Command Line Interface known as Artisan supports various operations to be done through CLI, which provides user friendly.  The Artisan gives availability to add new custom commands used for application specific recurring tasks.