Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

JDBC stands for Java Database Connectivity.

JDBC is a Java API to connect and execute the


query with the database. It is a part of JavaSE (Java Standard Edition). JDBC API uses JDBC
drivers to connect with the database. There are four types of JDBC drivers:

o JDBC-ODBC 1. Native Driver 2.Network Protocol Driver 3. Thin Driver 4 Bridge Driver.

We can use JDBC API to access tabular data stored in any relational database. By the help of
JDBC API, we can save, update, delete and fetch data from the database. It is like Open Database
Connectivity (ODBC) provided by Microsoft.
What is API

API (Application programming interface) is a document that contains a description of all the
features of a product or software. It represents classes and interfaces that software programs can
follow to communicate with each other. An API can be created for applications, libraries, operating
systems, etc.

What Is ADO.NET?
 
ADO.NET stands for ActiveX Data Object is a database access technology created by Microsoft as
part of its .NET framework that can access any kind of data source. It’s a set of object-oriented
classes that provides a rich set of data components to create high-performance, reliable and
scalable database applications for client- server applications as well as distributed environments
over the Internet and intranets.
 
ADO .NET uses SQL queries and stored procedures to read write update and delete data from a
data source. You use SQL queries through ADO.NET Command object, which returns data in the
form of DataReader or DataSet objects. After that connection closes, you use DataSet objects to
work with the data and connect to the data source again when you need to update the data source.

ADO.NET is a module of .Net Framework which is used to establish connection between


application and data sources. Data sources can be such as SQL Server and XML. ADO.NET
consists of classes that can be used to connect, retrieve, insert and delete data.
ODBC vs JDBC vs ADO.NET

What exactly are ODBC, JDBC and ADO.NET? What are the links between them?

These are all different data access technologies.

ODBC is an (older) open standard. It's designed to be database and technology neutral. JDBC and
ADO.NET can both actually use ODBC internally as a provider, if requested.

JDBC is a similar concept, but designed to be a standard for Java.

ADO.NET is a .NET data access technology.

ODBC (Open Database Connectivity) is a standard API that can be used to communicate with
databases.

JDBC (Java Database Connectivity) is a Java standard that can be used to communicate with
databases.

ADO.Net is a .Net standard that can be used to communicate with databases.

Individual databases, such as SQL Server or MySQL, have drivers that implement each of these
APIs.

What is a web.config file?

A web.config file is a Windows file that lets you customize the way your site or a specific directory
on your site behaves. For example, if you place a web.config file in your root directory, it will affect
your entire site (www.coolexample.com). If you place it in a /content directory, it will only affect
that directory (www.coolexample.com/content). However, in order for a web.config file to register
in a specific directory, there must be a web.config file in the root directory.

Why Configuration File?

Configuration file in the website describe the properties & behaviour of your Web Application.
These files manage many settings related to your website. The web configuration are the XML files
with the extension of .config. These are the normal text files which can be edited by any of the
editors like Notepad, VS code Sublime etc. and they are in the readable forms for the Developer.

Some uses of the web.config file include;

 URL redirection

 Hotlink protection

 Directory password protection

 Establishing custom error pages

The app.config file is an XML file whose goal it is to contain any variable configuration of your
application. It is a central place to put:

 Connection strings to databases


 Connection details to external services
 Application settings
 Other details on how the application should be run and/or hosted

What is a post back

All the web applications are running on Web Servers. Whenever a user made a request to the web
server, the web server has to return the response to the user. PostBack is the name given to the
process of submitting all the information that the user is currently working on and send it all back
to the server. Postbank is actually sending all the information from client to web server, then web
server process all those contents and returns back to client.

A post back originates from the client side browser. When the web page and its contents are sent to
the web server for processing some information and then, the web server posts the same page back
to the client browser. Normally one of the controls on the page will be manipulated by the user (e.g.
button click), and this control will initiate a post back. Then the state of this control and all other
controls on the page is Posted Back to the web server.

Post Back is the name given to the process of submitting an ASP.NET page to the server for
processing. Post Back is done if certain credentials of the page are to be checked against some
sources (such as verification of username and password using database). This is something that a
client machine is not able to accomplish and thus these details have to be 'posted back' to the
server.

IsPostBack
Postback is actually sending all the information from client to web server, then web server process
all those contents and returns back to the client.

 Validation Controls

Introduction

ASP.NET provides a set of web controls called validation controls that are used to validate
HTML forms. This article discusses various types of validation controls available with code
samples.

ASP.NET validation controls validate the user input data to ensure that useless,
unauthenticated, or contradictory data don't get stored.

What are validation controls?

Most of the times while using HTML forms we need to validate the user input for certain
criteria. In ASP there was no other way but to write our own server or client-side validation
routines. ASP+ frees the programmer from performing common validation tasks through
server-side validation controls.

There are 6 types of validation controls available:

1.RequiredFieldValidator 2.CompareValidator 3.RangeValidator 4.RegularExpressionValidator


5.CustomValidator 6.ValidationSummary

The validation control is used to implement page level validity of data entered in the server
controls.

- This check is done before the page is posted back to the server, thus avoid a round trip to the
server.

- If the data does not pass validation, it will display an error message to the user.

- It is an important part of any web application.

There are two types of validation:

1. Client side
2. Server side

- Validation controls are mostly used for implementing presentation logic, to validate user input
data, data format, data type and data range.

- Client-side validation is good, but we have to be dependent on the browser and scripting language
support.

- Server validation will work always whether client validation is executed or not.

1. Client-side Validation

 Validations performed at Client-Side i.e., browser.


 User gets information immediately as validation performed before a request is sent to the
server. 

2.  Server-side Validation

 Server-side validation takes place before data processing in the database.


 This type of validation is used, where client browser dependencies are involved.

An event is an action or occurrence such as a mouse click, a key press, mouse movements, or any
system-generated notification. A process communicates through events. For example, interrupts
are system-generated events. When events occur, the application should be able to respond to it
and manage it

Server Side Validation

In the Server Side Validation, the input submitted by the user is being sent to the server and
validated using one of server side scripting languages such as ASP.Net, PHP etc. After the
validation process on the Server Side, the feedback is sent back to the client by a new dynamically
generated web page. It is better to validate user input on Server Side because you can protect
against the malicious users, who can easily bypass your Client Side scripting language and submit
dangerous input to the server.

The user input validation that takes place on the server side during a post back session is
called server-side validation. The languages such as PHP and ASP.Net use server-side validation.
Once the validation process on server side is over, the feedback is sent back to client by generating
a new and dynamic web page. With the help of server-side validation, we can get protection against
malicious users.

Client Side Validation

In the Client Side Validation you can provide a better user experience by responding quickly at the
browser level. When you perform a Client Side Validation, all the user inputs validated in the
user's browser itself. Client Side validation does not require a round trip to the server, so the
network traffic which will help your server perform better. This type of validation is done on the
browser side using script languages such as JavaScript, VBScript or HTML5 attributes.For
example, if the user enter an invalid email format, you can show an error message immediately
before the user move to the next field, so the user can correct every field before they submit the
form.

On the other hand, the user input validation that takes place on the client side is called client-side
validation. Scripting languages such as JavaScript and VBScript are used for client-side validation.
In this kind of validation, all the user input validation is done in user’s browser only. It is not so
secure like server-side validation because the hacker can easily

Controls are small building blocks of the graphical user interface, which include text boxes,
buttons, check boxes, list boxes, labels, and numerous other tools. Using these tools, the users can
enter data, make selections and indicate their preferences.

Controls are also used for structural jobs, like validation, data access, security, creating master
pages, and data manipulation.

ASP.NET uses five types of web controls, which are:

 HTML controls
 HTML Server controls
 ASP.NET Server controls
 ASP.NET Ajax Server controls
 User controls and custom controls

An ASP.NET server control is a tag written in a Web page to represent a programmable server-
side object used for displaying a user interface element in a Web page.

ASP.NET server controls are tags that can be understood by the server. They are coded in a .aspx
file and expose properties, methods and events of the control that can be accessed from server-side
code.

Web server controls are special ASP. NET tags understood by the server.

Like HTML server controls, Web server controls are also created on the server and they require a
runat="server" attribute to work.

However, Web server controls do not necessarily map to any existing HTML elements and they
may represent more complex elements.

Mostly all Web Server controls inherit from a common base class, namely the WebControl class
defined in the System.Web.UI.WebControls namespace.

HTML controls are the native browser elements and they are part of HTML language. These are
client side controls which is accessible only in the HTML page, so it will improve the performance
of the web page. HTML controls on an ASP.NET Web page are not available to the web server.

What is ASP.NET?
ASP.NET is a framework for developing dynamic web applications. It supports languages like
VB.Net, C#, Jscript.Net, etc.  It is a web development platform provided by Microsoft. It is used for
creating web-based applications. ASP.Net applications can also be written in a variety of .Net
languages. These include C#, VB.Net, and J#. The ASP stands for Active Server Pages, and .NET is
Network Enabled Technologies.

ASP.NET is a web application framework developed and marketed by Microsoft to allow


programmers to build dynamic web sites. It allows you to use a full featured programming
language such as C# or VB.NET to build web applications easily.

Sr. Key ASP JSP


No.

Stands for ASP stands for Active Server Pages. JSP stands for Java Server
1
Pages.

2 Developed JSP was developed by Sun ASP was developed by


By Microsystems and is maintained by Microsoft and is maintained by
Sr. Key ASP JSP
No.

Oracle. them.

3 Cost JSP is free to use. ASP is paid.

Platform JSP being Java based is platform ASP is platform dependent.


4 Independenc independent.
e

Memory leak JSP has inbuilt memory leak ASP lacks inbuilt memory leak
5
Protection protection. protection.

Security JSP provides better inbuilt security ASP lacks an inbuilt security
6
mechanism. mechanism.

Extension JSP pages are identified using .jsp ASP pages are identified
7
extension. using .asp extension.

What is an event handler?


In programming, an event handler is a callback routine that operates asynchronously once an
event takes place. It dictates the action that follows the event. The programmer writes a code for
this action to take place. An event is an action that takes place when a user interacts with a
program. For example, an event can be a mouse click or pressing a key on the keyboard. An event
can be a single element or even an HTML document.Let's say a mouse click on a button displays
the message "DOM Event." The event handler will be the programmed routine whereby each time
a user clicks on the button, the message "DOM Event" is displayed.
Here are some common examples of an event handler:
• A notification pops up on a webpage when a new tab is opened.
• A form is submitted when the submit button is clicked.
• The background color changes on a mouse click.
The load event is fired when the whole page has loaded, including all dependent resources
such as stylesheets and images. This is in contrast to DOMContentLoaded , which is fired as
soon as the page DOM has been loaded, without waiting for resources to finish loading

The load event is fired when the whole page has loaded, including all dependent resources such
as stylesheets and images. This is in contrast to DOMContentLoaded , which is fired as soon as the
page DOM has been loaded, without waiting for resources to finish loading

You might also like