Successfully reported this slideshow.

Hidden gems of web and mobile development from open source


Published on

There might be lot many more hidden gems in heap of open-source and you got to know some great framework that carry the potential to be super frameworks of tomorrow.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Hidden gems of web and mobile development from open source

  1. 1. Hidden Gems of Web / Mobile Development from Open-Source Gaurav Dhiman Hidden Gems of Web / Mobile Development from Open-Source 4.79/5 (95.83%) 24 votes Internet is maturing fast, it’s becoming ubiquitous as now we can access internet anywhere anytime through WiFi networks, telecom data networks. With this accessibility benefit most of the applications are coming online and browser is their new home. If we go 15 years back, desktops were prominent, web was just a small kid then, but it grew fast with guiding care takers like Google, Firefox and many other such open-source supporters. As internet evolved, web technologies like JavaScript, HTML and CSS became super powerful. In 2000 nobody would have thought that JavaScript will become the key driver for internet. At that time HTML was just some tag based no- value scripting language which never got enough attention from serious programmers. With 2006 coming in, iPhone was launched and our world got introduced to mobile computing. There after things changed fast, Google was everywhere, Facebook was growing, Twitter was there, LinkedIn was new buddy on block and all these web assets were gathering, analyzing and making sense of data from whole world. All these were having a unique need of storing, analyzing and presenting the global data anytime, anywhere (desktop, mobile, tablets, smart TVs etc.), hence cloud computing and scalable NoSQL Databases were born as a backend infrastructure for scalable, highly- available web / mobile properties. With so many hot technologies boiling in a plate, few became so big that they over powered others. Javascript was already a king of browser world but soon it jumped over to server world in the form of NodeJS making PHP, Java look somewhat old. On client side too, lot many frameworks (AngularJS, EmberJS, BackboneJS, KnockoutJS, D3, HighCarts etc.) were developed on Javascript which made it even stronger as a strongest contender in web / mobile space. HTML5 blew up the world with its video / audio streaming, local storage, two-way socket communication, canvas drawing and geo-location capabilities. CSS3 brought media queries to make the frontend developer’s life bit easy allowing them to fit the same user interface responsively in different devices screens. With this background and context, today I am going to share with you my learning of some of the
  2. 2. hidden gems of web / mobile development space. Do note, I am saying these are hidden as they are not that well known as of now but they are still gems as they have high potential to be prominent if marketed well to developers. The Big Open Daddy – Wakanda Wakanda is a complete suite to build end to end enterprise web and mobile applications. It includes everything one needs to build a browser based app, including visual studio to design UI using drag- drop components, Java based server (middleware) where business logic resides and the NoSQL object database (to store huge enterprise data). Best part is that all these parts are well and tightly stitched to make the whole programming experience fun and quick. The client side (web / mobile) can be designed using Wakanda Studio, whereas the database design is done in its model designer which again is a part of studio itself. You even design the database model in drag-drop manner making things fast and intuitive. The client and server are automatically stitched by Wakanda and all communication between client and server happens using standard REST / HTTP protocol. I covered wakanda in detail in one of my last blog posts. You can check the post here along with the screencast. If you are trying building enterprise app, consider using Wakanda, its open-source. Although it’s good to build enterprise apps but frankly speaking it might not be suitable for cloud based scalable apps like Twitter or Instagram etc. Smart Chap – ArangoDB ArangoDB is a NoSQL database that was originally built as an enterprise data store. Recently somehow they realized that the developers community is not just happy with enterprise kind of apps. Developers are thinking of global cloud based apps now. They want to build another Twitter, Facebook or Google. For sure, Arango was not originally designed for such kind of apps that need a distributed cluster based data store. Well Arango recently added sharding to its roadmap. Now they are on the way to add seamless scaling-out feature where database can work over multiple commodity servers working together as cluster. Arango will internally manage the optimum storage and retrieval of data on that cluster of N nodes. This sharding feature is something which made me again interesting in Arango (earlier I evaluate and left it as it was not capable to scale-out). Arango is a good piece of open-source software as its multi-modal. Yes, it can act as document store, graph store or key-value store. Beauty of Arango lies in its graph capabilities, so if you plan to develop graph based apps like social networks (where one person/entity can be connected to N entities and those can further be related to other M entities with cyclic relations in-between), you can try ArangoDB. Even in case of graphs, it performs well, so traversing over graph (which actually a big problem in RDBMS world) is not big problem in case of ArangoDB, same stands for OrientDB which is covered next. Another good feature is its FOXX interface which acts as a middleware layer close to DB. It allows you to write your own Javascript functions to write your app’s business logic and make calls to DB using javascript, so if you are building a small or mid-level app, you can consider writing your app’s business logic in FOXX / Arango itself rather than having NodeJS / Apache layer in between. Big-O of NoSQL – OrientDB
  3. 3. OrientDB is another hidden gem from open-source NoSQL world. It’s very similar to ArangoDB in its capabilities as they both bring the positives of RDBMS and NoSQL worlds together. Few differences between them could be query language to perform CRUD operations (Arango uses AQL – similar to SQL & OrientDB have a SQL interface), clustering / sharding (OrientDb was designed keeping clustering in mind whereas Arango is now introducing it on developer’s demand). OrientDB has a nice inbuilt user access control in DB. It has default users and roles which can be extended and customized to meet the access control needs of ant application. Something which I liked about OrientDB is that it also manages the access control at document level (row of table in RDBMS world) automatically if our class is derived from some ORestricted abstract class. What actually it means is that although multiple users can store documents (rows in RDBMS) in same class (table in RDBMS) but when they fetch the documents they will only get the documents which they stored, not the documents of other users. You can read here, how record level security works in OrientDB. Although MongoDB, CouchDB, Neo4J are some of the popular NoSQL DBs, but if we get into details and compare them I personally think OrientDB is much better. Against MongoDB which makes a good case only for WORM (Write Once, Read Many) applications, OrientDB stand out. When we store related data in MongoDB, either we embed the sub document in parent document (we make data de- normalized, not good for updates or multiple writes) or we build relation between documents using reference (which are resolved at run time and hits the read performance). On other hand OrientDB handles it differently. As every record / document in OrientDB is an object (instance of a class) the linking between objects / documents is not through references, its direct linking (saving pointer to object. This this leads to quick retrieval of related data as compared to JOINS in RDBMS. So OrientDB neither loose the benefits of normalization and nor it gets hit on read / query performance due to run time cost of JOINS (there are no joins, it stored the direct pointers to other related documents). Other than this difference another key difference is that MongoDB is not make for transactional applications (it not ACID compliant), whereas OrientDB is made for transactional applications (its ACID compliant). You can check the detailed post comparing MongoDB and OrientDB here. Another good feature OrientDB comes with is Fetch Plan. Fetch Plan do the same thing which JOINS do in RDBMS, it fetches the related documents / records while querying DB. It’s same as JOINS but OrientDB makes it easy to use as compared to JOINS. We need not to write complex JOIN queries, we just need to write simple Fetch Plan; for instance below query will fetch all (*:-1) the related records from other classes (company, salary, projects etc.) up to infinite depth in one go. “SELECT * FROM emp WHERE name=’Gaurav’ FETCHPLAN *:-1” In above fetch plan * tells what related fields / attributes need to be fetched and -1 tells up to what depth the search should go on. You can learn more about fetch plans here. Sailing high in world of NodeJS – SailsJS
  4. 4. If you have ever worked in NodeJS or plan to, you must have not heard lot many great frameworks except ExpressJS, which is one of the most popular in NodeJS world. SailsJS took ExpressJS to one level further as it’s built upon ExpressJS. SailsJS brings MVC design methodology to NodeJS. You can related and understand it very quickly if you have earlier worked in some MVC framework like CodeIgniter or Zend etc. Clear distinction between Controller, Model and Views make much simple with SailsJS, plus it does lot many default basic work which is expected in every web app, running web server, taking request, parsing parameters, session management etc. if we do not use any framework on NodeJS, doing these basic things itself take lot of time with NodeJS. Just visit SailsJS website to know how easy it is to install and run any NodeJS app with it. You can get started in just 5 minutes. Best part of SailsJS is its database adapters and websockets integration. SailsJS can talk to any database with its waterline adapter layer. Waterline gives a standard interface to talk to any underlining database, may it be MongoDB, MySQL, REST Webservices, Redis or any other database. To support any database for SailsJS one need to write or use small adapter which knows how to talk to specific database. For instance, I just wrote a Sailsjs adapter for OrientDB as I want to use both and there was no exiting adapter for OrientDB in SailsJS. This shows the flexibility and the modular approach SailsJS takes. Another great thing about SailsJS is its tight integration with SocketIO to build two way communication Here is nice introduction video about SailsJS from its founder: Tiny atoms make the whole world – ATOMS Till now I talked about DBs or backend infrastructure, but on web / mobile along with performance, scalability everything needs to be beautiful else it will not get required attention. Till now making web / mobile UIs was more of coding in HTML / CSS. People who know HTML / CSS can make beautiful interfaces, but what about others, idea to build next big app can come to anyone, you, me or even a school kid. To build that barrier of nice UI designing, few tools came up but either those where paid or not that great. ATOMS is an attempt by France based startup to build a drag-drop web based IDE for web / mobile UI development. It’s still in beta as of now at the time of writing this post and hopefully will be released as open-source soon. Developer of ATOMS earlier made some nice CSS and Javascript frameworks like LungoJS and QuoJS which I personally find these very useful for mobile interface design as these frameworks are optimized performance on mobile. ATOMS is still in beta. Below is its video. Although its not in English still it makes sense to look at how it will work. The shining star – Ionic Framework
  5. 5. There have been many effort to build something great for hybrid mobile app development; esp the UI part. Many projects in open- source space also started to make robust, high performing, responsive and clean mobile UI framework. Sencha Touch, JQuery Mobile, PhoneJS, ChoclateChip UI, LungoJS, KendoUI are some of the result of that effort. Even Bootstrap re- wrote its framework to make it mobile first. One upcoming star in this world of mobile UI frameworks is Ionic Framework, which actually has been designed keeping mobile (low resource, responsive, touch based) in mind from the very beginning. It’s an open-source project started by Drift, company behind Cordiqa project which was designed to develop mobile app prototypes in drag-drop manner. Although Ionic is still in beta but its maturing fast and it already have many live apps to its credits. It’s a promising framework to build clean, mobile friendly user interfaces. Best part about Ionic is that it integrated with AngularJS and PhoneGap which make whole mobile app development much easier. Angular brings the benefits of two-way data binding (no more programmatic DOM manipulations, your view and model always remain in sync) and PhoneGap bring the device capabilities (camera, geo-location, contact address book, calling features etc) to your mobile app. Packaging your hybrid mobile app for different mobile platforms is just few commands with Ionic. Drifty guys are soon coming with cloud based build service, something similar to the one provided by Adobe for PhoneGap. They are also coming with drag-drop mobile UI development IDE, somewhat similar to ATOMS discussed above. You can know more about it here. There might be lot many more hidden gems in heap of open-source, but these are few which I personally explored during my evaluation to build and next version of TravelCRM. I hope with this post you got to know some great framework that carry the potential to be super frameworks of tomorrow. For any queries, doubts or consulting, feel free to contact me on my twitter handle @gaurav_dhiman or drop me message on LinkedIn.