SlideShare une entreprise Scribd logo
1  sur  73
Télécharger pour lire hors ligne
DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING
FACULTY OF ENGINEERING
UNIVERSITY OF RUHUNA
INDUSTRIAL TRAINING REPORT SUBMITTED IN PARTIAL FULFILMENT OF
THE DEGREE OF BACHELOR OF SCIENCE IN ENGINEERING
27th APRIL 2016
EFFECTIVE SOLUTIONS (PVT) LTD
WEWALA, PILIYANDALA
(FROM 04TH JANUARY 2015 TO 27TH MARCH 2016)
HARIHARAN K. (EG/2013/2204)
i
PREFACE
This report consists of all the tasks and projects carried out at the training at Effective
Solutions, Wewala Piliyandala. I involved in two major projects and four minor projects.
And throughout the report, it is discussed how the training experiences and work came along
in front of me and how I faced them and how the projects were developed based on all the
information gathered every day, and how I involved with the project management.
The first chapter consists of an introduction to Effective Solution and its workflow in the
process of developing the Software’s and Electronics products that they are offering.
From the second chapter onwards I have described the projects which I did during the period
and the knowledge and experiences I have gathered from them. I also included my Extra
work applications into the content. Also the project description that was developed by me
and their gathered information.
From the Third chapters of the report is concentrated on the way all the effort and the
information and experiences helped in completing a software project and how the
implementation of projects were done as a summary, and the project management
techniques.
In addition to this I have included the content pages, list of tables, list of figures and the
acknowledgement, abbreviations used throughout the context and the references used in
developing the report.
Hariharan K.
EG/2013/2204
Department of Electrical and Information Engineering,
Faculty of Engineering, University of Ruhuna.
ii
AKNOWLADGEMENT
The first industrial training of my life became a very successful one with the help of a number
of persons and a number of government bodies and many officials. First of all I present my
sincere gratitude and sincere thanks to the Department of Electrical and Information,
especially Dr. S.H.K.K. Gunawickrama and Dr. M.R. Udawalpola who gave me knowledge in
IT, which was more helpful in my training along with Senior Lecturer Dr. Ruwan Appuhamy,
coordinator of Engineering Education Centre (EEC), Faculty of Engineering, University of
Ruhuna and the National Apprentice and Industrial Training Authority (NAITA) for the
opportunity provided to follow an industrial training for period of three months.
The officials in the training centre at Effective Solutions, the Chief Executive Officer
Eng. Mr. Keerthi Kodithuwaku helped me to be aware of their services and the work that
they are doing. All the projects and all the tasks we were allocated to me via
Eng. Mr. Darshana Priyankara, Director of Effective Solutions (PVT) LTD,
Eng. Mr. Charith Jayarathna, IT Manager, and Eng. Mr. Charith Vithanage always helped
and guided me at all times whenever technology or other work related issues sprang up. And
also another trainee my friend Mr. Gunawardhana L.G.U.P.
And I wish to thank all these personals and beg pardon from unmentioned names that helped
me at all times at their best at all times to make my maiden training a success. And without
my parents and family members I couldn’t achieve any of these and I respect and thank them
for their cheering guide and well care.
Hariharan K.
EG/2013/2204
Department of Electrical and Information Engineering,
Faculty of Engineering, University of Ruhuna.
iii
Table of Contents
LIST OF FIGURES ...............................................................................................................1
LIST OF TABLES.................................................................................................................2
Chapter One
1.1 About Effective Solutions (Pvt) Ltd. ...............................................................................3
1.1.1 Company Logo..........................................................................................................3
1.1.2 Establishment............................................................................................................3
1.1.3 Present Status ............................................................................................................3
1.1.4 Offers and Services ...................................................................................................4
1.2 Organizational Structure ..................................................................................................4
1.3 Company Location...........................................................................................................4
1.4 Organizational Abilities ...................................................................................................5
1.4.1 Strengths....................................................................................................................5
1.4.2 Weaknesses ...............................................................................................................5
1.5 Suggestions ......................................................................................................................5
Chapter Two
Training Experiences – Technical..........................................................................................6
2.0.1 Introduction...............................................................................................................6
2.0.2 Working Summery....................................................................................................6
2.1 Environment Setup...........................................................................................................7
2.1.1 Introduction...............................................................................................................7
2.1.2 Working Environments.............................................................................................7
2.1.2.1 Overview............................................................................................................7
2.1.2.1.1 Php Strom....................................................................................................8
2.1.2.1.2 Postman.......................................................................................................8
2.1.2.1.3 Tortoise Hg .................................................................................................9
2.1.2.1.4 Android Studio 1.5.1.................................................................................10
2.1.2.1.5 Ideamart developer Bundle .......................................................................11
2.1.2.1.6 Symfony framework 2.8 ...........................................................................12
2.1.2.1.7 Php ............................................................................................................12
2.1.2.1.8 JQuery.......................................................................................................12
2.1.2.1.9 MySQL .....................................................................................................12
2.1.2.1.10 JavaScript................................................................................................13
2.1.2.1.11 PhpMyadmin...........................................................................................13
2.1.2.1.12 HTML .....................................................................................................13
iv
2.1.2.1.13 CSS .........................................................................................................13
2.1.2.1.14 Ajax.........................................................................................................14
2.1.2.1.15 Twig ........................................................................................................14
2.1.2.1.16 Bootstrap .................................................................................................14
2.1.2.1.16 JSON.......................................................................................................15
2.1.2.1.17 Bit Bucket ...............................................................................................15
2.2 Smart Messaging System...............................................................................................16
2.2.1 Introduction.............................................................................................................16
2.2.2 The Project Requirements.......................................................................................16
2.2.2.1 Overview..........................................................................................................16
2.2.2.1.1 User ...........................................................................................................17
2.2.2.1.2 Web Portal.................................................................................................17
2.2.2.1.3 Application................................................................................................17
2.2.2.1.4 Database....................................................................................................17
2.2.2.2 Functional Requirements .................................................................................17
2.2.2.2.1 Student ......................................................................................................17
2.2.2.2.2 Idea Mart...................................................................................................18
2.2.2.2.3 Application................................................................................................18
2.2.3 Process ....................................................................................................................18
2.2.3.1 Display Main menu......................................................................................19
2.2.3.2 View Results menu ......................................................................................19
2.2.3.3 Search student record...................................................................................19
2.2.4 Output......................................................................................................................20
2.3 Leaf Invoice Management System.................................................................................21
2.3.1 Introduction.............................................................................................................21
2.3.2 The Project Overview .............................................................................................21
2.3.3 Task.........................................................................................................................21
2.3.4 Process ....................................................................................................................21
2.4 SMS Feature of Route-Radar.........................................................................................22
2.4.1 Introduction.............................................................................................................22
2.4.2 The Project Requirements and Process...................................................................22
2.4.2.1 Overview..........................................................................................................22
2.4.2.1 Environment & Functional Requirements and their Process ...........................22
2.4.2.1.1 User ...........................................................................................................23
2.4.2.1.2 Web portal.................................................................................................23
2.4.2.1.3 Application................................................................................................23
v
2.4.3 Flow Diagram and Final output Description ..........................................................24
2.4.3.1 Receive SMS................................................................................................25
2.4.3.2 Validation.....................................................................................................25
2.4.3.3 Status Check and Final Output ....................................................................26
2.5 RSL MIS ........................................................................................................................27
2.5.1 Introduction.............................................................................................................27
2.5.2 The Project Overview .............................................................................................27
2.5.3 Task.........................................................................................................................27
2.5.4 Process ....................................................................................................................27
2.6 CTrack Feature of Route-Radar.....................................................................................28
2.6.1 Introduction.............................................................................................................28
2.6.2 The Project Requirements.......................................................................................28
2.6.2.1 Overview..........................................................................................................28
2.6.2.2 Environment & Functional Descriptions .........................................................29
2.6.2.2.1 User ...........................................................................................................29
2.6.2.2.2 Web portal.................................................................................................29
2.6.2.2.3 Application................................................................................................30
2.6.2.2 Flow diagram (Front-end)................................................................................30
2.6.2 Process ....................................................................................................................31
2.6.2.1 Front-end developing.......................................................................................31
2.6.2.2 Back-end developing........................................................................................33
2.6.4 Output......................................................................................................................35
2.7 Route-Radar B2B Command .........................................................................................36
2.7.1 Introduction.............................................................................................................36
2.7.2 Requirements and Task...........................................................................................36
2.7.3 Process ....................................................................................................................36
2.7.3.1 Terminal configuration scripting .....................................................................36
2.7.3.2 Track Method...................................................................................................37
2.7.3.3 Cronjob.............................................................................................................38
2.8 Route-Radar Android application..................................................................................39
2.8.1 Introduction.............................................................................................................39
2.8.2 The Project Requirements.......................................................................................39
2.8.2.1 Overview..........................................................................................................39
2.8.2.1 Task..................................................................................................................39
2.8.2.2 System Requirements.......................................................................................40
2.8.3 Process ....................................................................................................................40
vi
2.8.3.1 UI Design.........................................................................................................40
2.8.3.1.1 Activity_main.xml ....................................................................................40
2.8.3.1.2 Error.xml...................................................................................................41
2.8.3.1.3 Splashscreen.xml ......................................................................................41
2.8.3.2 Programming....................................................................................................42
2.8.3.2.1 Check.java.................................................................................................42
2.8.3.2.2 Mainactivity.java.......................................................................................42
2.8.4 Final output .............................................................................................................44
2.9 Location Updater function for RRClient Android application ......................................45
2.9.1 Introduction.............................................................................................................45
2.9.2 The Project Requirements.......................................................................................45
2.9.2.1 Overview..........................................................................................................45
2.9.2.1 Task..................................................................................................................46
2.9.2.1.1 Network Option only turn on....................................................................46
2.9.2.1.2 GPS only turn on.......................................................................................46
2.9.2.1.3 Only Network will turn on........................................................................46
2.9.2.1.4 Both Network and GPS options will turn off............................................46
2.9.2.2 System Requirement ........................................................................................47
2.9.3 Process ....................................................................................................................47
2.9.3.1 Sample UI Designing.......................................................................................47
2.9.3.2 Main Function..................................................................................................48
2.9.3.2 SQLite database functions ...............................................................................49
2.10 Titon Payroll ................................................................................................................50
2.10.1 Introduction...........................................................................................................50
2.10.2 Project Requirements ............................................................................................50
2.10.2.1 Overview........................................................................................................50
2.10.2.2 Task................................................................................................................51
2.10.2 Process ..................................................................................................................52
2.10.2.2 Web interface .................................................................................................52
2.10.2.2 Script Programming .......................................................................................52
2.10.2.3.2.1 Database save script.............................................................................53
2.10.2.3.2.1 Routing path configurations.................................................................53
Chapter Three
Training Experience – Management....................................................................................54
3.1 Management Standards..................................................................................................54
3.2 Management Techniques ...............................................................................................54
vii
3.2.1 Time management...................................................................................................54
3.2.2 Project management................................................................................................55
Chapter Four
4.1 Summary........................................................................................................................56
4.2 Conclusion .....................................................................................................................56
References...........................................................................................................................58
Appendix 1.............................................................................................................................I
Appendix 2.......................................................................................................................... III
LBS Service .....................................................................................................................IV
Subscription Check Service .............................................................................................VI
Curl Post Request............................................................................................................VII
SMS Get Request............................................................................................................VII
1
LIST OF FIGURES
Figure 1. 1 : Company Logo ..................................................................................................3
Figure 1. 2 : Company Hierarchical Levels ...........................................................................4
Figure 1. 3 : Company location..............................................................................................4
Figure 2. 1 : PhpStrom IDE sample project window .............................................................8
Figure 2. 2 : Postman Window ..............................................................................................9
Figure 2. 3 : Tortoise Hg working terminal of a sample project..........................................10
Figure 2. 4 : Android Studio 1.5.1 IDE................................................................................11
Figure 2. 5 : Ideamart Simulator ..........................................................................................11
Figure 2. 6 : PhpMyadmin Panel .........................................................................................13
Figure 2. 7 : Usage of twig...................................................................................................14
Figure 2. 8 : Code snap of JSON object...............................................................................15
Figure 2. 9 : Bit bucket main window..................................................................................15
Figure 2. 10 : Project path....................................................................................................16
Figure 2. 11 : RPS database's tables.....................................................................................19
Figure 2. 12 : Initial state .....................................................................................................20
Figure 2. 13 : Success path output .......................................................................................20
Figure 2. 14 : One of failed path..........................................................................................20
Figure 2. 15 : Flow diagram of the process .........................................................................24
Figure 2. 16 : Output of format error ...................................................................................25
Figure 2. 17 : Output of the user validation failed ...............................................................25
Figure 2. 18 : Password validation failed.............................................................................26
Figure 2. 19 : Output of Success path..................................................................................26
Figure 2. 20 : User view flow diagram ................................................................................30
Figure 2. 21 : UI process order ............................................................................................32
Figure 2. 22 : Example of Public-key cryptography technology .........................................34
Figure 2. 23 : History document and the cronjob result ......................................................35
Figure 2. 24 : CTrack interface ............................................................................................35
Figure 2. 25 : Crontab configuration for the B2B Command ..............................................38
Figure 2. 26 : Web view interface designing .......................................................................40
Figure 2. 27 : Error view interface designing ......................................................................41
Figure 2. 28 : Welcoming splash screen interface designing...............................................41
Figure 2. 29 : Output of the splash screen interface ............................................................44
2
Figure 2. 30 : Output of the error view interface .................................................................44
Figure 2. 31 : Location based system settings of android OS..............................................45
Figure 2. 32 : Testing sample UI designing.........................................................................47
Figure 2. 33 : Schedule tab final output...............................................................................50
Figure 2. 34 : Bitrix24 web interface ...................................................................................55
LIST OF TABLES
Table 2. 1 : Summery of works carried out ...........................................................................6
3
Chapter One
1.1 About Effective Solutions (Pvt) Ltd.
Effective Solutions (Pvt) Ltd is a professional Open source solution provider based in Sri
Lanka specializes in helping small, medium and large businesses to leverage the power of
open source technologies to realize substantial gains in both production and profit. Not only
Software Engineering Field but also Solutions provider for new trends’ problems on
Bio - Medical Engineering Field. In 2015 October, The rapid expansion of Effective
Solutions began with moving into the new office space. Effective Solutions has tripled its
staff with 15 employees within five months gaining a faster growth.
1.1.1 Company Logo
Figure 1. 1 : Company Logo
1.1.2 Establishment
Started as a passionate group of engineering undergraduates at University of Moratuwa. The
company was registered as Effective Solutions (Pvt) Ltd on 17th July 2014 as the first ever
undergraduate start up to be officially registered as a Private Limited. First Official Product
was launched on December 2014. Route Radar, the mobile tracking platform.
1.1.3 Present Status
Now it is a one of leading developing company in Srilanka. Company have a nice nature
premises at Wewala Piliyandala. Currently 15 staffs are there. They have many projects in
hands now. Currently Route Radar is one of the most popular mobile tracking solutions in
the country. Also collaborate with Universities for project researches. Many leading
companies MISs are developed by them. Not only the software field but also in the
Electronics site have they had major products that helps in Medical field. JENDO is the one
of the major products they handling now with many leading hospitals.
4
1.1.4 Offers and Services
 Mobile Tracking Systems
 IOT Platforms
 E-Commerce Applications
 Management Info. Systems
 Online Survey Platforms
 Web Applications
 Mobile Apps
1.2 OrganizationalStructure
1.3 Company Location
Figure 1. 3 : Company location
Senior
Advisor
Director/CEO
Director/CPO Director/CTO Director/COO
Project Manager
Marketing
Supervisors
Engineering Team
Finance Mgt
HR Mgt
Figure 1. 2 : Company Hierarchical Levels
5
1.4 OrganizationalAbilities
1.4.1 Strengths
Normally strength of a company depend on the employer’s work power and their dedication.
So that, Effective Solutions (Pvt) Ltd is the major developing company in srilanka Therefore,
they have a good teams. Every sections have a good knowledgeable leader. Overall
management is very high level. And also Time managements and project managements are
in the very acceptable manner. They have good contacts with the industries in Srilanka. Also
they have some join projects with some foreign leading companies. They have Bio-Medical
Electronic products also. This products is new to srilanka. So they have good market places
in Srilanka.
1.4.2 Weaknesses
As a company Effective Solutions (Pvt) Ltd does have a lot of projects but sometimes there
are no enough staff to complete the project at the given time period. Every project team have
lots of project to finish within the given period that I have been see during the internship.
Their main focus is web platforms. So, that is not enough for the current industrial
environment.
1.5 Suggestions
Main problem is staff vacancies. So I think it’s better to have more staff. But in the case of
increasing the staff, they should follow a necessary interview process in order to get to know
whether the person who is going to come to the company have the knowledge and experience
to work on. So that will help a lot to improve the company. And also they need to focus other
platforms also.
In recruiting trainees for the Effective Solution as university undergraduates, the training
plan should have to be more organized than the current state. The communication between
universities and this type of companies should be stronger and it leads in producing better
and useful output to the society. The industries invent technology and there should be enough
people to follow them and improve them, so it is the duty of these companies to improve a
closer relationship with universities and students, in order to produce better results for the
country and the world.
6
Chapter Two
Training Experiences – Technical
2.0.1 Introduction
I started my training at Effective Solution on 4th January 2016 as a Software Engineering
Trainee. First day, we have short introduction meeting with company’s all staffs. This
meeting was conducted by C.E.O of Effective Solutions (Pvt) Ltd. He described the
company structure and working environment. Also he described the current projects that
they involved.
2.0.2 Working Summery
Work Carried Out No of Days
Environment Setup 1
Smart Messaging System 9
Leaf Invoice Management System 3
SMS Feature for Route-Radar 5
RSL MIS 5
CTrack Feature for Route-Radar 18
Route-Radar B2B Command 2
Route-Radar Android application 9
Location Updater Function for RRClient Android application 1
Titon Payroll 4
Field Visits 3
Table 2. 1 : Summery of works carried out
7
2.1 Environment Setup
2.1.1 Introduction
Once I entered to the training, I had not a good knowledge in php programming. But their
almost all projects were coded in php. So I had to perform well on php however in order to
involve in their projects. And also, I had to learn the framework that they were already
working on. So the first week was learning those technologies and familiarizing the project
scope and the requirements. Under this I had to learn Symfony framework, php and MySQL
as well.
Their working environment was totally depend on the open source environment. So I
changed my laptop according to that. So I changed my laptop OS to Ubuntu. So I installed
Ubuntu 14.04 LTS version on my laptop as a second boot option along with Windows 8. On
the Ubuntu, I had needed to setup the Web development tools on Ubuntu OS.
2.1.2 Working Environments
2.1.2.1 Overview
Our most of the projects are working on using web portals that have provided by Mobile
Service Providers in Srilanka. So I had want to familiar with those also. In order to working
the projects, I installed following software on my laptop.
 Php Strom
 Postman
 Tortoise Hg
 Android Studio 2.0
 Ideamart Developer Bundle
Here, I worked Both Front-End and Back-End developments on my projects. In order to
carry the developments, I used following Technologies.
 Symfony framework 2.8
 PHP
 MySQL
 PhpMyadmin
 Ajax
 HTML
 Bit Bucket
 Android Studio
 JQuery
 JavaScript
 CSS
 Twig
 Bootstrap
 JSON
 Curl
 XML
8
2.1.2.1.1 Php Strom
It is light weight, smart IDE for the PHP developments. This IDE powered by Jet Brains.
PhpStorm = Webstrom + PHP + DB/SQL
Webstrom is Front-End Web development tool. So including this PhpStrom gives full
support for the both Front-End and Back-End Development. Here we can use main script
language as PHP but Webstrom supports all script languages. So on the PhpStrom we can
use all the script languages. PhpStorm is perfect for working with Symfony, Drupal,
WordPress, Zend Framework, Laravel, Magento, CakePHP, Yii, and other frameworks.
Also for the front-end development, make the most of the cutting edge front-end
technologies, such as HTML5, CSS, Sass, Less, Stylus, Coffee Script, Typescript, Emmet,
and JavaScript, with refactoring, debugging and unit testing available.
Figure 2. 1 : PhpStrom IDE sample project window
2.1.2.1.2 Postman
Postman app is an API creator. It gives normally post, get requests. During development
process and the unit testing process, we can make the real-time testing with this application.
We can perform web portal API functions using this. This app powered by Chrome
Developers. We can get this app on chrome web store.
9
Features
 Compact layout
 HTTP requests with file upload support
 Formatted API responses for JSON and XML
 Autocomplete for URL and header values
 Key/value editors for adding parameters or header values. Works for URL
parameters too.
 Use environment variables to easily shift between settings. Great for testing
production, staging or local setups.
Figure 2. 2 : Postman Window
2.1.2.1.3 Tortoise Hg
Tortoise Hg is a Windows shell extension and a series of applications for the Mercurial
distributed revision control system. It also includes a Gnome/Nautilus extension and a CLI
wrapper application so the Tortoise Hg tools can be used on non-Windows platforms.
10
Figure 2. 3 : Tortoise Hg working terminal of a sample project
2.1.2.1.4 Android Studio 1.5.1
Android Studio is the official IDE for Android app development, based on IntelliJ IDEA.
On top of IntelliJ's powerful code editor and developer tools.
Features
 A flexible Gradle-based build system
 Build variants and multiple APK file generation
 Code templates to help you build common app features
 A rich layout editor with support for drag and drop theme editing
 Lint tools to catch performance, usability, version compatibility, and other
problems
 Code shrinking with ProGuard and resource shrinking with Gradle
 Built-in support for Google Cloud Platform, making it easy to integrate Google
Cloud Messaging and App Engine
11
Figure 2. 4 : Android Studio 1.5.1 IDE
2.1.2.1.5 Ideamart developer Bundle
Ideamart is one of the leading web API provider in Srilanka. It powered by Dialog Axiata
PLC. They provides following APIs.
 SMS
 USSD
 LBS
 SUBSCRIPTION
For the testing purpose, they provide a developer bundle with those APIs. We can directly
use that within our applications.
Figure 2. 5 : Ideamart Simulator
12
2.1.2.1.6 Symfony framework 2.8
Symfony is loosely based on the popular Model-View-Controller development pattern.
While controller classes are a necessary part of development under Symfony, models and
views are optional. Symfony is most often noted for its speed when compared to other PHP
frameworks.
To start the new projects using this frame works, write the following code on the Terminal
under the local server’s public directory.
$ symfony new sample_project 2.8
2.1.2.1.7 Php
• PHP stands for PHP: Hypertext Pre-processor.
• It is a server-side scripting language.
• PHP is free and is an open source software product.
• The PHP scripts are executed on the server.
• PHP supports many databases (MySQL, Sybase, Oracle and many others.)
• PHP runs on different platforms (UNIX, Linux, and Windows.)
• PHP is compatible with almost all web-servers used today (Apache, IIS, etc.)
• A PHP file can contain plain text, HTML tags and scripts
2.1.2.1.8 JQuery
JQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML
document traversal and manipulation, event handling, animation, and Ajax much simpler
with an easy-to-use API that works across a multitude of browsers. Nowadays we use JQuery
for all of our applications because it is easy and customizable.
2.1.2.1.9 MySQL
MySQL is a freely available open source Relational Database Management System
(RDBMS) that uses Structured Query Language (SQL). SQL is the most popular language
for adding, accessing and managing content in a database. It is most noted for its quick
processing, proven reliability, ease and flexibility of use.
13
2.1.2.1.10 JavaScript
JavaScript is a programming language used to make web pages interactive. It runs on your
visitor's computer and doesn't require constant downloads from your website. JavaScript is
often used to create polls and quizzes.
2.1.2.1.11 PhpMyadmin
PhpMyadmin is a free and open source tool written in PHP intended to handle the
administration of MySQL with the use of a web browser. It can perform various tasks such
as creating, modifying or deleting databases, tables, fields or rows; executing SQL
statements or managing users and permissions.
Figure 2. 6 : PhpMyadmin Panel
2.1.2.1.12 HTML
HTML stands for Hyper Text Mark-up Language. A mark-up language is a set of mark-up
tags HTML documents are described by HTML tags. Each HTML tag describes different
document content.
2.1.2.1.13 CSS
Cascading Style Sheets (CSS) is a style sheet language used for describing the look and
formatting of a document written in a mark-up language. So using CSS we can define the
element sizes and the colours or any kind of interface changes.
14
2.1.2.1.14 Ajax
AJAX stands for Asynchronous JavaScript and XML. AJAX is a technique for creating fast
and dynamic web pages. AJAX allows web pages to be updated asynchronously by
exchanging small amounts of data with the server behind the scenes. This means that it is
possible to update parts of a web page, without reloading the whole page. Classic web pages,
(which do not use AJAX) must reload the entire page if the content should change.
2.1.2.1.15 Twig
Twig is a modern template engine for PHP. Twig compiles templates down to plain
optimized PHP code. The overhead compared to regular PHP code was reduced to the very
minimum. Twig has a sandbox mode to evaluate untrusted template code. This allows Twig
to be used as a template language for applications where users may modify the template
design. We can use the twig script as an inner script with the html codes.
Figure 2. 7 : Usage of twig
2.1.2.1.16 Bootstrap
Bootstrap is the most popular HTML, CSS, and JavaScript framework for developing
responsive, mobile-first web sites. Bootstrap is easy to use. We can use many html designing
as a classes. It’s one of the major benefit is Grid Layout system for the different devices.
15
2.1.2.1.16 JSON
JSON is short for JavaScript Object Notation, and is a way to store information in an
organized, easy-to-access manner. In a nutshell, it gives us a human-readable collection of
data that we can access in a really logical manner. This creates an object that we access using
the variable JSON. By enclosing the variable's value in curly braces, we're indicating that
the value is an object. Inside the object, we can declare any number of properties using a
"name": "value" pairing, separated by commas. To access the information stored in JSON,
we can simply refer to the name of the property we need.
Example of JSON object
var object1 = {
"age": "23",
"hometown": "Kalmunai, LK",
"gender": "male"
};
Figure 2. 8 : Code snap of JSON object
2.1.2.1.17 Bit Bucket
Distributed version control system that makes it easy for you to collaborate with our team.
The only collaborative Git solution that massively scales. Approve code review more
efficiently with pull requests. Hold discussions right in the source code with inline
comments. Have uninterrupted access with Bit bucket Data Centre. Fast performance
wherever we are in the world. So it’s a complete solution for the project team.
Figure 2. 9 : Bit bucket main window
16
2.2 Smart Messaging System
2.2.1 Introduction
This is my first major project in this company. This project was a web application using
Symfony framework 2.8 using Ideamart as a web portal. This project was developed for a
private institutions. The Institution have large no of students in four districts. This Institution
focus on the Advanced level students. So students have more than one common exam in
every month. They listed down all the marks and Z-Score, rank and Whole Results. Normally
the results are posted using noticeboard. So they needed an advanced solution for that.
According to do that, a solution was provided by us. It was Results post using SMS and
USSD methods. For that, this project was assigned to me and other trainee. So it was a team
project. The Team had two members.
2.2.2 The Project Requirements
2.2.2.1 Overview
The web portal applications were very new to me. Normally this kind of applications are
working following way. Here it used MySQL database. And also for development I used
Symfony framework, curl and php. For testing, I used postman and ideamart simulator.
This Information System consists of three main sections
1. User
2. Web Portal
3. Application
4. Database
User
Web portal
Application
Database
Figure 2. 10 : Project path
17
2.2.2.1.1 User
Here User was Student. Student was already registered in the database. A student had a
unique Index No for each class he/she attends and also had a Test ID. Index No was a unique
entity in the database. For every exam each student get a specific Test ID. Therefore a student
had to input two IDs in order to request results.
1. Index No
2. Test ID
2.2.2.1.2 Web Portal
Ideamart web portal was used as the interactive interface between the Student and the
application. Registration in the ideamart with specific requirements was required to establish
a connection between the Application and the Portal. Collected information from the student
will be sent to the application through ideamart to be processed in the application. And the
processed information from the application is fed back to the student.
2.2.2.1.3 Application
Application provides the student with an interface to acquire student specific information
through ideamart and then it fetch the requested information from the database and direct it
to the student’s mobile via ideamart.
2.2.2.1.4 Database
Here My SQL database were used in Apache server. The database have more tables for the
MIS. But here I used only three tables.
1. Student record
2. Test Info
3. Results
2.2.2.2 Functional Requirements
2.2.2.2.1 Student
 The specified USSD code to access the application
 Input the Index No
 Input the Test ID
18
2.2.2.2.2 Idea Mart
 Fetch the USSD code entered by the student.
 Start a new session
 Fetch student input
 Send the input information to the application using application id
 Receive the result and deliver that to student through the application interfaces
2.2.2.2.3 Application
 Maintain connection with ideamart and database
 Fetch responses from the ideamart
 Search for the specified information from the database
 Deliver data to the idea mart.
2.2.3 Process
I did the function developing following way. On the developing process I used curl function
to interactive with the Ideamart. On the USSD process the student asked to enter the Index
No. But the Index numbers contained some English Letters. So On the USSD input we
cannot input letters (In most of the mobiles) for that we choose a mapping formula.
public function mapping($studentid)
{
$town = substr($studentid,0,1);
$type = substr($studentid,1,1);
$year = substr($studentid,2,1);
$gender = substr($studentid,3,1);
$id = substr($studentid,4,4);
$examid = substr($studentid,9,2);
$town_array = array('F','M','G','R','T');
$studentid =
$town_array[(int)$town].$town_array[(int)$type].$year.$town_array[(int)$
gender].$id.$examid;
return $studentid;
}
19
2.2.3.1 Display Main menu
1. Triggered when the student input the USSD code to start a session.
2. The student is requested to Enter Index No.
3. Validate Student Input
2.2.3.2 View Results menu
1. Triggered when the student input valid Index No and Test ID.
2. Trigger the Search Function
3. if search function returns null show error message
4. Else display search results to the student.
5. End student session.
2.2.3.3 Search student record
1. Triggered by View results function
2. Search the database for Index No and Test ID
3. Fetch the available information from database.
4. Return available results to respond function ,if none available return nul
Figure 2. 11 : RPS database's tables
20
2.2.4 Output
Figure 2. 13 : Success path output
Figure 2. 14 : One of failed path
Figure 2. 12 : Initial state
21
2.3 Leaf Invoice Management System
2.3.1 Introduction
This project’s development part was already finished. Testing process only remained. Leaf
is leading printing company in Srilanka. It have more than 3 branches in Colombo and
nearby cities. They have huge no of invoices per day. So our project was manage the invoice
details quickly and securely. We had created an invoice management system.
2.3.2 The Project Overview
This project was developed using Symfony framework as a web application. It had MySQL
database for the management process. It was totally a cloud application. Database also
located in UBUNTU cloud server. This application gives complete solution for the invoice
management.
2.3.3 Task
Unit testing the web application with each possibilities. Work together with data-entry
operation for collecting more requirements and suggestions. And prepare a report.
2.3.4 Process
We went two field visit to the main branch office of Leaf that located in Horton place,
Colombo. We collected some invoice hardcopies and enter the data on the system for the
testing process. From that we could identify following interface issues.
1. Product add interface need more options.
2. Invoice date fixed with current date.
3. Admin could not change the finished invoice record after print issued.
So we informed those error to the development team. Here the unit testing process was did
with in the peak time of the Leaf Company.
22
2.4 SMS Feature of Route-Radar
2.4.1 Introduction
This is a new feature of Route radar application. The existing application was completely a
web based application. User can checked only using browsing the URL. Use got their
location on that way only. When user traveling user cannot browse some time using pc, also
user may not have a smart mobile phone. So that time user will disappointed. So we
introduced this SMS based location finding system as a smart solution.
This project was assigned only to me. This application also used the web portal. But this
time I had some experience to do this kind of projects. But the new things was database.
Normally Route-Radar application developed using NoSQL database. For that they used
Mongo DB as a web server. Mongo DB completely different than SQL databases. First I did
some case study about the Mongo DB.
For the development, I used Symfony framework 2.8. And also I used html twig extensions,
curl and php. For the testing purpose I used postman and ideamart simulators.
2.4.2 The Project Requirements and Process
2.4.2.1 Overview
The application was connected with the ideamart web portal to interact between the user and
the application. First the user starts a session by sending request sms with username and
password. Then the application verify the user if user is exist or not. If user is exist it will
get user’s SIM id from database. Then application send a request to the ideamart foe check
the user subscription status. From the Status result application select suitable process (error
return, history, fresh location). Since the application is implemented as a sms interactive
service the users can interact with the system using any mobile phone.
2.4.2.1 Environment & Functional Requirements and their Process
This application also consisted there major environments.
1. User
2. Web Portal
3. Application
23
2.4.2.1.1 User
User may be any one. But To access this feature; user should be registered on Route-Radar
application. So a Registered user have unique username and password for access the
application. That same username and password are required for access this feature.
To find the current location user can send the sms as below,
rr(space)<username>(space)<password>
This sms should send to 77102.
2.4.2.1.2 Web portal
Ideamart web portal was used as the interactive interface between the User and the
application. Here three ideamart API are used.
1. SMS API
2. Check Status API
3. LBS APPI
2.4.2.1.3 Application
Existing application of Route-radar was used. Here Application’s User, SIM & History
databases are used. And also LBS Service and Check status service methods are used. Here
the location result will send as an address. For that I used Google API function also.
It had only one controller, which called as SmsLocationController.php It contained
following seven methods.
1. smsAction
2. position
3. getLastLocation
4. findLocation
5. lastLocation
6. getSubStatus
7. curlPostRequest
24
2.4.3 Flow Diagram and Final output Description
Figure 2. 15 : Flow diagram of the process
25
2.4.3.1 Receive SMS
Application Receive the sms like. If sms format is
incorrect ideamart will respond to user. So application
only receive sms when format is correct. Then extract
username and password from text message.
“rr <username> <password>”.
2.4.3.2 Validation
From the user name, Application search the user on the database and return saved encoded
password. Then user entered password will encode and check the password is correct or not.
If validation failed Application will return an error message to the user.
 Here validation checked into two steps
1. User name check is available or not. If user not
exist, return error message. Message format:
“User not exist. Check your user name”
Figure 2. 16 : Output of format error
Figure 2. 17 : Output of the user validation failed
26
2. Password Checking. If password incorrect,
return error message. Message format:
“Password incorrect. Check your password
and try again.”
 If Validation is ok, then application send a request
to ideamart for checking user status.
2.4.3.3 Status Check and Final Output
Application send a request to ideamart for heck the entered user’s status. Then from the
Status Result it will process suitable method.
If Status result,
1. Unregistered: Ideamart response as error
message.
2. Registered: Send a LBS request using SIM
id to ideamart and show the message.
3. Pending-charge: Search Last Location from
history and send the last location.
Figure 2. 18 : Password validation failed
Figure 2. 19 : Output of Success path
27
2.5 RSL MIS
2.5.1 Introduction
RSL Ceramics is a second larger manufacturer in ceramics. In the main factory they have
six departments. For the factory management we developed a MIS application. This
application contains whole process of the six departments. This project was already finished.
Testing process only remained. So I assigned for the application testing process.
2.5.2 The Project Overview
This project also developed using Sanota Admin Bundle as Symfony project. This project
also used MySQL database. It was also a complete cloud application. Database located in
the same server that leaf database carried out under different project folder.
2.5.3 Task
Manual Data entering on the real server for the testing process, and suggest some interface
changes which gives more advantages.
2.5.4 Process
Did the testing process on each departments’ function with every possible ways. I entered
more than three hundred data manually under the many fields for the testing purpose. There
was a function for directly enter the data to the database using excel files. First I did manual
entering then, I tested that function also. From the testing, I observed many issues about the
data entering. So I informed every issues to the Developing Engineer, and corrected
instantly.
28
2.6 CTrack Feature ofRoute-Radar
2.6.1 Introduction
This was the main project carried out myself. Route-Radar application is one of the main
and most valuable product of the Effective Solutions (Pvt) Ltd. This was the first product,
that they were launched ever. Route-Radar is a location tracker application. It works only
for the Dialog SIM users. Because this project was registered under the Dialog Ideamart only
till now.
For use this service user want to register their Dialog SIM to the application through the
Dialog services. After the registration user will get user name and password through the sms.
Whatever the mobile they using user can register the application and track that. It only track
the registered SIM. User can visit the main application using URL (www.routeradar.lk) any
time. From that they can get their location. Here User can view their all the last histories and
download as a report.
It have another feature also. That is group tracking. User allowed to add group members. For
the group adding every user’s username and password must want. So one user cannot add
another user without their permission. So the security and privacy of the user will keeping
very well.
Here track was happened when user logged in as the On-demand service. Sometime user
want to go a long way, but they want know the travelled path with the time. So that time user
cannot track their self every time using the URL. But this need for some specific days only.
So that we planned to introduce a new feature for that as a smart solution. Actually this
project was planned according to the user feedbacks. So we planned a project CTRACK.
This project done only myself.
2.6.2 The Project Requirements
2.6.2.1 Overview
This continuous tracking system give the current location every 15 minutes. Everyone can
use this feature with registering. An existing user can change their plan from on demand to
continuous tracking. A new user can register initially to continuous tracking service. Also
this have another feature. User can allowed to track multiple SIMs which had registered.
29
There are four plans according to the time intervals.
 Three days plan
 Seven days plan
 Two weeks plan
 One month plan
After the plan selection user can select the users for this service including current user. But
selected users should be already registered and have group with logged in user. For this
service user want to pay some amount. The payment will done by Ez-Cash.
Router-Radar application was completely a web application using mongo dB database. Its
main application was develop by using Symfony framework 2.8. So I continued my
development on the existing project path. For that I used Bit bucket and Tortoise Hg. I joined
as a member of this product developing team in bit bucket group. This part’s Interface
designing part, Programming part, Database part and payment gateway were designed by
myself.
2.6.2.2 Environment & Functional Descriptions
2.6.2.2.1 User
User should be registered on Route-Radar application. So a Registered user have unique
username and password for access the application. That same username and password are
required for access this feature. For the Group tracking User should have group members on
Account. To activate the service user want to visit route radar webpage.
http://www.routeradar.lk. User can visit the page using PC or Mobile. Anyone can (without
register) view plan details, but to activate the service user should want to register.
2.6.2.2.2 Web portal
Ideamart web portal was used as the interactive interface between the User and the
application.
1. Route radar server
2. Dialog Ideamart LBS API
3. Dialog Ez-Cash API
Here we were are using Ez-cash payment Gateway. After the plan selection conformation
the link will redirect to dialog Ez-Cash payment gateway. User can pay the total cost using
30
any Ez-cash account. After the payment link will automatically redirect to the application
site. Their user can view the payment information and the plan information.
2.6.2.2.3 Application
Existing application of Route-radar was used. Here Application’s User, SIM, History and
newly added Payment info databases were used. And also LBS Service used.
2.6.2.2 Flow diagram (Front-end)
Figure 2. 20 : User view flow diagram
Start
Visit Page
Login
Select Plan
Select User
Payment Gateway
Notification
Select Plan
Login
31
2.6.2 Process
2.6.2.1 Front-end developing
Here I used Html, Bootstrap, CSS, JavaScript and Twig. The project had four web interfaces.
Every Interface passing parameter to the next page during the every process. So I used
browser’s temporary memory that. So finally I designed following five interfaces.
 cTrack.html.twig
 plan1.html.twig
 failed_notification.html.twig
 success_notification.html.twig
 payment_preview.html.twig
These interfaces were designed using bootstrap framework. So these web interfaces were
supported to all mobile devices also. Here I uncounted with problem. For the mobile devices
the summery of the plans selections not aligned well. But I found a solution for that. That
was client view function. It scripted by using JavaScript as a internal script with the html
codes.
<script>
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera
Mini/i.test(navigator.userAgent) ) {
// is mobile..
document.getElementById("win").style.width = "90%";
}
else
{
document.getElementById("win").style.width = "50%";
}
</script>
 Function of the reload the Interface with the parameters.
public function getRefererRoute(){
$request = $this->getRequest();
$referer = $request->headers->get('referer');
$lastPath = substr($referer, strpos($referer, $request-
>getBaseUrl()));
$lastPath = str_replace($request->getBaseUrl(), '',
$lastPath);
$matcher = $this->get('router')->getMatcher();
$parameters = $matcher->match($lastPath);
$route = $parameters['_route'];
return $route;}
32
UI process diagram
After the Plan selection Browser will save the plan_id and logged in user to local browser
storage. From the Logged in user, find the group members on User database and show into
Interface for user selection. Meanwhile according to the plan_id and user selection cost will
calculated and showed instantly. And also all the plan information will saved to the Payment
info database. Now status saved as “PENDING”. After the process button clicked it redirect
to the Ez-Cash Payment Gateway page for the payment. From the payment status notification
page will show. Also payment database’s status will change according to the payment
gateway result. If payment successful User’s plan will changed to Ctrack plan.
Start
User Validation
Show group members
Cost Calculation
Save Plan info
Payment Gateway
Plan Notification
Figure 2. 21 : UI process order
33
2.6.2.2 Back-end developing
Here I used Symfony framework for that. It is a contracted with MVC Architecture. This
project was an extension of the Route radar application. So that I used existing Bundles for
the Controller files. Whole my part contained one Controller Php class and One Command
Php class. Also the main part of this project was payment gateway.
For the interface controlling I coded following method actions under The
TrackingPlanController.php class.
 planSelectionAction : : It rendered the cTrack.html.twig. This action
only load the interface of the Plan selection
window.
 userSelectionAction: : It rendered Plan1.html.twig. This action will
get the logged in user. From that it will search
the group members and get the results as an
array and pass that to the interface.
 paymentPreviewAction : It rendered payment_preview.html.twig. This
action will handle the database insertion and
submit the data to the Ez-cash API
 eZCashResponseAction : From the payment result It returned
success_notification.html.twig
orfailed_notification.html.twig. This action
redirect from the Ez-Cash API. from the Ez-
cash payment status it will redirect to the
corresponding Interface
For the Controlling part I created some method along with those actions
 ezCashSubmit
 eZCashResponse
 activationAction
 timemanegment
 getRefererRoute
34
Ez-cash submit method was used to submit the relevant information to the Ez-Cash API.
This was a payment gateway methods. So the privacy and security things were more
important. So that whole the data transmission were done by using Public-key cryptography
technology. These used a public key and private key for the encryption and decryption.
Public-key cryptography, or asymmetric cryptography, is any cryptographic system that uses
two kinds of keys: public keys that may be disseminated widely, while private keys are
known only to the owner. In a public-key encryption system, any person can encrypt a
message using the public key of the receiver, but such a message can be decrypted only with
the receiver's private key. For this to work it must be computationally easy for a user to
generate a public and private key-pair to be used for encryption and decryption. The strength
of a public-key cryptography system relies on the degree of difficulty (computational
impracticality) for a properly generated private key to be determined from its corresponding
public key. Security then depends only on keeping the private key private, and the public
key may be published without compromising security.
Figure 2. 22 : Example of Public-key cryptography technology
35
Here I used mongo DB as a database. Actually I used the existing collection. Also I create
some document for the payment information history.
After the whole function I created the activation method and an activation command for the
cronjob.
Figure 2. 23 : History document and the cronjob result
2.6.4 Output
Figure 2. 24 : CTrack interface
36
2.7 Route-Radar B2B Command
2.7.1 Introduction
This application focus on delivery service companies. They have sales man for the delivering
works. The efficiency of the delivering service of the company depend on the staffs’
geniuses. Some staffs may ice for the works. Company cannot track the every time. So we
had a solution for that. There was an application companied with Route-radar application. It
track every registered staffs every 15 minutes. Company administration now track now
staffs. This application called as a B2B. This application already launched when I was joined
the company. This application function should work every 15 minutes.
The problem was, It server working every time on cloud. To avoid this we planned to use a
Crontab technology on Ubuntu server. This work was assigned to me. So that I used
Command function of the Symfony framework.
2.7.2 Requirements and Task
This was a Symfony 2.8 framework project. It was used mongo dB database. This database
had five collections. This project used Ideamart LBS service and Subscription service.
So my task was a developed a terminal command for the tracking application. It should
contained get the user subscription mood and the current location and save to the history.
2.7.3 Process
For the terminal I configured the command first. Then the method was developed. This
function contained the whole the tracking functions. For that I used LBS Poll service that
was already developed.
2.7.3.1 Terminal configuration scripting
protected function configure()
{
$this
->setName('effective:b2b')
->setDescription('B2B service')
->addOption(
'start',
null,
InputOption::VALUE_NONE,
'B2B Service started' );}
37
2.7.3.2 Track Method
if ($input->getOption('start')) {
$start = microtime(true);
$this->lbs_poll=$this->getContainer()->get('lbs_poll');
$dataAccess = $this->getContainer()->get('DataAccess');
$simAccess=$dataAccess->get('sim');
$this->dm = $this->getContainer()->get('doctrine_mongodb');
$simRepo = $this->getMyRepository('BaseDataAccessBundle:Sim');
$sims = $simRepo->findBy(array('registrationStatus' =>
'REGISTERED'));
$totalUsers = count($sims);
$sucess = 0;
if ($sims != null) {
foreach ($sims as $sim) {
$output->writeln($sim->getUser()->getUsername());
$locations = $this->lbs_poll->Poll(array($sim));
foreach ($locations as $location) {
$ab = $simAccess->addLBSCurrentLocation($sim,
$locations[$sim->getId()]);
if($ab == 1){
$item = json_decode($location);
$output->writeln('OK');
$output->writeln('lat :'.$item->latitude.'
lon: '.$item->longitude);
$sucess++;
}else{
$output->writeln('ERROR');
}
}
sleep(1);
}
}
$end = microtime(true);
$output->writeln("--------------------------------------------
----------------");
$output->writeln("Total Sucess Registry : $sucess");
$failed = $totalUsers - $sucess;
$output->writeln("Total Failure : $failed");
$exce = $end-$start;
$output->writeln("Total excecution Time : $exce Seconds");
$output->writeln("--------------------------------------------
----------------");
}
38
2.7.3.3 Cronjob
Figure 2. 25 : Crontab configuration for the B2B Command
39
2.8 Route-RadarAndroid application
2.8.1 Introduction
This project totally focused on Route-radar user who have android mobiles. Normally this
application is a web application. To access the application, user want to go with a browser.
Many of our customers’ feedback said that they want to easily access the application like
mobile app. So that we planned to create mobile app that have easily and securely access the
web application. So we planned to do a web view android application with some smart
including. Such as mobile networks related things. This project assigned only for me. So this
project totally completed by myself, such as Interfaces designing, programming and testing.
2.8.2 The Project Requirements
2.8.2.1 Overview
This application is partially web view application. Web view only load the URL of the
Route-Radar application. That web interfaces are developed for both PC and Mobile devices
using Bootstrap. So here the mobile view will show on the web view UI like a browser
interface. But the main content was handling the mobile internet connections. So that I
planned auto network enabling function. But from the android API 20 the function was
restricted by the GOOGLE. So I planned another way to complete the task.
2.8.2.1 Task
The main task is network controlling. So that I listed down following possibilities.
1. Network enabled full time
2. Network disabled before starting the app
3. Network disabled during the process.
If network enabled until finish the process, it was not a problem. So it was the Success path
of the project. Otherwise the failure path had two options. But on the both condition there
will be a pop-up notification will show. And also user will asked to enable the data network.
It will redirect to the system data-network settings. The notification will continue until
enabled the network or exit the application.
Other task was construct the web view interface functions for the real-time process.
40
2.8.2.2 System Requirements
I used the Android Studio 1.5.1 as an android development tool. This project developed up
to API 10 in android SDK. This app unit tested using real time testing device. For that I used
an android phone that have API 19 (Jellybean 4.0.1) and API 21(Kit Kat 4.4). And also I
used to test my android virtual device using API 23 (Marshmallow).
For the functional developments, I needed some android OS default function. So that I just
enabled those function on AndroidManifest.xml.
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE"/>
2.8.3 Process
2.8.3.1 UI Design
I created three Interfaces for the application. One of those should web view. And also I
created some animation for the main interface. All those three interfaces created by using
XML.
1. activity_main.xml
2. error.xml
3. splashscreen.xml
2.8.3.1.1 Activity_main.xml
This content the web view layout. So this interface not needed to well design.
Figure 2. 26 : Web view interface designing
41
2.8.3.1.2 Error.xml
This interface will show, when the data-network disabled. This interface have retry button.
If it is pressed, it will check the network again and if network interrupted, it will show a
notification window to the user for enable the network.
2.8.3.1.3 Splashscreen.xml
This is the main welcoming interface. It contains the animation.
Figure 2. 28 : Welcoming splash screen interface designing
Figure 2. 27 : Error view interface designing
42
2.8.3.2 Programming
It contains the five java classes. These contains all the functions related to the tasks which
described section 2.8.2.1.
1. Check
2. MainActivity
3. Network
4. Progress
5. Splash
2.8.3.2.1 Check.java
This class contains the function that check the network is enabled or not. Actually this
function worked on background. Every state I will notify the network state as a Toast
message.
 Function of checking the connection
public static int getConnectivityStatus(Context context) {
ConnectivityManager cm = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
if (null != activeNetwork) {
if(activeNetwork.getType() ==
ConnectivityManager.TYPE_WIFI)
return TYPE_WIFI;
if(activeNetwork.getType() ==
ConnectivityManager.TYPE_MOBILE)
return TYPE_MOBILE;
}
return TYPE_NOT_CONNECTED; }
2.8.3.2.2 Mainactivity.java
This is the main control class. It have functions that do control the web view, control the
network and arrange the functions. This class load the activity_main.xml
 Web view client function
webView.setWebViewClient(new WebViewClient() {
public void onPageFinished(WebView view, String url) {
43
Log.i(TAG, "Done loading " + url);
if (progressBar.isShowing()) {
progressBar.dismiss();
}
}
public boolean shouldOverrideUrlLoading(WebView view, String
url) {
current = url;
Log.i(TAG, "Loading");
view.loadUrl(url);
return true;
}
public void onReceivedError(WebView view, int errorCode,
String description, String
failingUrl) {
setContentView(R.layout.error2);
System.out.println(webView.getUrl().toString());
current = webView.getUrl().toString();
ImageView image = (ImageView) findViewById(R.id.iV);
Animation animation1 =
AnimationUtils.loadAnimation(getApplicationContext(),
R.anim.zooming);
image.startAnimation(animation1);
final ImageButton reload = (ImageButton)
findViewById(R.id.iB);
reload.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
System.out.println(current);
current = webView.getUrl();
networkCheck();
}
});
Toast.makeText(getApplicationContext(),
"Oh no! Network Diabled",
Toast.LENGTH_SHORT).show();
}
});
 Network controller
public void networkCheck() {
try {
AlertDialog.Builder alertDialogBuilder = new
AlertDialog.Builder(this);
alertDialogBuilder.setMessage("Data Connection is
not enabled. Please enable Data connection");
alertDialogBuilder.setPositiveButton("Enable Data",
new DialogInterface.OnClickListener() {
@Override
44
public void onClick(DialogInterface arg0, int arg1) {
startActivityForResult(new
Intent(Settings.ACTION_SETTINGS), 0);
}
});
alertDialogBuilder.setNegativeButton("Exit", new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(getApplicationContext(),
"Thankyou for using Route-Radar", Toast.LENGTH_LONG).show();
finish();
}
});
AlertDialog alertDialog =
alertDialogBuilder.create();
alertDialog.setCancelable(false);
alertDialog.show();
} catch (Exception e) {
Toast.makeText(getApplicationContext(),
e.toString(), Toast.LENGTH_LONG).show();
finish();
}
}
And also there are more function to control the app, such as progress bar controlling
functions, alert dialog function, animation function and etc.
2.8.4 Final output
Figure 2. 30 : Output of the error view
interface
Figure 2. 29 : Output of the splash
screen interface
45
2.9 Location Updater function for RRClient Android application
2.9.1 Introduction
Route radar application includes many features. So that we planned to introduce new feature.
That was totally for android users. This app name was RRClient. This will update the current
position of the registered user using GPS or Network Location or Collaborate of both. And
also this app will work background process and auto enabling internet connection if possible.
So this was a Team project. Three staffs were assigned for this project including me. This
project used Android Studio with Java as a programming Language. So my part is develop
a class that was main function of this app. That was updating locations and analysing.
2.9.2 The Project Requirements
2.9.2.1 Overview
The Developing requirements were little complicated. Normally android mobile location
finding function is depending on the two states.
1. Wireless Networks
2. GPS
Wireless network working using the nearby networks. Such as mobile networks and Wi-Fi.
It actually identify the SIM network of the android mobile. These results are not accurate.
Accuracy is depend on the nearby network base station.
GPS is considerably accurate. But we have to turn on the option. It works using GPS modules
that fixed with the mobile mother board. This not depend on our SIM. So this is very
accuracy than wireless network location.
Figure 2. 31 : Location based system settings
of android OS
46
2.9.2.1 Task
From the both conditions I had needed to find the accuracy location. There are 4 main states.
1. Network Option only turn on
2. GPS only will turn on
3. Only Network will turn on
I. Initial start
II. Not the initial state
4. Both Network and GPS options will turn off
I. App Initial start conditions
II. Not the initial state
2.9.2.1.1 Network Option only turn on
Now both options are turned on. So as we discussed above GPS is more accuracy than
Wireless. So For this condition we can chose only the GPS result as a final result of our
location.
2.9.2.1.2 GPS only turn on
Now also we can get the GPS results as a final result. Do not want to analyse part.
2.9.2.1.3 Only Network will turn on
So this state onwards the main things would happened. Actually analysis part will work here.
There are two possibilities. If the mobile may restart or normal state. If the mobile restart
and newly opened the app, so there are no any history. Then we can get the wireless network
result as a location results.
If the mobile use as a normal state (at least onetime the app used), here we have history.
Then app will get the new location results and compare with the last results. From the analyse
result it will take the final result and replace the history with new result. For the comparing
state, it actually check the distance between the both coordinates. We set the minimum
accuracy distance as 200m. Then if it was exceed, history result will take as a final result.
2.9.2.1.4 Both Network and GPS options will turn off
This state also have two possibilities. The app may be start first time or not. If it is first time,
there are no any history. And also fresh result cannot find. Then it will notify the user to turn
on the GPS or Wireless. If it is not an initial state, History result will be taken as a final
result. And also history remains.
47
2.9.2.2 System Requirement
I used the Android Studio 1.5.1 as an android development tool. This project developed up
to API 10 in android SDK. This app unit tested using real time testing device. For that I used
an android phone that have API 19 (Jellybean 4.0.1). And also I used to test my android
virtual device using API 23 (Marshmallow).
For the history management a Database wanted. This app does not want to connect online
Databases. Only the local app database was enough. So that I Selected the SQLite as the
database.
For the Function development, I needed some android OS default function. So that I just
enabled those function on AndroidManifest.xml.
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
My part was only develop the function. I did not involve with UI designing, but for the
testing purpose I created a normal interfaces.
2.9.3 Process
2.9.3.1 Sample UI Designing
This was only for the unit testing process. Using the android studio framework, I developed
a sample interface using XML.
Figure 2. 32 : Testing sample UI designing
48
2.9.3.2 Main Function
if (isGPSEnabled && GeoLongitude > 0 && GeoLongitude > 0) {
final_t.setText("" + GeoLatitude);
final_l.setText("" + GeoLongitude);
} else if (isGPSEnabled == false && mydb.numberOfRows() == 0)
/// from database
{
final_t.setText("" + NetLatitude);
final_l.setText("" + NetLongitude);
} else if (isGPSEnabled == false && mydb.numberOfRows() != 0) {
Cursor rs = mydb.getData(1);
rs.moveToFirst();
String lattitude =
rs.getString(rs.getColumnIndex(DBHelper.COLUMN_Latitude));
String longitude =
rs.getString(rs.getColumnIndex(DBHelper.COLUMN_Longitude));
Location GPS = new Location("GPS");
GPS.setLatitude(Double.parseDouble(lattitude));
GPS.setLongitude(Double.parseDouble(longitude));
if (isNetworkEnabled == true)
{
try {
float distan = distance(GPS, n);
if (distan > 200) {
final_t.setText("" + lattitude);
final_l.setText("" + longitude);
} else {
final_t.setText("" + NetLatitude);
final_l.setText("" + NetLongitude);
}
dis.setText("" + distan);
} catch (Exception e) {
System.out.println(e.toString());
System.out.println("test try");
}
}
else
{
final_t.setText("" + lattitude);
final_l.setText("" + longitude);
}
49
2.9.3.2 SQLite database functions
public void onUpgrade(SQLiteDatabase db, int oldVersion, int
newVersion) {
db.execSQL("DROP TABLE IF EXISTS history");
onCreate(db);
}
public boolean insertDB (int id,String latitude, String
longitude)
{
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("id", id);
contentValues.put("latitude", latitude);
contentValues.put("longitude", longitude);
db.insert("history", null, contentValues);
return true;
}
public Cursor getData(int id){
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from history where
id="+id+"", null );
return res;
}
public int numberOfRows(){
SQLiteDatabase db = this.getReadableDatabase();
int numRows = (int) DatabaseUtils.queryNumEntries(db,
TABLE_NAME);
return numRows;
}
public boolean updateDB (Integer id, String latitude, String
longitude)
{
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("latitude", latitude);
contentValues.put("longitude", longitude);
db.update("history", contentValues, "id = ? ", new String[] {
Integer.toString(id) } );
return true;
}
50
2.10 Titon Payroll
2.10.1 Introduction
This project was developing employee payroll system for the Titon (Pvt) Ltd. When I
involved this project, I was in the middles stage of developing. And also my training period
was almost over. Actually one four days ahead. So I involved with the project only four days.
My part was develop the worker's working hour’s scheduler. My part contained a web
interface and database part.
2.10.2 Project Requirements
2.10.2.1 Overview
In the dashboard there were many options. In the system there were many admin s. For the
scheduler system, this system only can only accessed by the super admin. So this have only
one web interface and one new table on database. But for function there were more than
three linked databases were used. This system totally developed using sanota admin bundle
on Symfony framework as a web application. Here I used php, Html with twig and bootstrap,
JavaScript and Ajax.
Figure 2. 33 : Schedule tab final output
51
2.10.2.2 Task
My part actually contained two function under the Scheduler section. It contained one
Interface only. So I needed to consider following two functions.
 Schedule generator
 Schedule viewer
These all functions are working under the specific given date range. Here this company have
two shift types. There were Day and night shifts. Night shift had some complicated contents.
So I discussed with my chief engineer to summarize following contents.
 8 hour shift
o If leave day
 If full day
 Else if half day morning
 Else if half day afternoon
o Else if holyday
 sDateTime=null
 eDateTime=null
o Else if sunday
 sDateTime=null
 eDateTime=null
o Else if saturday
 sDateTime=08:00
 eDateTime=13:00
o Else
 sDateTiime=08:00
 eDateTime=17:00
 24 hour shift
 If leave day
o If full day
 If first day
 Else if second day
o Else if half day morning
 If first day
 Else if second day
52
o Else if Half day afternoon
 If first day
 Else if second day
 Else
o If first day
 sDateTime=08:00
 eDateTime=17:00
o Else if second day
 sDateTime=00:00
 eDateTime=08:00
2.10.2 Process
2.10.2.2 Web interface
I created an Html page using bootstrap. Here instance page view needed. So I used Ajax for
that.
$.getJSON("{{ url('base_page_schedule_sheet') }}", {
startDate: startDate,
endDate: endDate,
empId: empId
},function(res){
$('#detail').html(res.view);
});
2.10.2.2 Script Programming
I created a Schedule Generate Controller php class only. It contained following methods.
 generateAction
 scheduleCreateAction
 saveSchedules
 scheduleShowaction
All those six methods were developed myself. Generate action was load the web interface
under the dashboard selection if user is super admin. Schedule generate action was the main
function of this project. It got the date duration given by the UI, then search the specific user
attendance database. From that it will generate a schedule report. For that it used leave Verify
method. It contained leave configuration. And also it saved in to the new Schedule database.
53
After the scheduling the database schedule Show action will work. It worked using Ajax
connection. It shows the final generating result. It also contains the date range selection.
2.10.2.3.2.1 Database save script
$em = $this->getDoctrine()->getManager();
$atsRepo = $em-
>getRepository('BasePageBundle:AttendanceSchedule');
$empRepo = $this->getRepository('Profile');
$emp = $empRepo->find($empId);
foreach ($clas as $std) {
$date = $std->Date;
$schedule = $atsRepo->findOneBy(array('profile' =>
$empId, 'date' => $date));
if ($schedule != null) {
$em->remove($schedule);
$em->flush();
}
$newAdd = new AttendanceSchedule();
$newAdd->setDate($date);
$newAdd->setProfile($emp);
$newAdd->setSDateTime($std->sDateTime);
$newAdd->setEDateTime($std->eDateTime);
$newAdd->setShiftType($std->Shift);
$em->persist($newAdd);
$em->flush();
2.10.2.3.2.1 Routing path configurations
base_page_schedule:
path: /admin/schedule
defaults: { _controller: BasePageBundle:ScheduleGenerate:generate }
base_page_schedule_sheet:
path: /admin/sheet
defaults: { _controller:
BasePageBundle:ScheduleGenerate:scheduleShow }
base_page_schedule_create:
path: /admin/schedule/create
defaults: { _controller:
BasePageBundle:ScheduleGenerate:scheduleCreate }
54
Chapter Three
Training Experience – Management
3.1 ManagementStandards
Effective Solutions is an island-wide well known economic body. It is considered as a
booming software solutions partner in Sri Lanka. To maintain such a standard Effective
Solutions has adopted its own way of managing human resources and other resources.
During the training period, I could not able to interact much with the marketing side. I was
in the Engineering team. But I had three Client meeting during this period. So that time I can
learned about the product marketing management things and feedback management things.
During the client meeting, I abled to understand, how to manage the product delivering
things and manage the client’s actual needs. We want carefully manage everything otherwise
we will loss the client. Both Project management and Client managements were differ each
other. Our Successive of the project depend on the Client management skill.
3.2 ManagementTechniques
3.2.1 Time management
This the very import thing of a company. My company was started at 9.00 am, and the
official off time was 6.00 pm. But we can stay up to 8.00. This was our choice only. And
we had one hour break for the launch. Actually we did not want to work whole eight hours.
Middle of that we had some mind relaxation off times. That was the wonderful times. That
time we played some games and also had some fun talking with staffs.
For the project’s time management, we planned whole works already and customize those
time and charted the things and the work time. So that we had maintained our projects with
on time easily. When the project planning, we consider everything about the time
management. For example some technologies, we had want to some case studies. That times,
we allocated times for that also within the whole project time.
55
3.2.2 Project management
For the Project management, first we assigned the team members. Then we had an instruction
and project planning meeting. During that meeting, we divided for the parts of the project.
Then we can did our only part under the one topic. For that, we used following project
management tools.
 Bit Bucket
 Tortoise Hg
 Bitrix24
Here we use the Bitrix24 as the office management tools. Otherwise my chief engineer
assigned a google excel cheat for the daily work management. On the first day, I wanted to
list down the next day works, and also end of the every day I wanted to summarize the on
day working summary on the that document. He checked that document every day. This was
a good project management skill for me. Overall I had got more new things about the project
management during my training period.
Figure 2. 34 : Bitrix24 web interface
56
Chapter Four
4.1 Summary
As an Electrical and Information Engineering undergraduate student of University of
Ruhuna, I completed my first industrial training in Effective Solutions (Pvt) Ltd, Wewala
Piliyandala. First week was kind of an introduction to the environment of the software
development which was followed by the company. From the experience gained from the
first week by seeing the projects which have done using those technologies, go the ability to
work on the Symfony2.8 framework and Dialog ideamart APIs. So then it was a nice time
to engage in many projects. Two main features in Route-Radar application were done by
myself and whole interface designing, front-end, back-end coding and all were done by
myself.
Apart from that, I worked with Web portal Platforms, Mobile Application platforms also. So
it’s a great experience to work on some other client’s requirements and then giving solutions
for it. I could make a good relations with my chief engineers, and from the couple of Client’s
field visits, I could understand the industrial work flow. Though we know technologies,
applications of the technology is totally different from as it seems. So understanding all the
concepts and working it a great feeling. And the infrastructures also was at satisfactory
conditions. So at the end overall training process is Excellent I guess. I gained a lot of
knowledge in that and as well as a lot of experiences.
4.2 Conclusion
The Industrial training programme was a new experience with a lot of challenges and lot of
knowledge for me. In the training period the best practise I learned was to improve
communication skills in all sort of work. I was not supposed to code all the day. I had the
opportunity to meet the client to do business analysis and requirement gathering for the
project. In these instances the communication ways and arranging meetings with the officials
were new experience for me. And more than technical background I was able to experience
a lot of related procedures like project requirement gathering, project management and also
the human resource management along with the communication with the co-workers.
I really had a good training experience and I was able to complete with a good attendance to
the work and I was able to leave the training facility with a cheerful way, because I am
57
confident about the way I was able to tackle a lot of new technology and new persons. In the
training period, I could meet many industrial people who have higher positions in various
companies.
It is the fact that for a person who don’t know the basics of OOP concepts in the software
industry cannot survive in the field. His or her code will be not in good standards. So there
has to be a way of evaluation. I suggest a panel must be appointed including EEC, department
Lecturers and Instructors to evaluate the current progress of a student in the expected field.
I suggest students should be given the chance to select training centres before couple of
months and they can have preparation for the training and in the evaluation every student
can have a fair chance to get selected to the training places.
58
References
 https://symfony.com/ [Accessed : 2016/01/04 ]
 http://twig.sensiolabs.org/documentation [Accessed : 2016/02/05]
 http://getbootstrap.com/getting-started/ [Accessed : 2016/01/16]
 http://en.wikipedia.org/wiki , User Requirements Document [Accessed : 2016/03/20]
 https://docs.mongodb.org/manual/ [Accessed : 2016/03/18]
 http://stackoverflow.com/ [Accessed : During the Project Programming]
 http://community.ubuntu.com/contribute/support/ubuntu-forums/
 https://effectives.bitrix24.com/ [Accessed : 2016/04/25]
I
Appendix 1
ABBRIVIATIONS
II
AJAX Asynchronous JavaScript and XML
SQL Structured Query Language
PHP Hypertext Pre-processor
MIS Managing Information System
IOT Internet of Things
HTML Hyper Text Mark-up Language
JSON JavaScript Object Notation
LBS Location Based Service
USSD Unstructured Supplementary Service Data
IDE Integrated development environment
APK Android application package
UI User Interface
III
Appendix 2
SERVICE SOURCE CODES
IV
LBS Service
class LBS extends Base {
/**
* by Darshana (Copywrights registerd)
* @param $appId
* @param $subscriberId
*/ public function poll(Array $sims)
{
$mh = curl_multi_init(); // multi handler
$curlArray = array();
$result = array();
foreach($sims as $index=>$sim)
{
$ch = curl_init($this->getAPI('lbs'));
$app = $this->getAppById($sim->getAppId());
$data = new stdClass();
$data->applicationId = $app['appId'];
$data->password = $app['password'];
$data->subscriberId = 'tel:'. $sim->getSubscriberId();
$data->serviceType = "IMMEDIATE";
$this->logYml($data,'LBS_Request');
$data_string = json_encode($data);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Accept: application/json',
'Content-Length: ' . strlen($data_string))
);
$curlArray[$sim->getId()] = $ch;
curl_multi_add_handle($mh, $curlArray[$sim->getId()]);
V
}
$running = null;
do {
curl_multi_exec($mh, $running);
} while($running > 0);
foreach($curlArray as $index => $ch) {
$result[$index] = curl_multi_getcontent($ch);
curl_multi_remove_handle($mh, $ch);
}
curl_multi_close($mh);
$this->logYml($result,'LBS_Response');
return $result;
}
}
VI
Subscription Check Service
class Subscription extends Base
{
/**
* by Darshana (Copywrights registerd)
* to get the subscriber status (register/unregister/payment
pending)
* @param $appId
* @param $subscriberId
*/
public function getStatus($appId,$subscriberId){
$ch = curl_init($this->getAPI('customer_status'));
$app = $this->getAppById($appId);
$request = new stdClass();
$request->applicationId = $app['appId'];
$request->password = $app['password'];
$request->subscriberId = 'tel:'.$subscriberId;
$data_string = json_encode($request);
$this->logYml($request,'subscription');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string))
);
$result = curl_exec($ch);
$this->logYml($result,'response');
curl_close($ch);
return $result;
}
}
VII
Curl Post Request
private function curlPostRequest($message,$url)
{
$data_string = json_encode($message);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string)
));
$response = curl_exec ($ch);
curl_close ($ch);
return $response;
}
SMS Get Request
$subscriber = json_decode(file_get_contents('php://input'));
$password = '161a083157a2b659b67b05127dbf05e2';
$url = 'https://api.dialog.lk/sms/send';
$applicationId = 'APP_009023';
$message = $subscriber->message;
$logger->info($message);
$sourceAddress = $subscriber->sourceAddress;
$returnMessage = new stdClass();
$returnMessage->password = $password;
$returnMessage->applicationId = $applicationId;
$returnMessage->destinationAddresses = [$sourceAddress];
$message = explode(' ', $message, 2);
$message = explode(' ', $message[1]);

Contenu connexe

Similaire à Report_original_hari

Artículo Electricidad-y-electronica-industrial.pdf
Artículo Electricidad-y-electronica-industrial.pdfArtículo Electricidad-y-electronica-industrial.pdf
Artículo Electricidad-y-electronica-industrial.pdf
miguelangelquirozgar
 
Investigating SCM in Indian Construction Industry
Investigating SCM in Indian Construction IndustryInvestigating SCM in Indian Construction Industry
Investigating SCM in Indian Construction Industry
Abhishek Singh
 

Similaire à Report_original_hari (20)

Industrial Training Report, UmaOya Downstream Development Project
Industrial Training Report, UmaOya Downstream Development ProjectIndustrial Training Report, UmaOya Downstream Development Project
Industrial Training Report, UmaOya Downstream Development Project
 
Naita training report Electro serv
Naita training report Electro servNaita training report Electro serv
Naita training report Electro serv
 
120463N
120463N120463N
120463N
 
Final Report v3
Final Report v3Final Report v3
Final Report v3
 
Satellite Systems and Terrestrial TV Distribution and receiving systems
Satellite Systems and Terrestrial TV Distribution and receiving systems Satellite Systems and Terrestrial TV Distribution and receiving systems
Satellite Systems and Terrestrial TV Distribution and receiving systems
 
Final Year Project
Final Year ProjectFinal Year Project
Final Year Project
 
Artículo Electricidad-y-electronica-industrial.pdf
Artículo Electricidad-y-electronica-industrial.pdfArtículo Electricidad-y-electronica-industrial.pdf
Artículo Electricidad-y-electronica-industrial.pdf
 
Symposium Proceedings_full book
Symposium Proceedings_full bookSymposium Proceedings_full book
Symposium Proceedings_full book
 
vikas patel (2)
vikas patel (2)vikas patel (2)
vikas patel (2)
 
Internship Report
Internship ReportInternship Report
Internship Report
 
Final training report PDF
Final training report PDFFinal training report PDF
Final training report PDF
 
Internship report done by Vincent de Paul
Internship report done by Vincent de PaulInternship report done by Vincent de Paul
Internship report done by Vincent de Paul
 
INDUSTRIAL ATTACHMENT REPORT By Innocent Nsengimana
INDUSTRIAL ATTACHMENT REPORT By Innocent NsengimanaINDUSTRIAL ATTACHMENT REPORT By Innocent Nsengimana
INDUSTRIAL ATTACHMENT REPORT By Innocent Nsengimana
 
Internship_Report_Projects_have_done_Dur.pdf
Internship_Report_Projects_have_done_Dur.pdfInternship_Report_Projects_have_done_Dur.pdf
Internship_Report_Projects_have_done_Dur.pdf
 
A TECHNICAL REPORT ON STUDENTS’ INDUSTRIAL WORK EXPERIENCE SCHEME (SIWES) UND...
A TECHNICAL REPORT ON STUDENTS’ INDUSTRIAL WORK EXPERIENCE SCHEME (SIWES) UND...A TECHNICAL REPORT ON STUDENTS’ INDUSTRIAL WORK EXPERIENCE SCHEME (SIWES) UND...
A TECHNICAL REPORT ON STUDENTS’ INDUSTRIAL WORK EXPERIENCE SCHEME (SIWES) UND...
 
Investigating SCM in Indian Construction Industry
Investigating SCM in Indian Construction IndustryInvestigating SCM in Indian Construction Industry
Investigating SCM in Indian Construction Industry
 
Internship presentation.pptx
Internship presentation.pptxInternship presentation.pptx
Internship presentation.pptx
 
Experience at WSO2 as an Intern
Experience at WSO2 as an InternExperience at WSO2 as an Intern
Experience at WSO2 as an Intern
 
Basic Industrial Training Report
Basic Industrial Training ReportBasic Industrial Training Report
Basic Industrial Training Report
 
Front page
Front pageFront page
Front page
 

Report_original_hari

  • 1. DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING FACULTY OF ENGINEERING UNIVERSITY OF RUHUNA INDUSTRIAL TRAINING REPORT SUBMITTED IN PARTIAL FULFILMENT OF THE DEGREE OF BACHELOR OF SCIENCE IN ENGINEERING 27th APRIL 2016 EFFECTIVE SOLUTIONS (PVT) LTD WEWALA, PILIYANDALA (FROM 04TH JANUARY 2015 TO 27TH MARCH 2016) HARIHARAN K. (EG/2013/2204)
  • 2. i PREFACE This report consists of all the tasks and projects carried out at the training at Effective Solutions, Wewala Piliyandala. I involved in two major projects and four minor projects. And throughout the report, it is discussed how the training experiences and work came along in front of me and how I faced them and how the projects were developed based on all the information gathered every day, and how I involved with the project management. The first chapter consists of an introduction to Effective Solution and its workflow in the process of developing the Software’s and Electronics products that they are offering. From the second chapter onwards I have described the projects which I did during the period and the knowledge and experiences I have gathered from them. I also included my Extra work applications into the content. Also the project description that was developed by me and their gathered information. From the Third chapters of the report is concentrated on the way all the effort and the information and experiences helped in completing a software project and how the implementation of projects were done as a summary, and the project management techniques. In addition to this I have included the content pages, list of tables, list of figures and the acknowledgement, abbreviations used throughout the context and the references used in developing the report. Hariharan K. EG/2013/2204 Department of Electrical and Information Engineering, Faculty of Engineering, University of Ruhuna.
  • 3. ii AKNOWLADGEMENT The first industrial training of my life became a very successful one with the help of a number of persons and a number of government bodies and many officials. First of all I present my sincere gratitude and sincere thanks to the Department of Electrical and Information, especially Dr. S.H.K.K. Gunawickrama and Dr. M.R. Udawalpola who gave me knowledge in IT, which was more helpful in my training along with Senior Lecturer Dr. Ruwan Appuhamy, coordinator of Engineering Education Centre (EEC), Faculty of Engineering, University of Ruhuna and the National Apprentice and Industrial Training Authority (NAITA) for the opportunity provided to follow an industrial training for period of three months. The officials in the training centre at Effective Solutions, the Chief Executive Officer Eng. Mr. Keerthi Kodithuwaku helped me to be aware of their services and the work that they are doing. All the projects and all the tasks we were allocated to me via Eng. Mr. Darshana Priyankara, Director of Effective Solutions (PVT) LTD, Eng. Mr. Charith Jayarathna, IT Manager, and Eng. Mr. Charith Vithanage always helped and guided me at all times whenever technology or other work related issues sprang up. And also another trainee my friend Mr. Gunawardhana L.G.U.P. And I wish to thank all these personals and beg pardon from unmentioned names that helped me at all times at their best at all times to make my maiden training a success. And without my parents and family members I couldn’t achieve any of these and I respect and thank them for their cheering guide and well care. Hariharan K. EG/2013/2204 Department of Electrical and Information Engineering, Faculty of Engineering, University of Ruhuna.
  • 4. iii Table of Contents LIST OF FIGURES ...............................................................................................................1 LIST OF TABLES.................................................................................................................2 Chapter One 1.1 About Effective Solutions (Pvt) Ltd. ...............................................................................3 1.1.1 Company Logo..........................................................................................................3 1.1.2 Establishment............................................................................................................3 1.1.3 Present Status ............................................................................................................3 1.1.4 Offers and Services ...................................................................................................4 1.2 Organizational Structure ..................................................................................................4 1.3 Company Location...........................................................................................................4 1.4 Organizational Abilities ...................................................................................................5 1.4.1 Strengths....................................................................................................................5 1.4.2 Weaknesses ...............................................................................................................5 1.5 Suggestions ......................................................................................................................5 Chapter Two Training Experiences – Technical..........................................................................................6 2.0.1 Introduction...............................................................................................................6 2.0.2 Working Summery....................................................................................................6 2.1 Environment Setup...........................................................................................................7 2.1.1 Introduction...............................................................................................................7 2.1.2 Working Environments.............................................................................................7 2.1.2.1 Overview............................................................................................................7 2.1.2.1.1 Php Strom....................................................................................................8 2.1.2.1.2 Postman.......................................................................................................8 2.1.2.1.3 Tortoise Hg .................................................................................................9 2.1.2.1.4 Android Studio 1.5.1.................................................................................10 2.1.2.1.5 Ideamart developer Bundle .......................................................................11 2.1.2.1.6 Symfony framework 2.8 ...........................................................................12 2.1.2.1.7 Php ............................................................................................................12 2.1.2.1.8 JQuery.......................................................................................................12 2.1.2.1.9 MySQL .....................................................................................................12 2.1.2.1.10 JavaScript................................................................................................13 2.1.2.1.11 PhpMyadmin...........................................................................................13 2.1.2.1.12 HTML .....................................................................................................13
  • 5. iv 2.1.2.1.13 CSS .........................................................................................................13 2.1.2.1.14 Ajax.........................................................................................................14 2.1.2.1.15 Twig ........................................................................................................14 2.1.2.1.16 Bootstrap .................................................................................................14 2.1.2.1.16 JSON.......................................................................................................15 2.1.2.1.17 Bit Bucket ...............................................................................................15 2.2 Smart Messaging System...............................................................................................16 2.2.1 Introduction.............................................................................................................16 2.2.2 The Project Requirements.......................................................................................16 2.2.2.1 Overview..........................................................................................................16 2.2.2.1.1 User ...........................................................................................................17 2.2.2.1.2 Web Portal.................................................................................................17 2.2.2.1.3 Application................................................................................................17 2.2.2.1.4 Database....................................................................................................17 2.2.2.2 Functional Requirements .................................................................................17 2.2.2.2.1 Student ......................................................................................................17 2.2.2.2.2 Idea Mart...................................................................................................18 2.2.2.2.3 Application................................................................................................18 2.2.3 Process ....................................................................................................................18 2.2.3.1 Display Main menu......................................................................................19 2.2.3.2 View Results menu ......................................................................................19 2.2.3.3 Search student record...................................................................................19 2.2.4 Output......................................................................................................................20 2.3 Leaf Invoice Management System.................................................................................21 2.3.1 Introduction.............................................................................................................21 2.3.2 The Project Overview .............................................................................................21 2.3.3 Task.........................................................................................................................21 2.3.4 Process ....................................................................................................................21 2.4 SMS Feature of Route-Radar.........................................................................................22 2.4.1 Introduction.............................................................................................................22 2.4.2 The Project Requirements and Process...................................................................22 2.4.2.1 Overview..........................................................................................................22 2.4.2.1 Environment & Functional Requirements and their Process ...........................22 2.4.2.1.1 User ...........................................................................................................23 2.4.2.1.2 Web portal.................................................................................................23 2.4.2.1.3 Application................................................................................................23
  • 6. v 2.4.3 Flow Diagram and Final output Description ..........................................................24 2.4.3.1 Receive SMS................................................................................................25 2.4.3.2 Validation.....................................................................................................25 2.4.3.3 Status Check and Final Output ....................................................................26 2.5 RSL MIS ........................................................................................................................27 2.5.1 Introduction.............................................................................................................27 2.5.2 The Project Overview .............................................................................................27 2.5.3 Task.........................................................................................................................27 2.5.4 Process ....................................................................................................................27 2.6 CTrack Feature of Route-Radar.....................................................................................28 2.6.1 Introduction.............................................................................................................28 2.6.2 The Project Requirements.......................................................................................28 2.6.2.1 Overview..........................................................................................................28 2.6.2.2 Environment & Functional Descriptions .........................................................29 2.6.2.2.1 User ...........................................................................................................29 2.6.2.2.2 Web portal.................................................................................................29 2.6.2.2.3 Application................................................................................................30 2.6.2.2 Flow diagram (Front-end)................................................................................30 2.6.2 Process ....................................................................................................................31 2.6.2.1 Front-end developing.......................................................................................31 2.6.2.2 Back-end developing........................................................................................33 2.6.4 Output......................................................................................................................35 2.7 Route-Radar B2B Command .........................................................................................36 2.7.1 Introduction.............................................................................................................36 2.7.2 Requirements and Task...........................................................................................36 2.7.3 Process ....................................................................................................................36 2.7.3.1 Terminal configuration scripting .....................................................................36 2.7.3.2 Track Method...................................................................................................37 2.7.3.3 Cronjob.............................................................................................................38 2.8 Route-Radar Android application..................................................................................39 2.8.1 Introduction.............................................................................................................39 2.8.2 The Project Requirements.......................................................................................39 2.8.2.1 Overview..........................................................................................................39 2.8.2.1 Task..................................................................................................................39 2.8.2.2 System Requirements.......................................................................................40 2.8.3 Process ....................................................................................................................40
  • 7. vi 2.8.3.1 UI Design.........................................................................................................40 2.8.3.1.1 Activity_main.xml ....................................................................................40 2.8.3.1.2 Error.xml...................................................................................................41 2.8.3.1.3 Splashscreen.xml ......................................................................................41 2.8.3.2 Programming....................................................................................................42 2.8.3.2.1 Check.java.................................................................................................42 2.8.3.2.2 Mainactivity.java.......................................................................................42 2.8.4 Final output .............................................................................................................44 2.9 Location Updater function for RRClient Android application ......................................45 2.9.1 Introduction.............................................................................................................45 2.9.2 The Project Requirements.......................................................................................45 2.9.2.1 Overview..........................................................................................................45 2.9.2.1 Task..................................................................................................................46 2.9.2.1.1 Network Option only turn on....................................................................46 2.9.2.1.2 GPS only turn on.......................................................................................46 2.9.2.1.3 Only Network will turn on........................................................................46 2.9.2.1.4 Both Network and GPS options will turn off............................................46 2.9.2.2 System Requirement ........................................................................................47 2.9.3 Process ....................................................................................................................47 2.9.3.1 Sample UI Designing.......................................................................................47 2.9.3.2 Main Function..................................................................................................48 2.9.3.2 SQLite database functions ...............................................................................49 2.10 Titon Payroll ................................................................................................................50 2.10.1 Introduction...........................................................................................................50 2.10.2 Project Requirements ............................................................................................50 2.10.2.1 Overview........................................................................................................50 2.10.2.2 Task................................................................................................................51 2.10.2 Process ..................................................................................................................52 2.10.2.2 Web interface .................................................................................................52 2.10.2.2 Script Programming .......................................................................................52 2.10.2.3.2.1 Database save script.............................................................................53 2.10.2.3.2.1 Routing path configurations.................................................................53 Chapter Three Training Experience – Management....................................................................................54 3.1 Management Standards..................................................................................................54 3.2 Management Techniques ...............................................................................................54
  • 8. vii 3.2.1 Time management...................................................................................................54 3.2.2 Project management................................................................................................55 Chapter Four 4.1 Summary........................................................................................................................56 4.2 Conclusion .....................................................................................................................56 References...........................................................................................................................58 Appendix 1.............................................................................................................................I Appendix 2.......................................................................................................................... III LBS Service .....................................................................................................................IV Subscription Check Service .............................................................................................VI Curl Post Request............................................................................................................VII SMS Get Request............................................................................................................VII
  • 9. 1 LIST OF FIGURES Figure 1. 1 : Company Logo ..................................................................................................3 Figure 1. 2 : Company Hierarchical Levels ...........................................................................4 Figure 1. 3 : Company location..............................................................................................4 Figure 2. 1 : PhpStrom IDE sample project window .............................................................8 Figure 2. 2 : Postman Window ..............................................................................................9 Figure 2. 3 : Tortoise Hg working terminal of a sample project..........................................10 Figure 2. 4 : Android Studio 1.5.1 IDE................................................................................11 Figure 2. 5 : Ideamart Simulator ..........................................................................................11 Figure 2. 6 : PhpMyadmin Panel .........................................................................................13 Figure 2. 7 : Usage of twig...................................................................................................14 Figure 2. 8 : Code snap of JSON object...............................................................................15 Figure 2. 9 : Bit bucket main window..................................................................................15 Figure 2. 10 : Project path....................................................................................................16 Figure 2. 11 : RPS database's tables.....................................................................................19 Figure 2. 12 : Initial state .....................................................................................................20 Figure 2. 13 : Success path output .......................................................................................20 Figure 2. 14 : One of failed path..........................................................................................20 Figure 2. 15 : Flow diagram of the process .........................................................................24 Figure 2. 16 : Output of format error ...................................................................................25 Figure 2. 17 : Output of the user validation failed ...............................................................25 Figure 2. 18 : Password validation failed.............................................................................26 Figure 2. 19 : Output of Success path..................................................................................26 Figure 2. 20 : User view flow diagram ................................................................................30 Figure 2. 21 : UI process order ............................................................................................32 Figure 2. 22 : Example of Public-key cryptography technology .........................................34 Figure 2. 23 : History document and the cronjob result ......................................................35 Figure 2. 24 : CTrack interface ............................................................................................35 Figure 2. 25 : Crontab configuration for the B2B Command ..............................................38 Figure 2. 26 : Web view interface designing .......................................................................40 Figure 2. 27 : Error view interface designing ......................................................................41 Figure 2. 28 : Welcoming splash screen interface designing...............................................41 Figure 2. 29 : Output of the splash screen interface ............................................................44
  • 10. 2 Figure 2. 30 : Output of the error view interface .................................................................44 Figure 2. 31 : Location based system settings of android OS..............................................45 Figure 2. 32 : Testing sample UI designing.........................................................................47 Figure 2. 33 : Schedule tab final output...............................................................................50 Figure 2. 34 : Bitrix24 web interface ...................................................................................55 LIST OF TABLES Table 2. 1 : Summery of works carried out ...........................................................................6
  • 11. 3 Chapter One 1.1 About Effective Solutions (Pvt) Ltd. Effective Solutions (Pvt) Ltd is a professional Open source solution provider based in Sri Lanka specializes in helping small, medium and large businesses to leverage the power of open source technologies to realize substantial gains in both production and profit. Not only Software Engineering Field but also Solutions provider for new trends’ problems on Bio - Medical Engineering Field. In 2015 October, The rapid expansion of Effective Solutions began with moving into the new office space. Effective Solutions has tripled its staff with 15 employees within five months gaining a faster growth. 1.1.1 Company Logo Figure 1. 1 : Company Logo 1.1.2 Establishment Started as a passionate group of engineering undergraduates at University of Moratuwa. The company was registered as Effective Solutions (Pvt) Ltd on 17th July 2014 as the first ever undergraduate start up to be officially registered as a Private Limited. First Official Product was launched on December 2014. Route Radar, the mobile tracking platform. 1.1.3 Present Status Now it is a one of leading developing company in Srilanka. Company have a nice nature premises at Wewala Piliyandala. Currently 15 staffs are there. They have many projects in hands now. Currently Route Radar is one of the most popular mobile tracking solutions in the country. Also collaborate with Universities for project researches. Many leading companies MISs are developed by them. Not only the software field but also in the Electronics site have they had major products that helps in Medical field. JENDO is the one of the major products they handling now with many leading hospitals.
  • 12. 4 1.1.4 Offers and Services  Mobile Tracking Systems  IOT Platforms  E-Commerce Applications  Management Info. Systems  Online Survey Platforms  Web Applications  Mobile Apps 1.2 OrganizationalStructure 1.3 Company Location Figure 1. 3 : Company location Senior Advisor Director/CEO Director/CPO Director/CTO Director/COO Project Manager Marketing Supervisors Engineering Team Finance Mgt HR Mgt Figure 1. 2 : Company Hierarchical Levels
  • 13. 5 1.4 OrganizationalAbilities 1.4.1 Strengths Normally strength of a company depend on the employer’s work power and their dedication. So that, Effective Solutions (Pvt) Ltd is the major developing company in srilanka Therefore, they have a good teams. Every sections have a good knowledgeable leader. Overall management is very high level. And also Time managements and project managements are in the very acceptable manner. They have good contacts with the industries in Srilanka. Also they have some join projects with some foreign leading companies. They have Bio-Medical Electronic products also. This products is new to srilanka. So they have good market places in Srilanka. 1.4.2 Weaknesses As a company Effective Solutions (Pvt) Ltd does have a lot of projects but sometimes there are no enough staff to complete the project at the given time period. Every project team have lots of project to finish within the given period that I have been see during the internship. Their main focus is web platforms. So, that is not enough for the current industrial environment. 1.5 Suggestions Main problem is staff vacancies. So I think it’s better to have more staff. But in the case of increasing the staff, they should follow a necessary interview process in order to get to know whether the person who is going to come to the company have the knowledge and experience to work on. So that will help a lot to improve the company. And also they need to focus other platforms also. In recruiting trainees for the Effective Solution as university undergraduates, the training plan should have to be more organized than the current state. The communication between universities and this type of companies should be stronger and it leads in producing better and useful output to the society. The industries invent technology and there should be enough people to follow them and improve them, so it is the duty of these companies to improve a closer relationship with universities and students, in order to produce better results for the country and the world.
  • 14. 6 Chapter Two Training Experiences – Technical 2.0.1 Introduction I started my training at Effective Solution on 4th January 2016 as a Software Engineering Trainee. First day, we have short introduction meeting with company’s all staffs. This meeting was conducted by C.E.O of Effective Solutions (Pvt) Ltd. He described the company structure and working environment. Also he described the current projects that they involved. 2.0.2 Working Summery Work Carried Out No of Days Environment Setup 1 Smart Messaging System 9 Leaf Invoice Management System 3 SMS Feature for Route-Radar 5 RSL MIS 5 CTrack Feature for Route-Radar 18 Route-Radar B2B Command 2 Route-Radar Android application 9 Location Updater Function for RRClient Android application 1 Titon Payroll 4 Field Visits 3 Table 2. 1 : Summery of works carried out
  • 15. 7 2.1 Environment Setup 2.1.1 Introduction Once I entered to the training, I had not a good knowledge in php programming. But their almost all projects were coded in php. So I had to perform well on php however in order to involve in their projects. And also, I had to learn the framework that they were already working on. So the first week was learning those technologies and familiarizing the project scope and the requirements. Under this I had to learn Symfony framework, php and MySQL as well. Their working environment was totally depend on the open source environment. So I changed my laptop according to that. So I changed my laptop OS to Ubuntu. So I installed Ubuntu 14.04 LTS version on my laptop as a second boot option along with Windows 8. On the Ubuntu, I had needed to setup the Web development tools on Ubuntu OS. 2.1.2 Working Environments 2.1.2.1 Overview Our most of the projects are working on using web portals that have provided by Mobile Service Providers in Srilanka. So I had want to familiar with those also. In order to working the projects, I installed following software on my laptop.  Php Strom  Postman  Tortoise Hg  Android Studio 2.0  Ideamart Developer Bundle Here, I worked Both Front-End and Back-End developments on my projects. In order to carry the developments, I used following Technologies.  Symfony framework 2.8  PHP  MySQL  PhpMyadmin  Ajax  HTML  Bit Bucket  Android Studio  JQuery  JavaScript  CSS  Twig  Bootstrap  JSON  Curl  XML
  • 16. 8 2.1.2.1.1 Php Strom It is light weight, smart IDE for the PHP developments. This IDE powered by Jet Brains. PhpStorm = Webstrom + PHP + DB/SQL Webstrom is Front-End Web development tool. So including this PhpStrom gives full support for the both Front-End and Back-End Development. Here we can use main script language as PHP but Webstrom supports all script languages. So on the PhpStrom we can use all the script languages. PhpStorm is perfect for working with Symfony, Drupal, WordPress, Zend Framework, Laravel, Magento, CakePHP, Yii, and other frameworks. Also for the front-end development, make the most of the cutting edge front-end technologies, such as HTML5, CSS, Sass, Less, Stylus, Coffee Script, Typescript, Emmet, and JavaScript, with refactoring, debugging and unit testing available. Figure 2. 1 : PhpStrom IDE sample project window 2.1.2.1.2 Postman Postman app is an API creator. It gives normally post, get requests. During development process and the unit testing process, we can make the real-time testing with this application. We can perform web portal API functions using this. This app powered by Chrome Developers. We can get this app on chrome web store.
  • 17. 9 Features  Compact layout  HTTP requests with file upload support  Formatted API responses for JSON and XML  Autocomplete for URL and header values  Key/value editors for adding parameters or header values. Works for URL parameters too.  Use environment variables to easily shift between settings. Great for testing production, staging or local setups. Figure 2. 2 : Postman Window 2.1.2.1.3 Tortoise Hg Tortoise Hg is a Windows shell extension and a series of applications for the Mercurial distributed revision control system. It also includes a Gnome/Nautilus extension and a CLI wrapper application so the Tortoise Hg tools can be used on non-Windows platforms.
  • 18. 10 Figure 2. 3 : Tortoise Hg working terminal of a sample project 2.1.2.1.4 Android Studio 1.5.1 Android Studio is the official IDE for Android app development, based on IntelliJ IDEA. On top of IntelliJ's powerful code editor and developer tools. Features  A flexible Gradle-based build system  Build variants and multiple APK file generation  Code templates to help you build common app features  A rich layout editor with support for drag and drop theme editing  Lint tools to catch performance, usability, version compatibility, and other problems  Code shrinking with ProGuard and resource shrinking with Gradle  Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine
  • 19. 11 Figure 2. 4 : Android Studio 1.5.1 IDE 2.1.2.1.5 Ideamart developer Bundle Ideamart is one of the leading web API provider in Srilanka. It powered by Dialog Axiata PLC. They provides following APIs.  SMS  USSD  LBS  SUBSCRIPTION For the testing purpose, they provide a developer bundle with those APIs. We can directly use that within our applications. Figure 2. 5 : Ideamart Simulator
  • 20. 12 2.1.2.1.6 Symfony framework 2.8 Symfony is loosely based on the popular Model-View-Controller development pattern. While controller classes are a necessary part of development under Symfony, models and views are optional. Symfony is most often noted for its speed when compared to other PHP frameworks. To start the new projects using this frame works, write the following code on the Terminal under the local server’s public directory. $ symfony new sample_project 2.8 2.1.2.1.7 Php • PHP stands for PHP: Hypertext Pre-processor. • It is a server-side scripting language. • PHP is free and is an open source software product. • The PHP scripts are executed on the server. • PHP supports many databases (MySQL, Sybase, Oracle and many others.) • PHP runs on different platforms (UNIX, Linux, and Windows.) • PHP is compatible with almost all web-servers used today (Apache, IIS, etc.) • A PHP file can contain plain text, HTML tags and scripts 2.1.2.1.8 JQuery JQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. Nowadays we use JQuery for all of our applications because it is easy and customizable. 2.1.2.1.9 MySQL MySQL is a freely available open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). SQL is the most popular language for adding, accessing and managing content in a database. It is most noted for its quick processing, proven reliability, ease and flexibility of use.
  • 21. 13 2.1.2.1.10 JavaScript JavaScript is a programming language used to make web pages interactive. It runs on your visitor's computer and doesn't require constant downloads from your website. JavaScript is often used to create polls and quizzes. 2.1.2.1.11 PhpMyadmin PhpMyadmin is a free and open source tool written in PHP intended to handle the administration of MySQL with the use of a web browser. It can perform various tasks such as creating, modifying or deleting databases, tables, fields or rows; executing SQL statements or managing users and permissions. Figure 2. 6 : PhpMyadmin Panel 2.1.2.1.12 HTML HTML stands for Hyper Text Mark-up Language. A mark-up language is a set of mark-up tags HTML documents are described by HTML tags. Each HTML tag describes different document content. 2.1.2.1.13 CSS Cascading Style Sheets (CSS) is a style sheet language used for describing the look and formatting of a document written in a mark-up language. So using CSS we can define the element sizes and the colours or any kind of interface changes.
  • 22. 14 2.1.2.1.14 Ajax AJAX stands for Asynchronous JavaScript and XML. AJAX is a technique for creating fast and dynamic web pages. AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page. Classic web pages, (which do not use AJAX) must reload the entire page if the content should change. 2.1.2.1.15 Twig Twig is a modern template engine for PHP. Twig compiles templates down to plain optimized PHP code. The overhead compared to regular PHP code was reduced to the very minimum. Twig has a sandbox mode to evaluate untrusted template code. This allows Twig to be used as a template language for applications where users may modify the template design. We can use the twig script as an inner script with the html codes. Figure 2. 7 : Usage of twig 2.1.2.1.16 Bootstrap Bootstrap is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first web sites. Bootstrap is easy to use. We can use many html designing as a classes. It’s one of the major benefit is Grid Layout system for the different devices.
  • 23. 15 2.1.2.1.16 JSON JSON is short for JavaScript Object Notation, and is a way to store information in an organized, easy-to-access manner. In a nutshell, it gives us a human-readable collection of data that we can access in a really logical manner. This creates an object that we access using the variable JSON. By enclosing the variable's value in curly braces, we're indicating that the value is an object. Inside the object, we can declare any number of properties using a "name": "value" pairing, separated by commas. To access the information stored in JSON, we can simply refer to the name of the property we need. Example of JSON object var object1 = { "age": "23", "hometown": "Kalmunai, LK", "gender": "male" }; Figure 2. 8 : Code snap of JSON object 2.1.2.1.17 Bit Bucket Distributed version control system that makes it easy for you to collaborate with our team. The only collaborative Git solution that massively scales. Approve code review more efficiently with pull requests. Hold discussions right in the source code with inline comments. Have uninterrupted access with Bit bucket Data Centre. Fast performance wherever we are in the world. So it’s a complete solution for the project team. Figure 2. 9 : Bit bucket main window
  • 24. 16 2.2 Smart Messaging System 2.2.1 Introduction This is my first major project in this company. This project was a web application using Symfony framework 2.8 using Ideamart as a web portal. This project was developed for a private institutions. The Institution have large no of students in four districts. This Institution focus on the Advanced level students. So students have more than one common exam in every month. They listed down all the marks and Z-Score, rank and Whole Results. Normally the results are posted using noticeboard. So they needed an advanced solution for that. According to do that, a solution was provided by us. It was Results post using SMS and USSD methods. For that, this project was assigned to me and other trainee. So it was a team project. The Team had two members. 2.2.2 The Project Requirements 2.2.2.1 Overview The web portal applications were very new to me. Normally this kind of applications are working following way. Here it used MySQL database. And also for development I used Symfony framework, curl and php. For testing, I used postman and ideamart simulator. This Information System consists of three main sections 1. User 2. Web Portal 3. Application 4. Database User Web portal Application Database Figure 2. 10 : Project path
  • 25. 17 2.2.2.1.1 User Here User was Student. Student was already registered in the database. A student had a unique Index No for each class he/she attends and also had a Test ID. Index No was a unique entity in the database. For every exam each student get a specific Test ID. Therefore a student had to input two IDs in order to request results. 1. Index No 2. Test ID 2.2.2.1.2 Web Portal Ideamart web portal was used as the interactive interface between the Student and the application. Registration in the ideamart with specific requirements was required to establish a connection between the Application and the Portal. Collected information from the student will be sent to the application through ideamart to be processed in the application. And the processed information from the application is fed back to the student. 2.2.2.1.3 Application Application provides the student with an interface to acquire student specific information through ideamart and then it fetch the requested information from the database and direct it to the student’s mobile via ideamart. 2.2.2.1.4 Database Here My SQL database were used in Apache server. The database have more tables for the MIS. But here I used only three tables. 1. Student record 2. Test Info 3. Results 2.2.2.2 Functional Requirements 2.2.2.2.1 Student  The specified USSD code to access the application  Input the Index No  Input the Test ID
  • 26. 18 2.2.2.2.2 Idea Mart  Fetch the USSD code entered by the student.  Start a new session  Fetch student input  Send the input information to the application using application id  Receive the result and deliver that to student through the application interfaces 2.2.2.2.3 Application  Maintain connection with ideamart and database  Fetch responses from the ideamart  Search for the specified information from the database  Deliver data to the idea mart. 2.2.3 Process I did the function developing following way. On the developing process I used curl function to interactive with the Ideamart. On the USSD process the student asked to enter the Index No. But the Index numbers contained some English Letters. So On the USSD input we cannot input letters (In most of the mobiles) for that we choose a mapping formula. public function mapping($studentid) { $town = substr($studentid,0,1); $type = substr($studentid,1,1); $year = substr($studentid,2,1); $gender = substr($studentid,3,1); $id = substr($studentid,4,4); $examid = substr($studentid,9,2); $town_array = array('F','M','G','R','T'); $studentid = $town_array[(int)$town].$town_array[(int)$type].$year.$town_array[(int)$ gender].$id.$examid; return $studentid; }
  • 27. 19 2.2.3.1 Display Main menu 1. Triggered when the student input the USSD code to start a session. 2. The student is requested to Enter Index No. 3. Validate Student Input 2.2.3.2 View Results menu 1. Triggered when the student input valid Index No and Test ID. 2. Trigger the Search Function 3. if search function returns null show error message 4. Else display search results to the student. 5. End student session. 2.2.3.3 Search student record 1. Triggered by View results function 2. Search the database for Index No and Test ID 3. Fetch the available information from database. 4. Return available results to respond function ,if none available return nul Figure 2. 11 : RPS database's tables
  • 28. 20 2.2.4 Output Figure 2. 13 : Success path output Figure 2. 14 : One of failed path Figure 2. 12 : Initial state
  • 29. 21 2.3 Leaf Invoice Management System 2.3.1 Introduction This project’s development part was already finished. Testing process only remained. Leaf is leading printing company in Srilanka. It have more than 3 branches in Colombo and nearby cities. They have huge no of invoices per day. So our project was manage the invoice details quickly and securely. We had created an invoice management system. 2.3.2 The Project Overview This project was developed using Symfony framework as a web application. It had MySQL database for the management process. It was totally a cloud application. Database also located in UBUNTU cloud server. This application gives complete solution for the invoice management. 2.3.3 Task Unit testing the web application with each possibilities. Work together with data-entry operation for collecting more requirements and suggestions. And prepare a report. 2.3.4 Process We went two field visit to the main branch office of Leaf that located in Horton place, Colombo. We collected some invoice hardcopies and enter the data on the system for the testing process. From that we could identify following interface issues. 1. Product add interface need more options. 2. Invoice date fixed with current date. 3. Admin could not change the finished invoice record after print issued. So we informed those error to the development team. Here the unit testing process was did with in the peak time of the Leaf Company.
  • 30. 22 2.4 SMS Feature of Route-Radar 2.4.1 Introduction This is a new feature of Route radar application. The existing application was completely a web based application. User can checked only using browsing the URL. Use got their location on that way only. When user traveling user cannot browse some time using pc, also user may not have a smart mobile phone. So that time user will disappointed. So we introduced this SMS based location finding system as a smart solution. This project was assigned only to me. This application also used the web portal. But this time I had some experience to do this kind of projects. But the new things was database. Normally Route-Radar application developed using NoSQL database. For that they used Mongo DB as a web server. Mongo DB completely different than SQL databases. First I did some case study about the Mongo DB. For the development, I used Symfony framework 2.8. And also I used html twig extensions, curl and php. For the testing purpose I used postman and ideamart simulators. 2.4.2 The Project Requirements and Process 2.4.2.1 Overview The application was connected with the ideamart web portal to interact between the user and the application. First the user starts a session by sending request sms with username and password. Then the application verify the user if user is exist or not. If user is exist it will get user’s SIM id from database. Then application send a request to the ideamart foe check the user subscription status. From the Status result application select suitable process (error return, history, fresh location). Since the application is implemented as a sms interactive service the users can interact with the system using any mobile phone. 2.4.2.1 Environment & Functional Requirements and their Process This application also consisted there major environments. 1. User 2. Web Portal 3. Application
  • 31. 23 2.4.2.1.1 User User may be any one. But To access this feature; user should be registered on Route-Radar application. So a Registered user have unique username and password for access the application. That same username and password are required for access this feature. To find the current location user can send the sms as below, rr(space)<username>(space)<password> This sms should send to 77102. 2.4.2.1.2 Web portal Ideamart web portal was used as the interactive interface between the User and the application. Here three ideamart API are used. 1. SMS API 2. Check Status API 3. LBS APPI 2.4.2.1.3 Application Existing application of Route-radar was used. Here Application’s User, SIM & History databases are used. And also LBS Service and Check status service methods are used. Here the location result will send as an address. For that I used Google API function also. It had only one controller, which called as SmsLocationController.php It contained following seven methods. 1. smsAction 2. position 3. getLastLocation 4. findLocation 5. lastLocation 6. getSubStatus 7. curlPostRequest
  • 32. 24 2.4.3 Flow Diagram and Final output Description Figure 2. 15 : Flow diagram of the process
  • 33. 25 2.4.3.1 Receive SMS Application Receive the sms like. If sms format is incorrect ideamart will respond to user. So application only receive sms when format is correct. Then extract username and password from text message. “rr <username> <password>”. 2.4.3.2 Validation From the user name, Application search the user on the database and return saved encoded password. Then user entered password will encode and check the password is correct or not. If validation failed Application will return an error message to the user.  Here validation checked into two steps 1. User name check is available or not. If user not exist, return error message. Message format: “User not exist. Check your user name” Figure 2. 16 : Output of format error Figure 2. 17 : Output of the user validation failed
  • 34. 26 2. Password Checking. If password incorrect, return error message. Message format: “Password incorrect. Check your password and try again.”  If Validation is ok, then application send a request to ideamart for checking user status. 2.4.3.3 Status Check and Final Output Application send a request to ideamart for heck the entered user’s status. Then from the Status Result it will process suitable method. If Status result, 1. Unregistered: Ideamart response as error message. 2. Registered: Send a LBS request using SIM id to ideamart and show the message. 3. Pending-charge: Search Last Location from history and send the last location. Figure 2. 18 : Password validation failed Figure 2. 19 : Output of Success path
  • 35. 27 2.5 RSL MIS 2.5.1 Introduction RSL Ceramics is a second larger manufacturer in ceramics. In the main factory they have six departments. For the factory management we developed a MIS application. This application contains whole process of the six departments. This project was already finished. Testing process only remained. So I assigned for the application testing process. 2.5.2 The Project Overview This project also developed using Sanota Admin Bundle as Symfony project. This project also used MySQL database. It was also a complete cloud application. Database located in the same server that leaf database carried out under different project folder. 2.5.3 Task Manual Data entering on the real server for the testing process, and suggest some interface changes which gives more advantages. 2.5.4 Process Did the testing process on each departments’ function with every possible ways. I entered more than three hundred data manually under the many fields for the testing purpose. There was a function for directly enter the data to the database using excel files. First I did manual entering then, I tested that function also. From the testing, I observed many issues about the data entering. So I informed every issues to the Developing Engineer, and corrected instantly.
  • 36. 28 2.6 CTrack Feature ofRoute-Radar 2.6.1 Introduction This was the main project carried out myself. Route-Radar application is one of the main and most valuable product of the Effective Solutions (Pvt) Ltd. This was the first product, that they were launched ever. Route-Radar is a location tracker application. It works only for the Dialog SIM users. Because this project was registered under the Dialog Ideamart only till now. For use this service user want to register their Dialog SIM to the application through the Dialog services. After the registration user will get user name and password through the sms. Whatever the mobile they using user can register the application and track that. It only track the registered SIM. User can visit the main application using URL (www.routeradar.lk) any time. From that they can get their location. Here User can view their all the last histories and download as a report. It have another feature also. That is group tracking. User allowed to add group members. For the group adding every user’s username and password must want. So one user cannot add another user without their permission. So the security and privacy of the user will keeping very well. Here track was happened when user logged in as the On-demand service. Sometime user want to go a long way, but they want know the travelled path with the time. So that time user cannot track their self every time using the URL. But this need for some specific days only. So that we planned to introduce a new feature for that as a smart solution. Actually this project was planned according to the user feedbacks. So we planned a project CTRACK. This project done only myself. 2.6.2 The Project Requirements 2.6.2.1 Overview This continuous tracking system give the current location every 15 minutes. Everyone can use this feature with registering. An existing user can change their plan from on demand to continuous tracking. A new user can register initially to continuous tracking service. Also this have another feature. User can allowed to track multiple SIMs which had registered.
  • 37. 29 There are four plans according to the time intervals.  Three days plan  Seven days plan  Two weeks plan  One month plan After the plan selection user can select the users for this service including current user. But selected users should be already registered and have group with logged in user. For this service user want to pay some amount. The payment will done by Ez-Cash. Router-Radar application was completely a web application using mongo dB database. Its main application was develop by using Symfony framework 2.8. So I continued my development on the existing project path. For that I used Bit bucket and Tortoise Hg. I joined as a member of this product developing team in bit bucket group. This part’s Interface designing part, Programming part, Database part and payment gateway were designed by myself. 2.6.2.2 Environment & Functional Descriptions 2.6.2.2.1 User User should be registered on Route-Radar application. So a Registered user have unique username and password for access the application. That same username and password are required for access this feature. For the Group tracking User should have group members on Account. To activate the service user want to visit route radar webpage. http://www.routeradar.lk. User can visit the page using PC or Mobile. Anyone can (without register) view plan details, but to activate the service user should want to register. 2.6.2.2.2 Web portal Ideamart web portal was used as the interactive interface between the User and the application. 1. Route radar server 2. Dialog Ideamart LBS API 3. Dialog Ez-Cash API Here we were are using Ez-cash payment Gateway. After the plan selection conformation the link will redirect to dialog Ez-Cash payment gateway. User can pay the total cost using
  • 38. 30 any Ez-cash account. After the payment link will automatically redirect to the application site. Their user can view the payment information and the plan information. 2.6.2.2.3 Application Existing application of Route-radar was used. Here Application’s User, SIM, History and newly added Payment info databases were used. And also LBS Service used. 2.6.2.2 Flow diagram (Front-end) Figure 2. 20 : User view flow diagram Start Visit Page Login Select Plan Select User Payment Gateway Notification Select Plan Login
  • 39. 31 2.6.2 Process 2.6.2.1 Front-end developing Here I used Html, Bootstrap, CSS, JavaScript and Twig. The project had four web interfaces. Every Interface passing parameter to the next page during the every process. So I used browser’s temporary memory that. So finally I designed following five interfaces.  cTrack.html.twig  plan1.html.twig  failed_notification.html.twig  success_notification.html.twig  payment_preview.html.twig These interfaces were designed using bootstrap framework. So these web interfaces were supported to all mobile devices also. Here I uncounted with problem. For the mobile devices the summery of the plans selections not aligned well. But I found a solution for that. That was client view function. It scripted by using JavaScript as a internal script with the html codes. <script> if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { // is mobile.. document.getElementById("win").style.width = "90%"; } else { document.getElementById("win").style.width = "50%"; } </script>  Function of the reload the Interface with the parameters. public function getRefererRoute(){ $request = $this->getRequest(); $referer = $request->headers->get('referer'); $lastPath = substr($referer, strpos($referer, $request- >getBaseUrl())); $lastPath = str_replace($request->getBaseUrl(), '', $lastPath); $matcher = $this->get('router')->getMatcher(); $parameters = $matcher->match($lastPath); $route = $parameters['_route']; return $route;}
  • 40. 32 UI process diagram After the Plan selection Browser will save the plan_id and logged in user to local browser storage. From the Logged in user, find the group members on User database and show into Interface for user selection. Meanwhile according to the plan_id and user selection cost will calculated and showed instantly. And also all the plan information will saved to the Payment info database. Now status saved as “PENDING”. After the process button clicked it redirect to the Ez-Cash Payment Gateway page for the payment. From the payment status notification page will show. Also payment database’s status will change according to the payment gateway result. If payment successful User’s plan will changed to Ctrack plan. Start User Validation Show group members Cost Calculation Save Plan info Payment Gateway Plan Notification Figure 2. 21 : UI process order
  • 41. 33 2.6.2.2 Back-end developing Here I used Symfony framework for that. It is a contracted with MVC Architecture. This project was an extension of the Route radar application. So that I used existing Bundles for the Controller files. Whole my part contained one Controller Php class and One Command Php class. Also the main part of this project was payment gateway. For the interface controlling I coded following method actions under The TrackingPlanController.php class.  planSelectionAction : : It rendered the cTrack.html.twig. This action only load the interface of the Plan selection window.  userSelectionAction: : It rendered Plan1.html.twig. This action will get the logged in user. From that it will search the group members and get the results as an array and pass that to the interface.  paymentPreviewAction : It rendered payment_preview.html.twig. This action will handle the database insertion and submit the data to the Ez-cash API  eZCashResponseAction : From the payment result It returned success_notification.html.twig orfailed_notification.html.twig. This action redirect from the Ez-Cash API. from the Ez- cash payment status it will redirect to the corresponding Interface For the Controlling part I created some method along with those actions  ezCashSubmit  eZCashResponse  activationAction  timemanegment  getRefererRoute
  • 42. 34 Ez-cash submit method was used to submit the relevant information to the Ez-Cash API. This was a payment gateway methods. So the privacy and security things were more important. So that whole the data transmission were done by using Public-key cryptography technology. These used a public key and private key for the encryption and decryption. Public-key cryptography, or asymmetric cryptography, is any cryptographic system that uses two kinds of keys: public keys that may be disseminated widely, while private keys are known only to the owner. In a public-key encryption system, any person can encrypt a message using the public key of the receiver, but such a message can be decrypted only with the receiver's private key. For this to work it must be computationally easy for a user to generate a public and private key-pair to be used for encryption and decryption. The strength of a public-key cryptography system relies on the degree of difficulty (computational impracticality) for a properly generated private key to be determined from its corresponding public key. Security then depends only on keeping the private key private, and the public key may be published without compromising security. Figure 2. 22 : Example of Public-key cryptography technology
  • 43. 35 Here I used mongo DB as a database. Actually I used the existing collection. Also I create some document for the payment information history. After the whole function I created the activation method and an activation command for the cronjob. Figure 2. 23 : History document and the cronjob result 2.6.4 Output Figure 2. 24 : CTrack interface
  • 44. 36 2.7 Route-Radar B2B Command 2.7.1 Introduction This application focus on delivery service companies. They have sales man for the delivering works. The efficiency of the delivering service of the company depend on the staffs’ geniuses. Some staffs may ice for the works. Company cannot track the every time. So we had a solution for that. There was an application companied with Route-radar application. It track every registered staffs every 15 minutes. Company administration now track now staffs. This application called as a B2B. This application already launched when I was joined the company. This application function should work every 15 minutes. The problem was, It server working every time on cloud. To avoid this we planned to use a Crontab technology on Ubuntu server. This work was assigned to me. So that I used Command function of the Symfony framework. 2.7.2 Requirements and Task This was a Symfony 2.8 framework project. It was used mongo dB database. This database had five collections. This project used Ideamart LBS service and Subscription service. So my task was a developed a terminal command for the tracking application. It should contained get the user subscription mood and the current location and save to the history. 2.7.3 Process For the terminal I configured the command first. Then the method was developed. This function contained the whole the tracking functions. For that I used LBS Poll service that was already developed. 2.7.3.1 Terminal configuration scripting protected function configure() { $this ->setName('effective:b2b') ->setDescription('B2B service') ->addOption( 'start', null, InputOption::VALUE_NONE, 'B2B Service started' );}
  • 45. 37 2.7.3.2 Track Method if ($input->getOption('start')) { $start = microtime(true); $this->lbs_poll=$this->getContainer()->get('lbs_poll'); $dataAccess = $this->getContainer()->get('DataAccess'); $simAccess=$dataAccess->get('sim'); $this->dm = $this->getContainer()->get('doctrine_mongodb'); $simRepo = $this->getMyRepository('BaseDataAccessBundle:Sim'); $sims = $simRepo->findBy(array('registrationStatus' => 'REGISTERED')); $totalUsers = count($sims); $sucess = 0; if ($sims != null) { foreach ($sims as $sim) { $output->writeln($sim->getUser()->getUsername()); $locations = $this->lbs_poll->Poll(array($sim)); foreach ($locations as $location) { $ab = $simAccess->addLBSCurrentLocation($sim, $locations[$sim->getId()]); if($ab == 1){ $item = json_decode($location); $output->writeln('OK'); $output->writeln('lat :'.$item->latitude.' lon: '.$item->longitude); $sucess++; }else{ $output->writeln('ERROR'); } } sleep(1); } } $end = microtime(true); $output->writeln("-------------------------------------------- ----------------"); $output->writeln("Total Sucess Registry : $sucess"); $failed = $totalUsers - $sucess; $output->writeln("Total Failure : $failed"); $exce = $end-$start; $output->writeln("Total excecution Time : $exce Seconds"); $output->writeln("-------------------------------------------- ----------------"); }
  • 46. 38 2.7.3.3 Cronjob Figure 2. 25 : Crontab configuration for the B2B Command
  • 47. 39 2.8 Route-RadarAndroid application 2.8.1 Introduction This project totally focused on Route-radar user who have android mobiles. Normally this application is a web application. To access the application, user want to go with a browser. Many of our customers’ feedback said that they want to easily access the application like mobile app. So that we planned to create mobile app that have easily and securely access the web application. So we planned to do a web view android application with some smart including. Such as mobile networks related things. This project assigned only for me. So this project totally completed by myself, such as Interfaces designing, programming and testing. 2.8.2 The Project Requirements 2.8.2.1 Overview This application is partially web view application. Web view only load the URL of the Route-Radar application. That web interfaces are developed for both PC and Mobile devices using Bootstrap. So here the mobile view will show on the web view UI like a browser interface. But the main content was handling the mobile internet connections. So that I planned auto network enabling function. But from the android API 20 the function was restricted by the GOOGLE. So I planned another way to complete the task. 2.8.2.1 Task The main task is network controlling. So that I listed down following possibilities. 1. Network enabled full time 2. Network disabled before starting the app 3. Network disabled during the process. If network enabled until finish the process, it was not a problem. So it was the Success path of the project. Otherwise the failure path had two options. But on the both condition there will be a pop-up notification will show. And also user will asked to enable the data network. It will redirect to the system data-network settings. The notification will continue until enabled the network or exit the application. Other task was construct the web view interface functions for the real-time process.
  • 48. 40 2.8.2.2 System Requirements I used the Android Studio 1.5.1 as an android development tool. This project developed up to API 10 in android SDK. This app unit tested using real time testing device. For that I used an android phone that have API 19 (Jellybean 4.0.1) and API 21(Kit Kat 4.4). And also I used to test my android virtual device using API 23 (Marshmallow). For the functional developments, I needed some android OS default function. So that I just enabled those function on AndroidManifest.xml. <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/> <uses-permission android:name="android.permission.MODIFY_PHONE_STATE"/> 2.8.3 Process 2.8.3.1 UI Design I created three Interfaces for the application. One of those should web view. And also I created some animation for the main interface. All those three interfaces created by using XML. 1. activity_main.xml 2. error.xml 3. splashscreen.xml 2.8.3.1.1 Activity_main.xml This content the web view layout. So this interface not needed to well design. Figure 2. 26 : Web view interface designing
  • 49. 41 2.8.3.1.2 Error.xml This interface will show, when the data-network disabled. This interface have retry button. If it is pressed, it will check the network again and if network interrupted, it will show a notification window to the user for enable the network. 2.8.3.1.3 Splashscreen.xml This is the main welcoming interface. It contains the animation. Figure 2. 28 : Welcoming splash screen interface designing Figure 2. 27 : Error view interface designing
  • 50. 42 2.8.3.2 Programming It contains the five java classes. These contains all the functions related to the tasks which described section 2.8.2.1. 1. Check 2. MainActivity 3. Network 4. Progress 5. Splash 2.8.3.2.1 Check.java This class contains the function that check the network is enabled or not. Actually this function worked on background. Every state I will notify the network state as a Toast message.  Function of checking the connection public static int getConnectivityStatus(Context context) { ConnectivityManager cm = (ConnectivityManager) context .getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); if (null != activeNetwork) { if(activeNetwork.getType() == ConnectivityManager.TYPE_WIFI) return TYPE_WIFI; if(activeNetwork.getType() == ConnectivityManager.TYPE_MOBILE) return TYPE_MOBILE; } return TYPE_NOT_CONNECTED; } 2.8.3.2.2 Mainactivity.java This is the main control class. It have functions that do control the web view, control the network and arrange the functions. This class load the activity_main.xml  Web view client function webView.setWebViewClient(new WebViewClient() { public void onPageFinished(WebView view, String url) {
  • 51. 43 Log.i(TAG, "Done loading " + url); if (progressBar.isShowing()) { progressBar.dismiss(); } } public boolean shouldOverrideUrlLoading(WebView view, String url) { current = url; Log.i(TAG, "Loading"); view.loadUrl(url); return true; } public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { setContentView(R.layout.error2); System.out.println(webView.getUrl().toString()); current = webView.getUrl().toString(); ImageView image = (ImageView) findViewById(R.id.iV); Animation animation1 = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.zooming); image.startAnimation(animation1); final ImageButton reload = (ImageButton) findViewById(R.id.iB); reload.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { System.out.println(current); current = webView.getUrl(); networkCheck(); } }); Toast.makeText(getApplicationContext(), "Oh no! Network Diabled", Toast.LENGTH_SHORT).show(); } });  Network controller public void networkCheck() { try { AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this); alertDialogBuilder.setMessage("Data Connection is not enabled. Please enable Data connection"); alertDialogBuilder.setPositiveButton("Enable Data", new DialogInterface.OnClickListener() { @Override
  • 52. 44 public void onClick(DialogInterface arg0, int arg1) { startActivityForResult(new Intent(Settings.ACTION_SETTINGS), 0); } }); alertDialogBuilder.setNegativeButton("Exit", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Toast.makeText(getApplicationContext(), "Thankyou for using Route-Radar", Toast.LENGTH_LONG).show(); finish(); } }); AlertDialog alertDialog = alertDialogBuilder.create(); alertDialog.setCancelable(false); alertDialog.show(); } catch (Exception e) { Toast.makeText(getApplicationContext(), e.toString(), Toast.LENGTH_LONG).show(); finish(); } } And also there are more function to control the app, such as progress bar controlling functions, alert dialog function, animation function and etc. 2.8.4 Final output Figure 2. 30 : Output of the error view interface Figure 2. 29 : Output of the splash screen interface
  • 53. 45 2.9 Location Updater function for RRClient Android application 2.9.1 Introduction Route radar application includes many features. So that we planned to introduce new feature. That was totally for android users. This app name was RRClient. This will update the current position of the registered user using GPS or Network Location or Collaborate of both. And also this app will work background process and auto enabling internet connection if possible. So this was a Team project. Three staffs were assigned for this project including me. This project used Android Studio with Java as a programming Language. So my part is develop a class that was main function of this app. That was updating locations and analysing. 2.9.2 The Project Requirements 2.9.2.1 Overview The Developing requirements were little complicated. Normally android mobile location finding function is depending on the two states. 1. Wireless Networks 2. GPS Wireless network working using the nearby networks. Such as mobile networks and Wi-Fi. It actually identify the SIM network of the android mobile. These results are not accurate. Accuracy is depend on the nearby network base station. GPS is considerably accurate. But we have to turn on the option. It works using GPS modules that fixed with the mobile mother board. This not depend on our SIM. So this is very accuracy than wireless network location. Figure 2. 31 : Location based system settings of android OS
  • 54. 46 2.9.2.1 Task From the both conditions I had needed to find the accuracy location. There are 4 main states. 1. Network Option only turn on 2. GPS only will turn on 3. Only Network will turn on I. Initial start II. Not the initial state 4. Both Network and GPS options will turn off I. App Initial start conditions II. Not the initial state 2.9.2.1.1 Network Option only turn on Now both options are turned on. So as we discussed above GPS is more accuracy than Wireless. So For this condition we can chose only the GPS result as a final result of our location. 2.9.2.1.2 GPS only turn on Now also we can get the GPS results as a final result. Do not want to analyse part. 2.9.2.1.3 Only Network will turn on So this state onwards the main things would happened. Actually analysis part will work here. There are two possibilities. If the mobile may restart or normal state. If the mobile restart and newly opened the app, so there are no any history. Then we can get the wireless network result as a location results. If the mobile use as a normal state (at least onetime the app used), here we have history. Then app will get the new location results and compare with the last results. From the analyse result it will take the final result and replace the history with new result. For the comparing state, it actually check the distance between the both coordinates. We set the minimum accuracy distance as 200m. Then if it was exceed, history result will take as a final result. 2.9.2.1.4 Both Network and GPS options will turn off This state also have two possibilities. The app may be start first time or not. If it is first time, there are no any history. And also fresh result cannot find. Then it will notify the user to turn on the GPS or Wireless. If it is not an initial state, History result will be taken as a final result. And also history remains.
  • 55. 47 2.9.2.2 System Requirement I used the Android Studio 1.5.1 as an android development tool. This project developed up to API 10 in android SDK. This app unit tested using real time testing device. For that I used an android phone that have API 19 (Jellybean 4.0.1). And also I used to test my android virtual device using API 23 (Marshmallow). For the history management a Database wanted. This app does not want to connect online Databases. Only the local app database was enough. So that I Selected the SQLite as the database. For the Function development, I needed some android OS default function. So that I just enabled those function on AndroidManifest.xml. <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> My part was only develop the function. I did not involve with UI designing, but for the testing purpose I created a normal interfaces. 2.9.3 Process 2.9.3.1 Sample UI Designing This was only for the unit testing process. Using the android studio framework, I developed a sample interface using XML. Figure 2. 32 : Testing sample UI designing
  • 56. 48 2.9.3.2 Main Function if (isGPSEnabled && GeoLongitude > 0 && GeoLongitude > 0) { final_t.setText("" + GeoLatitude); final_l.setText("" + GeoLongitude); } else if (isGPSEnabled == false && mydb.numberOfRows() == 0) /// from database { final_t.setText("" + NetLatitude); final_l.setText("" + NetLongitude); } else if (isGPSEnabled == false && mydb.numberOfRows() != 0) { Cursor rs = mydb.getData(1); rs.moveToFirst(); String lattitude = rs.getString(rs.getColumnIndex(DBHelper.COLUMN_Latitude)); String longitude = rs.getString(rs.getColumnIndex(DBHelper.COLUMN_Longitude)); Location GPS = new Location("GPS"); GPS.setLatitude(Double.parseDouble(lattitude)); GPS.setLongitude(Double.parseDouble(longitude)); if (isNetworkEnabled == true) { try { float distan = distance(GPS, n); if (distan > 200) { final_t.setText("" + lattitude); final_l.setText("" + longitude); } else { final_t.setText("" + NetLatitude); final_l.setText("" + NetLongitude); } dis.setText("" + distan); } catch (Exception e) { System.out.println(e.toString()); System.out.println("test try"); } } else { final_t.setText("" + lattitude); final_l.setText("" + longitude); }
  • 57. 49 2.9.3.2 SQLite database functions public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL("DROP TABLE IF EXISTS history"); onCreate(db); } public boolean insertDB (int id,String latitude, String longitude) { SQLiteDatabase db = this.getWritableDatabase(); ContentValues contentValues = new ContentValues(); contentValues.put("id", id); contentValues.put("latitude", latitude); contentValues.put("longitude", longitude); db.insert("history", null, contentValues); return true; } public Cursor getData(int id){ SQLiteDatabase db = this.getReadableDatabase(); Cursor res = db.rawQuery( "select * from history where id="+id+"", null ); return res; } public int numberOfRows(){ SQLiteDatabase db = this.getReadableDatabase(); int numRows = (int) DatabaseUtils.queryNumEntries(db, TABLE_NAME); return numRows; } public boolean updateDB (Integer id, String latitude, String longitude) { SQLiteDatabase db = this.getWritableDatabase(); ContentValues contentValues = new ContentValues(); contentValues.put("latitude", latitude); contentValues.put("longitude", longitude); db.update("history", contentValues, "id = ? ", new String[] { Integer.toString(id) } ); return true; }
  • 58. 50 2.10 Titon Payroll 2.10.1 Introduction This project was developing employee payroll system for the Titon (Pvt) Ltd. When I involved this project, I was in the middles stage of developing. And also my training period was almost over. Actually one four days ahead. So I involved with the project only four days. My part was develop the worker's working hour’s scheduler. My part contained a web interface and database part. 2.10.2 Project Requirements 2.10.2.1 Overview In the dashboard there were many options. In the system there were many admin s. For the scheduler system, this system only can only accessed by the super admin. So this have only one web interface and one new table on database. But for function there were more than three linked databases were used. This system totally developed using sanota admin bundle on Symfony framework as a web application. Here I used php, Html with twig and bootstrap, JavaScript and Ajax. Figure 2. 33 : Schedule tab final output
  • 59. 51 2.10.2.2 Task My part actually contained two function under the Scheduler section. It contained one Interface only. So I needed to consider following two functions.  Schedule generator  Schedule viewer These all functions are working under the specific given date range. Here this company have two shift types. There were Day and night shifts. Night shift had some complicated contents. So I discussed with my chief engineer to summarize following contents.  8 hour shift o If leave day  If full day  Else if half day morning  Else if half day afternoon o Else if holyday  sDateTime=null  eDateTime=null o Else if sunday  sDateTime=null  eDateTime=null o Else if saturday  sDateTime=08:00  eDateTime=13:00 o Else  sDateTiime=08:00  eDateTime=17:00  24 hour shift  If leave day o If full day  If first day  Else if second day o Else if half day morning  If first day  Else if second day
  • 60. 52 o Else if Half day afternoon  If first day  Else if second day  Else o If first day  sDateTime=08:00  eDateTime=17:00 o Else if second day  sDateTime=00:00  eDateTime=08:00 2.10.2 Process 2.10.2.2 Web interface I created an Html page using bootstrap. Here instance page view needed. So I used Ajax for that. $.getJSON("{{ url('base_page_schedule_sheet') }}", { startDate: startDate, endDate: endDate, empId: empId },function(res){ $('#detail').html(res.view); }); 2.10.2.2 Script Programming I created a Schedule Generate Controller php class only. It contained following methods.  generateAction  scheduleCreateAction  saveSchedules  scheduleShowaction All those six methods were developed myself. Generate action was load the web interface under the dashboard selection if user is super admin. Schedule generate action was the main function of this project. It got the date duration given by the UI, then search the specific user attendance database. From that it will generate a schedule report. For that it used leave Verify method. It contained leave configuration. And also it saved in to the new Schedule database.
  • 61. 53 After the scheduling the database schedule Show action will work. It worked using Ajax connection. It shows the final generating result. It also contains the date range selection. 2.10.2.3.2.1 Database save script $em = $this->getDoctrine()->getManager(); $atsRepo = $em- >getRepository('BasePageBundle:AttendanceSchedule'); $empRepo = $this->getRepository('Profile'); $emp = $empRepo->find($empId); foreach ($clas as $std) { $date = $std->Date; $schedule = $atsRepo->findOneBy(array('profile' => $empId, 'date' => $date)); if ($schedule != null) { $em->remove($schedule); $em->flush(); } $newAdd = new AttendanceSchedule(); $newAdd->setDate($date); $newAdd->setProfile($emp); $newAdd->setSDateTime($std->sDateTime); $newAdd->setEDateTime($std->eDateTime); $newAdd->setShiftType($std->Shift); $em->persist($newAdd); $em->flush(); 2.10.2.3.2.1 Routing path configurations base_page_schedule: path: /admin/schedule defaults: { _controller: BasePageBundle:ScheduleGenerate:generate } base_page_schedule_sheet: path: /admin/sheet defaults: { _controller: BasePageBundle:ScheduleGenerate:scheduleShow } base_page_schedule_create: path: /admin/schedule/create defaults: { _controller: BasePageBundle:ScheduleGenerate:scheduleCreate }
  • 62. 54 Chapter Three Training Experience – Management 3.1 ManagementStandards Effective Solutions is an island-wide well known economic body. It is considered as a booming software solutions partner in Sri Lanka. To maintain such a standard Effective Solutions has adopted its own way of managing human resources and other resources. During the training period, I could not able to interact much with the marketing side. I was in the Engineering team. But I had three Client meeting during this period. So that time I can learned about the product marketing management things and feedback management things. During the client meeting, I abled to understand, how to manage the product delivering things and manage the client’s actual needs. We want carefully manage everything otherwise we will loss the client. Both Project management and Client managements were differ each other. Our Successive of the project depend on the Client management skill. 3.2 ManagementTechniques 3.2.1 Time management This the very import thing of a company. My company was started at 9.00 am, and the official off time was 6.00 pm. But we can stay up to 8.00. This was our choice only. And we had one hour break for the launch. Actually we did not want to work whole eight hours. Middle of that we had some mind relaxation off times. That was the wonderful times. That time we played some games and also had some fun talking with staffs. For the project’s time management, we planned whole works already and customize those time and charted the things and the work time. So that we had maintained our projects with on time easily. When the project planning, we consider everything about the time management. For example some technologies, we had want to some case studies. That times, we allocated times for that also within the whole project time.
  • 63. 55 3.2.2 Project management For the Project management, first we assigned the team members. Then we had an instruction and project planning meeting. During that meeting, we divided for the parts of the project. Then we can did our only part under the one topic. For that, we used following project management tools.  Bit Bucket  Tortoise Hg  Bitrix24 Here we use the Bitrix24 as the office management tools. Otherwise my chief engineer assigned a google excel cheat for the daily work management. On the first day, I wanted to list down the next day works, and also end of the every day I wanted to summarize the on day working summary on the that document. He checked that document every day. This was a good project management skill for me. Overall I had got more new things about the project management during my training period. Figure 2. 34 : Bitrix24 web interface
  • 64. 56 Chapter Four 4.1 Summary As an Electrical and Information Engineering undergraduate student of University of Ruhuna, I completed my first industrial training in Effective Solutions (Pvt) Ltd, Wewala Piliyandala. First week was kind of an introduction to the environment of the software development which was followed by the company. From the experience gained from the first week by seeing the projects which have done using those technologies, go the ability to work on the Symfony2.8 framework and Dialog ideamart APIs. So then it was a nice time to engage in many projects. Two main features in Route-Radar application were done by myself and whole interface designing, front-end, back-end coding and all were done by myself. Apart from that, I worked with Web portal Platforms, Mobile Application platforms also. So it’s a great experience to work on some other client’s requirements and then giving solutions for it. I could make a good relations with my chief engineers, and from the couple of Client’s field visits, I could understand the industrial work flow. Though we know technologies, applications of the technology is totally different from as it seems. So understanding all the concepts and working it a great feeling. And the infrastructures also was at satisfactory conditions. So at the end overall training process is Excellent I guess. I gained a lot of knowledge in that and as well as a lot of experiences. 4.2 Conclusion The Industrial training programme was a new experience with a lot of challenges and lot of knowledge for me. In the training period the best practise I learned was to improve communication skills in all sort of work. I was not supposed to code all the day. I had the opportunity to meet the client to do business analysis and requirement gathering for the project. In these instances the communication ways and arranging meetings with the officials were new experience for me. And more than technical background I was able to experience a lot of related procedures like project requirement gathering, project management and also the human resource management along with the communication with the co-workers. I really had a good training experience and I was able to complete with a good attendance to the work and I was able to leave the training facility with a cheerful way, because I am
  • 65. 57 confident about the way I was able to tackle a lot of new technology and new persons. In the training period, I could meet many industrial people who have higher positions in various companies. It is the fact that for a person who don’t know the basics of OOP concepts in the software industry cannot survive in the field. His or her code will be not in good standards. So there has to be a way of evaluation. I suggest a panel must be appointed including EEC, department Lecturers and Instructors to evaluate the current progress of a student in the expected field. I suggest students should be given the chance to select training centres before couple of months and they can have preparation for the training and in the evaluation every student can have a fair chance to get selected to the training places.
  • 66. 58 References  https://symfony.com/ [Accessed : 2016/01/04 ]  http://twig.sensiolabs.org/documentation [Accessed : 2016/02/05]  http://getbootstrap.com/getting-started/ [Accessed : 2016/01/16]  http://en.wikipedia.org/wiki , User Requirements Document [Accessed : 2016/03/20]  https://docs.mongodb.org/manual/ [Accessed : 2016/03/18]  http://stackoverflow.com/ [Accessed : During the Project Programming]  http://community.ubuntu.com/contribute/support/ubuntu-forums/  https://effectives.bitrix24.com/ [Accessed : 2016/04/25]
  • 68. II AJAX Asynchronous JavaScript and XML SQL Structured Query Language PHP Hypertext Pre-processor MIS Managing Information System IOT Internet of Things HTML Hyper Text Mark-up Language JSON JavaScript Object Notation LBS Location Based Service USSD Unstructured Supplementary Service Data IDE Integrated development environment APK Android application package UI User Interface
  • 70. IV LBS Service class LBS extends Base { /** * by Darshana (Copywrights registerd) * @param $appId * @param $subscriberId */ public function poll(Array $sims) { $mh = curl_multi_init(); // multi handler $curlArray = array(); $result = array(); foreach($sims as $index=>$sim) { $ch = curl_init($this->getAPI('lbs')); $app = $this->getAppById($sim->getAppId()); $data = new stdClass(); $data->applicationId = $app['appId']; $data->password = $app['password']; $data->subscriberId = 'tel:'. $sim->getSubscriberId(); $data->serviceType = "IMMEDIATE"; $this->logYml($data,'LBS_Request'); $data_string = json_encode($data); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Accept: application/json', 'Content-Length: ' . strlen($data_string)) ); $curlArray[$sim->getId()] = $ch; curl_multi_add_handle($mh, $curlArray[$sim->getId()]);
  • 71. V } $running = null; do { curl_multi_exec($mh, $running); } while($running > 0); foreach($curlArray as $index => $ch) { $result[$index] = curl_multi_getcontent($ch); curl_multi_remove_handle($mh, $ch); } curl_multi_close($mh); $this->logYml($result,'LBS_Response'); return $result; } }
  • 72. VI Subscription Check Service class Subscription extends Base { /** * by Darshana (Copywrights registerd) * to get the subscriber status (register/unregister/payment pending) * @param $appId * @param $subscriberId */ public function getStatus($appId,$subscriberId){ $ch = curl_init($this->getAPI('customer_status')); $app = $this->getAppById($appId); $request = new stdClass(); $request->applicationId = $app['appId']; $request->password = $app['password']; $request->subscriberId = 'tel:'.$subscriberId; $data_string = json_encode($request); $this->logYml($request,'subscription'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($data_string)) ); $result = curl_exec($ch); $this->logYml($result,'response'); curl_close($ch); return $result; } }
  • 73. VII Curl Post Request private function curlPostRequest($message,$url) { $data_string = json_encode($message); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($data_string) )); $response = curl_exec ($ch); curl_close ($ch); return $response; } SMS Get Request $subscriber = json_decode(file_get_contents('php://input')); $password = '161a083157a2b659b67b05127dbf05e2'; $url = 'https://api.dialog.lk/sms/send'; $applicationId = 'APP_009023'; $message = $subscriber->message; $logger->info($message); $sourceAddress = $subscriber->sourceAddress; $returnMessage = new stdClass(); $returnMessage->password = $password; $returnMessage->applicationId = $applicationId; $returnMessage->destinationAddresses = [$sourceAddress]; $message = explode(' ', $message, 2); $message = explode(' ', $message[1]);