The document discusses the implementation of a project, including:
- The selection of Windows 7 and a platform-independent J2EE platform for development
- The selection of Java as the programming language due to its object-oriented capabilities, rich APIs, powerful development tools, open source libraries, and platform independence
- The use of Oracle Database for its reliability and ability to ensure data integrity through ACID properties
- Requirements including Java/J2EE, HTML, JavaScript, JSON, and Tomcat as the web server
- Guidelines for programming including naming conventions and handling exceptions
- The implementation procedure including creating a dynamic web project in Eclipse and exporting a WAR file
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
Project report for final year project
1. CHAPTER - 6
IMPLEMENTATION
6.1 Implementation
The implementation chapter describes about various tools and languages which are used to
implement the project and contains the details of the programming language and environment
used for the project and also explains the significance of these details to the system. This
chapter covers the following information:
Selection of the OS platforms
Selection of the programming language for development of the system.
Implementation Requirements
Program Coding Guidelines
Implementation Procedure
Development Methodology
6.2 Platform Selection
1) Microsoft Windows-7/Any OS: Project Development is done over window OS but it is
compatible for any OS from any vendor since application is developed using java technology so
it is OS vendor independent.
2) J2EE Platform: Short for Java 2 Platform Enterprise Edition. J2EE is a platform-
independent, Java-centric environment from Sun for developing, building and deploying Web-
based enterprise applications online. The J2EE platform consists of a set of services, APIs, and
protocols that provide the functionality for developing multitiered, Web-based applications.
Some of the key features and services of J2EE:
2. At the client tier, J2EE supports pure HTML, as well as Java applets or applications. It
relies on Java Server Pages and servlet code to create HTML or other formatted data for
the client.
Enterprise JavaBeans (EJBs) provide another layer where the platform's logic is stored.
An EJB server provides functions such as threading, concurrency, security and memory
management. These services are transparent to the author.
Java Database Connectivity (JDBC), which is the Java equivalent to ODBC, is the
standard interface for Java databases.
The Java servlet API enhances consistency for developers without requiring a graphical
user interface.
The J2EE platform provides the following:
Complete Web services support. The J2EE platform provides a framework for
developing and deploying web services on the Java platform.
Faster solutions delivery time to market. The J2EE platform uses "containers" to
simplify development. J2EE containers provide for the separation of business logic from
resource and lifecycle management, which means that developers can focus on writing
business logic -- their value add -- rather than writing enterprise infrastructure.
Freedom of choice. J2EE technology is a set of standards that many vendors can
implement. The vendors are free to compete on implementations but not on standards or
APIs. The J2EE platform brings Write Once, Run Anywhere (WORA) to the server.
Simplified connectivity. J2EE technology makes it easier to connect the applications and
systems you already have and bring those capabilities to the web, to cell phones, and to
devices. By offering one platform with faster solution delivery time to market, freedom
of choice, and simplified connectivity, the J2EE platform helps IT by reducing TCO and
simultaneously avoiding single-source for their enterprise software needs.
6.3 Language Selection
Java is one of the best programming language created ever, and I am not saying this because we
choosed this because we are passionate Java developer, but Java has proved it in last 20 years.
Two decades is a big time for any Programming language, and Java has gained strength every
passing day
1: Java is an Object Oriented Programming Language
it's an Object Oriented Programming language. Developing OOPS application is much easier,
and it also helps to keep system modular, flexible and extensible
2: Java has Rich API
3. Java has Rich API and most importantly it's highly visible because come with Java installation.
When I first started Java programming, I used to code Applets and those days Applets provides
great animation capability, which amazes new programmer like us, who are used to code in
Turbo C++ editor. Java provides API for I/O, networking, utilities, XML parsing, database
connection, and almost everything.
3) Powerful development tools e.g. Eclipse , Netbeans
Believe it or not, Eclipse and Netbeans has played a huge role to make Java one of the best
programming languages. Coding in IDE is a pleasure
4) Great collection of Open Source libraries
Open source libraries ensures that Java should be used everywhere. Apache, Google, and other
organization has contributed lot of great libraries, which makes Java development easy, faster
and cost effective.
There are framework like Spring, Struts, Maven, which ensures that Java development follows best
practices of software craftsmanship, promotes use of design patterns and assisted Java
developers to get there job done.
5) Wonderful community support
Community is the biggest strength of Java programming language and platform. No matter, How
good a language is, it wouldn't survive, if there is no community to support, help and share there
knowledge.
6) Java is Platform Independent
In 1990s, this was the main reason of Java's popularity. Idea of platform independence is great,
and Java's tag line "write once run anywhere" was enticing enough to attract lots of new
development in Java. This is still one of the reason of Java being best programming language,
most of Java applications are developed in Windows environment and run in UNIX platform.
7) The Java Compiler
The compiler is one of the things we take for granted in any language, without thinking about its
great features. In Java, unlike C++, you can simply compile your code without thinking too
much about linking, optimisation and all sorts of other usual compiler features. This is partially
due to the JIT (Just In Time compiler), which does further compilation work at runtime
8) The Java Memory Model
Again, a very interesting point of view from someone with a solid C++ background. We’re
taking many things for granted as Java has had a very good threading and memory model from
4. the beginning, which was corrected only once in the JDK 1.5 in 2004, and which has built a solid
grounds for newer API like actor-based ones, Fork/JOIN, etc.
9: High-Performance JVM
The JVM is the most obvious thing to talk about it has allowed for so many languages to work
on so many hardware environments, and it runs so fast, nowadays!
6.3.1 J2EE Architecture
The JEE platform provides the environment to develop enterprise applications / services using
multitier architecture.
- The highly intensified technology made the need for scalable, efficient, faster solutions for
information management.
- The JEE technology is rightly apt for meeting these requirements.
- JEE provides a programming development environment which improves the productivity of
development, standards for hosting / deploying enterprise applications.
The following are the tiers in JEE application
Client Tier :
- The client tier includes the web components such as Servlets, JSP or standalone Java Desktop
applications.
- This tier provides dynamic interfaces to the middle tier.
Middle Tier:
- This is also called as the server tier.
- In the middle tier enterprise beans and web services encapsulate distributable business logic for
the applications which are reusable.
- The JEE application server contains the server-tier components which provides the platform for
these web components for actions to be performed and data to be stored / persisted.
Enterprise data tier :
- The enterprise level data is stored / persisted preferably or typically in a relational database.
- In this tier, the JEE applications comprises of components, containers and services.
5. - All the web components (Servlets, JSP) provide dynamic requests and responses from a web
page.
- The EJB components contain the server-side business logic for enterprise applications.
6.3.2: Oracle Database:
Oracle Database (commonly referred to as Oracle RDBMS or simply as Oracle) is an object-
relational database management system[3] produced and marketed by Oracle Corporation.
Oracle is a database that responds very well with excellent performance in demanding
environments. Oracle is a major database which along with its added features passes the ACID
test, which is important in insuring the integrity of data. This is very important because data is
the heart of any system in organization. A reliable and adequate database system has the
following properties:
Atomicity:
That is Results of a transaction’s execution are either all committed or all rolled back.
Consistency:
The database is transformed from one valid state to another valid state. Illegal
transactions aren’t allowed and, if an integrity constraint can’t be satisfied then the
transaction is rolled back.
Isolation:
The results of a transaction are invisible to other transactions until the transaction is
complete thus increasing the security on data.
Durability:
Once committed (completed), the results of a transaction are permanent and survive
future system and media failures and thus ensuring maintenance and protection of data.
6.4 Implementation Requirements
The language chosen for this project is java/j2ee along with many other web technologies.
o Java/j2ee
o Servlet
o Jsp
o Html
o Javascript
o Jquery
6. o Bootstrap
o Ajax
o Json
o iText
o javamail
Operating System used is: Microsoft Windows
Database Oracle 11g xe
Jdk
Eclipse
WebSerever Tomcat
6.5 Program Coding Guidelines
1) The source file name consists of the case-sensitive name of the top-level class it contains (of
which there is exactly one), plus the .java extension.
2) One variable per declaration. Every variable declaration (field or local) declares only
one variable: declarations such as int a, b; are not used.
3) Declared when needed. Local variables are not habitually declared at the start of their
containing block or block-like construct. Instead, local variables are declared close to the
point they are first used (within reason), to minimize their scope. Local variable
declarations typically have initializers, or are initialized immediately after declaration.
4) identifiers use only ASCII letters and digits, and, in a small number of cases, underscores.
5) Package names are all lowercase, with consecutive words simply concatenated together (no
underscores).
7. 6) Class names are written in UpperCamelCase.
7: Method names are written in lowerCamelCase.
8) Caught exceptions: not ignored
Except as noted below, it is very rarely correct to do nothing in response to a caught
exception. (Typical responses are to log it, or if it is considered "impossible", rethrow it as
an AssertionError.)
6.6 Implementation Procedure
6.6.1: Creating a Dynamic Web Project in Eclipse
Create a Dynamic Web Project
To create a new dynamic Web project in Eclipse:
1. On the main menu select File > New > Project....
2. In the upcoming wizard choose Web > Dynamic Web Project.
8. Figure: Creating a New Dynamic Web Project
3. Click Next.
4. In the properties page enter a name for your Web project.
5. Make sure that the target runtime is set to Apache Tomcat with the currently supported
version.
If not, please set up the Apache Tomcat server as described in the section Configuring the
Server of the previous chapter.
6. Select Dynamic web module_version 2.4 or 2.5, as 3.0 is currently not supported by
Stardust.
9. 7. In the Configurations entry, select Stardust Portal for Dynamic web module 2.4 or
Stardust Portal for Dynamic web module 2.5 respectively in the drop down list. The
facets provided with this configuration can be added or removed later as described in
section Process Manager Facets.
Figure: Setting Dynamic Web Project Properties
8. Click Next.
10. Now choose the folder for your java sources, the default is src. Leave or adjust the default
output folder and select Next.
Figure: Set Build Path.
The next dialog gives you the opportunity to configure Web module settings. If you want to use
the default settings, just choose Next.
1. The default context root is the name of your project, optionally choose another name.
2. The default name of the content directory for your Web project is WebContent.
Optionally choose another name.
3. Select Next.
11. Figure: Configure Web Module Settings
4: click finish
6.6.2: Creating Executable
To export a WAR file from a Web project, do the following:
1. Right click on a Web project folder and select Export from the pop-up menu. Then select
WAR file in the Export window and then select Next.
2. Specify the Web project you want to export (this field is primed if you used the pop-up
menu to open the wizard), and specify a location for the new WAR file
3. Optional: Optionally, supply WAR export Options, such as whether or not to include
Java™ source files in the WAR, and whether to overwrite any existing resources during
the export process. Source files are not usually included in a WAR file, because they are
not necessary for the server to run the web application.
4. Click Finish.