Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

PROGRAMMING LOGIC AND TECHNIQUES

STAND ALONE AND CLIENT SERVER PROGRAMMING CONCEPT


1. INTRODUCTION:
Standalone programs are the softwares that do not require any software other than the operating system to
run. Stand-alone Capable of operating without other programs, libraries, computers, hardware, networks,
etc. They are complete programs which contain all tools to operate in the program for examples games, paint
softwares, presentation slide, music player, entertainment softwares are some example of standalone
programs. This software does not require any plug-ins or expansion pack for its operation. So, they can run
without their installation. If Standalone is more widely defined as a program not needing the services of
other programs (except maybe firmware) once it is running, then most operating systems, since they need
the bootstrap (assisting) loader only for starting up. A stand-alone application deploys services locally, uses
the services, and terminates the services when they are no longer needed. If an application does not need to
interact with any other applications, then it can be a stand-alone application with its own exclusive local
service deployment. Services locally deployed by this application are not available to any other application;
in addition, no remote services are available. This is the definition of a "stand-alone application" that is used
e.g. in the C programming language standards. Normal applications are called "hosted applications" in
contrast. In some embedded systems, the one and only application that they run is truly stand-alone, in the
sense that it includes all the code that's ever going to be seen by the CPU of those systems. This kind of
application has to contain its own (possibly very basic) operating system.

USER BUSINESS BUSINESS


SERVICES SERVICES SERVICES

Structure of Monolithic Application or Standalone Application

Some Standalone Terms:

 In computer games, a stand-alone game is one that can be played without requiring another game to
provide most of its operating code (as opposed to an expansion pack or a mod, which adds to a
previous game).
 Computers themselves are often termed "stand-alone" if they are not connected to a network.

Some advantages of standalone programs:

1. In Standalone program does not need services of other program.


2. Standalone program reduces the loading time.
3. Standalone application starts faster.
4. Standalone program contains its own library files, functions and applications itself.
5. These types of programs can be run from a removable storage or other drives.
6. These types of programs can be work offline i.e. does not necessary required network connection
to function.

Limitations of Standalone programming:


1. It is very difficult to make a complete standalone program.
2. All storage processing and presentation of data are done by a single system.
3. Size of programs become large and so large memory is required.
4. Difficult to maintain large software.
1
Prepared by: N.P.BHUSAL
Email ID: smcnpbhusl@gmail.com
PROGRAMMING LOGIC AND TECHNIQUES
5. Data may be corrupted due to wrong user or handle by unauthorized person.
6. Cost of software is high due to large size.

2. CLIENT AND SERVER PROGRAMMING:


Client –Server describes the relation between two computers in which one computer program, the client,
makes a server request from another program the server, which full fills the request. A two-way interaction
in a client/server environment, in which the user interface is stored in the client and the data are stored in
the server. The application logic can be in either the client or the server. Clients are the user’s computer that
request information to the server. They are less powerful computer with less memory and processing
capability then the server. The Program use by clients computer are called client program. Servers have high
processing capacity and high storage capacity then client. The programs run by server are server idea can be
used by programs with in a single computer. It is more important idea in a network. In a network the
client/Server module provides a convenient way to interconnect programs that are distributed efficiently
across location. For example: To check your bank account from your computer .A client program is your
computer forward your request to a server in turn forwards your request its one program. That sends a
request to a bank server another bank server another bank computer to retrieve your account balance. The
balance return to back to the bank data client which is turn servers, it back to the client in your personal
computer, which display information for you.

Advantage of client/Server Programming:


1. Server can be used to manage resources and share among server client process.
2. The server and the client application can be developed and realized independently.
3. Allow functionality to be grouped and optimized within a server.
4. The code present in a server can be reused by several different client applications.

3. CLIENT-SERVER (APPLICATIONS) ARCHITECTURE:


Client /Server is often a generic umbrella term for any application architecture that divides processes, often
on two or more machines. Any database application is a Client /Server application if it handles data storage
and retrieval in the database process and data manipulation and presentation some where else. The Server
is database engine that stores data, and the Client is the process the process that gets or creates the data. The
idea behind the Client /Server architecture in a database application is to provide multiple users with access
to the same data.
Developers commonly use one of the following client server architecture in system design.
1. Two-Tier Architecture
2. Three-Tier Architecture

1. Two-Tier Architecture: The two-tier application programming model was developed to enhance
the file server application programming model. As compared with the file server application programming
model, the two-tier application programming model provides you with improved usability, scalability, and
flexibility of applications. In Two-Tier model, you will have two separate layers namely Client & Server. Two-
tier architecture is client/server architecture where a request to do some task is sent to the server and the
server responds by performing the task, where the client request is sent to the server and the server in turn
sends the request to the database. The database sends back the information/data required to the server
which in turn sends it to the client.

2
Prepared by: N.P.BHUSAL
Email ID: smcnpbhusl@gmail.com
PROGRAMMING LOGIC AND TECHNIQUES
The simplest shape of Client-Server architecture is called two-tier architecture. In fact, most Client -Server
architecture are two –tier architecture. Term “Two-Tier” describes the way in which application processing
can be divided in a Client and Server application. A two-tier application provides multiple workstations with
a uniform presentation layer that communicates with a centralized data storage layer. The presentation
layer is generally the client and the data storage layer is server. Some exceptional environments such as the
X windows system, shuffle the roles of Client –Server application. In this application programming model,
the client application directly interacts with the server application without the presence of any intermediate
application. Most Internet applications such email, telnet, FTP, gopher and web are simple two tier
applications.

SERVER

USER TIER BUSINESS DATA TIER


LOGICS

Two-Tier Client-Server Architecture

The two-tier architecture is like client server application. The direct communication takes place between
client and server. There is no intermediate between client and server.

The above figure(Example :2) shows the architecture of two-tier. Here the communication is one to one.
Let us see the concept of two tier with real time application. For example now we have a need to save the
employee details in database. The two tiers of two-tier architecture is:
1. Database (Data tier)
2. Client Application (Client tier)

2. Three-Tier Architecture: In three-tier architecture, the data and applications are split onto
separate servers, with the server-side distributed between a database server and an application server. The
client is a front end, simply requesting and displaying data. Reason being that each server will be dedicated
to processing either data or application requests, hence a more manageable system and less contention for
resources will occur. The three tier clients server design says that data processing should be separated from
the user interface and data storage layers stored procedures provide the most common method of inter
action between user interface and data storage in a third tier. Three tier applications, Client are partially
thick. Apart from that there are two more layers application layer and database layer.

So, in client application the client writes the program for saving the record in SQL Server and thereby saving
the data in the database. The three tier system consists of following layers.
1. User interface
2. Data processing or business rules
3. Data storage
3
Prepared by: N.P.BHUSAL
Email ID: smcnpbhusl@gmail.com
PROGRAMMING LOGIC AND TECHNIQUES
In a loading application functional three tier development the system becomes easier to maintain and
modify. The user interface for example: No larger cares where or how the system stores its data. Changes in
data storage, such as distributing the data across multiple database end-up having a much smaller impact or
affect on the system as a whole.

Three tier architecture having three layers. They are listed below:-
1. Client layer
2. Business layer
3. Data layer
Client layer: Here we design the form using textbox, label etc. Business layer: It is the intermediate layer
which has the functions for client layer and it is used to make communication faster between client and data
layer. It provides the business processes logic and the data access.Data layer: it has the database.

Example:1 Three Tier Architecture

4
Prepared by: N.P.BHUSAL
Email ID: smcnpbhusl@gmail.com
PROGRAMMING LOGIC AND TECHNIQUES

Advantages of Three tier Architecture :


1. Easy to modify with out affecting other modules
2. Fast communication
3. Performance will be good in three tier architecture.

Difference between Two-Tier and Three Tier Applications:


Sr. TWO-TIER ARCHITECTURE Sr. THREE-TIER ARCHITECTURE
1. In two tier there are only client and 1. A three-tier or multi tier architecture
server. has client , server and database.
2. In a modern two-tier architecture the 2. In three-tier architecture the data and
server holds both the application and the applications are split onto separate servers with
data. the server-side The client is a front end, simply
requesting and displaying data.
3. It has some limitataions related to 3. It's also important that those machines
difficulties to administer and maintain. service requests quickly which is where a
two-tiered architecture fails.
4. Two tier software architectures are used 4. It is used when an effective distributed
frequently in decision support systems client/server design is needed that provides
where the transaction load is light. increase performance, flexibility,
maintainability, reusability compare to two
tier architecture.
5. It is effective in solving workgroup 5. It is more effective for internet applications
problems. It is usable to interacting and net-centric information systems.
people on a LAN.

5
Prepared by: N.P.BHUSAL
Email ID: smcnpbhusl@gmail.com
PROGRAMMING LOGIC AND TECHNIQUES
6. It supports for the smaller business. 6. It supports for the standard business and
distributed environments.
7. Microsoft's Visual Basic,Borland's Delphi, 7. C, C++,Small Talk,Basic,Ada 83,Ada93, SQL
and Sysbase's Power Builder are the 2- are the 3-Tier tools.
Tier tools.

4. WEB BASED PROGRAMMING:


The program that displays or interacts with the user through WebPages is known as web based
programming. Web applications run through a web browser like Internet Explorer, Mozila Firefox, and
Netscape Navigator etc. The program sits on a web server, rather than on the PC, or local server for
traditional applications. In this client server program the user(client request web pages to the server or web
server). Internet service provider (ISP)provides internet services. User request the ISP for the web page by
giving a name to it called domain name. Domain name server in ISP process the domain name to get its
server address. The server sends the page to the ISP and it directed to the respective client. The web page is
then processed by the client program to display it on the screen. Web application pages interact with users
requesting and responding to users. The most common example is online shopping application. Web
applications typically use a database to store permanent information such as product descriptions and costs,
and customer orders. The user can easily see the content of the page or sends another request to the server.
The web pages are easy way to share the information with large number of people at once. They are made in
such a way that they can be used by any system being platform independent programming. Some web based
applications are ASP, ASP.Net, JavaScript, HTML & CSS, PHP and some database applications that also
supports to design web based applications are SQL Server, Access and MySQL.

Advantages of Web based programming:


1. They are more attractive with colourful background and animations with sounds and videos.
2. They are easier then windows based programs.
3. Large number of people can use it as same time.
4. Easy to understand the matter contained in it.
5. No special software is required for its creation.
6. No special software is necessary for its processing.
7. Easy to extend the content and can is hyperlink about the other texts, scripts, images, sound etc.
8. Less cost to create and update.
9. Can be used world wide.
10. Being platform independent so can be used by any system.

Disadvantages of Web based programming:

1. Slower, as run over the internet.


2. Internet not always 100% available.
3. Interfaces often not as sophisticated.
4. Can take longer to develop as they are more complex.
5. Have to support different browsers, and different versions.
6. Security risks .

6
Prepared by: N.P.BHUSAL
Email ID: smcnpbhusl@gmail.com
PROGRAMMING LOGIC AND TECHNIQUES

5. PLATFORM INDEPENDENT PROGRAMMING (SYSTEM):


Platform independent system or programs are the programs that can be run on any system and on any
environment. Platform independency makes the program portable and helps to extend its feature by large
number of people. It is the feature of client server programming in which the program present in server can
be accessed through any client at any location of the world. Web based programming being platform
independent and can be used by large number of people at a same time. The information present in web
page can be studied and further intended by other people. Web based program being cheaper means to
communication needs this feature a lot.

6. SOME WEB BASED PROGRAMMING LANGUAGES:


There are various types of web based programming languages, some of which are described below:

1. HTML :
HTML stands for types of text mark up language. HTML is developed by Tim Berners Lee in 1990. To
standardize the HTML codes World Wide Web consortium (W3C) was formed in 1994.It uses markup
symbols or tags (codes) that describe format and layout of text , image, movie clips etc in a web page. It is not
the programming language like QBASIC, C++. The language consist of standardize code which defines the
structure of the information on a web page. Like making bold, italic, underlined letters, characters, heading
of the scripts, inserting various sound clips, videos and animated objects can be prepared easily using its
tags. Tables can be designed, background color of the web page can be easily designed, bullets can be easily
inserted using its tags. A web page browser interprets the text in a HTML file and presents it as formatted
readable web page. HTML document can be viewed an all types of system such as machine tosh PL and UNIX
machine. The HTML language coding characters, symbols are very easily understand by the developer and
user.HTML language codes are not sensitive to code. The good knowledge in HTML codes gives to the user
complete flexibility in designing pages. The user can create HTML documents using any text editor like
Notepad or Text pad.
Features of HTML:
1. It is a hypertext language so, it contains graphical and designing features for text, documents, images,
sounds etc.
2. It is platform independent language because it can be execute in any type of machine.
3. It consists of hyperlink feature for the web contents and documents.
4. It contains simple tags and tags attributes for coding any web page.
5. This language is not case sensitive so, there is no required to remember codes.

2. PHP:
PHP stands for Hyper Text Pre-processor. Which is widely used for creating programmed features for web
sites because it is easy to learn and also because PHP syntax is drawn from other widely used languages
,making it familiar to many programmers. It is used for open source general purpose scripting language that
is specially sited for web development and can be embedded into HTML. It has similar syntax as of
C,C++,Java and it is easy to learn also. This language is used to make a dynamic web page quickly. PHP can
be used to write the sort of sites that those who regularly use the web are likely to encounter every day. This

7
Prepared by: N.P.BHUSAL
Email ID: smcnpbhusl@gmail.com
PROGRAMMING LOGIC AND TECHNIQUES
language devised by Ramus Lerdorf in 1994 for building dynamic, interactive web sites. Since then it has
been evolving into a full fledged language. PHP is large number of internet service provider (ISPs) and web
hosting companies that support it. Several millions sites are reported to have PHP installed. When you want
to work with PHP then you can write a PHP application that works with your Web pages, you need to have
PHP installed and configured. Because you will be writing a Web application, it is given that you will need a
Web server and some Web pages.
System requirements:
1. Server Software such as an operating system(Windows or Linux)
2. A compatible Web server such as Internet Information server(IIS) or Apache
3. PHP5 or any version of PHP
4. A relational database system such as SQLite or MySQL
5. A Web browser such Mozilla Firefox, Internet Explorer
6. A text editor such as Notepad or Emacs,BBEdit

3. Java Script
Java is a computer programming language which enables programmers to write computer instructions
using English based command, instead of having to write in numeric codes. It is known as a high level
language because it can be read and written easily by the developers, programmers .Like English, Java has a
set of rules that determine how the instructions are written. These rules are known as its “syntax”. Once a
program has been written, the high level instructions are translated into numeric codes that computers can
understand and execute. In the early nineties, Java was created by a team lead by James Gosling for Sun
Microsystems which is now a subsidiary of Oracle Corporation. It was originally designed for use on digital
mobile devices, such as cell phones. Whenever the first version of Java (Java 1.0) released to the public in
1996, its main focus had shifted to use on the Internet. It provided more interactivity with users by giving
developers a way to produce animated WebPages. Over the years it has evolved as a successful language for
use both on and off the Internet. 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, and is widely used from application software to web applications. JavaScript is an object-
oriented scripting language used to enable programmatic access to objects within both the client application
and other server applications also.

Why Java is important:

1. Platform Independent: The concept of Write-once-run-anywhere (known as the Platform


independent) is one of the important key feature of java language that makes java as the most powerful
language. Not even a single language is idle to this feature but java is closer to this feature. The programs
written on one platform can run on any platform provided the platform must have the JVM.

2. Simple Programming Language: There are various features that make the java as a simple language.
Programs are easy to write and debug because java does not use the pointers explicitly. Java provides the
bug free system due to the strong memory management. It also has the automatic memory allocation and
deal location system.

3. Object Oriented Programming language: To be an Object Oriented language, any language must
follow at least the four characteristics.

 Inheritance : It is the process of creating the new classes and using the behavior of the
existing classes by extending them just to reuse the existing code and adding the additional features
as needed.
 Encapsulation: : It is the mechanism of combining the information and providing the
abstraction.

8
Prepared by: N.P.BHUSAL
Email ID: smcnpbhusl@gmail.com
PROGRAMMING LOGIC AND TECHNIQUES
 Polymorphism: : As the name suggest one name multiple form, Polymorphism is the way of
providing the different functionality by the functions having the same name based on the
signatures of the methods.
 Dynamic binding : Sometimes we don't have the knowledge of objects about their specific types
while writing our code. It is the way of providing the maximum functionality to a program about the
specific type at runtime.

4. Robust: Java has the strong memory allocation and automatic garbage collection mechanism. It
provides the powerful exception handling and type checking mechanism as compare to other programming
languages. Compiler checks the program whether there any error and interpreter checks any run time error
and makes the system secure from crash. All of the above features makes the java language robust.

5. Distributed:The widely used protocols like HTTP and FTP are developed in java. Internet
programmers can call functions on these protocols and can get access the files from any remote machine on
the internet rather than writing codes on their local system.

6. Portable :The feature Write-once-run-anywhere makes the java language portable provided that the
system must have interpreter for the JVM. Java also has the standard data size irrespective of operating
system or the processor. These features make the java as a portable language.

7. Secure:Java does not use memory pointers explicitly. All the programs in java are run under an area
known as the sand box. Security manager determines the accessibility options of a class like reading and
writing a file to the local disk. Java uses the public key encryption system to allow the java applications to
transmit over the internet in the secure encrypted form. The bytecode Verifier checks the classes after
loading.

8. Architecture Neutral:Java is an architectural neutral language. The growing popularity of networks


makes developers think distributed. In the world of network it is essential that the applications must be able
to migrate easily to different computer systems. The Java compiler does this by generating byte code
instructions, to be easily interpreted on any machine and to be easily translated into native machine code on
the fly. The compiler generates an architecture-neutral object file format to enable a Java application to
execute anywhere on the network and then the compiled code is executed on many processors, given the
presence of the Java runtime system.

4. ASP.NET:
ASP.NET stands for Active Server Pages Network. ASP.NET is a server-side technology for developing
Web applications based on the Microsoft .NET Framework. According to Microsoft Corporation
"ASP.NET is a technology for building powerful, dynamic Web applications and is part of the .NET
Framework". For years now, Active Server Pages (ASP) has been arguably the leading choice for Web
developers building dynamic Websites on Windows Web servers. ASP has gained popularity by offering
the simplicity of flexible scripting via several languages. That, combined with the fact that it’s built into
every Microsoft Windows-based Web server, has made ASP a difficult act to follow. Early in 2002,
Microsoft released its new technology for Internet development. Originally called ASP+, it was finally
released as ASP.NET, and represents a leap forward from ASP both in sophistication and productivity for
the developer. It continues to offer flexibility in terms of the languages it supports, but instead of a range
of simple scripting languages, developers can now choose between several fully-fledged programming
languages. Development in ASP.NET requires not only an understanding of HTML and Web design, but
also a firm grasp of the concepts of object-oriented programming and development. . The file of ASP.NET
has extension “.aspx”. . It would be perfectly possible to write ASP.NET code in Notepad, and use the
commandline compiler included with the .NET framework. ASP.NET is language independent, which
means we can use any ASP.NET supported language to make .NET applications.In the Client side
ASP.NET programming there supported by the like Java Script,VB script, Html etc. In the Server
side ASP.NET programming there supported by the,JSP, programming C#,VB.Net ASP.
9
Prepared by: N.P.BHUSAL
Email ID: smcnpbhusl@gmail.com
PROGRAMMING LOGIC AND TECHNIQUES

Requirements of asp.net:
1. Web server: Internet information services (IIS ). It is software which processes the web application by
integrating with ASP.NET DLLs and also provides the execution path of a web application.
2. Web browser: It is used to display the output of web application. Internet explorer for example:
3. Visual studio.net: For designing and coding.
4. Operating system: sp4(ASP:2.0) WINDOW 2000 server ,xp service pack 2,windows 2003

Various versions ASP.NET:


1. VERSION 1.0 2002
2. 1.1 2003
3. 2.0 2005
4. 3.5 2008
5. 4.0 Recently

FEATURES OF ASP.NET:
1. Totally Object oriented.
2. Support for over 40 languages.
3. Supported by most of the browser.
4. Large set of controls( web server controls and HTML control)And user controls
5. Use of Master pages which help in easier design of web pages.(login control).
6. New set of controls for data hiding and for security.
7. Support for SQL Server 2005 express edition.
8. Web parts controls for customizing of web pages.
9. Use of file system based web sites.
10. Use of web site administration tools.

10
Prepared by: N.P.BHUSAL
Email ID: smcnpbhusl@gmail.com

You might also like