Monday, March 20, 2017

Do We Really Need Git OR Version Controlling ?

If you are onto software development, you may have heard lot about GIT and some words like Merge, Branch, Commit, It's my branch ! like things. As I belive theoritically learning git concepts is difficult. I will try to explain as much as possible with practical situations.

git vs version controlling ?

Java is a programming language. Likewise git is a version controlling system. There are different other programming languages than Java like PHP, JavaScript etc. Similarly there are other version controlling systems other than git like SVN, Apache Subversion, Rational Clear Case etc.

Why git ?

Git is one of most popular version controlling system or VCS. You may have heard of github.com. It's built upon git concepts. Git is used from startup to larger enterprises and from home to universities where somekind of software development process is happening.

As a university student, How git will help me ?

Let's move on. I have three friends. Movinda, Supun and Philips. We are working on a modern single page website. I'm designing the navigation bar and header. Movinda designs the products section. Philips designs the about us section and Supun designs the contact us form. 

As you know, In a single page website all sections are bundled together in a single HTML file. Therefore all of us must do our work in a single file.

Traditional approaches

  • Wait each one to complete their work. Supun start after Movinda finishes. TIME CONSUMING. One must depend on another.
  • Do parallely in our own computers and then copy and paste our code to a final document - DIFFICULT TO TEST, CODE BECOMES UNREADABLE

Solution !

  • We must be able to work parallaly in the same file.
  • We must be able to undo any changes done
  • Copying and pasting of each members code must happen automatically.
  • Any member must be able to see what other people have done to the page without intefering his or her own work
  • System must acknowledges each ones contribution to the project (Without commenting - Edited by Lanil like that)
That't where the git comes to the game. Git can make your life easy !. I will write more on Git. Keep in touch.

Friday, March 17, 2017

Why Should I Use AngularJS?

There are lot of buzz going about AngularJS.  This article for rookies who wants to know what is AngularJS and why should we use it.

AngularJS is a JavaScript framework backed by Google.

What is a framework now ?


Framework is a set of tools where you can do specific tasks easier than generic tools programming languages. Some examples are

  • Bootstrap frameworks allows you to design beautiful web applications without writing a single CSS statement. 
  • A simple API can be built using ExpressJS framework for NodeJS without using any complex code.
  • Hibernate framework simplifies the trade offs between OOP and relation database

So the AngularJS is also a JavaScript framework. That means we can do many things easily using JavaScript and AngularJS.

What we are going to do ?

I have a simple html page. There I have a text box and a paragraph. What I want to do is, I want to appear the text in the text box in the paragraph. This should be done realtime. i.e: When user types something it should be on paragraph too.

Here is the HTML code

This is how it is done in JavaScript - Option 1

I have added few lines of Javascript after the body tag.


This is how it is done in jQuery(Another JS library) - Option 2

Here you must remove the onchange() attribute in text box. Somewhat simpler than raw JavaScript. Only one line inside the function.


Finally using AngularJS - Option 3

Here we do not have any Scripts or JavaScript functions. But I have added some extra attributes starting with ng-* to the text box and paragraph. Examine carefully the original and below. This does the same as above two methods. Did I wrote any Scripts ?? NO !!!. Saves time and LOCs. 

Wednesday, March 1, 2017

Second Year Final Project


Those days second year students had to do a project for a client in their final semester. The module name was Information Technology Project. From the begining we had make proposals, specifications, schedules and everything needed to be documented. Project's flow went as follows. We developed a system to manage construction project and our client was a medium sized contractor.

  1. Submitting project charter
  2. A presentation introducing the client and the project
  3. Submitting project proposal
  4. Submitting systems requirements specification (SRS)
  5. Presenting the prototype
  6. Presenting the final product
  7. Submitting the project report

The project went for about 3 months and was hugely successful. All team members had good results for the project. Though it was a group project all members were individually assessed. 

Our Team, from left: Bhathiya, Milinda, Movinda
Upeksha, Gajanayake, Pasan and Me.
Most of our collegues developed standalone Java applications. But we were different. We built an advanced web application using PHP. We along used JavaScript, jQuery, Bootstrap for the development and underlying database was made using mySQL. Even we were in second year we used advanced backend PHP frameworks for the development. Our system is modern looking, accessible from anything from anywhere and userfriendly.

Home Page


A screenshot from machine hiring module.