Better moves, updated names : a story about recurring software engineering nomenclature

They say – “History repeats itself”

I think most of the things we came across are recurring in themselves. “No matter what I design, the costume industry is going to recur, fashion repeats itself after a time span”. Names we decide for our offsprings, position of platonic plates, planetory positions.. everything recurs in one way or other,  in same, better or in a degraded way. Recursion plays with everything but we, Software Engineers play with recursion.

Pradeep Kumar recursion

In this decade, we came across with new updated recursions of some fundamentally same things enchanted with new names and some updates. Some are :

MOOCs : From the very starting of internet, the focus was to share information and to make it readily available. Information stacked in a sequence so that a novice can master the subject matter, becomes courses. Initially these courses were distributed over the internet then we moved forward to put them in a sequence, made better interfaces/teaching engines and term which got coined was “MOOCs”.

SaaS , PaaS and other ‘X’aaS : Things evolved and softwares evolved most rapidly over internet. Creating a web interface for a simple thing like editing a file over web using browser got names like SaaS. Was it just because we moved from vi to nice beautiful in-place editors? No, We recurred, made things better and easier. Initially companies used to offer hosting space, we made it better, gave all controls to the end user and we updated the name to PaaS. Today there are a whole lot of services. Think of “x” and you will get “x” as a Service.

DevOps : Being agile is a good thing but not the best thing we can have or we can do. So, we added new ingredients to agile and the resultant is a new dish : DevOps, a sweet and refreshing dish 😉

Bitcoins : Currency denominations are a problem and we need a unified currency over the internet. Which is distributed, under no leadership, uncrackable, secure soft storage and easy accessible. Initially this kind of currency may have started with rewards system on browsing or buying something over web, in some other factors may be time or a collection of buyers which resulted in deals portal.

QR Codes : The amount/types of information we wanna carry these days has changed significantly. We just can’t go with the fairly simple bar codes.

Wearables : It’s not about any sci-fi movie. It’s here and it’s on. This time we have a better name for them and boom, many competitors are there already in the market.

NFC :  Most of the time we upgrade by becoming more powerful or giving new dimensions to existing things. But NFC have a different story. It has been resulted from chopping off some powers from RF and others. In this field, we are going both ways. One side we are chopping off few features to create NFC and on other hand we are beaming ultra high frequency laser lights to moon for internet connectivity over there.

Big Data : We are preparing for the days when you are about to leave home for work and your smartphone beeps with a push message “Don’t go outside today, there are 93% chances of cloud burst”. Or may be a smart grocery shop learns your shopping habit and remind you through a message that “Hey, Pradeep Kumar you have not bought Tops tomato sauce, which you used to buy around every 40 days”. So, preparing well for better future, better earth, with recursions, new names.

Cloud : A really sexy name given to upgraded versions of hosting. More powers to you. I know a startup with a tagline “We may not take to you moon or stars but we are sure we will take all of your business into cloud”

Croud-“x” : We did lot of things in past with collective efforts of general public may be in lieu of their interest, some offerings or simply volunteeringly. In democratic setups, many things are done by public in a collective efforts resulting in different outcomes. Crowd-funding and crowd-sourcing are just upgraded versions which are being better protocolized, but this is the way we move forward.

So, let’s Keep Calm and Keep Recurring.

REST Vs SOAP – answer on quora by Pradeep Kumar

Hello Buddies,

These days I am hooked to quora.com. The quality of content it provides is awesome.
Quora marks another important point to be taken care by Internet Marketing firms and professionals that internet is overcrowded by information. The quantity doesn’t matter, quality does. Quality of content is the only thing that drives users engagement and helps to get a larger user base. And when they are engaged, they turn them into active users. Only this that matters for a business.

So, I was answering an question on quora regarding difference between REST(Representational State Transfer) and SOAP(Simple Object Access Protocol). And after 5 days, today I re-read it again and I found awesome (yes, I know I am saying I did awesome :P). I found it worth sharing here :

Backlink : LINK TO ORIGINAL POST BY PRADEEP KUMAR

In layman terms you are asking –

What’s the difference between a building plan-map and building making process.

In software terms you are asking –

What’s the difference between MVC and HTTP.

Now, let’s co-relate them:

Building plan map, MVC and REST are architectural patterns.

Building making process, HTTP and SOAP are set of rules i.e. protocols.

And now the big deals :

Building Plan map is deciding how you will place different things e.g. Bathroom, dining room, doors, bed-room etc. in a particular geographical area.

MVC is deciding how you will separate concerns regarding data, business logic and controls.

REST is deciding how you will use different HTTP verbs to perform one of CRUD operation on your data.

Building making process is following predefined steps like first create foundation then walls and in the end go for roof.

HTTP is following predefined rules like you need to send request on port 80 which will consist of two parts: HTTP headers and HTTP body.

SOAP is following predefined set of rules how and where you can place function to be called and various parameters to be passed in that function in your XML SOAP request.

When to use any and trade-offs:

To understand this, you need to understand differences between JSON and XML.(google it else answer will be too long ;))

SOAP is rigid XML structure. XML is overwhelmed by data-size.
REST can use XML or JSON. JSON is just key – value pairs.

Use SOAP:

1. when you have no other option provided by API exposer.
2. when your end user want to have only SOAP response.
3. Faster development. As tools Axis 2 and cxf exist. 🙂

Use REST(with JSON):

1. To have cleaner software architecture.
2. To save server resources (JSON is smaller to process).
3. To save network resources (JSON size is smaller than XML).
4. To save client side resources (JSON is much faster to parse).

With SOAP you are confined to XML only. With REST you have option to generate XML or JSON.

Drupal meetup on 27/04/2013 (Saturday) : in a nutshell

Today in Delhi, as the temperature was rising, so the Drupalers’ urge to attend the Drupal meet was rising in same proportion. It all started few days back on meetup.com. and held at Srijan’s CP Office. First time we got such a large number of Drupalers in meetup. We discussed a lot of things during the event. There were some guys who couldn’t attend the event due to some reason. So, the community decided to have a summary to share with those guys. So, here we go!

We started around 10:30 AM with “Responsive Layouts” by Sanjay Rohila, (Front-end Developer, Srijan Technologies).
He talked about CSS Media Queries and the things to take care of when developing a web-site targeting all the possible devices/screen sizes. He also discussed issues related with  images and videos when going responsive. It was a very fruitful discussion.

After that Prashant Goel (Developer, Srijan Technologies) discussed the thing everyone is concern about : Drupal’ performance. Yes, there were some fruitful outcomes, which are summarized below:

Tools to use for testing performance:

  • Siege
  • Apache Benchmarking
  • jMeter
  • Yslow
  • Devel

Steps to take care to improve site’s performance:

  • Use necessary modules
  • Use catching
  • Enable aggregation
  • Code in Drupal’s way
  • Optimize views queries
After that we had lunch. huuhh…. yes! Drupalers are also humans and they eat food! 😛
We were taking a nap after taking tea and pizzas, which suddenly breaked with discussion initiated by Nitesh (Developer, Srijan Technologies). He discussed how to start contributing to D.
Most of the peoples don’t take testing seriously as much serious it is. It is the only reason that most of the projects gets delayed and leads to degradation in quality subsequently lower customer satisfaction. Guys from teamie took initiative to mark out it’s importance. We discussed SimpleTest‘ importance. During the discussion I came to know that there is a plan to make .test files mandatory i D8. 🙂 I wish other platforms should learn something from Drupal now.
Doing things fast and right is all what we need. I was full of enthusiasm to discuss how to accomplish things with Drupal @speed of thought. Getting things done fast and right. Yes, we were talking about Drupal distributions, a magical answer from D community to get things done fast and right at place. We continued to discuss about various cons and pros of these distributions. Challenges faced when using them and other issues related.
Then time was to setup a frequency and agenda for such  meetups. And in the last, with community’s decision was that it will take place on each month’s last Saturday.
There were some other pointers I found useful during the meetup that Drupalers shared with each other:
The meetup execution was successful, enjoyed much, learned more….
Drupalers stay connected! join the group now to stay on the top of latest happenings. See you in next meetup.
And yes! please add in comments anything I missed out 🙂
You can get in touch with me on twitter as well for further updates…. Pradeep Kumar (@prady00)

Oauth 2.0 Protocol, driving authentication across the web

OAuth 2.0 in nutshell – “Solving complexity with simplicity”, its done.
You still here? Okay, let’s discuss what does it mean in a broader sense.
It is a well known proverb- “Necessity is mother of invention”. Same follows for Oauth. Let’s see how…

 

Our Necessity
Someone made a web site “X” that gone viral and now the site owner wants to make API to expose data of site to be used by developers to integrate various functionality in their 3rd party app “Y” (be it mobile or desktop or something else you can think of…) or it could be simple like making an app based on data accessed from the site.
Now there is a registered user of site “X” and wants to access app “Y”.
In the olden golden days this registered user have to provide both username and password to app “Y”, which cause two very important issues:

1. It causes a security risk to registered user as he have to provide username and password to third party application.
2. If there are n numbers of applications alike app “Y” and someday registered user changed his password, he have to change his password across all the n apps, which causes a serious maintenance issue.


Invention
With time, many big players rolled out their own proprietary ways to provide access and to maintain authenticity of third party apps. But the differences always create pains (like IE have proved it when it comes to web development).
Then, Oauth came into picture, it’s an open-standards protocol which helps to solve above stated problems. Oauth uses tokens in place of username and password. Let’s see how it works…OAuth in action
The below ASCII Art says it all:

#     +--------+                               +---------------+
#     |        |--(A)- Authorization Request ->|   Resource    |
#     |        |                               |     Owner     |
#     |        |<-(B)-- Authorization Grant ---|               |
#     |        |                               +---------------+
#     |        |                               +---------------+
#     |        |--(C)-- Authorization Grant -->| Authorization |
#     | Client |                               |     Server    |
#     |        |<-(D)----- Access Token -------|               |
#     |        |                               +---------------+
#     |        |                               +---------------+
#     |        |--(E)----- Access Token ------>|    Resource   |
#     |        |                               |     Server    |
#     |        |<-(F)--- Protected Resource ---|               |
#     +--------+                               +---------------+
#     
# Read the full spec at http://tools.ietf.org/html/rfc6749


What’s next
Most of the players like Google, Tumblr, Twitter and Facebook are using Oauth. The best place to try hands on is Google Oauth Playground, Go ahead and make the web a better place !!


Keep Rocking !!

PhoneGap : The Pre Big Picture !!

Bridging the gaps have became a rage of era. Be it be bridging of SMS by IM apps like hike or of voice calls by viber. But it goes really rocking when bridging is to bridge the technologies on web and mobile apps.

 There are many mobile cross-frameworks out, but as an open-source enthusiasts we call PhoneGap on the top, not just because of easy to use APIs but its capabilities to catch-up with existing web technologies like jQuery, jQueryMobile and Bootstrap(but i really don’t prefer it when it comes to small screens) are really rocking.
But the best part personally I like (probably all of us) is its extensions capability via various plugins. Plugins comes handy when we want to give our app a device specific function, like if we have got a customized hardware having a special button to start an app directly (remember devices to launch music players or facebook on one touch?). Here plugins comes handy. Search for a specific plugin on GIThub. If you don’t find one there, story doesn’t end here, head on to develop your own customized plugin and keep the open-source spirit of contributing alive.

Better than ever, recently PhoneGap launced its online build  tool , the best part is that it already supports git to control code, no hands up same!.
Developing with Phonegap is really gone super-excited when combined with many existing APIs and tools and technologies. My favorites flows down, with short description  and use case of  each:
1. HTML5SQL : Comes handy when we want to use SQL on client side.
2. Launchair : Lite-weight js to  implement client-side JSON based storage, comes handy for nonSQLees.
3. Ripple : Rocking Cross Platform emulator.
4. jQuery : De’facto cross-js APIs!
5. jQueryMobile : For front-end UIs
As a phone gap developer, the picture against us is really big, do it in HTML5, CSS3, JS, Native Code and much more…. hope this get you excited about PhoneGap. Stay tuned, more to come.
The real bonus: Here goes my aggregated feeds for top-notch phonegapers blog posts, its all yours 🙂
I do tweet via @prady00 and yes a lot! Keep Connected  🙂

First ever resolutions

If there were an official Oscar for Being lazy, I would have won it at least with a probability of 1. As usual in each and every case, I start somewhat later. Being influenced by some peoples around me I have decided following things to get done by the end of this year. First I thought of making them just private but later decided to write down so that I have you to remind me about same. Here we go!

1. To learn at least one new language, going to prefer French.
2. Turn from an occational blogger to blogger.( taking this resolution second time, hoping I complete it this time).
3. To learn a musical instrument, not the Guitar, but Violen that my mom has always asked to me. (On lowest priority).
4. To improve my soft skills, not being dummy again.
5. “Being good to everyone”, 😉
6. To work/start a new open source project.
7. To write a developer centric reusable code.
8. To sleep less and doing some physical exercise.
9. To do less fb.
10. To complete these 10 points.

There is no Android Vs Mozilla OS

From the day mozilla announced about its B2G project afterwards renamed as Firefox OS. Experts are comparing it with Android. “Android Vs Firefox OS” has become a new rage on search engines. But the truth is that they are not competing with anyone. Mozilla have a very different philosophy of doing work.
From the very beginning it relied on open-source, the most respected thing on the web!!

If there were no open-source philosophy our pockets would have ruined for OS to Microsoft, developers would be in a great pain due to ActiveX of IE, no linux, no firefox, no the bullish HTML 5 and in turn no android (coz. based on linux kernal).

Open source had always rocked!!
IE itself started supporting open standards in their latest release “the beautiful web”. Our web run on open source, yes it runs on linux servers. Our OS runs on open source. Our browsers run on open source. Most of the useful utilities we have are open-source because we, our-self don’t want to pay anything. So, no big day if one day we have smart devices running on open-source in our pockets.

Few experts have commented that HTML 5 apps, on which Mozilla OS is relying have no big future, they say that native API have better access to hardware but mozilla is working on the same.
Microsoft have already bend down to respect open-source by introducing Windows 8 Metro UI and apps, all the stuff based on HTML 5 open standards.
Google too is working on two mobile OS namely Android(native) and Chrome OS(open standards), but this giant have kept Chrome in background to have better control over market.

Corporate sector always want a monopoly on web. Mozilla is the only organization who prevents them to do so. So, mozilla is not competing. This respected organization is just keeping the things open, more accessible and cheaper than ever.

 

Integrating SMS in your web or desktop application

Web services make integrating SMS in your applications very easy. As always I would like to divide this into following steps:
Note: Here in this tutorial I am using FSMSAPI as SMS-gateway.Step 1: Get a domain name
Go and get a domain name. I personally recommend bigrock.in and set a email account by setting MX entries.

Step 2: Register on freesmsapi.com
Go to fsmsapi.com and register their. Start information will be mailed to you

Step 3: Get secret key
Login on fsmsapi.com . and get your secret key by scrolling down.

Step 4: Integration
As most web-services are technology independent , so is it. You can integrate it in any technology of your choice. Using FSMSAPI is so simple that requires only one URL request! Below goes the tech terms:

Parameters of URL
* skey – put your secret key e.g. d67ddf90df1019b0dd63b5f1842f6617
* message – proper url encoded message.
* recipient – whom to send, Can be comma seperated multiple values
* response – json or xml (default is xml)

For php:
Simply writing this works:

echo file_get_contents(“http://s1.freesmsapi.com/messages/send?skey=d67cdf98df1019b0dd63b5f1842f6617&message=”.urlencode(‘YOUR MESSAGE’).”&recipient=MOBILE_NUMBERS”);
?>

For java:
You have to write:

import java.net.*;
import java.io.*;
public class JavaGetUrl {
public static void main(String[] args) throws Exception {
URL myurl = new URL(“http://s1.freesmsapi.com/messages/send?skey=d67cdf98df1019b0dd63b5f1842f6617&message=YOUR_MESSAGE&recipient=MOBILE_NUMBER”);
BufferedReader in = new BufferedReader(
new InputStreamReader(
myurl.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
}

For C#:
.netties can go via following way:

using System.IO;
using System.Net;
string connectionString = “http://s1.freesmsapi.com/messages/send?skey=d67cdf98df1019b0dd63b5f1842f6617&message=YOUR_MESSAGE&recipient=MOBILE_NUMBER”;
try
{
System.IO.Stream SourceStream = null;
System.Net.HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(connectionString);
myRequest.Credentials = CredentialCache.DefaultCredentials;
HttpWebResponse webResponse = (HttpWebResponse)myRequest.GetResponse();
SourceStream = webResponse.GetResponseStream();
StreamReader reader = new StreamReader(webResponse.GetResponseStream());
string str = reader.ReadLine();
MessageBox.Show(str);
}
catch (Exception ex)
{       MessageBox.Show(ex.Message);
}

Step 5: My recommendations(you may or may not follow this)
For php:
Write down the above code(d’t forget to set your own skey) after wrapping in a function in a file named smssender.php and include it wherever necessary in your script files using:

 

and make a proper function call.

For java and C#:
Just make a file and include it using below and make proper function call:

import yourpackage.smssender.java;
or
using yournamespace;

If you are on another technologies, then find a equivalent inbuilt function call in your technology of choice. OR get code in SMS API section of fsmsapi.
Happy integration!
I will be happy to solve any problem during this process, let me know via comments.

Search Engine Optimization: SEO Quick Starter 3/5 – On site techniques

Hoping that you gone through deeply part 1 and part 2 of this series. And here goes part 3/5 On Site SEO factors to check out, to see your website on the top of Search Engines. Okay, let me first clear that some SEOs say that on-page and on-site factors are same but I think they are different because on-page factors dominate to each page individually but on-site factors are meant for whole of the site in one-go. And here we go for On-site factors of SEO:

Domain Name: If your domain name include the keyword you are optimizing for, then it is a multiplicative factor to your SEO efforts.
Example: Songs.pk are better than indiamp3.com, if keyword is ‘songs’.Navigation: Navigation affects SEO efforts very much. JS/Flash navigation should not be used because these technologies are not search engine friendly. CSS 3 transition effects can be used as an alternative to these technologies.

Structure of site: The structure of site should be very efficient and user friendly with a tree like structure and no page at more than 4 depth in this tree.

Subdomains: If your site is meant for more than one service than you can make subdomains respectively.
Sub-domaining not only increase SEO marks but also improves total performance of site as modern browser treat colleges.pratiyogi.com and schools.pratiyogi.com as two different domain and more parallel connections can be made by browser on same domain.


Site-Maps: Each site should have two site-maps. One for your users it can be made up of any-thing viz. images, flash elements, js etc. And another XML sitemaps for Search Engine bots. Many online tools are available to do so.


Validated Code: The code of whole of the site should be valid whether it is js, css, or html. Many excellent tools like W3C can be used for code validation purposes.

Robots.txt: Robots.txt is simply a configuration file which tells the search engine bot what to index from site and what not to index. It comes handy when we want a bot not to index confidential files.

Size of site: Google likes sites with more pages and more information.


Frequency of update: Pages should be updated frequently to get new catches on the side of Search Engines. Best to-do here is blog and RSS feeds.

So, here On-site SEO factors comes to end. Stay tuned for Off-site SEO techniques, get your hands dirty with these techniques fast because a vast sea of off-site SEO techniques is waiting for you next!

Making txtweb txtApps in 5 steps

Believe it or not, txtweb.com can be a game changer! By using txtApps you can give SMS extension to your existing web application. So, lets get to the point without making much overflow.
I would like to divide this post for developing txtApps into 5 steps to make the simple things more simpler. So it goes here:
Step 1:
Get registered to txtweb.com and click the “Create txtApp” link after login.Step 2:
Select keyword and enter other details. In the “I want to enter AppSite url” enter http://abc.com/ (We will change this later!) and enter contact information then finish.

Step 3:
Develop the code that generates HTML output, as required by txtWeb plateform. You can choose any technology of your interest. I took up php as a development language for my first app for humancalculator.in to send random puzzles with answer. You can  try out it by sending @humancalc to 9243342000. I don’t used any database to store these puzzles and answers instead I preferred XML to store these, because I don’t want to take a overload on me to keep checking MySQL is always up or not!

Code looks something like:

  //Include your txtWeb app key in the head section of your app response 
  echo “
 
 
 
 “;
  /*intermediate code not included*/
echo “
  “;     
?>

XML structure used is:



Step 4:
Host your application somewhere. I prefer fun.ggbecause you can get a sub-domain their ( if you don’t have in case) and get some space (that saves me from setting up NS) with MySQL too, in case you want to add some DB functionality for your app. I am a fileZilla fan-boy when it comes to FTP file-transfer.

Step 5:
So, let me assume that you successfully deployed your web app at http://example.com/. Change “I want to enter AppSite url” from http://abc.com/ (as entered in Step 2) to http://example.com/. Now its up. Publish your application and launch.
For more trips and tricks you can head to tutorials section of txtWeb. Let me know if you are facing problem via comments I would try to help you 🙂
Happy App Making!!