Thursday, 29 June 2017

Today’s Web Application Architectures

Server-side rendered

In server-side rendered applications, the vast majority of the application’s rationale dwells on the server, and stays there. The client fundamentally enters the URL, the request gets send to the server, which then creates the HTML containing the information and sends that back to the program which essentially renders it out. At the point when the client connects with the page, that demand gets again sent to the server, which thus creates another HTML page and serves it back to the program.

This is how the web has been designed, a perfectly valid model and what many pages still use today.

Client-side rendered

Advanced pages frequently require to work more like applications do on the desktop. Individuals interest for a greatly improved client encounter, more intelligence, quick moves amongst “pages” and even disconnected capacities. That is the place the alleged SPAs (Single Page Applications) become possibly the most important factor.

At the point when the client enters the URL, the web server reacts with a HTML page, additionally with an arrangement of assets (JavaScript documents and pictures) that make up our customer side application. The program gets that, heaps the JavaScript application and “boots it”. Presently it’s the occupation of that application to powerfully produce the UI (HTML) in view of the information, right from inside the program. After that happens, each new client activity doesn’t reload the whole site once more, but instead the information for that particular client association is send to the server (more often than not by utilizing the JSON organize) and the server thus reacts with the simply the measure of information asked for by the JavaScript customer, again utilizing JSON (regularly). The JavaScript application gets the information, parses it and progressively produces HTML code which is appeared to the client.


As should be obvious, the measure of information that is being traded is exceptionally advanced. In any case, a major drawback of such kind of uses is that the startup time is normally any longer. You may as of now have figured why: well, in light of the fact that the program doesn’t get the HTML code to appear, but instead a bundle of JavaScript documents that should be deciphered, and executed, and which thus then creates the last HTML to be appeared to the client.

Wednesday, 28 June 2017

Sales People are Oftentimes Good Problem Solvers


Having a skill in problem solving can help you in performing well in your career. You provide solutions to a client desire in external or internal issues. A support to someone needs answers.
Problem solving is a skills that sales people should to develop their career. Sales people provides
Solutions to their clients concerns influence what is the best solution to meet in times of chaos. The best Sales person has an ability to solve customer problems confident that they can answers and give a good solutions effectively delivers the answers quickly.
Basic steps in solving a problem:
  • Define the problem – knowing the issues will deliver a good outcome. Be sure you are not dealing with the symptoms but the real cause of it.
  • Generates alternative – in generating alternatives you should exercise a good decision making whether to go/ or no go.
  • Evaluating/ Selecting Alternatives – in developing or selecting alternatives, we have to consider to find a new perspective. If there’s a need to asked opinion of others why not no matter how silly the answer is. Be open to any possibilities. Always consider clients suggestions.
  • Implementing solutions – why solutions sometimes becomes ineffective even you are already developing answers to clients issues. It is because sometimes the provider neglect to consider the following:
    • What will happened after
    • Who and what will be affected later
    • What resources are required
    • Timescales
    • Deliverables
    • Risks
    • Contingencies

            As far back as I can remember, I have enjoyed solving problems and that has certainly been of great assistance during my sales career. You see, creativity is problem solving. That’s the essence of successful selling. The foremost function of the mind is problem solving; we solve problems with our imagination, and imagination is a function of our creative ability. A creative salesperson is a problem-solver.



Tuesday, 27 June 2017

Telerain, Horizon Gateway Signs Direct Connectivity Agreement to Benefit Philippine Call Centers















Telerain Inc and Horizon Gateway have established direct connect in Telerain Inc United States Data center to provide their customers a better Voice services.

“Connecting Horizon with the same platform that hosts software application and voice provides more reliable and better voice to our Philippines-based customers that are connected to Horizon’s internet” commented Rajeev Agarwal, CEO of Telerain, Inc.  Establishing direct connectivity with Internet service providers in Philippines gives us edge to achieve better Qos, lowest network latency, low jitters, and best voice quality.

Varun Bansal, VP Sales for Horizon Gateway said, “With an effective partnership in place, Horizon customers will gain direct access to services hosted by Telerain data centers and vice-versa. We are confident that this agreement will redound to a better experience on VoIP services benefiting customers of both parties and the country as a whole”.

Horizon Gateway provides wide array of services in Philippines from high speed internet services, Domestic/International Private Leased Line and state of the art data centers in Tokyo, Japan and the Philippines to meet the ever-increasing complexity of the demands of its customers.

Tuesday, 13 June 2017

A Web Developer’s Journey With Angular2


In our previous post we already have an idea about its cool features and benefits. Like how it organizes our application into one single page. Knowing where this framework direction will go. That I fell in love with this framework.
I heard of it before and have a dream that I may become an Angular developer. I invested time of learning it not because it is trending. It is for a reason to never stop learning new things.
Until an exciting opportunity came and my Angular2 journey began.  I encountered terms like directives, provider and injection.  Mostly what I am coding along with the video tutorial and from Angular.io’s ‘Tour of Heroes’.
Learning Angular2 is like a spring and fall. Spring, when you overcome the challenge and a season of fall when you get stuck somewhere.  The spring season that turned my journey wonderful and the feeling it gives that you reached the goal.  But this will not ignite my excitement.  What is really the exciting part of this Angular2 Journey when you did not sweat at all?
It is a season of fall, where you will feel frustrated because you cannot find a solution.  I keep searching, asking myself or others, and thinking but it seemed that it didn’t.  Minor error of not including a component to the module, or missing closing tag or single quote to other errors that at first I am not aware of or not familiar on how to debug it.
I am taking this as my weaknesses though this will not stop me from not believing that it has a solution in some ways.  Three quotes from Martin Luther King’s surely inspire me to press on moving forward when all I can see is black shadow over towering me. One is 
‘Faith is taking the first step even when you can’t see the whole staircase,’
Two,
We must accept finite disappointment, but never lose infinite hope,’
And in my desperate trial
If you can’t fly then run, if you can’t run then walk, if you can’t walk then crawl, but whatever you do you have to keep moving forward’.
Learning from mistake and develop strategies or change the course of programmatically doing it and move on.
My Angular2 journey is still going and if this didn’t inspire you, maybe on my next post you can have a gist of what you are looking for, putting it into real world application.
Happy coding!


Monday, 12 June 2017

Tools to Optimize and Compress your Web Images

Before you upload your next web image or product picture — a logo, or banner image to your website, think about the quality and file size of the image. You do not want to make the mistake of uploading a generous file size.

Not optimizing web images properly results in extremely slow loading time. When you intend to publish your images online, you have to compromise the quality. In order to do so, a good balance between image quality and image file size will be needed when you save web images.

Here are 3 tools to optimize your images.

Tiny PNG
Tiny PNG is my go-to image optimization tool of choice. TinyPNG uses smart lossy compression techniques to reduce the file size of your PNG files. By selectively decreasing the number of colors in the image, you can bulk upload images with drag and drop (up to 20 at a time, 5 MB max each).
Results: 660 KB to 236 KB (minus 64%)


Compressor.io
Compressor.io is another one of my favorite image size optimization tools for one very good reason: It allows you to choose between lossy (picture quality reduction) and lossless (same picture quality) compression. Lossless compression, however, is limited to JPG and PNG images, and the file savings are also typically very small.
Still, the option is available should you want it, and it’s one that none of the other tools offer, save one. So if you often have to use both lossy and lossless compression then Compressor.io is probably the way to go.
It doesn’t allow you to bulk upload images, though, and the single file sizes are limited to 10 MB.
Results (lossy): 660 KB to 370 KB (minus 44%)

JPEG Optimizer
JPEG Optimizer does really well at decreasing file size, but unfortunately the compressed image’s quality is noticeably lower than the original. Furthermore, the interface only allows you to upload and compress one image at a time, which makes it unfeasible for bulk image compression.
Result: 644 KB to 16.7 KB (minus 97.4%)


Friday, 2 June 2017

How to Enable MongoDB Extension with XAMPP


Enabling MongoDB extension (library) for PHP is quite simple, and ready within few steps listed below.
Assuming, XAMPP running on your PC already, create a PHP page: info.php
<?php
// this command will check and tell if mongodb extension is already installed or not.
echo “mongo extension status :: “ . extension_loaded("mongo") ?"loaded\n" :"not loaded\n";
// this will print whole PHP install details (like version, architecture VC version etc)
phpinfo();
?>
Execute this info.php page on browser and search “mongo extension status” and see if value is “loaded” or “not loaded”.
If loaded, nothing else to follow, just make a test connection with Mongo server.
If not loaded, then follow these steps to install it.
  1. Note down the values as highlighted below. 
System:-windows NT KAPIL-BUDHIRAJA 6.2 build 9200(Window 8 Professional Edition)i586
Build Date: Jun 22 201616:05:20
Compiler:-MSVC11 (Visual C++2012)
Architecture: x86

  1. Open this site, https://s3.amazonaws.com/drivers.mongodb.org/php/index.html, and download the php_mongo_?.?.?.zip according to your php version.

In my case, I downloaded php_mongo-1.4.5.zip as my php version is 5.5.37
php< 5.5 è php_mongo-1.3.5.zip
php>= 5.5 and php< 6.0 è php_mongo-1.4.5.zip
php>= 6.0 è php_mongo-1.6.8.zip

  1. Download the php_mongo-?.?.?.zip.
  2. Unzip it.
  3. You will see many files after extraction of zip. Here we need to pick a file based on PHP version + compiler version + architecture version, ex:
php_mongo-?.?.? – <PHP version> – <Compiler version> – <Architecture version> .dll
for my pc I picked this file :php_mongo-1.4.5-5.5-vc11-x86_64.dll

6. Copy this file and paste inside folder “C:\xampp\php\ext”.
7. After paste, rename the file as “php_mongo.dll”.
8. Open your php.ini file and ask php to load this module during initialization “extension=php_mongo.dll”
9. Restart Apache service.

10. Open your “info.php” page again on Browser and search “Mongo” as well as “mongo extension status”. You will see the module loaded already.

Thursday, 1 June 2017

Querying MongoDB from Kamailio 4.4.4 on Ubuntu Server

In this blog, we will discuss the procedures in querying MongoDB collection and parse the JSON document returned, to use it laterthroughout Kamailio routes.
We make useof following Kamailio modules:
ndb_mongodb module for querying MongoDB
jansson moduleto parse the JSON document data
We have already installed the mongo-c-driver thatis a dependency for this module. If you have not installed, refer to ourprevious blog.
Load ndb_mongodb module and configure in your kamailioconfiguration
# under modules section in yourkamailio.cfg
loadmodule"ndb_mongodb.so"  #
Configure the mongodb server path inmodule parameters modparam("ndb_mongodb", "server", "name=apayaa;uri=mongodb://admin:password@localhost/database")
There are many functions provided by the ndb_mongodb module to queryMongoDB.
  •          mongodb_cmd
  •          mongodb_cmd_simple
  •         mongodb_find
  •          mongodb_find_one
  •         mongodb_next
  •          mongodb_free

You can refer to Documentation above for details on functions providedby the ndb_mongodb module.
Example on using mongodb_find_one function:
mongodb_find_one: This will query the database and return firstmatching response.
if(mongodb_find_one("server","database", "employee", "{ \"username\" :\"1001\" }", "response")) {
xlog("L_INFO","Employee Data from mongodb is \" $mongodb(response=>value)\" \n");
$var(jsondata) =$mongodb(response=>value);
}
 You will have the response JSON Data available in this container $mongodb(response=>value) and we assign to $var(jsondata) variable.
As we haveJSON data available, now we will parse the response document to get the values,using JANSSON module.
JANSSONmodule configuration
Install the Jansson library dependency
cd /usr/src/
# Download using GIT git clonehttps://github.com/akheron/jansson.git
# Compile JANSSON
cd /usr/src/jansson autoreconf -i
./configure && make &&make install
Load Janssonmodule and configure in your Kamailio configuration.
# under modules section in yourkamailio.cfg
loadmodule “jansson.so”
There are no module parameters available.There are many functions provided by the Jansson module to parse JSON documents.
  •          jansson_get
  •         jansson_set
  •          jansson_append
  •          jansson_array_size
  •          jansson_get_field

You can refer to Documentation above for details on functions providedby the Jansson module.
Example on using jansson_get function:
jansson_get: Fetch the value at the provided ‘path’ fromthe json object and store it in result variable. This also supports dotdelimited notation to parse the json tree object.
eg. employee.contact.phone[0]
jansson_get("employee.contact.phone[0]",$var(jsondata), "$var(phonenumber)");
xlog("L_INFO","Employee Contact Phone number is $var(phonenumber)");
Now we have employee’s contact phone number in a variable, $var(phonenumber).We can use this anywhere in our script. Similarly we can fetch any data fromour JSON response document from mongodb.
The ndb_mongodb and Jansson modules are helpful when you need to fetch data in real time from mongodb and use it in your Kamailio routes.

The data fetching and parsing will be pretty fast, when using in-built modules rather than using external scripts.