Top Banner
OCTAD SOLUTIONS ERP TO ICTAD MINI PROJECT REPORT Presented to The Faculty of Applied Sciences Sabaragamuwa University of Sri Lanka In Partial Fulfillment of the Requirements for the B.Sc. degree Computing and Information Systems Submitted By OCTAD SOLUTIONS GROUP June 16, 2014 A project of 2 credit points at 3rd year 2nd semester Supervised by DR. Jayalath Ekanayake
35
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: project report erp

OCTAD SOLUTIONS

ERP TO ICTAD MINI PROJECT REPORT

Presented to

The Faculty of Applied Sciences

Sabaragamuwa University of Sri Lanka

In Partial Fulfillment of the Requirements for the B.Sc. degree

Computing and Information Systems

Submitted By

OCTAD SOLUTIONS GROUP

June 16, 2014

A project of 2 credit points at 3rd year 2nd semester

Supervised by

DR. Jayalath Ekanayake

Page 2: project report erp

OCTAD ERP SOLUTIONS

W.K.M. Sanjeewa EP 957

Page 3: project report erp

DECLARATION

I do hereby declare that the work reported in this project report was exclusively carried out by me

under the supervision of Dr. Jayalath . It describes the results of my own independent work except

where due reference has been made in the text. No part of this project report has been submitted

earlier or concurrently for the same or any other degree.

Signature of the Candidate: ………………………………………………………. Date: ………………..

Certified by:

Supervisor (Name): Dr. Jayalath Ekanayake Date: ………………..

(Signature): …………………………………

Head of the Department (Name): Senior Lecturer S.Vasanthapriyan Date: ………………..

(Signature): …………………………………

Page 4: project report erp

ACKNOWLEDGEMENT I wish to express our deep gratitude to all those who have helped me in successfully completing the project on “Octad ERP Solutions”. First and foremost, my sincere thanks go to Dr.Jayalath Ekanayake for his assistance in the preparation of this manuscript. Further, the courtesy and cooperation given by the logistics companies to understand their needs became a key factor in successful completion of our project. A special thank goes to ICTAD staff and Director Board for giving me a hand to make this a success. And I wish to convey my heartfelt thanks to all those who helped me in many ways whose names not mentioned above, but who were instrumental in bringing this project a success.

Page 5: project report erp

Table of Contents June 16, 2014 ......................................................................................................................................... 1

DECLARATION .................................................................................................................................. 3

ACKNOWLEDGEMENT ................................................................................................................... 5

Table of Contents .................................................................................................................................. 6

1.ERP System – Introduction .............................................................................................................. 7

1. Introduction ...................................................................................................................................................... 7

2.Background and motivation .............................................................................................................................. 7

3.Major issues – When developing an ERP System ............................................................................................. 7

4.Aim ..................................................................................................................................................................... 9

5.Objectives .......................................................................................................................................................... 9

6.OCTAD ERP for ICTAD ......................................................................................................................................10

2.Roles and Responsibilities .............................................................................................................. 13

1.Requirement gathering and designing. ...........................................................................................................13

1.1.Use case Diagrams ........................................................................................................................ 13

1.2.ER diagrams .................................................................................................................................. 14

1.3.User Interfaces ............................................................................................................................... 14

2.Development ...................................................................................................................................................13

2.1.Entity classes for total salary table ................................................................................................ 13

2.2.Generic java persistance API data access model ........................................................................... 14

2.3.Employee interface for the DAO................................................................................................... 14

2.4.Data access object implementation ............................................................................................... 13

2.5.Managed bean class for the employee ........................................................................................... 14

2.6.Java server faces interfaces ........................................................................................................... 14

3.Web servise for the ERP ...................................................................................................................................13

3.1.Implementation .............................................................................................................................. 13

3.2.php system's interfaces .................................................................................................................. 14

Page 6: project report erp

3.Technologies ..................................................................................................................................... 42

3.1 JSF framework...............................................................................................................................................42

A Different Point of View .................................................................................................................... 42

Simplicity and Performance ................................................................................................................ 42

Ease of Use .......................................................................................................................................... 42

Strong Community Feedback .............................................................................................................. 43

3.2 Spring MVC framework .................................................................................................................................43

3.3 Hibernate framework ...................................................................................................................................43

4.Specially used building tools............................................................................................................................43

3.4.1 Apache Maven ............................................................................................................................ 43

3.4.2 GitHUB ...................................................................................................................................... 43

3.4.2 Visual paradigm .......................................................................................................................... 44

4.References

1. ERP System – Introduction

1. Introduction

The Operator Training Centre (OTC) was established in 1982 with assistance of the International

Page 7: project report erp

Development Association of the World Bank. This training centre, situated in the North Central Province of Sri Lanka, has all necessary facilities to provide training to construction equipment operators and related personnel. The trainers are highly competent and the fleet consists of about 60 equipment for training. A large practice field is available for the trainees to operate the machines freely. Dormitory facilities, canteen and recreational facilities are available for the residential trainees. Persons who undergo training at this centre are successful in finding gainful employment either in Sri Lanka or overseas. Over the years although being successful the organization have faced several operational issues due to manual handling of processes. For instance some of the company’s inventory is stuck in maintenance for over a year due to process inefficiencies. Also the company has made losses in the previous years although student number is increasing. Another big problem that we discovered during our research is that there is no available electronic database for students So current and previous students’ data is unavailable at request Increasing the lagging time of vehicles in the workshop has made problematic. Due to the current inefficiencies the ongoing processes of ICTAD has created lot of issues ,where they do not have any methods of measuring the current Revenue, current costs, and the profits this have lead to the requirement of an automated system. So as a group we have decided to implement a project on ERP for the Operational and Training Centre of the ICTAD.

2. Background and motivation

As far as the government authorities in Sri Lanka are concerned they are really inefficient and ineffective due to traditional and lagging processes. If you consider it is the same with ICTAD. We as a team has had to troll a tremendous effort in getting our research done on ongoing processes as they were not clearly defined. But the potential of the business and the service they provide to the society we believe by improving the efficiency of their work through some kind of mechanism is really meaningful and valuable. Considering the location of the business and its remoteness implementing such a work is really challenging. So with a team that is competent enough all round to take on such a responsibility.

3. Major issues – When developing an ERP System Project Manager should have a clear implementation plan a strategy to implement that plan. The plan and strategy, however, should evolve through systematic consideration of the ICTAD requirements and its ability to manage changes that would be required under the new situation. Some of the questions to be considered in the planning

Stages are:

What are the specific information needs at the operational and managerial levels for various functional areas?

Page 8: project report erp

How will the proposed ERP system integrate with the existing information systems? (Currently ICTAD has a manual System)

How will the employees response to this proposed changes

How to gather the required information

Methods of collecting information

What is the schedule for adaptation of the new system? Common issues faced by OCTAD development team

Dividing to implementation Stages This was a huge issue we faced, due to the complexity of the ERP project Dividing in to stages was highly required so we divided the project in to Stages.

Using a common platform and a common language

There were 8 members in our team and choosing a common framework and a language was an issue.

Training on new Frameworks

We had to conduct on training on new frameworks Such as JSF and Spring which Spent a reasonable time for training.

Requirement analysis This took a long time since identifying ICTAD’s current processes were highly complex mainly due to lack of manual standards. For identifying the Standards we had to conduct lot of Interviews with employees in order to identify the Current procedures.

ER-designing

Due to the complexity of the database connecting the ER-diagram was a huge challenge. We had to connect 108 tables together. This also took a long time than expected.

1. Aim The aim of this project is to develop an ERP System to reduce fraud, Smoothing process, reduce

wastage and increase the efficiency of ICTAD.

Page 9: project report erp

2. Objectives

To reduce the frauds by 5% in Stores within 1 year.

To Smooth up the organization process

Increase the efficiency of overall process

Integrate all functions to a one System

Convert current manual process in to an Automated System

To reduce time delays in operations

Increase the efficiency in Student Training activities

3. OCTAD ERP for ICTAD

ICTAD training and development center which is situated in Galkulama provides two main tasks. Namely they are 1. Providing training to Students 2. Issuing machines for construction in a Hiring basis

Based on our Research we identified 5 main Departments they are

I. Administration

II. Stores

III. Civil and maintenance

IV. Human Resources

V. Finance

In all 5 of these departments documentation is done manually. Which takes a significant delay in communication through departments and with the head office. Due to manual documentation ordering processes, Hiring, Training has become ineffective. Specially Hiring and training which needs to be scheduled concurrently has been affected a lot and this have affected the entire performance of the company. Not having sufficient information about costs incurring has created difficulties on calculating the costs. Due to this reason Currently ICTAD do not calculate COSTS. They requires a way of identifying their costs. Current System Apart from the Finger Print System Currently all processes of ICTAD operates manually. Currently used models

Page 10: project report erp

Administration

Stores & Receiving

Civil and maintenance

Purchasing

Finance

Security

Why an ERP Based on the Discussion we had with Authorized parties in ICTAD They clearly wanted an IT System Which integrate with the following departments.

Administration

Stores

Civil and maintenance

Human Resources

Finance

In order to measure their I. Costs

II. Profits

III. Schedule the hiring and training

IV. Analyse the performance

V. Provide Separate view points based on their roles

VI. Save time by automating

Based on the requirements we identified the following components in the ERP that we are going to design.

Page 11: project report erp

1.Roles and Responsibilities

I have contributed to some phases of requirement analysis that we were perform in ICTAD center in Galkulama, Anuradapura. As requirement Gathering is trivial part of software development life cycle

Page 12: project report erp

we hold some discussions ,meeting with the team members of our OCTAD solutions group to gather requirements that best match for our user requirements. When the project migrates to the development phase I have to learn new frameworks and

integrate those frameworks that best suite to our requirements.

In the early stages of the development process we design our user interfaces using JSF and we

enhanced its capabilities using Primefaces which provides built-in components which enrich user

friendliness of the application. as the major developer of the finance module I have develop user

interfaces regarding to the module and also I have to design the whole user interface wireframe to the

system using the features such as templating, theming, navigation.

As finance module is communicating with all the modules of the ERP I have face many

challenges when designing my module. And finance module have to provide main Dashboard of the

system which act as decision making system for the administration manager.

As a developer I have to introduce, and perform some learning sessions of Hibernate which is

most popular and most used object-relational mapping framework in J2EE component suite after JPA.

my contributions also made to solve problems regarding integration of hibernate in to Spring

framework and mapping issues that arising when mapping POJO's into database tables.

Building architecture for a large system is the major task when using 3 major frameworks for

the model , view and controller components. I also contributed to solve architectural issues and

design issues when implementing those frameworks by using problem solving skills gained through my

development experience.

2.1 Use case Diagram for Finance Module.

I have the responsibility for developing finance module for the ERP system. Finance module generally

contains the analyzing of the whole system accounting and the report generation. I have develop a

dashboard to the finance module which shows the analyzing of the accounts in the system.

I have to query through the whole erp modules to calculate the expenditure for the system and also

calculate the income for the system

Page 13: project report erp
Page 14: project report erp

2.2 Er digram for the Finance module which shows other modules database tables which have to be

queried.

2.3.1 Main Dashboard of the ERP system

Page 15: project report erp

2.3.2 monthly salary expenses report

2.3.3 monthly vehicle purchasing, hiring reports and vehicle cost calculation.

2.3.4 Monthly Student course fee payments and Id card fee payments

Page 16: project report erp

3.0 entity class for total salary database table.

We have create entity classes for each of the database tables using the Object relationl mapping tool

hibernate. In this classes we have use java annotations for mapped the class to the table. For each of the

culumn we have use attributes in the class. Sometimes we have use named queries which is query

language for query the classes not the tables. @Entity @Table(name="total_salary") @NamedQuery(name="TotalSalary.findAll", query="SELECT t FROM TotalSalary t") public class TotalSalary implements Serializable { private static final long serialVersionUID = 1L; @Id @Column(name="tls_id", unique=true, nullable=false) private int tlsId; @Column(name="available_date", nullable=false) private Timestamp availableDate; @Column(name="basic_salary", nullable=false) private double basicSalary; @Column(name="date_from", nullable=false) private Timestamp dateFrom; @Column(name="date_to", nullable=false) private Timestamp dateTo; @Column(name="no_pay_leaves", nullable=false) private double noPayLeaves; @Column(name="over_time", nullable=false) private double overTime; @Column(name="received_date", nullable=false) private Timestamp receivedDate; @Column(nullable=false, length=20) private String state; @Column(nullable=false) private double total; @Column(name="travelling_clame", nullable=false) private double travellingClame; //bi-directional many-to-one association to Employee @ManyToOne @JoinColumn(name="employee_id", nullable=false) private Employee employee; public TotalSalary() { } public int getTlsId() { return this.tlsId;

Page 17: project report erp

} public void setTlsId(int tlsId) { this.tlsId = tlsId; } public Timestamp getAvailableDate() { return this.availableDate; } public void setAvailableDate(Timestamp availableDate) { this.availableDate = availableDate; } public double getBasicSalary() { return this.basicSalary; } public void setBasicSalary(double basicSalary) { this.basicSalary = basicSalary; } public Timestamp getDateFrom() { return this.dateFrom; } public void setDateFrom(Timestamp dateFrom) { this.dateFrom = dateFrom; } public Timestamp getDateTo() { return this.dateTo; } public void setDateTo(Timestamp dateTo) { this.dateTo = dateTo; } public double getNoPayLeaves() { return this.noPayLeaves; } public void setNoPayLeaves(double noPayLeaves) { this.noPayLeaves = noPayLeaves; } public double getOverTime() { return this.overTime; } public void setOverTime(double overTime) { this.overTime = overTime; } public Timestamp getReceivedDate() { return this.receivedDate; }

Page 18: project report erp

public void setReceivedDate(Timestamp receivedDate) { this.receivedDate = receivedDate; } public String getState() { return this.state; } public void setState(String state) { this.state = state; } public double getTotal() { return this.total; } public void setTotal(double total) { this.total = total; } public double getTravellingClame() { return this.travellingClame; } public void setTravellingClame(double travellingClame) { this.travellingClame = travellingClame; } public Employee getEmployee() { return this.employee; } public void setEmployee(Employee employee) { this.employee = employee; } }

3.1 generic Java Persistance API Data Access model

this is the layer which is closure to the database. In this layer we queried the database using generic

methods such as findall(), findById() ,update , insert , delete by implementing entity manager object.

We have not use direct sql queries which is mostly error- prone and which reduces application's

modularity. Instead of we used these active record methods for accessing database.

@Transactional public abstract class GenericJpaDao<T> implements GenericDao<T> {

Page 19: project report erp

private Class<T> persistentClass; private EntityManager entityManager; public GenericJpaDao(Class<T> persistentClass) { this.persistentClass = persistentClass; } public GenericJpaDao() { } protected EntityManager getEntityManager() { return entityManager; } @PersistenceContext public void setEntityManager(EntityManager entityManager) { this.entityManager = entityManager; } public Class<T> getPersistentClass() { return persistentClass; } @Transactional(readOnly = true) public T findById(int id) { T entity = (T) getEntityManager().find(getPersistentClass(), id); return entity; } @SuppressWarnings("unchecked") @Transactional(readOnly = true) public List<T> findAll() { return getEntityManager().createQuery( "select x from " + getPersistentClass().getSimpleName() + " x") .getResultList(); } public T save(T entity) { getEntityManager().persist(entity); return entity; } public T update(T entity) { T mergedEntity = getEntityManager().merge(entity); return mergedEntity; } public void delete(T entity) { getEntityManager().remove(entity); } public void flush() { getEntityManager().flush(); }

Page 20: project report erp

} --emplyee interface for DAO this interface include abstract methods that should be perform to query the database.

public interface Fin_employeeDao { List<TotalSalary> load_empl_salary(); } 3.2 data access object implementation code this is the implementation class of the previous interface class and also the child class of generic JPADAO class. In this class we implemented all the abstract methods defined in the interface and we queried the data base through calling the methods we have implemented in the generic class. When we quering the database we have use arrayList as the datastructure and we store the data base result oject in those list as object List. @Repository("fin_employeeDao") public class Fin_employeeJpaDao extends GenericJpaDao<TotalSalary> implements Fin_employeeDao{ public Fin_employeeJpaDao() { super(TotalSalary.class); } @Override public List<TotalSalary> load_empl_salary() { return findAll(); } }

3.3 managed Bean class for employee salary

in the managed Bean class we inject the data access classes using dependancy injection and we have

access the data access class methods and stored in the variables defined in the class.

@ManagedBean(name="fin_employeeBean") @SessionScoped public class Fin_employeeBean { private Employee employee; private double basicSalary; private double overTime;

Page 21: project report erp

private double noPayLeaves; private double travellingClame; private double total; private double grandTot; public double getGrandTot() { return grandTot; } public void setGrandTot(double grandTot) { this.grandTot = grandTot; } @ManagedProperty("#{fin_employeeDao}") private Fin_employeeDao finemployeeDao; private List<TotalSalary> empl_salary_details; public List<TotalSalary> getEmpl_salary_details() { return empl_salary_details; } public void setEmpl_salary_details(List<TotalSalary> empl_salary_details) { this.empl_salary_details = empl_salary_details; } public Fin_employeeDao getFinemployeeDao() { return finemployeeDao; } public void setFinemployeeDao(Fin_employeeDao finemployeeDao) { this.finemployeeDao = finemployeeDao; } public Employee getEmployee() { return employee; } public void setEmployee(Employee employee) { this.employee = employee; } public double getBasicSalary() { return basicSalary; } public void setBasicSalary(double basicSalary) { this.basicSalary = basicSalary; } public double getOverTime() { return overTime; } public void setOverTime(double overTime) { this.overTime = overTime; } public double getNoPayLeaves() {

Page 22: project report erp

return noPayLeaves; } public void setNoPayLeaves(double noPayLeaves) { this.noPayLeaves = noPayLeaves; } public double getTravellingClame() { return travellingClame; } public void setTravellingClame(double travellingClame) { this.travellingClame = travellingClame; } public double getTotal() { return total; } public void setTotal(double total) { this.total = total; } @PostConstruct public void init() { empl_salary_details = finemployeeDao.load_empl_salary(); for(int i=0;i<empl_salary_details.size();i++) { TotalSalary tt =empl_salary_details.get(i); grandTot += tt.getTotal(); } } } 3.4 Java server faces interface class for employee salary. We have used java server faces for creating User interfaces for the ERP system. Also we used JSF component library for creating interactive web pages using primfaces components such as tables ,panel ,panelgrids and charts etc. in those xhtml pages we have use exprssion language to access the attributes in the managed beans classes. Ex: #{fin_employeeBean.empl_salary_details}

<?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"

Page 23: project report erp

xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:p="http://primefaces.org/ui"> <h:form> <p:dataTable var="employee" value="#{fin_employeeBean.empl_salary_details}" widgetVar="" emptyMessage="No Records found " filteredValue=""> <p:column filterBy="#{employee.employee_id}" headerText="Emp Id" > <h:outputText value="#{employee.employee.name}" /> </p:column> <p:column filterBy="#{employee.basicSalary}" headerText="basic salary" > <h:outputText value="#{employee.basicSalary}" /> </p:column> <p:column filterBy="#{employee.overTime}" headerText="OT"> <h:outputText value="#{employee.overTime}" /> </p:column> <p:column filterBy="#{employee.travellingClame}" headerText="Travelling claims"> <h:outputText value="#{employee.travellingClame}" /> </p:column> <p:column filterBy="#{employee.noPayLeaves}" headerText="no pay leaves"> <h:outputText value="#{employee.noPayLeaves}" /> </p:column> <p:column filterBy="#{employee.total}" headerText="Total"> <h:outputText value="#{employee.total}" /> </p:column> </p:dataTable> </h:form> <br/><br/> <p:outputLabel><b>Total:#{fin_employeeBean.grandTot}</b></p:outputLabel> </html>

Page 24: project report erp

4.0 Provide Middleware platform for ERP to communicating with suppliers through web

services.

I have the responsibility to build interfaces for the enterprise resource planning system to

communicate with external parties such as suppliers. For provide those type off communication

I have to build web services for the system act as interoperable components that can communicate

through any type of external party system which is independant from their implementaion language.

For example it is no matter which language they use to implement their system. It can be java,asp.net

or PHP . Using that characteristic of web services I can communicate with the external parties.

When we consider web services we can identify 2 type of web services. First one is SOAP web

services and other one is RESTful webservices. SOAP web services use SOAP(simple object access

protocol) envelopes which is similar to xml to communicating across distributed systems. SOAP is a

simple XML-based protocol that allows applications to exchange information over HTTP. By using

XML, messages can be sent between applications. Soap web services use wsdl to give the location of

the web service and the operations that are expose through the web service.WSDL is an XML-based

language for describing Web services and how to access them.

But I have use RESTful web services it is more suitable to implement with the Spring

framework. In Restful web services we use URL to access web resources over internet. I have use

JSON as communication language betwean the ICTAD company's ERP sytem and the suppliers.

I choose JSON because is light weight ,fast and easier to parse than xml.

I have build a interface to listing purchase requests previously enter to the system using stores

components and allow the user to send purchase request to the supplier's system

4.1 JSF interface of the ERP to send purchase request to suppliers system.

Page 25: project report erp

class that handling of sending the JSON object to the suppliers PHP web service.

public class Webservice { public static void sendJson(JSONObject mainObj) throws IOException { HttpParams httpParams = new BasicHttpParams(); DefaultHttpClient client = new DefaultHttpClient(httpParams); String url = "http://abccompany.byethost8.com/insert.php"; HttpPost request = new HttpPost(url); try { request.setEntity(new ByteArrayEntity(mainObj.toString().getBytes("UTF8"))); } catch (UnsupportedEncodingException ex) { } request.setHeader("json", mainObj.toString()); HttpResponse response = null; try { response = client.execute(request); } catch (IOException ex) { } HttpEntity entity = response.getEntity(); if(response!=null){ InputStream in = null; in = response.getEntity().getContent(); BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String line = ""; while ((line = reader.readLine()) != null) { System.out.println("RES : "+line); } } } }

Page 26: project report erp

JSON object of the purchase request contains Purchase request items object array.

{

"Items":

[

{

"qty":"2100",

"name":"item cc"

},

{

"qty":"7400",

"name":"item vv"

},

{

"qty":"7400",

"name":"item vv"

}

]

,

"company" : "ICTAD private limited.",

"id" : "221"

}

I have heard of that suppliers system is written In PHP. So I develop supplier's system using php

and I can receive the JSON object send by JAVA web application and parse the JSON object and insert

it in to the Mysql database. To accomplish the task I have to host the php system in a server.

I have use jquery and Ajax which provide user a superior experience when using the system.

The php system act as real time web application. When interacting with the system it is most like

desktop application which forgets to the user that is a web application. When the system receives

purchase order from the erp system supplier can see a new notification saying there is a new purchase

order with playing a notification sound. When they check that notification message icon they can see

the whole purchase order with all the requesting items attached with the purchase order. This is really

good and very effective way of interaction with the user which is mostly not found in current systems

.the php system doesn't need to refresh to see the new purchase orders. It automatically refreshes the

database results by executing the retrieving function for every 5 seconds.

Page 27: project report erp

4.3 PHP system's interfaces

4.3.1 showing notification for user when new purchase order was received.

4.3.2 listing of new purchase orders

Page 28: project report erp

4.3.3 Details of the purchase request

-Jquery( javascript library ) function which performs ajax behavior.

Page 29: project report erp

<script type=”text/javascript”>

function showDetails(id)

{

$.post('data2.php',{id:id},function(output){

$('#output').hide();

$('body').append('<div id="output"></div>');

$('#output').html(output).slideDown(1000);

});

$.post('data3.php',{pur_id:id},function(output){

});

}

</script>

php code that parse the JSON object and insert purchase request to putchase request table and insert

purchase request items to purchase_request_item table.

<?php

$json = file_get_contents('php://input');

$obj = json_decode($json,true);

mysql_connect('localhost','root','');

mysql_select_db('suppliera');

$company =$obj['company'];

$time = time();

$result=mysql_query("insert into purchase_request(pr_id,company_name,date)

values('','$company','$time')");

$pur_id =mysql_insert_id();

mysql_query("update purchase_request set new=1 where pr_id='$pur_id' ");

for($i=0; $i<count($obj['Items']) ;$i++)

{

$iname= $obj['Items'][$i]['name'];

$qty =$obj['Items'][$i]['qty'];

mysql_query("insert into purchase_request_item values('$pur_id','$iname','$qty')");

}

?>

Page 30: project report erp

3. Technologies

3.1 JSF framework

JavaServer Faces (JSF) is a new standard Java framework for building Web applications. It simplifies

development by providing a component-centric approach to developing Java Web user interfaces.

JavaServer Faces also appeals to a diverse audience of Java/Web developers. "Corporate developers"

and Web designers will find that JSF development can be as simple as dragging and dropping user

interface (UI) components onto a page, while "systems developers" will find that the rich and robust

JSF API offers them unsurpassed power and programming flexibility. JSF also ensures that applications

are well designed with greater maintainability by integrating the well-established Model-View-

Controller (MVC) design pattern into it's architecture. Finally, since JSF is a Java standard developed

through Java Community Process (JCP), development tools vendors are fully empowered to provide

easy to use, visual, and productive develop environments for JavaServer Faces. This provides a high

ajax support.

Why use Primefaces

A Different Point of View

Prime Technology is not a software vendor but a software development house along with the consulting training activities. A framework that's not even used by its own creators can easily miss vital points regarding usability and simplicity, a major difference compared to vendor products is that

Page 31: project report erp

we use PrimeFaces in all of our clients' projects as the front end framework. This helps us to view the project from an application developer's point of view so that we can easily realize the missing features and quickly fix the bugs. This significantly differs PrimeFaces from other libraries.

Simplicity and Performance

PrimeFaces is a lightweight library; all decisions made are based on keeping PrimeFaces as lightweight as possible. Usually adding a third-party solution could bring a overhead however this is not the case with PrimeFaces. It is just one single jar with no dependencies and nothing to configure.

Ease of Use

Components in PrimeFaces are developed with a design principle which states that "A good UI component should hide complexity but keep the flexibility" while doing so.

Strong Community Feedback

PrimeFaces community continuously helps the development of PrimeFaces by providing feedback, new ideas, bug reports and patches.

3.2 Spring MVC framework

The Spring web MVC framework provides model-view-controller architecture and ready components that can be used to develop flexible and loosely coupled web applications. The MVC pattern results in separating the different aspects of the application (input logic, business logic, and UI logic), while providing a loose coupling between these elements.

The Model encapsulates the application data and in general they will consist of POJO. The View is responsible for rendering the model data and in general it generates HTML output that the client's browser can interpret. The Controller is responsible for processing user requests and building appropriate model and passes it to the view for rendering.

3.3 Hibernate framework

Hibernate is a high-performance Object/Relational persistence and query service which is licensed under the open source GNU Lesser General Public License (LGPL) and is free to download. Hibernate not only takes care of the mapping from Java classes to database tables (and from Java data types to SQL data types), but also provides data query and retrieval facilities.

This tutorial will teach you how to use Hibernate to develop your database based web applications in simple and easy steps.

Hibernate is an object-relational mapping library for the Java language, providing a framework for

Page 32: project report erp

mapping an object-oriented domain model to a traditional relational database. Hibernate

solves object-relational impedance mismatch problems by replacing direct persistence-related

database accesses with high-level object handling functions. Hibernate's primary feature is mapping

from Java classes to database tables (and from Java data types to SQL data types). Hibernate also

provides data query and retrieval facilities. It generates SQL calls and relieves the developer from

manual result set handling and object conversion. Applications using Hibernate are portable to

supported SQL databases with little performance. We used this to increase the speed of query our

database.

4. building tools

3.4.1 Apache Maven

Maven is a build automation tool used primarily for Java projects. Maven addresses two aspects of

building software: First, it describes how software is built, and second, it describes its dependencies.

Contrary to preceding tools like Apache Ant it uses conventions for the build procedure, and only

exceptions need to be written down. An XML file describes the software project being built, its

dependencies on other external modules and components, the build order, directories, and

required plug-ins. It comes with pre-defined targets for performing certain well-defined tasks such as

compilation of code and its packaging. Maven dynamically downloads Java libraries and Maven plug-

ins from one or more repositories such as the Maven 2 Central Repository, and stores them in a local

cache. This local cache of downloaded artifacts can also be updated with artifacts created by local

projects. Public repositories can also be update.

3.4.2 GitHUB

GitHub is a Git repository web-based hosting service which offers all of the functionality of Git as well

as adding many of its own features. Unlike Git which is strictly a command-line tool, Github provides a

web-based graphical interface and desktop as well as mobile integration.

GitHub is the best place to share code with friends, co-workers, classmates, and complete strangers.

Over six million people use GitHub to build amazing things together. With the collaborative features of GitHub.com, our desktop apps, and GitHub Enterprise, it has never

been easier for individuals and teams to write better code, faster. Originally founded by Tom Preston-

Werner, Chris Wanstrath, and PJ Hyett to simplify sharing code, GitHub has grown into the world's

largest code host.

Page 33: project report erp

3.4.2 Visual paradigm

Visual Paradigm for UML (Visual Paradigm, 2010) is a CASE tool with several options for

modeling with UML2 diagrams and also supports SysML requirements diagrams and ER

diagrams. The tool has a good working environment, which facilitates viewing and

manipulation of the modeling project. It is a business tool and also supports specific

changes to source code of some programming languages such as C++ and Java.

Visual Paradigm International is a leading provider of software solutions that enable organizations to

develop quality applications faster, better and cheaper. Visual Paradigm is dedicated to the continuing

delivery of software, services, and partnerships to help our customers to accurately transform systems

requirement into quality software solutions, with minimum risk and maximum ROI. We design and

develop products that remove complexity, improve productivity, and compress your software

development time frames.

Visual Paradigm provides a suite of award-winning products that facilitates organizations to visually

and diagrammatically design, integrate and deploy their mission critical enterprise applications and

their underlying databases. Our award-winning products help your software development team to

excel the entire model-build-deploy software development process, maximizing and accelerating both

team and individual contributions.

Page 34: project report erp

4.0 References:

https://netbeans.org/kb/docs/web/hibernate-webapp.html

https://netbeans.org/kb/docs/web/jsf20-intro.html

https://www.primefaces.org

https://www.w3scools.com

https://www.roseindia.net

https://www.tutorialspoint.org

Page 35: project report erp