Documente Academic
Documente Profesional
Documente Cultură
Page |1
Training Details
About Real Infotech:
Real Infotech was established to provide "Quality Software & web Solutions" and
"Professional IT trainings". The tremendous progress made by the organization and
the reputation it commands today is an ample testimony of its commitment to
quality.
Real Infotech offers various training programs for IT professionals. The objective of
their training programs is to bridge the gap between the practical knowledge level
of IT professionals and requirement of the IT industry. Keeping this in mind, they
have prepared some extensive training programs which makes their students
technically sound enough for the IT industry.
Real Infotech offers three types of training programs:
1. Specialized Training Programs.
2. Six Month Training Programs for Eng. Graduates / MCAs.
3. Two Month Training Programs for Engineering Graduates.
Page |2
Why Java?
There are many reasons for why I have opted Java Web Technology for six month
training. Reason behind the increasing Java Popularity is its portability and easy to
understand English like syntax.
Java is a front line programming language and its Googles chosen language for
Android apps development making it an important programming language in the
modern times. Many job options are open to you if you learn Java, you can develop
core Java based server side application, J2EE web and enterprise applications, and
opt for Android based mobile application development.
Apart from the reasons cited above, here are 10 more reasons for learning Java 1) Java is ready to learn As stated on javarevisited.blogspot.in, Java comprises
of fluent English like syntax with minimal magic characters like
Generics angle brackets. It makes it easy to read Java program and learn quickly.
Once one becomes familiar with initial hurdles with installing JDK and setting up
PATH and understanding how Classpath works as its easy to program in Java.
2) Java is an Object Oriented Programming Language (OOPS) - Developing
OOPS application is much simpler and it assist in keeping system modular, flexible
and extensible. After acquiring knowledge in key OOPS concept including
Abstraction, Encapsulation, Polymorphism and Inheritance, all these can be used
using Java as it encompasses several best practices and design pattern in it's
library.
3) Java has rich API The language has a rich API and visibility that comes with
Java installation. In the initial days of Java programming, Applets were used
proving great animation capability. Java offers API for I/O, networking, utilities, xml
parsing, database connection, and everything. Anything remaining is covered by
open source libraries like Apache Commons, Google Guava and others.
4) Powerful development tools e.g. Eclipse , Netbeans - Eclipse and Netbeans
have played a vital role in making Java one of the best programming language. It is
a pleasure to code in IDE once you have coded in DOS Editor or Notepad. It not
only assist in code completion but also offers strong debugging capability that are
essential for real world development.
5) Good collection of open source libraries - Open source libraries help in
ensuring that Java is utilized everywhere. There has been contribution by a host of
libraries from organizations like Apache, Google, etc making Java development
easy, faster and cost effective. With framework such as Spring, Struts, Maven
ensuring that Java development follows best practices of software craftsmanship,
propagates using of design patterns and assisted Java developers in getting the
Page |3
work done.
6) Great community support - Community is the greatest strength of Java
programming language and platform. Java has many active forums like
Stackoverflow which is an open source organizations and many Java user group for
assisting with everything. Java has a community to assist beginners, advanced and
even expert Java programmers.
7) Java is FREE As Java is free language you can save money for creating
anything using the Java application. It has also assisted Java in gaining popularity
in the midst of individual programmers, and large organizations.
8) Very Good documentation support Javadocs Javadoc is an amazing piece
of documentation telling you all there is to know about Java API. It is one of the
major reasons for Java being the best programming language. It has made learning
easy, and providing great reference at the time of coding in Java.
9) Java is platform independent Javas tag line "write once run anywhere" is a
great way to attract a host of new development in Java. It is the prime reason for
Java being the best programming language, as most of Java applications are
developed in Windows environment and run in the UNIX platform.
10) Java is everywhere Java runs on desktop, on mobile, on card, and nearly
everywhere and so do Java programmers. The wide availability of Java
programmers is another reason for organizations opting to choose Java for new
development than any other programming language.
Page |4
Project Description:
WebBean is a Java Based Content Management System with Mobile responsive
attractive user interface. Using WebBean, you can develop any kind of web project
like a blog website, or commercial website, or a web portal for universities and
hospital, etc. WebBean take care of data management in dbms and uses highly
secure methods to fetch that data. Using WebBean, you can customize themes of
your website, can add new components or banners, can add or delete articles and
their categories, manage users of website, add custom footer and title of website.
WebBean also manage sessions, user details, total visitors, online user, and many
things at backend.
It is my innovative idea which came from other existing Content Management
System like Joomla, Drupal, DotNetNuke, etc. Most of these CMSs support PHP and
some support other technologies like ASP.NET, PERL, RUBY, and PYTHON.
But there are very less number of CMS which support Java. And those which
support like openCMS and Apache Roller are very complex and can only be used for
high scale projects.
So I am designing Webbean as a solution to this problem. Webbean is very simple
to use CMS but is highly flexible and efficient. Webbean take care of authentication
problems and sql injections attacks.
Languages used:
Programming Logic:
Core Java, Java Servlets, JSP and XML.
User Interface:
Html 5, CSS 3, Javascript, Jquery, Less, and Twitter Bootstrap framework.
Database Tier:
Structure Query Language (SQL) in Mysql database system.
Page |5
Technologies Used
Page |6
Page |7
Page |8
Public View
WebBean is a tool to create websites and to manage content on them. So the final
output which admin want to get is a public interface (which can be web site, college
bulletin board, campus portal, a blog, a discussion forum, etc).
As WebBean is supposed to generate this public view automatically, we need to
design this interface also. So I have designed one default html layout with all
required CSS. In addition I have designed 5 other CSS design (themes) for this
default layout. Admin can change look and feel of website by just selecting from a
list of all 5 different themes.
o
o
Page |9
Below is the screen shot of default layout of public view with all
different content sections:
P a g e | 10
P a g e | 11
Admin View
Admin view is the main interface with which admin or other users (assigned by
admin) will interact or will work.
Admin will open this interface by opening its link in browser and will use it to
manage content on the site.
o
o
P a g e | 12
Mobile Responsive
As admin will need to add new article using his mobile, design
of CMS should be mobile responsive. I have used bootstrap
framework which make use of jquery and media queries to
make your design mobile responsive.
WYSIWYG editor
WYSIWYG means What you see is what you get. I assumed
that admin has no knowledge of html. But to write good looking
articles and components, we need some css and html.
Fortunately, I have used tinymce editor which is WYSIWYG
editor, which format your article text automatically in back end.
You just need to write and use buttons available to format your
text.
Help Menu
Though admin interface is very easy to use, still admin
sometime need help to understand any particular feature.
For that I have added help menu button in which user can
search on any topic.
Help page also highlights all positions available and also help in
adding new positions.
Help page will be modified in future to add more features.
Security and Authorization
Well, admin link is complete separated from public pages. By
default /admin in end of your domain will direct you to admin
area of WebBean. But you can easily customize this /admin
link to whatever you want like /jaspreet or /newlink or
anything.
By changing this link, public users will never know how to go to
admin page.
Second WebBean each page is well authorized using session
technique of Java Servlets. When user login, first its details are
checked in database and then new session is created which will
invalidate automatically after 30 minutes.
Search button
Search button is always must in any kind of project. WebBean
is provided with search facility which helps in searching
database or any feature present in WebBean. Results of search
button will be organized into categories like menu, article,
component, user, features, database, etc.
Note:
P a g e | 13
Here is how
WebBean works:
P a g e | 14
Development Environment
Project development starts with this phase. First of all environment is set. All tools
like compilers, editors, designer tools, etc are collected.
Prepros and Sublime Text Editor: These two applications are used
to design WebBean Layout and editing Bootstrap default CSS files to
produce new CSS themes.
1.
2.
3.
4.
5.
P a g e | 15
P a g e | 16
2. Home page
3. Global Settings
P a g e | 17
4. Article Title
P a g e | 18
P a g e | 19
P a g e | 20
P a g e | 21
b. Database Design
Database design is the root base of every project. It should be simple, clear,
robust, highly optimized and documented. I have designed my database using
MySql Workbench tools.
Following tables are designed in webbean_db schema.
Users it hold current user details and keep the session active.
Setting it is used to store title, subtitle, theme, footer, and other global
information
Category it hold list of categories and article count in each category.
Article it is used to store articles and their meta information like, title,
body, author, date, category, etc.
Menu it store menu names and their content.
Component it store component name, content and its position on page.
Test this table is only used while testing and developing. In actual
deployment it is removed.
P a g e | 22
c.
Modal Classes.
Modal classes are just simple old java classes. But these classes are responsible for
the core functioning of your application.
Controller classes (which are servlets) just accept the request and decide which
modal class should process the request. Then actual business logic is executed by
modal classes only.
In some frameworks like spring or hibernate, modal classes are well mapped with
database design. Like for each table in database there will be one modal class with
same name as that of table. This class will be then responsible to update and
manage respective table in database.
The main reason for separating modal classes from servlets or controller classes is
to provide security as well as flexibility. Security is due to fact that servlets and
hence user cannot directly communicate with database. Flexibility is due to fact that
once modal classes are made, you can customize your servlets and jsp files as you
wish. Core programming will remain same.
P a g e | 23
P a g e | 24
P a g e | 25
d. Controller Classes
Function of controller class is to control the flow of information and computation.
Request is first given to controller class which is called as Servlets. Then Servlets
check process the request; identify its type and parameters inside it. If the request
needs some business logic to be performed like database update, bank
transactions, saving session details, etc, then Servlets call methods from modal
classes to perform these functions. Servlets in the end send processed data to View
files which are usually jsp files. Jsp file produce interface and html files and send
them to client or users browser.
I have created number of controller classes each for different module of
WebBean:
As all controller classes are Servlets so there are only two methods inside these
classes:
doGet() to process Http requests with GET method.
doPost() to process Http requests with POST method.
In addition to above methods Servlets do have some inherited methods which can
be overridden if necessary. These are:
init(ServletConfig config)
destroy()
getServletContext()
getServletConfig()
sendRedirect()
etc.
P a g e | 26
P a g e | 27
P a g e | 28
level 1 dfd:
For admin process
P a g e | 29
P a g e | 30
Deployment Environment
Deployment environment is the environment in which our application will be
deployed finally. In android projects, android phone or emulator is the
environment. In desktop projects, your pc is the environment. And in web
applications, Server is the deployment environment.
WebBean is a web application, so we need server to deploy it. Server must be
having java enabled in it and should support Servlets 3.0 and Jsp 2.3 specs.
There are many such servers like tomcat, glassfish, etc.
I have chosen Tomcat 8 for my project. It is open source and free. It is updated to
latest specifications of Servlets and Jsp. And it can be easily integrated with Eclipse.
Tomcat usually run on port 8080 as port 80 is reserved for http requests. So you
can open tomcat applications by using link http://localhost:8080 or
http://yourdomain.com:8080
Interface testing:
To design and test interface we do not require tomcat. I have first designed html
layouts with css designs and tested them directly in browser.
Here is how I setup my design directory and worked on it.
Design
o
Admin
Dist
Css
Default.html
Login.html
Template.html
Fonts
Js
Less
Public
Default template
Css
Fonts
Img
Js
Article-body.html
Default.html
Index.html
Website_custom
Dist
P a g e | 31
Fonts
Js
Less
Logo and favicon
Tomcat configuration:
Deployment in Tomcat:
Now upload your .sql file in MySql database using PhpMyAdmin or MySql
Workbench and start the database system.
P a g e | 32
My Future goals:
P a g e | 33
Bibliography
Author: Jaspreet Singh (2011CSA1736).
College and department: CSE department in GNDU RC Gurdaspur.
Project Title: Advance java project titles as WebBean CMS.
Category: Content Management System for web applications.
Sources:
www.google.com
Reference book: Creating Content Management Systems in Java
Programming Series by Arron Ferguson (publishers: Charles River Media,
Boston, Massachusetts.)
Reference book: Head First Servlets and Jsp by Bryan Basham, Kathy
Sierra & Bert Bates (publishers: Shroff publishers & Distributors PVT. LTD)
Designing Knowledge: www.w3schools.com
Designing Knowledge: www.learn.shayhowe.com
Designing framework used: www.getbootstrap.com
Editor: www.tinymce.com
Inspired from: www.joomla.org