Friday, March 6, 2015

declarative and imperative programming

Declarative programming is when you write your code in such a way that it describes what you want to do, and not how you want to do it. It is left up to the compiler to figure out the how. Examples of declarative programming languages are SQL and Prolog

Reference: http://stackoverflow.com/questions/129628/what-is-declarative-programming


A great C# example of declarative vs. imperative programming is LINQ.

With imperative programming, you tell the compiler what you want to happen, step by step.

For example, let's start with this collection, and choose the odd numbers:

List<int> collection = new List<in  t> { 1, 2, 3, 4, 5 };

With imperative programming, we'd step through this, and decide what we want:

List<int> results = new List<int&g  t;();  foreach(var num in collection)  {      if (num % 2 != 0)            results.Add(num);  }

Here, we're saying:

  1. Create a result collection
  2. Step through each number in the collection
  3. Check the number, if it's odd, add it to the results

With declarative programming, on the other hand, you write code that describes what you want, but not necessarily how to get it (declare your desired results, but not the step-by-step):

var results = collection.Where( num => num % 2 != 0);        
Reference: http://stackoverflow.com/questions/1784664/what-is-the-difference-between-declarative-and-imperative-programming


http://latentflip.com/imperative-vs-declarative/

Thursday, March 5, 2015

Consider using node.js for mobile app

http://blog.langoor.mobi/node-js-mobile-web-apps/
http://www.quora.com/Should-I-use-Go-or-Node-js-for-a-mobile-app-backend

Push technology
https://www.google.com.hk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CBsQFjAA&url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FPush_technology&ei=gLr1VMXMGKGnmAXDlID4Cw&usg=AFQjCNGIXBTAcTDmv-bK5_H5lHq1XFjQ0A&sig2=-9uCYkeBLewm1b8lFLspBQ&bvm=bv.87269000,d.dGY

http://www.gianlucaguarini.com/blog/nodejs-and-a-simple-push-notification-server/

What server is suitable for mobile app?
http://aws.amazon.com/mobile/
...


Related topics:
How whatsapp works?
https://www.google.com.hk/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=how%20whatsapp%20do%20server%20push

Mobile App development tools

Products:

http://xamarin.com/?_bt=44014802828&_bk=%2Bxamarin&_bm=b&gclid=Cj0KEQiA1NWnBRDchObfnYrbo78BEiQA-2jqBcR4-xZxH4KEPXEuEEr4Pv4IfkeNvuOKLjcCji7AXYsaAsF88P8HAQ

http://phonegap.com/

http://www.telerik.com/

http://rhomobile.com/products/rhogallery/

http://www.appcelerator.com/titanium/



References:
http://www.tcs.com/SiteCollectionDocuments/White%20Papers/Mobility_Whitepaper_Client-Architecture_1012-1.pdf

Comparison on NoSQL Solutions

https://www.google.com.hk/search?q=nosql+comparison&ie=utf-8&oe=utf-8&gws_rd=cr&ei=hhD4VP3lNIbv8gX0moGwAg

http://db-engines.com/en/system/Memcached%3BMongoDB%3BRedis
https://www.digitalocean.com/community/tutorials/a-comparison-of-nosql-database-management-systems-and-models
http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis