Wednesday, 27 July 2016

Email Protocols - POP3, SMTP and IMAP

What is POP3 and which are the default POP3 ports

Post Office Protocol version 3 (POP3) is a standard mail protocol used to receive emails from a remote server to a local email client. POP3 allows you to download email messages on your local computer and read them even when you are offline. Note, that when you use POP3 to connect to your email account, messages are downloaded locally and removed from the servers. This means that if you access your account from multiple locations, that may not be the best option for you. On the other hand, if you use POP3, your messages are stored on your local computer, which reduces the space your email account uses on your web server.
By default, the POP3 protocol works on two ports:
  • Port 110 - this is the default POP3 non-encrypted port
  • Port 995 - this is the port you need to use if you want to connect using POP3 securely

What is IMAP and which are the default IMAP ports

The Internet Message Access Protocol (IMAP) is a mail protocol used for accessing email on a remote web server from a local client. IMAP and POP3 are the two most commonly used Internet mail protocols for retrieving emails. Both protocols are supported by all modern email clients and web servers.
While the POP3 protocol assumes that your email is being accessed only from one application, IMAP allows simultaneous access by multiple clients. This is why IMAP is more suitable for you if you're going to access your email from different locations or if your messages are managed by multiple users.
By default, the IMAP protocol works on two ports:
  • Port 143 - this is the default IMAP non-encrypted port
  • Port 993 - this is the port you need to use if you want to connect using IMAP securely

What is SMTP and which are the default SMTP ports

Simple Mail Transfer Protocol (SMTP) is the standard protocol for sending emails across the Internet.
By default, the SMTP protocol works on three ports:

  • Port 25 - this is the default SMTP non-encrypted port
  • Port 2525 - this port is opened on all SiteGround servers in case port 25 is filtered (by your ISP for example) and you want to send non-encrypted emails with SMTP
  • Port 465 - this is the port used, if you want to send messages using SMTP securely

Source From : 

https://www.siteground.com/tutorials/email/pop3-imap-smtp-ports.htm

Monday, 11 July 2016

The Value of Web APIs

The terms "Web API" and ""API-first development" have been gaining a lot of traction in recent months. Yet, the term API - or Application Programming Interface - is quite vague and may apply to a variety of application development components. At its most general, it's a set of function/routines, protocols, and tools for building software applications. With regards to its role in Web development, the primary focus is on a piece of code that allows two software programs to communicate with each other. More specifically, the API defines the correct way for a developer's code to requests services from a vendor's service provider component. The vendor describes the required syntax in their public documentation and may even provide tools that generate the code for you. In today's article, we'll explore some of the ramifications and benefits that API-driven development offers the provider, user, and of course, you, the developer.

Examples of Popular APIs

With over 15,000 APIs available, ProgrammableWeb is the place to find an API for a multitude of tasks. Some of the most requested APIs to be found there are offered by big players like Google Maps, Flickr, Twitter, Amazon, and Youtube. Speaking of the latter, I described a couple of Youtube APIs in my There's More than One Way to Play Embedded YouTube Videos! article. Youtube provides a couple of different APIs: an HTML markup iFrame API for basic embedding and the IFrame Player API, which uses JavaScript to provide more granular control over video playback.
Other APIs may utilize both HTML, such as elements with a given attribute or handlebars ({}) and JavaScript. One such API is the Geobytes Ajax Autocomplete Cities List API. It employs JSONP to fetch a list of matching cities based on the first typed letters. Matches are then displayed beneath the textbox. Here are the client-side scripts and HTML that invoke the API:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//in the head:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
 jQuery(function ()
 {
  jQuery("#f_elem_city").autocomplete({
  source: function (request, response) {
   jQuery.getJSON(
         function (data) {
          response(data);
         }
   );
  },
  minLength: 3,
  select: function (event, ui) {
    var selectedObj = ui.item;
    jQuery("#f_elem_city").val(selectedObj.value);
    getcitydetails(selectedObj.value);
    return false;
  }
  });
  jQuery("#f_elem_city").autocomplete("option", "delay", 100);
 });
</script>
 
//somewhere in the body:
<input class="ff_elem ui-autocomplete-input" type="text" name="ff_nm_from[]" value="" id="f_elem_city" autocomplete="off">
auto-complete.jpg

Benefits of Web APIs

Much like Object-oriented programming (OOP) did a few decades ago, APIs encourage modularity, separation of concerns, and the hiding of internal complexities. OOP has shown us that modular code is easier to test, maintain and update. It's the ultimate in black box programming. All you need to concern yourself with is the API for using a particular library. Once you've got that down, it should just work! Moreover, as long as the API remains intact, individual components can be swapped in and out without any ill effects.
The target audience of Web APIs are usually developers or web-savvy Do-it-yourselfers, whomever is incorporating a service into a web page. Having said that, end users and the API providers also reap the many rewards of an API. Here's how each of these groups benefit in their own way:
  • Web Developers: Web APIs save developers from having to code advanced functionality and features whose subject matter they may have little knowledge about, for instance geocoding, charting, weather forecasting, probability analysis, etc... APIs tend to offer the opportunity for greater customization and flexibility than standard widget components. APIs also benefit developers by:
    • enriching functionality: features which are not available on a device or provided by an operating system can be invoked via Web APIs
    • combing multiple services: completely new operations can be designed by mixing and matching several APIs
    • integrating more quickly and easily: API technologies make registration and integration much easier for developers, compared to more outdated approaches (like downloading widgets and kits)
  • End Users: Incorporating one or more good Web APIs into one's website can greatly increase its usefulness, enhance interactivity, and just make it more interesting in general.
  • API Providers: Adoption by the web development community can supply the API provider with invaluable advertising by:
    • building brand loyalty
    • spreading the word about the company's products and services
    • increasing website traffic
    • providing useful tools to consumers
    • conveying company ideas and messaging

    Not to mention, the API itself can become a money maker if the provider charges for the API or for an advanced version of it.

Conclusion

Web APIs have been catching on so well that there is an emerging trend in web development called "API-first" approach, in which the underlying API(s) is/are selected or built before UI components. This strategy makes perfect sense when you consider that both websites and mobile apps will need to interact with the same processes and data. This is not to say that this approach is always the superior one, but if you do decide to integrate a third party API, make sure that it works properly, is easy to integrate, and fits the user's needs. Once you've become adept at working with APIs, you may even consider taking advantage of the booming API market and get into developing APIs yourself.

Source Code :

http://www.htmlgoodies.com/beyond/the-value-of-web-apis.html?utm_medium=email&utm_campaign=HTML_NL_WDU_20160711_STR1L1&dni=341180553&rni=165800258