Skip to main content

Posts

Backbone.js - An Introduction

Backbone.js is a lightweight JavaScript library that adds structure to your client-side code.  Developers commonly use libraries like Backbone.js to create single-page applications (SPAs).  What is a Single-Page-Application? A single page Web App is a website that attempts to recreate the experience of a native desktop or mobile application. On a Single Page Web App you are less likely to see page refreshes, the browser navigation within the app is often overridden and  there will usually be some offline capabilities. To a user their interaction with a Single Page Web App will be almost identical to how they interact with a full native application. Backbone has many advantages over other js frameworks. Backbone is mature, popular, and has a number  of plugins and extensions available that build upon it. It has been used to create non-trivial applications by companies such as Disqus, Walmart, SoundCloud and LinkedIn. Backbone organizes its whole code under t...
Recent posts

MongoDB Operations

The four core database operations used in database driven application development are create,read,update and delete(CRUD). Create  This is one o f the four basic database operations ,CRUD.  create  operations are those that add new records or  documents  to a   collection  in MongoDB.  You can create documents in a MongoDB collection using any of the following basic operations: insert upsert The  insert()  is the primary method to insert a document or documents into a MongoDB collection and  is analogous to the  INSERT   statement in SQL. It  has the following syntax:                   db.collection.insert( <document> ) If the collection does not exist , then the  insert()  method creates the collection during the first insert. The  update()  operation in MongoDB accepts an “ upsert ” flag that modifies the behavior of...

Huffman

Huffman coding The secret of huffman compression lies in the fact that not all characters are equally common. For instance, in typical English text the letter 'e' is much more common than the letter 'z'. If we could encode the letter 'e' with less number of bits and the least common letter 'z' with more bits, it makes a sense and that is the idea behind huffman coding. Theseveral steps in huffman coding are: Examine text to be compressed to determine the relative frequencies of individual letters. Assign a binary code to each letter using shorter codes for the more frequent letters. Encode normal text into its compressed form as a string of '0's and '1's. Recover the original text from the compressed. The complete javascript code for huffman compression is available here . Enter the string to encode Encode Decoded text

NoSQL - An Introduction

"Not Only SQL" generally known as  NoSQL is a database system that provides simple lightweight mechanism for storage and retrieval of data.  NoSQL has become much popular in the last few years. The database arose alongside major Internet companies such as  Google, Yahoo, Facebook and Amazon because all these companies has to deal with a large amount of data  and    when a relational database grows out of one server, it is no longer that easy to use. In other words, they don't scale out very well in a distributed system. So all these big sites  store the data in  distributed systems  for several reasons. It could be that the data doesn't fit on one server, or there are  requirements for high availability .  Some advantages of NoSQL databases are: They don't have a fixed schema as traditional RDMS have. They don't write normal SQL statements against the database, but instead use an API to get the data they need. The NoSQL ...

Django - Some Basics

Django,  a prominent member of new generation web framework  lets you build deep, dynamic, interesting sites in an extremely short time. Django is designed to let you focus on the fun, interesting parts of your job while easing the pain of the repetitive bits. Django provides high-level abstractions of common Web development patterns, shortcuts for frequent programming tasks, and clear conventions on how to solve problems. Django, as a Web framework provides a programming infrastructure for your applications, so that you can focus on writing clean, maintainable code without having to reinvent the wheel.  The MVC Design Pattern Django follows a pattern called Model-View-Controller(MVC). Simply put, MVC is a way of developing software so that the code for defining and accessing data (the model) is separate from request-routing logic (the controller), which inturn is separate from the user interface (the view). While using Django framework, the entire code is split in...

Software as a Service - SaaS

Some ideas covered in the Software as a Service course conducted by  edx  are discussed here. The first week of course covers some basic software engineering concepts. Software and hardware, the two basic components of any system differs in many ways. Hardware is developed completely before it is being delivered to the vendor. If any error occurs after the delivery of the product, the only solution is to replace the whole hardware. But the situation is different in case of a software. Software evolves over time and if there occurs any bug, it could be easily cleared with some updates to the software.  Software can be categorized as legacy software and beautiful software . Even though legacy software satisfies the end user, it remains the same over time and is difficult to evolve. But beautiful software is easy to evolve as well as meets the customer needs.  The various software models to be discussed here are Waterfall model, Spiral model, Agile model . Water fa...