Integrated Development Environment
Integrated Development Environment
1.INTRODUCTION
•Code editor: This feature is a text editor designed for writing and editing source code. Source
code editors are distinguished from text editors because they enhance or simplify the writing
and editing of code.
•Compiler: This tool transforms source code written in a human readable/writable language into a
form executable by a computer.
•Debugger: This tool is used during testing to help debug application programs.
•Class browser: This tool is used to examine and reference the properties of an object-oriented
class hierarchy.
•Object browser: This feature is used to examine the objects instantiated in a running application
program.
•Class hierarchy diagram: This tool allows the programmer to visualize the structure of object-
oriented programming code.
The IDE may be a stand-alone application or may be included as part of one or more compatible
applications.
Examples of IDE: Pycharm, visual studio, phpstorm, intelliJ idea, Netbeans, eclipse, Rubymine.
History of IDEs
Before IDEs, developers wrote their programs in text editors. They would write and save an
application in a text editor; then run the compiler, taking note of the error messages; then go back
to the text editor to revise the code.
In 1983, Borland Ltd. acquired a Pascal compiler and released it as TurboPascal, which featured,
for the first time, an integrated editor and compiler.
While TurboPascal launched the idea of an integrated development environment, many believe
Microsoft’s Visual Basic (VB), launched in 1991, was the first real IDE. Visual Basic was built
on the older BASIC language, which was a popular programming language throughout the
1980s. With the emergence of Visual Basic, programming could be thought of in graphical
terms, and significant productivity benefits emerged.
Features of IDE
• Faster setup: Without an IDE interface, developers would need to spend time configuring
multiple development tools. With the application integration of an IDE, developers have
the same set of capabilities in one place, without the need for constantly switching tools.
• Continual learning: Staying up to date and educated is another benefit. For instance, the
IDE’s help topics are constantly being updated, as well as new samples, project
templates, etc. Programmers who are continually learning and current with best practices
are more likely to contribute value to the team and the enterprise, and to boost
productivity.
• Standardization: The IDE interface standardizes the development process, which helps
developers work together more smoothly and helps new hires get up to speed more
quickly.
Different Types of IDEs
There are a variety of different IDEs, catering to the many different ways developers work and
the different types of code they produce. There are IDEs that are designed to work with one
specific language, cloud-based IDEs, IDEs customized for the development of mobile
applications or for HTML, and IDEs meant specifically for Apple development or Microsoft
development.
Types of Applications
• Console Application:
• WindowsApplication:
Windows Application is a user build application that can run on a Windows platform. The
windows application has a graphical user interface that is provided by Windows Forms.
Windows forms provide a variety of controls including Button, Text Box, Radio Button, Check
Box, and other data and connection controls.
• Client/Server:
An application that runs on the client side and accesses the remote server for information is
called a client/server application. The client server always makes requests to the remote server to
get some information. The user interaction with the server is always through a user interface or
application on the client side.A client server application can be platform specific as well as cross
platform depending on the programming language used. The cross platform language makes an
application look native to the platform or the operation system of the client. The client/server
application is always installed on the client’s computer. A client server application uses a two-
tier architecture.
A web application is a computer program that utilizes web browsers and web technology to
perform tasks over the internet.
Web applications are usually coded in browser-supported language such as JavaScript and
HTML as these languages rely on the browser to render the program executable. Some of the
applications are dynamic requiring server-side processing. Others are completely static with no
processing required at the server.
The web application requires a webserver to manage requests from the client, an application
server to perform the tasks requested and sometimes a database to store the information.
Application server technology ranges from ASP.Net Asp and ColdFusion to PHP and JSP.
• Enterprise Application:
In general, enterprise application software is large-scale software that is aimed to support or
solve the problems of an entire organization. This large-scale software allows for several
different user roles, and the roles define the actions a specific user can perform.
Web application runs on a web server like tomcat while enterprise application runs on an
application server like glassfish, jboss etc.
An enterprise application will contain enterprise beans(session/entity beans) and will run in
a J2EE Container which provides transaction and security services to the beans and it will be
named as .ear file. Whereas a web appliaction executes in a web-container like tomcat,
contains servlets/jsps alone and named with an extension of .war.
As more no. Of users increases we cant provide security to the application, remote client
cannot access the application, performance will be decreased, transactions cannot be
completed within specific time and so on.
The client tier in the three-tier architecture model is usually a web browser. Web
browser software processes and displays HTML resources, issues HTTP requests for
resources, and processes HTTP responses.
Jar—java archive file
War—web archive
Ear—enterprise archive
• HR Management
Such organizations include businesses, schools, interest-based user groups, clubs, charities, and
governments. Enterprise software is an integral part of a (computer-based) information system.
Services provided by enterprise software are typically business-oriented tools, such as online
shopping, and Online payment processing, interactive product catalogue, automated billing
systems, security, Business Process Management, enterprise content management, IT service
management, customer relationship management, enterprise resource planning, business
intelligence, project management, collaboration, human resource management,
manufacturing, occupational health and safety, enterprise application integration, and enterprise
forms automation.
2. ECLIPSE IDE
• Console Application:
Program to take student name and student marks as input and display student name and
percentage of marks scored in console. To write console application:
1.open eclipse
package console;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
{
// TODO Auto-generated method stub
String name=b.readLine();
int i;
marks[i] = scanner.nextInt();
scanner.close();
avg = total/6;
if(avg>=80)
{
System.out.print("A");
System.out.print("B");
System.out.print("C");
else
System.out.print("D");
after writting above file just save and click runbutton of eclipse-id
output:
• Windows Application
To create window application first you need to download windowbuilder of eclipse then only we
can run window application on eclipseIDE.
Click help tool of eclipse->eclipse marketplace->search like windowbuilder->it will show you
like below and just click install->close that window and restart your eclipseIDE.(i was installed
in my eclipse)
Now go with new file->other->search like windowbuilder->just click Application Window (like
below)
in above screen name then click next(i was given name like Jlogin)->click finish button
now edit window like below for that just drag the JLabel and JTextField ,JButton field to your
window its look like below screen.
first you should go components choose components and then drag to window like below screen:here i
was draging JLabel component to window
do same like to create login page after check your source phase also it will get below like code:
package simple;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import java.awt.Font;
import javax.swing.JPasswordField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
/**
*/
EventQueue.invokeLater(new Runnable() {
try {
window.frmLoginPage.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
});
/**
*/
public Jlogin() {
initialize();
/**
*/
frmLoginPage.setTitle("login page");
frmLoginPage.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frmLoginPage.getContentPane().setLayout(null);
frmLoginPage.getContentPane().add(textField);
textField.setColumns(10);
frmLoginPage.getContentPane().add(passwordField);
frmLoginPage.getContentPane().add(lblPassword);
btnLogin.addActionListener(new ActionListener() {
}*/
});
frmLoginPage.getContentPane().add(btnLogin);
Suppose if you want change the name of the Label ->click on that Label->go to properties and change
like below:
After creation of above like window just double click on login button it will create action lister for that
button.I am also editing that actionLister like if username is admin and password 1234 then it will
show message login success other wise login is failed.
package simple;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import java.awt.Font;
import javax.swing.JPasswordField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
/**
*/
EventQueue.invokeLater(new Runnable() {
try {
window.frmLoginPage.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
});
/**
*/
public Jlogin() {
initialize();
/**
*/
frmLoginPage.setTitle("login page");
frmLoginPage.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frmLoginPage.getContentPane().setLayout(null);
frmLoginPage.getContentPane().add(textField);
textField.setColumns(10);
JLabel lblNewLabel = new JLabel("user name");
frmLoginPage.getContentPane().add(lblNewLabel);
frmLoginPage.getContentPane().add(passwordField);
frmLoginPage.getContentPane().add(lblPassword);
btnLogin.addActionListener(new ActionListener() {
String text=textField.getText();
@SuppressWarnings("deprecation")
String pass=passwordField.getText();
if(text.equals("admin")&& pass.equals("1234"))
JOptionPane.showMessageDialog(null,"login suceess");
else
{
JOptionPane.showMessageDialog(null,"wrong
username/password");
}*/
});
frmLoginPage.getContentPane().add(btnLogin);
}
• Client Server Application
server.java
import java.io.IOException;
import java.io.PrintStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Scanner;
Socket ss=s1.accept();
@SuppressWarnings("resource")
int number=sc.nextInt();
int temp=number*2;
p.println(temp);
client.java:
import java.io.IOException;
import java.io.PrintStream;
import java.net.Socket;
import java.util.Scanner;
int port=5631;
int number;
@SuppressWarnings("resource")
@SuppressWarnings("resource")
number=ss.nextInt();
p.println(number);
int temp=s1.nextInt();
4
• Web Based Application
Create a login page and perform validations for username and password
If you want create web application after opening eclipse ->click file->new->Dynamic
webproject->click next->give name of the project(here i am giving demo2)->set apache to cat
server also(if you not have apache just click new runtime configuration and give path to store
apache software in your system)->Dynamic web module version like(2.5,3.0)->Once check
configuration version download same or not if it is ok then click next->it will show you src file
just click next->it will ask web.xml creation just click checkbox ->finish button
I was create file name demo2 you can below screen how it look like and I was created three jsp
files and one servlet file.(if you want create those file just rightclick on your project name -
>new->if you want jsp/servlet click that file)
index.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<html>
<head>
</head>
<body>
<form method="post"action="Display">
Password:<input type="password"name="pass">
<input type="submit"value="login">
</form>
</body>
</html>
member.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<html>
<head>
</head>
<body>
</body>
</html>
error.jsp
pageEncoding="ISO-8859-1"%>
<html>
<head>
</head>
<body>
Unsuccessful login
</body>
</html>
Display.java
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
*/
@WebServlet("/Display")
/**
* @see HttpServlet#HttpServlet()
*/
public Display() {
super();
/**
*/
String name=request.getParameter("uname");
String password=request.getParameter("pass");
// TODO Auto-generated method stub
response.sendRedirect("Member.jsp");
else
response.sendRedirect("error.jsp");
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>demo2</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
output: if you want run web application just right click on your project and
click->run as-> run on server -> check server name and your downlod version if it ok
then click next->it will show you project name just click your project name click
finish it will start your server.
suppose if your enter user name as admin and password 12 (or)user name acvd
and password 123 then it will show like below screen(error.jsp file)
• connecting to database
Write program login page while giving user details it should store in database.
• Download Mysql connector add that jar to java jrelib of next file
after downloading connector add that jar to java jre->lib ->ext file.
2.Create Dynamic project with web.xml file same web application process(here i am creating
Regiter is the project name like below screen):
After creation project take new servlet file and edit below code :
RegisterServlet .java
package DataBase;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;
@SuppressWarnings("serial")
try
//res.setContentType("text/html");
PrintWriter pw=res.getWriter();
@SuppressWarnings("unused")
String fname=req.getParameter("uname");
@SuppressWarnings("unused")
String lname=req.getParameter("lname");
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/student","root",
"");
st.setString(1, "fname");
st.setString(2, "lname");
int i= st.executeUpdate();
if(i>=1)
pw.println("registererd successfully");
catch(Exception e)
System.out.println(e); }
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
</head>
<body>
<form method="get"action="Display">
FirstName:<input type="text"name="uname">
LastName:<input type="text"name="lname">
<input type="submit"value="login">
</form>
</body>
</html>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID"
version="3.0">
<servlet>
<servlet-name>register</servlet-name>
<servlet-class>DataBase.RegisterServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>register</servlet-name>
<url-pattern>/Display</url-pattern>
</servlet-mapping>
<display-name>Register</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
after regitration completion you can see that data in database just click on
table like below:
it open table like below if you insert data: