WEBtek
WEBtek
3 4
1
To create an XML parser: Define the XML syntax: Before you can Client/Server Arch
build a parser, you need to understand the syntax of the XML 2 Tier Arch: It runs the client processes separately from the server
language. XML consists of elements, attributes, and text content, processes, usually on a different computer: >>The client processes
all enclosed within tags. You'll need to define the rules for parsing provide an interface for the customer, and gather and present data
these elements and attributes. Implement the parser: You can usually on the customer’s computer. This part of the application is the
implement the parser in your preferred programming language. One presentation layer The server processes provide an interface with the data
approach is to use a tokenizer to break the input XML file into smaller store of the business. This part of the application is the data layer. The
chunks, such as elements, attributes, and text nodes. Then, you can use a business logic that validates data, monitors security and permissions, and
parser to parse these chunks and build a data structure that represents performs other business rules can be housed on either the client or the server, or
the XML document . Handle errors: It's important to handle errors in the split between the two. o Fundamental units of work required to complete the
XML file, such as missing tags or improperly formatted data. You'll need to business process o Business rules can be automated by an application program.
define rules for detecting and handling these errors. Output the parsed Merits: Easy to maintain and modification is bit easy Communication is faster .
Demerits; Performance will be degrade upon increasing the users. Cost –
data: Once the parser has successfully parsed the XML document, you can
output the data in your preferred format, such as a JSON object, database, ineffective
or HTML page. 3 tier Arch: 3-tier architecture is a specific implementation of the client/server
model, where the system is divided into three main layers: presentation layer,
>>XSLT (Extensible Stylesheet Language Transformations) is a language application logic layer, and data storage layer. The presentation layer deals with
used for transforming XML documents into other formats, such as HTML, user interface and presentation logic, the application logic layer handles the
plain text, or other XML documents business logic, and the data storage layer deals with data storage and retrieval.
>>XPath (XML Path Language) is a language used to query XML documents Merits: High performance High degree of flexibility in deployment platform
and configuration Better re-use Improve Data integrity Improved security –
and navigate through their elements and attributes. XPath is used to select
nodes or sets of nodes from an XML document, based on certain criteria . client is not direct access to database Easy to maintain and modification is bit
easy, won’t affect other modules In three tier architecture application
The XML DOM (Document Object Model) is a programming interface for performance is good Demerits: Increase complexity /effort .
XML documents. It provides a hierarchical representation of an XML
N Tier Arch: N-tier architecture, also known as multi-tier architecture, is a
document as a tree structure, which can be manipulated with software architecture pattern that extends the 3-tier architecture by adding
programming languages like JavaScript, Python, and Java. additional tiers or layers. The "N" in N-tier refers to any number of additional
>>DTD stands for Document Type Definition, which is a way to define the layers beyond the three tiers in the traditional 3-tier architecture. In an N-tier
structure, elements, and attributes of an XML (Extensible Markup architecture, the software system is divided into multiple layers or tiers that are
Language) document .Internal declaration refers to the part of a DTD loosely coupled and independent of each other. Each layer provides a specific
that is included within the document itself, typically enclosed in a pair of functionality and communicates with the other layers through well-defined
square brackets [ ]. This internal subset is used to declare the rules for the interfaces. The layers are typically organized in a hierarchical fashion, with higher-
level layers depending on lower-level layers. Merits: Changes to the user
document type being defined, such as the elements, attributes, entities, interface or to the application logic are largely independent from one another,
and notations. Internal declarations are only accessible within the allowing the application to evolve easily to meet new requirements. Network
document in which they are defined and cannot be reused in other bottlenecks are minimized because the application layer does not transmit extra
documents. Private external declaration refers to the part of a DTD that data to the client, only what is needed to handle a task. The client is insulated
is located in an external file, typically referenced by the document using a from database and network operations. The client can access data easily and
system identifier. Private external declarations are used when a DTD is quickly without having to know where data is or how many servers are on the
defined separately from the document that uses it, allowing the same DTD system. Database connections can be 'pooled' and thus shared by several users,
to be shared by multiple documents. Private external declarations are only which greatly reduces the cost associated with per-user licensing.
accessible to documents that explicitly reference the external DTD file, and SESSION: In web development, a session is a way to keep track of a user's
they are not available to other documents that do not have access to the activity on a website or web application. When a user interacts with a web
same DTD file. application, the web server creates a unique session for that user, which is
Tag Libraries: identified by a session ID. Merits : It helps maintain user state and data all the
application. It is easy to implement and we can store any kind of object eg.
In a web application, a common design goal is to separate the display code
from business logic. Java tag libraries are one solution to this problem. Database, dataset etc. Stores client data separately Session is secure and
Tag libraries allow isolating business logic from the display code by transparent from the use. DEmerits : As session is stored on the server
memory, it is not advisable to user session state when there is a large volume of
creating a tag class and including an HTML – like tag in JSP page.
data. With the use of session state, it will affect the performance of
Error handling is the process of responding to and recovering from error memory, because it stored in server memory until you destroy the state
conditions in your program. a) Syntax Error b) Logical Error c) Runtime USES: Carrying information as a client travels between pages. One page data
SESSION vs COOKIES: can be stored in session variable and that data can be accessed from other pages.
Session can help to uniquely identify each client from another Session is
1.Session expires when the browser is closed. 1 Cookies last longer than mostly used in ecommerce sites where there is shopping cart system. It helps
session 2 Session are stored on the server computer 2 Cookies are stored maintain user state and data all over the application. It is easy to implement
on the user’s computer 3 Session are reliable and more secure as we and we can store any kind of object. Stores client data separately. Session is
cannot easily access the session value 3 Cookies are unreliable and less secure and transparent from the user.
secure as we can easily access the cookie value 4 Session can store
unlimited amount of data 4 Cookies can store only limited amount of data(
maximum cookie size is 4KB) 5 Session is mainly used for login/logout
purpose 5 Cookies using for user activity tracking .
about:blank 1/2
2/17/23, 9:44 AM WEBtek
about:blank 2/2