1 SUMMER TRAINING PROJECT REPORT ON EVENT DEKHO COMPONENT REPOSITORY MANAGEMENT GIRNAR SOFT PVT. LTD. JAIPUR Under the guidance of Submitted By Submitted To Mr. Vikas Sonwal Rahul Kumar Goyal Dr. Namita Mittal Project Manager, 2009UIT916 Assistant Professor GirnarSoft pvt. Ltd. Jaipur
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
1
SUMMER TRAINING PROJECT REPORT
ON
EVENT DEKHO COMPONENT REPOSITORY
MANAGEMENT
GIRNAR SOFT PVT. LTD.
JAIPUR
Under the guidance of Submitted By Submitted To
Mr. Vikas Sonwal Rahul Kumar Goyal Dr. Namita Mittal
Project Manager, 2009UIT916 Assistant Professor
GirnarSoft pvt. Ltd.
Jaipur
2
Malviya National Institute Of Technology
Declaration
I hereby declare that work entitled “Summer training project report”, submitted towards
completion of summer training after 3rd year of B.Tech(IT) at Malaviya National Institute
Of Technology Jaipur, comprises of my original work pursued under the guidance of Mr.
Vikas Sonwal.
The results embodied in this report have not been submitted to any other Institute or
University for any award.
Signature Date
3
Table of Contents Chapter 1 ....................................................................................................................................................... 5
GIRNARSOFT COMPANY PROFILE ................................................................................................................. 5
1.1 Overview Of Company ........................................................................................................................ 5
3.1.1 Model .......................................................................................................................................... 9
3.2 How it Works ..................................................................................................................................... 10
3.3 Use In Web Applications ................................................................................................................... 11
Spring Framework ....................................................................................................................................... 11
4.2 Spring includes: ................................................................................................................................. 12
4.3 Spring Modules ................................................................................................................................. 12
4.4 Importance of Spring Framework ..................................................................................................... 13
GIRNARSOFT COMPANY PROFILE GirnarSoft holds the expertise in Product Development and partners with the world's most innovative companies to accelerate great software products using the unique Business Value Approach.
1.1 Overview Of Company GirnarSoft has a team of experts whose full time research effort goes on to solve real world problems using various optimization and search algorithms. This service aims to help customers make well informed decisions for their organization. This covers an umbrella of product services in various verticals like manufacturing, logistics, revenue management, scheduling, planning etc. The expertise lies in modeling the real world problems into math models and finding feasible solutions to real world problems involving resource constraints and resource availability. Under this service comes our Supply Chain Management Solution. Company's key differentiator is the expertise their team carries in the areas of Optimization, SCM consulting, domain expertise in various SCM industry. Here are the key areas covered:
Strategic Planning
Supply Chain Management
Pricing And Revenue Management
Logistics And Site Location
Optimization
Scheduling
Inventory Analysis
1.2 GirnarSoft Mission Creating Business Value for Product Companies with innovative end-to-end solutions throughout the product lifecycle.
1.3 Products and Services
GirnarSoft offers variety of services to fulfill client needs and to ensure a focused effort to accomplish business goals. Services are broadly classified into two categories:-
6
Business Value Services
Product Services
1.3.1 Business Value Services Business Value Services cater to addressing a specific business goal. With our vast experience in the field of e-commerce we have innovated and developed expertise in various specific areas which impact the bottom line of our customers directly..Primary services offered in this domain are:
Conversion Service
Lead Scoring Service
SEO/SEM Service
Viral Marketing Service
Web Analytics Service
Operations Research Service
1.3.2 Product Services Product Services cater to development of a product and seeing it emerge successfully though various lifecycles of the product. Varieties of services are offered to ensure the product takes the shape envisioned and is successfully implemented and maintained through its lifecycles. Be it conceptualizing a product, which involves deep expertise in innovation, or developing it to spec, on time with quality, or maintaining the giant product you have – It’s all addressed under these services:
Product Conceptualization Service
Product Development Service
Product Maintenance Service
Migration and Porting Service
1.4 GirnarSoft BI Services
Customer Service Analytics and enterprise-wide strategy (Identify threats, opportunities and market trends)
Design solutions for your business problems using a hands-on, practical approach
Develop customized BI software packages
Data Warehousing including Warehouse Design and Implementation
Executive Dashboards
7
Chapter 2
JAVA Java is a programming language originally developed by James Gosling at Sun Microsystems (which is now a subsidiary of Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low level facilities. Java applications are typically compiled to byte code (class file) that can run on any Java Virtual Machine (JVM) regardless of computer architecture. Java is a general-purpose, concurrent, class-based, object-oriented language that is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere." Java is currently one of the most popular programming languages in use, particularly for client-server web applications.
2.1 Principles There were five primary goals in the creation of the Java language: 1. It should be "simple, object-oriented and familiar" 2. It should be "robust and secure" 3. It should be "architecture-neutral and portable" 4. It should execute with "high performance" 5. It should be "interpreted, threaded, and dynamic"
2.2 Java Platform One characteristic of Java is portability, which means that computer programs written in the Java language must run similarly on any hardware/operating-system platform. This is achieved by compiling the Java language code to an intermediate representation called Java byte code, instead of directly to platform-specific machine code. Java byte code instructions are analogous to machine code, but are intended to be interpreted by a virtual machine (VM) written specifically for the host hardware. End-users commonly use a Java Runtime Environment (JRE) installed on their own machine for standalone Java applications, or in a Web browser for Java applets.
2.3 Implementations Sun Microsystem officially licensed the Java Standard Edition platform for Linux, Mac OS X, and Solaris. In the past Sun licensed Java to Microsoft but the license expired without renewal. Because Windows does not ship with a Java software platform, a
8
network of third party vendors and licensees develop them for Windows and other operating system/hardware platforms. Sun also distributes a superset of the JRE called the Java Development Kit (commonly known as the JDK), which includes development tools such as the Java compiler, Javadoc, Jar, and Debugger.
2.4 Performance Programs written in Java have a reputation for being slower and requiring more memory than those written in C. However, Java programs' execution speed improved significantly with the introduction of Just-in-time compilation in 1997/1998 for Java 1.1, the addition of language features supporting better code analysis (such as inner classes, StringBuffer class, optional assertions, etc.), and optimizations in the Java Virtual Machine itself, such as Hot Spot becoming the default for Sun's JVM in 2000.
2.5 Automatic Memory Management Java uses an automatic garbage collector to manage memory in the object lifecycle. The programmer determines when objects are created, and the Java runtime is responsible for recovering the memory once objects are no longer in use. Once no references to an object remain, the unreachable memory becomes eligible to be freed automatically by the garbage collector. Something similar to a memory leak may still occur if a programmer's code holds a reference to an object that is no longer needed, typically when objects that are no longer needed are stored in containers that are still in use. If methods for a nonexistent object are called, a "null pointer exception" is thrown Garbage collection may happen at any time. Ideally, it will occur when a program is idle. It is guaranteed to be triggered if there is insufficient free memory on the heap to allocate a new object; this can cause a program to stall momentarily. Explicit memory management is not possible in Java.
9
Chapter 3 MVC Architecture The MVC (Model-View-Controller) architecture is a way of decomposing an application into three parts: the model, the view and the controller. It was originally applied in the graphical user interaction model of input, processing and output.
3.1 Component interactions 3.1.1 Model A model represents an application’s data and contains the logic for accessing and manipulating that data. Any data that is part of the persistent state of the application should reside in the model objects. The services that a model exposes must be generic enough to support a variety of clients. By glancing at the model's public method list, it should be easy to understand how to control the model's behavior. A model groups related data and operations for providing a specific service; these group of operations
10
wrap and abstract the functionality of the business process being modeled. A model’s interface exposes methods for accessing and updating the state of the model and for executing complex processes encapsulated inside the model. Model services are accessed by the controller for either querying or effecting a change in the model state. The model notifies the view when a state change occurs in the model.
3.1.2 View The view is responsible for rendering the state of the model. The presentation semantics are encapsulated within the view, therefore model data can be adapted for several different kinds of clients. The view modifies itself when a change in the model is communicated to the view. A view forwards user input to the controller.
3.1.3 Controller The controller is responsible for intercepting and translating user input into actions to be performed by the model. The controller is responsible for selecting the next view based on user input and the outcome of model operations.
3.2 How it Works In MVC a controller handles the user request instead of another JSP. The controller is implemented as a Servlet. The following steps are executed when the user submits the request.
The Controller Servlet handles the user’s request. (This means the hyperlink in the JSP should point to the controller servlet).
The Controller Servlet then instantiates appropriate JavaBeans based on the request parameters (and optionally also based on session attributes).
The Controller Servlet then by itself or through a controller helper communicates with the middle tier or directly to the database to fetch the required data.
The Controller sets the resultant JavaBeans (either same or a new one) in one of the following contexts – request, session or application.
The controller then dispatches the request to the next view based on the request URL.
The View uses the resultant JavaBeans from Step 4 to display data. Note that there is no presentation logic in the JSP. The sole function of the JSP in Model 2 architecture is to display the data from the JavaBeans set in the request, session or application scopes.
11
3.3 Use In Web Applications
Model View Controller has been adapted as an architecture for World Wide Web applications. Several commercial and noncommercial application frameworks have been created to enforce the pattern. These frameworks vary in their interpretations, mainly in the way that the MVC responsibilities are divided between the client and server.
Early web MVC frameworks such as Java EE took a thin client approach that placed almost the entire model, view and controller logic on the server. In this approach, the client sends either hyperlink requests or form input to the controller and then receives a complete and updated web page (or other document) from the view; the model exists entirely on the server. As client technologies have matured, frameworks such as JavaScriptMVC and Backbone have been created that allow the MVC components to execute partly on the client.
Chapter 4 Spring Framework 4.1 Introduction
The Spring Framework is an open source application framework and Inversion of Control container for the Java platform.
The core features of the Spring Framework can be used by any Java application, but there are extensions for building web applications on top of the Java EE platform. Although the Spring Framework does not impose any specific programming model, it has become popular in the Java community as an alternative to, replacement for, or even addition to the Enterprise JavaBean (EJB) model.
The Spring Framework provides a comprehensive programming and configuration model for modern Java-based enterprise applications - on any kind of deployment
12
platform. A key element of Spring is infrastructural support at the application level: Spring focuses on the "plumbing" of enterprise applications so that teams can focus on application-level business logic, without unnecessary ties to specific deployment environments.
4.2 Spring includes:
Flexible dependency injection with XML and annotation-based configuration styles
Advanced support for aspect-oriented programming with proxy-based and AspectJ-based variants
Support for declarative transactions, declarative caching, declarative validation, and declarative formatting
Powerful abstractions for working with common Java EE specifications such as JDBC, JPA, JTA and JMS
First-class support for common open source frameworks such as Hibernate and Quartz
A flexible web framework for building RESTful MVC applications and service endpoints
Rich testing facilities for unit tests as well as for integration tests
4.3 Spring Modules
Spring framework provides many modules that can be used in development of enterprise grade applications. Here is the list of Spring Modules:
1. Inversion of Control container 2. Aspect-oriented programming 3. Data access (DAO) 4. Transaction management 5. Model-view-controller (Spring MVC) 6. Remote Access framework 7. Convention-over-configuration (Spring ROO module) 8. Batch processing (Spring Scheduler) 9. Authentication and authorization (Spring Security) 10. Remote Management (Spring JMX) 11. Messaging (Spring messaging) 12. Testing - It provides support classes for writing and executing the test cases
13
4.4 Importance of Spring Framework
Spring is a powerful framework that solves many common problems in J2EE. Many Spring features are also usable in a wide range of Java environments, beyond classic J2EE.
Spring provides a consistent way of managing business objects and encourages good practices such as programming to interfaces, rather than classes. The architectural basis of Spring is an Inversion of Control container based around the use of JavaBean properties. However, this is only part of the overall picture: Spring is unique in that it uses its IoC container as the basic building block in a comprehensive solution that addresses all architectural tiers.
Spring provides a unique data access abstraction, including a simple and productive JDBC framework that greatly improves productivity and reduces the likelihood of errors. Spring's data access architecture also integrates with TopLink, Hibernate, JDO and other O/R mapping solutions.
Spring also provides a unique transaction management abstraction, which enables a consistent programming model over a variety of underlying transaction technologies, such as JTA or JDBC.
Spring provides an AOP framework written in standard Java, which provides declarative transaction management and other enterprise services to be applied to POJOs or - if you wish - the ability to implement your own custom aspects.
Chapter 5
Hibernate Framework 5.1 Introduction
Hibernate is an Object-relational mapping (ORM) tool. Object-relational mapping or ORM is a programming method for mapping the objects to the relational model where entities/classes are mapped to tables, instances are mapped to rows and attributes of instances are mapped to columns of table.
A “virtual object database” is created that can be used from within the programming language.
Hibernate is a persistence framework which is used to persist data from Java environment to database. Persistence is a process of storing the data to some permanent medium and retrieving it back at any point of time even after the application that had created the data ended.
14
5.2 Hibernate Architecture
The above diagram shows minimal architecture of Hibernate. It creates a layer between Database and the Application. It loads the configuration details like Database connection string, entity classes, mappings etc.
5.3 Hibernate Configuration
Hibernate configuration is managed by an instance of org.hibernate.cfg.Configuration. An instance of org.hibernate.cfg.Configuration represents an entire set of mappings of an application’s Java types to an SQL database. The org.hibernate.cfg.Configuration is used to build an immutable org.hibernate.SessionFactory. The mappings are compiled from various XML mapping files or from Java 5 Annotations.
Hibernate provides following types of configurations
1. hibernate.cfg.xml – A standard XML file which contains hibernate configuration and which resides in root of application’s CLASSPATH
2. hibernate.properties – A Java compliant property file which holds key value pair for different hibernate configuration strings.
3. Programmatic configuration – This is the manual approach. The configuration can be defined in Java class.
15
Hibernate creates persistent objects which synchronize data between application and database.
5.4 Building a SessionFactory
Once the instance of org.hibernate.cfg.Configuration is created using any of the above method, the singleton instance of SessionFactory can be created as follow:
Hibernate does allow your application to instantiate more than one org.hibernate.SessionFactory. This is useful if you are using more than one database.
5.5 Getting Session instance
As noted above, Session represents a communication channel between database and application. Each session represents a factory of transactions. Session can be created from SessionFactory as follows:
Session session = sessions.openSession(); // get a new Session
Chapter 6 Project Overview
6.1 Introduction In this era of science and technology computer is most important component in our life.
Work can be done in better way with the help of computer. Our project is an online
portal where any one can see recently happed and famous events of his city. Any one
can arrange events line parties, marriages, meetings on this portal. Name of this portal
is “Event dekho Website”.
On this website users can arrange their events according to their budget. They can
choose all resources which will be used in the event like garden, band-baja, dj, cakes
Catering etc from a lot of of different options of these resources on this single online
portal. They can even talk to the partners who own these resources.
16
6.2 Problem Statement Currently organizing an event is a big headache. It takes a lot of timing and running
from here and there at different event resources owners. For organizing an event we
have to go to every resource owners and bargaining with them for the price of the
resources. We need more than a month to organize every thing for the big events like
marriage and all.
This is not proper and effective kind of work. There is a big probability that something
bad can happen in this kind of arrangement. We can face many problems during the
event like we might not get as good decoration as we expected.
6.3 Propose Solution We can make an online portal to solve all these problems. Where we can see all event
resources with different varieties and different budgets. We can see the pics and
themes of the resources in the previous events so that we won’t have doubts about the
kind of arrangement the resource holders will provide. Among these different varieties of
the resources we can choose and book according to our budget without bargaining
because rates of these resources will be already fair as the prices will be set by the
admin of the portal not by the resources owners. Within minutes we can select
everything for our event like band baja, cake, catering, conference_hall, decoration, dj,
garden, hotel, marriage hall, tent etc.
6.4 Event Dekho Website Name of this online portal is “Event Dekho Website”
In the EventDekho website database used is MySql. and the technology used for
insertion information in the database and retrieval of the information from the database
is “Java Hibernate Framework” By using this framework we don’t need to worry about
the queries which are being used for the information insertion in the database and
retrieval of the information from the database so we can focus only on the java coding
and make this project much efficient.
There are three parts of this website:-
6.4.1 Registration App. This is the part of the portal where all kinds of users can register them selves. There is
separate center database of registration app. Which contains all the information about
all kind of the users. There are 3 types of the users
17
Sub admins
Partners
Customers
So there are 3 different tables in the database, each contains information about the
respective kind of user.
This is how refistration App. Of EvntDekho Portal works
When a user gets registered himself with “EventDekho”, there will be scheduler
which will bring the registration request to the admin.
This scheduler regularly runs after certain amount of time.
if it finds any recent registration request, it will bring the registration request to the
admin and drops an email to the admin for reminding him about the registration
request.
Admin will see the registration request and he can verify the data provided by the
user.
if he finds the request suitable for the registration he will approve the registration
otherwise will cancel the registration.
means admin either can approve the registration request or can cancel the
registration request.
If admin approves the registration request, all the information provided by the
user will be added into database and a notification email will be sent to the user
that he has been successfully registered with the “EventDekho”.
also this email will explain the user that what services he can get from the portal
and how he can make this portal beneficial for him.
After approval of the registration request user can sign in in the portal and can do
the related work he is supposed to do depends on the kind of the user he has
signed in as.
6.4.2 EventDekho Main Website
This part is the center of the EventDekho portal. This part connects all the parts of this
portal. Whenever any user opens this website he will be sent to the eventdekho main
website, from here he can choose any option he wants to suppose if he wants to get
registered himself he will be referred to the registration App, if he is partner and he
wants to add resources or delete resources he will be referred to the CRM app. Other
than these there are following things a user can do on this main website
User can see the pics of the recent events.
18
User can sign in being different kind of the user.
User can see different event resources available on the portal
User can choose an option of “budget-automation” for searching the event
resources. This automation automatically searches the resources which are in
the budget of the user.
User can see the list of the partners and their contacts.
User can plan his event by giving his requirements.
6.4.3 EventDekho CRM
EventDekho Component Repository Management is the most important part of this
online portal. CRM is basically for the partners. Partners are those users who owns the
event resources.
If a partner signs in the website he will be referred to the CRM App. CRM app deals with