Ip Easy Solu
Ip Easy Solu
Layers or Services
A software application is created using programming Ianguages(called as frontend) and databasefcalled as backend). In evety
software we have to implement following three layers’.
It is also called as client layer which contain User interface of our application. This layer is used for design purpdse. In this, data is
presented to the user and also input can be accepted from the. user. For example in banking software, the registration form of an account
holder can be considerd as user layer.
In this layer actual database is comes in the picture. Data Access Layer contains methods to connect with database and to perform
insert, update, delete, get data from database based on our input data. Depending upon the implementation of these, three layers there are
types of database architectures.
layer and data layer are implemented in a single application. This . Business Layer
$
architecture is usually used for small applications.
t Data Layer
5
Client Server
B. Two Tier Architecture
i) The business layer can be integrated with presentation layer at client side. In this case the size of client application increases,
hence it is known as Fat Client.
Scanned by CamScanner
; .... .J
Inten
indej
and data layer.
Server
Adv
2.
3.
4.
7.
8.
Di!
Fig. 1.3 : Fat server ‘‘ 1.
Server
Client 2,
Advantages of two tier architecture 3.
1. In two tier architecture, applications can be easily developed.due to Data layer
User layer
simplicity.
2. In this client and server are directly connected, due to which
communication becomes faster. Business I
Business layer
3. Maximum user satisfaction is achieved with accurate and fast layer
prototvping of applications through robust tools.
4. It contains static business rules which are easily applicable for
homogeneous environment.
Fig. 1.4 -. Two tier architecture
5. we can distribute business layer physically with the user layer as
well as data layer.
C. Three Tier Architecture world. In this architecture the user layer, business tap
......
Database layer
Rasy-solutions
Scanned by CamScanner
ll’-3
b, I I'lutininiiiilng (MU) , _______ ___
,hfW
. ....... „ llr( | by llic ........ .•....... ’"■ "' "" ....... “" '" ) ' W " W
"" .......
independently.
Q. 2 Explain 3-tior web nrchltocturo with diagram for online shopping database system?
Ans. : ’
This is the. online shopping diagram for 3 Tier architecture. Here the as a front end Dot Net environment is used while as backend
database MS SQL Server 2008 is used.
Onllno shopping • 3 leiyor a rchltocluro
° ns3 . EXP
' aln Domaln
Name lce, Domain Nam.
S is an identification scheme for computers, services, or some other sources that are connected to the Internet or a personal
,n s a
. variety of information with domain names linked to each and every contributing entity. Most importantly, it translates
lona omain names to the number of different IP addresses which are needed for identifying and locating computer devices with
ork protocols. The DNS is a necessary part for the use of the Internet which his been in use since 1985.
Domain name registration is die method of getting a domain name by a domain name registrar. Domain name registration
information is reserved by the domain registries, which deal with domain registrars to supply registration facilities to the people. A client
chooses a registrar to offer the registration service, and that particular registrar becomes the elected registrar for the domain selected by the
client. Only the selected registrar can delete or modify the information regarding domain names in a central registry record. It is not
strange foi a client to change registrars. When a registrar registers a com domain for a client, he must pay an annual fee for it. Most of the
The most basic is web page and small-scale file hosting, where files can be uploaded via File Transfer Protocol (FTP) or a Web
interface. The files are usually delivered to the Web "as is" or with minimal processing. Many Internet Service Providers (ISPs) offer this
service free to subscribers. Individuals and organizations may also obtain Web page hosting from alternative service providers. Free web
hosting service is offered by different companies with limited services, sometimes supported by advertisements, and often limited when
compared to paid .hosting. Single page hosting is generally sufficient for personal web pages. Personal web site hosting is typically free,
advertisement-sponsored, or inexpensive. Business web site hosting often has a higher expense depending upon the size and type of the
site. . •
2. Larger hosting services *
Many large companies that are not Internet service providers need to be permanently connected to the web to send email, files, etc. to
other sites. The company may use the computer as a website host to provide details of their goods and services and facilities for online
orders. A complex site calls for a more comprehensive package that provides database support and application development platforms
(e.g. ASP.NET, ColdFusion, Java EE, Perl/Plack, PHP or Ruby on Rails). These facilities allow customers to write or install scripts for
applications like fomms and content management. Also, Secure Sockets Layer (SSL) is typically used for websites that wish to keep the
data transmitted more secure.
Scanned by CamScanner
IP-5
IITTP
FFP __
Onlydaiacoiincclion h rM.tblhhej ----- .. __ -■ -------- — “ *
f
KIP establishes two connections: one fo
III 11' uses Id's port nuinlx'i HO. for the control connection.
No nerd of authentication,
KIP requires a password.
The content tramferred to . device using HTTP I, not llw file transferred to the host device using I I
saved to the memory of that device.
in the memory of that host device. --------- -----------
„ , W h0t IS cross browser compatibility? What nro It, | S5UC8 on(l how t0 106O | V0 thorn?
o. 3
AO5 - ‘
t |s cross browser compatibility?
Consider a form on a website which is very important for lead generation. Before launching in the testing phase, l it
on the browser. Let us consider on the browsers of 25% visitors, the form is not working properly : it either loo s n >
p; Tbe screen resolutions related to web and mobile arc always different which affect the look and feel of die webs, .
How to ensure cross browser compatibility? sometimes because of complexity, it
A Cb
a web
bavc "niore or les consistently across browsers. For this purpose, the designecandefinitely
developer ukds efforts
take following steps: so that the site will look and
Scanned by CamScanner
*n ternet Pr
Hash
nCln
bro ° important w -
Sers eS
do not have sup rt *®ners sbou
ld keep in mind is that the browser designed for the blind and some of the mobi
mpal
*bility igSUes While the visual appeal of the site is improved by the sites it can also leads to cross browv,
5 i- -
Anofc
' thing which n
elem
* which may be jnler code should be absolutely clean and do not contain any avoidable
11
is responsibility of the web desii? acflieve
avoiding the cross browser compatibT compliance. This is surely a difficult task but it will definitely helps in
8 Cross
‘ -Browser Testing
I
012 UCbSlte maXlmum possible brow
cross-browser testing. sers. Nowadays there are many free and paid tools available for
Q 6 Wr,te note
' on W3C validators. -----------------------------------------------------------------------
Ans. :
W3C validators
a i ator provided by the World Wide Web Consortium(W3C) that allows Internet users to check HTML and XHTML
documents fnr wall 1... niTiLL
■ Markup validation is an important step towards ensuring the technical quality of web pages. However, it is not a complete measure
of web standards conformance. Though validation is important for browser comparrbility and site usability, it has not been confine
what effect tt has on search engine optimization. Mark-up validators are used to check missed dosing tags and other technicalities.
DTD-based validators are also limited in their ability to check attribute values according to many specification documents. For
example, using an HTML 4.01 DOCTWE, bgcolomW is accepted as valid for the "body- element even though the value W is
missing a preceding * character mid contains only five (instead of six) hexadecimal digits. Also, for the "img" element, widfc'really
ea sy-sol otions
Scanned by CamScanner
J g Indicates that this
Is written In HTML
<head>
Of the I
'" eb Page</tj1te> • *>tag contains the web
</head> Page title.
contains
formation about the web.
Flg U:St
' ™cfure of HTOn. Documents '
Head
1.
2. Body
May15, Dec.15
Ans. :
‘ image map with example -
HTML pros ides the <map> tag to define a client-sidd image-map. It is an image with clickable areas. The <map> element has name
attribute which is associated with the attribute use map and links the image with the map. The <map> element has sub-tag <area>, which
defines the clickable areas in the image map.
<!D0CTYPE html>
<html>
<body>
<area shape="rect" coords="0, 0,82, 126" alt = "Jellyfish" href= "Jellyfish.htm" >
</body> ZZ:ZZ
5/htai>
casy-soitnions
Scanned by CamScanner
_ -A,,.*.' ■
Q© * C:\pl htrnl
T
< Web Shce Gallery .
Favorites i Suggested Sites
./z C:\pl.html
Ans. :
Use of list in HTML : As the name suggests, these elements are used to give list of items. Lists are used everywhere on the websites
There are number of things like articles, website navigation menus, and product features on e-commerce websites which makes frequent
use of lists.
Use : In this list, plain bullets are used for the list items. Generally this option is used when there is no any standard sequence or
order of the list items. The <ul> tag is used to give this list. Every element in the list is marked by a bullet. Different types of bullets are
available. The <li> which is the sub-tag of <ul> is used for individual list elements. The <ul> tag has attribute TYPE which is used to
specify the type of bullet for the list items.
There are following options for the attribute TYPE of <ul> tag. ' .
(i) Square (ii) Circle (iii) Disc , .
Use : Ordered lists are generally used when we want to specify numbers instead of bullets. The <ol> tag is used for such list.1* j •
number starts from 1 and also incremented by one for each successive list element in the ordered list. The <ol> tag has attribute fl# :
which is used to specify the type of number for the list items. The de *
There are following options for the attribute TYPE of <ul> tag. L
- F. • •
1 - Number
I - Upper Roman
i - Lower Roman
A - Upper Alpha
a -Lower Alpha .
c as v -sol nitons
Scanned by CamScanner
.(gft
* tribute of «*> te ? ,s used 10 sU1
W point of umbering.
htML Definition Lists
jdered as
C' ignition Lists are used to give the list of definitions just like the di
1 l
' f , present a glossary, list of l. .ms. or some kind of nameAalue pa
l 11
‘“ , am used in definition list
pawing tag>
1h pefmes the beginning of the list
<d(? . Specify a term
ui'
, d> _ Specify term definition
ini’
dl> Defines the end of the list
Chapter 2: JavaScript
Ans.:
(nr ictics of JavaScript
1
............ ........... ......... S""*" ”
■ XI- .*———**•
................
6
A
"S . „»=nf client side scripting more interactivity
AdVan
’ a9eS „ s etouser'saetlon- he
"* S
Scanned by CamScanner
°' 3 ' Wha,are differences between client side and server side 8cr,
P*l "® lan ®liaS9
Ans. : ______ _____
t,s
Notepad can be used to write the scripts. Inside the context of a web brows , r no nee( j
to buy a compiler.
JavaScript Editing Tools
1. Microsoft FrontPage
This is popular product of Microsoft. It provides various JavaScript tools to web developers for assistance to create interactive
websites. ' . . '
>
2. Macromedia Dreamweaver MX
It is very popular' HTML and JavaScript tool used for web development professionally. It provides various JavaScript' components to
handle databases, and supports new standards like XHTML and XML.
3. Macromedia HomeSite 5
This is a product of Macromedia which is well-liked HTML and JavaScript editor. It helps to effectively manage personal websites.
Scanned by CamScanner
11
meter Juvn
JaviiSirlpt
Java program Ims file fxte0llon »j ..
psim 1
compilation it crcatci file ‘ U
" W
hlV.i.'n ti|it ||r h;r, |||c rifriiil'Hi " j"5 *” lilinl”
6
0-
AH 5, •
p, w ryp” " nd Vnrlnb,CB |n
C
Viable is 3 name given to memory location where we can !lore „ ime value. Tire value depend, upon the d.(. Iyi« "< ' "
JavaScript there are number of data types used to .tore different types of values. These data type* arc primarily categorized as .
1 JavaScript primitive data types
. i..„..c< rint. there arc live types of primitive data tvr™ »< fnii™. .
Sr. No. Data Ty pe Description __ __
1. Siring Represents scrpicnce of characters c.g Mita
2. ' Nuinlwr Represents numeric values c.g. 101 _______
3. Boolean Represents Boolean value cither true or false
4. Undefined Represents undefined value
5; Null Represents null means no value at all
2. JavaScript n
Data Type Description ______—
Sr. No.
is considered
ie«d by the JavaScript as a While
engine. dynamic .ype ««a variable,
declaring « var
i«o keyword . is , he
Examples
2 varsname= M*odl ° ______ ______ ______ _ _______
1. varmo = 101; //holding number
Ans. :
P., A.
Examples of objects
of objects in JavaScript.
(ii) Numbers (
(i) Booleans (when defined with the new keyw (iv) Dates
(iii) Strings (when defined with the new keyword)
(vii) Functions
z • . fvi) Arrays
(v) Regular expressions k /. . .
'dis eas y - s o I u I i o n s
Scanned by CamScanner
Internet Pr<
Crea,ln
9 Objects lnJavaScr . pt
1
- Script Object by Object Literal
Syntax
,<head>
< ti tie > Objects </title>
</head>
<body>
r •'
<idntstze=5>
<script language="JavaScript">
employee = {id: 101, name:"Pranav Dilip Dev".salarj :40000} •
document. write(einployee. id + 4’employee. named- + employee .salary),
</font> ■
</body>
</htinl>
Output
■, Object!
> © f1le7//c:/pi.html
Syntax
Following is the syntax of creating instance of object .
. ............. .
<html>
<head> ''
< ti tie > Objects </title>
<body>
<fontsize-5>
script language="JavaScnpt >
vate mployee=newObjecl(l;
1011
employee-
i , > n'iine="Pranav Dilip Dev ;
\
i
Scanned by CamScanner
enrploy ------------
employee, salary);
■
z/h11"' 5’
OutPut
have to create parameterized function, “this” keyword is used to assign each argum
Here.
, js „ key word refers to the current object • .
pausing "this- keyword
diead> ,
15 /lllle>
ztitle Ohj '
>
</'head
<body>
<fontsize=5>
zrflan npt*
feOtSlS
this.iB= id ’
this.sname= shame;
this.marks-marks; , .
I ' -A*-
Output
Scanned by CamScanner
Q. 8
using
, P ™ Orra age-neuM interface that allows programs and scripts to dynamically access and update the content, stm
style of a document”
DOM
Model
Document — | —
Object
Hierarchy of objects in web document
Document Object Model (DOM) is the method by which the content of document is accessed and modified. In a web document the
organization of objects is implemented in a hierarchical structure.
1. Window object
It resides at top of the hierarchy. It is the topmost element of the object hierarchy.
• 2. Document object
All the HTML documents which get loaded into browser are considered as document objects. The contents of the page are storedin
the document object
3. Form object
Everything which is contained in the opening <form> and c!osing</form> tag sets the form object
1
4. Form control elements
The form object has all the elements which are defined for the objects like text fields, buttons, checkboxes, select box, radio tarn
etc.
Window
DOM Levels
frame parent self top
The DOM provides all the features to JavaScript to create
dynamic HTML :
history document location
(1) Changes can be made in all HTML elements.
(2) Changes can be made in attributes of HTML elements. link form anchor
(3) Changes can be made in all CSS styles in the page.
(4) Existing HTML elements and attributes can be deleted. radio textarea button text checkbox!
(5) New HTML elements and attributes can be added.
password reset select
(6) Response can be given to HTML events.
(7) New HTML events can be created in HTML page. option
Ans. :
Event •
Events are the actions performed by the end users while browsing the website. For example mouse move or mouse c
buttons, whpn
wnen an<UI event is fired, objects are triggered which are associated with that specific event The event is caught by
, ■ •
■ tf. ft( rfersandin response the related coders executed. . _____ _____ ■-
Scanned by CamScanner
IH f,
Evcnlx are baxically dauified in four calorie: ;
1. Window Events
3. Keyboard Events
4. Form events
Q. 10 Expl
Ans.:
........
JavaScript, cookies can be accessed through eved d through a simple and intuitive interface. A cookie
The path helps to specify a directory where e rf)nkie b valjd throughout the entire domain.
set the
ns
e a su-sointio l
Scanned by CamScanner
JSgfngt Programming (MU) ------ ~~
• Creating Cookie
Example
<head>
<»cnpltype — "text/javascript">
function SetCookieQ
{
i
i■ v
~ document.frm.nm.value ;
if(v !=="”){
alerif’Please enter name");
; return;
<locumenLcookie='’name=" + v;
document.write ("Setting Cookies : " + "name=" + y )t
}
</script>
</head>
<body>
<form name="frm" action
Enter name: <input type="texl'' name="nni7>
<input lypc="button" value='Set Cookie" onclick = "SetCookieQ; />
</form>
</body>
</htm!>
Output
2. Reading Cookies
5
To read cookie we have to read value of the documentcookie object The documentcookie string maintains a list of r* *
pairs which are basically separated by semicolons, in which name is the name of a cookie while value is its string value. The string
break into key and value using splitQ function.
Scanned by CamScanner
P-tZ
Example
<html>
<h(‘ad>
Cscript lypr --"lcxl/java*cript">
(unction HmIDainQ
name - nrr[ij.spliif'=')[f)J;
value - arr[i].split('=')[lj;
document. write ("Key is : " + name + " and Value is ; " + value);
</script>
</head>
<body>
<fonn name" inn action— >
<n> Click to get Cookie Data </p>
<input |ype="butl»n" vahie= nGel Cookie" onelir:k="BeadData()7>
</form>
</body >
</html>
Output
/c:/pl.html
/- e © file:///c/pl.html
Get Cookie
Deleting a Cookie
be deleted by setting the previous expiry date.
Sometimes (hem is need lo delete a cookie explicitly. A cookie can
Example
<html> ■
■
: <head>
<script type— 7ext/javascript">
function DeltecookieQ
ftasv-soluijons
Scanned by CamScanner
le>
11
div.innerHTML — "V ou are at Latitude: 4- latitude + ", Longitude: " + longitude;
•; .. This function displays the latitude and longitude when the browser has a location
</script>
</head >
<body>
h :A • ■
1
<div class = "container > ’
■
<h3> How to find location of a user using 1ITML5 Geolocalion? </h3>
</div>
■</body>
__ •: ___
eas soluiions
Scanned by CamScanner
IP-21
Output
DoolASo
we simply an erorTIp'i?
, return an erro . f ta w all to getCuneotPositioa method and pass diapbyl
coordinates tionO
on thefoncion as a
Web Page.
user coordinates. Now lets display the coordinates on Google Maps. --------------------- -------------------------
Ans. :
and satisfying experience for every user. Desktop compu guch dejtop! .
n a s v - s o 11) h o n s
Scanned by CamScanner
rr
rs
ES
Phone
Desktop
Viewport
3
a b'l* h f° F USer
k cons ers 25 v
re’-v P orL The viewport is different for different devices. It is smaller on
1 C0 n are 10 com iner
only to P * P P screen. Before the evolution of tablets and mobile phones, the web sites were basically designed
screens
web th* \ ’ and the viewport is considered as common for all. Then, when mobiles and tablets are being used to surf th*
S rowsers on ose
This was not red ’ devices scaled down the entire web page to fit the screen
:
me name- viewport .< tenl=’OTdlh=deidc widt\imtid-s«je=1.0 ’>' ....
to
* "- K 00 h0W 10 CMtroI
<“ scaling. £
Media query
MeAaquen- Qe Mock
blOvk of
of TOn
055
certain condition. is advances L hrnqu- introduced h CSS3. It is used to include properties
h; ■
using ©media
' rule based or
Example
body {
background-color: pink;
Scanned by CamScanner
IP-23
</styie>
<fnead>
■ -
<Lo3y> V. • ;>•
<h3> |
Resize the browser window.
<br> Setting background color as light gray for browser window 600px or less
oherwise pink.</h3>
</body> :
</html>
Output
B X i
May 16
Ans. :
This code targets all the image tags in the markup having an alt attribute. .... . „■ ... , . x-.-ns-
img[alt='’atwi_oscar’1 {
border: 3px dashed #e!5f5f; •
This would only target images which have an alt attribute of atwi.oshar. It can be done, in CSS2. Then what CSS3 provides?
Scanned by CamScanner
substring r-atehxg attribute n
- I VT DiZ
15.M3V'
An?. :
Pseudo !n CSS3
and relative position. Here we will first see basic link used pseudo class :
eafliolMliflni
Scanned by CamScanner
IP-25
<11011(1?
'</atyle>
: </liWul>
Output
/c:/pl.hlml X
Blue Link
Ans. :
CSS3 Transitions
CSS transitions help to modify property values from one value to another over a given duration of lime. To apply a transition effect
we have to specify two things : (i) The CSS property to which we want to add effect, fii) Time duration for the effect, (iii) The default
value duration is 0, hence if it is not mentioned then there will no effect of transition.
Example
The following example illustrates 50px * 50px gray <div> element. Transition effect is specified for the width property of The <di v>
element. The transition duration will be 3 seconds
<!D0CTYPE html>
<hlml>
<head>
< 9 tyle>
div {
■ ... ' ■' ' "
width: 50px;
height: 50px;
background: gray;
-wehkit-transilion: width 3s, height 6s; /* For Safari 3.1 to 6.0 /
7 tnmsition: width 3s, height 6s;
}
■ _ :■ ■
div:hover {
width: 200px;
height: 200px;
) •
</style>
</head>
■<fody> . . ' ___
easv-soluiions
Scanned by CamScanner
Internet Programming (MU) —
'7- . —- * * *< “ * Tl
s
; documentcookie ="r,anie ''
\ (kxiujncntxwkie = ’’expire
documentwriteCSelting Cookie*
}
j:?k ■,■..•■ >'■ ; ■
</script>
' </head>
i <body>
n
<fonnnamc=Trm action- >
= ,ext name
Enter nainc: <»nput type r[) e ]ete C(X)kieO“/?
i </fonn>
</body>
:</h!ml>
Output
ith CSS3
Chapter 3
c .g.
SVG and canvas —
Vector Graphics
VML, Sil verlight, Flash etc. -----
GeoLocation of end user browsing the JS GeoLocaUou
It is difficult to trace true < , .. j P vicp<; location ot user browsing the
Tracing User
Location
It supports local storage instead of cookies-.
Cookies Html use cookies.
Shapes The different shapes such as circle, rectangle and triangle are not It is easy to draw
rectangle, and triangle.
possible.
Supported by all new browsesr.
Browser Support Supported by old browsers
DOCTYPE declaration in Html5 is
Syntax "<!DOCTYPE html>”
<!DOCTYPE HTML PUBLIC n-//PhoenixGlobe//DTD HTML
easy-solutions
Scanned by CamScanner
(MU) IP-19
An* *
( (| ,|...!.i I' '’.'thiny but the il.it, i (iiih-iniation) mIhhiI tlntn IIIMI.5% piovhlrn <mrlx> big Io manage metadata of the HTML
1
i Hu-
1
inri.utii n not visible on tlr page, but will lie nuuhinc puikublc. I hr meta elements arc usually used to describe page
Is
i,l, tlii't i’l tbr di* iiiiieni. List niiHlilird. anti otlirr inrhuljit.i hniwticru can use llir. metadalafhow to display content
3
"'lL'l p-’XH. “’so nnh engine* (keywords), and other web r.rrvh rn also uses metadata. HTML5 provided a way to allow web
cl ,lir v < w t,lM lHn vll,b,c n,ra ,,f
';,U*|S l ike ‘" ‘ ’ l’"” ’ « wHl l’»K«). with the help of the <meta> tag.
1
ftfli’U’ '’ . . ......................... . ............ r ..................
<html-
</l'ixiy''
</htinl>
Output
file:///c/
|May 15]
0. 3 Explain Geo Location with an example.
Ans. :
Geo Location
Up dll now, the paper maps were Meal soludon to search any iocadons. But now they are replaced by defeated GPS navigation
devices and mobile applications. These devices arc found everywhere like in cars, on tablets and smart-phones. The most important feature
of a navigation device is to detect the device’s cutrent position and update it as per changes. This assists user to reach from one iocatton to
. other by providing directions. Near about ail the current browsers support the geo location. Here we am going to earn the Geolocauon
API. which allows applications to detect and hack the location of devices. There are number of applications of det n,g device iocadons.
For example on the web giants such as Google. Microsoft, and Yahoo use the user's location to petsonahze the SERPs (Search Engme
Results Page) depending upon the location of user. Localization is another important application of geo-locauon.
The geolocation API allows us to easily fetch the geographical position of a user. If the browser support Geolocation API, one can
easily get the Longitude and Latitude just using Javascript The Geolocation API uses multiple sources to determine the most accurate
Position of the user. The location accuracy depends upon the best location source available. The most common sources of location
. information are IP address, Wi-Fi and Bluetooth MAC address, radio-frequency identification (RFID), Wi-Fi connection location, or
Scanned by CamScanner
Prog ra r~;.'Ti:r,g (MU) ___________________ ____
Hover over the div element below, to see the transition effect: </p>
<div></div>.
< oody>
</html>
Output
Q. 9 Create a webpage to display border effects by using transition effects In CSS3. Assume sulta p
required.
Ans. :
display :inline-block; ••
• P' - ebkit-box-sizing:border-box;
r . < j. -W
: -moz-box-sizing:border-box;
box-sizing:border-box;
■■
width:90px;
heigbt.'OOpx;
-webkit-border-radiu8:40px;
-moz-border-radius:40px;
'74
s
I ■
border-width:50px;
; ; ! border-color:rgba(0, 0,0,0);
; -webkil-transition:0.5s ease:
transition:0.5s ease;
easy-soluilons
Scanned by CamScanner
IP-27
—
Iransition:().5s ease;
s
7 • '
u:hover{
border-widlh:0;
border-colonrgba (0,0, 0,0. 5) ;
}
a.one {border-stylersolid;}
a.two {border-styleidashed;}
) ■"
Xfstyle?
</head>
<body>
<a clas9=s "one" href="#"> <
/ a>
<br><br>
, fl>
<acla. SS =Whref-’ #"></
Output /cVpl.hlml*
: 0 file:///c/pl.html*
used to translate, rotate, scale, and skew dements. A transformation effect helps an element to change its shape.
L
The amtateO function is used to move an element from its current position (based on the arguments given for the X-aois ar.d
010 Y axi5)
* - ____ _ r
div {
, tWorm.traneW.nOpa);
e a s v soliiiioiisi
Scanned by CamScanner
K{
<c~.. n>1 .lU , (75,1 1. ;« 1E 9 «/
w
* ?bkit-trsnMornn rvt;itc(7;xleg); /* Safari */
traniforin: wtatejfb&tegh
■' ■ •'• -• ''■■■- ' . . ..._ ; _• ............. '
1
M ftacta b toed to tattose or decrease die * <- *■*** " **
height).
div {
4. SkewXO
The skewXO function is used to skew an element along the
-ms-transfonn: skewX(35deg); /♦ IE 9 */
-webkit-tr.uis.fonn: skewX(35deg): /* Safari */
transform: skewX(35deg);
SkewYQ
method skew an element along the
The skewYQ and SkewQ methods are same as of skewXO- Just skewYO
Y-axis while skewQ method skew an element along both X and Y axis.
...... .
Similarly rotateYQ and rotateZO methods am used to rotate an element around its Y and Z axts.
Dec. 15
Q. 11 Explain Input elements newly Introduced In HTML5 with example.
Ans. :
Input element In HTML5
could not understand, a textbox is created. Hie HTML5 provides nine additional input types for
. .......... - __
easv-soluiioiis
Scanned by CamScanner
Internet Prot
< "*mi>
<label>
C01M <lnpUI
</label> ’ “"color" name="S elM l„rS
</form>
*?/body>
</html>
Output
0 «ft///t LhVr,|
CdordBI] I•
« J&’aaaaM
SLLQHen
LLLBDa
l l be
LLiiiH
BEaaaL
LZBWMDW
EtSaBBL
jh ss§ an
□□
Si ri a a
ii oo
Qn
: • nn
6~
S« C G.-W- C~
input[type= "email"]invalid {
outline: 3px solid brown;
</style>
f</headJ>
;*Cbody> :
<form>
<label> ' ’
Enter your Email ID <input type="email" name="sremail” required?
</label> ' ■■ \ '
r n s v - solutions
Scanned by CamScanner
IQ L Pr °gramming (MU)
Output ' »
3. Input Type Number -stticl (he user 10 enter specific values with the help
The number input type is used to accept numerical value. We can ~ ~
attributes such as min, max, and step.
.. .
,<!DOCTYPEhtml>
<head>
<lil]e>Ntnnber : Input Type</title>
i..,
Output
Number: Input Type X ______ ______
; 4- ; 4? 0 {j)
SelectNumber:|j5OQ jEI
------- > ' • ~ -~-—y
Tasv-soiHj Jll
Scanned by CamScanner
IP-31
1
Internet Programming (MU) " -
Output
Select Number:
5. InputType Search
This type is used to create search fields. A search field is same as of a regular text field, but in specific browser such as G g
Chrome and Apple Safari when user start typing in a search box a small cross appears on the right side of the field that allows user to
quickly clear the search field.
Search the Website: <input iype=' ,sea rc h" name=”srsearch*>
Output
HTMUTel InputType
we e fl
; __
Scanned by CamScanner
r
Jto221fg9 amming (MU)
,n
Pa, [ t yFX- = ’’nrl']:in Vf>li<l(
</style> . '
</head>
<body>
<form>
<label>
i Website URL: <input type url" nsme="snir]" required-*
</)abel>
<lhTa>
„ >,„M wK.Pb«nhCI»bc.«>m</p>
<p> < strong > Note </strong>: Enter UHL in the standard format sue -4
</body>
</html>
Output
Website URL:
The date input type provides a drop-down calendar from which user can select a da.e
k!DOCTYPEhtml>
,<html iang="en">
<bead>
</head>
;<body>
J ■■
<label>
</label>
' - ' Bi : .
n
e a s v-sol»ii° s|
Scanned by CamScanner
IP-33
Output
D»tt- Input Type
Select Date:
Output
Output
Output
HTML5 Time Input Type
Scanned by CamScanner
j£!2[2S!frogrammlng (MU) _ — - -----*------- *
Select Werk:|ii«k *
Chapter 4 £
.. .. ... **«*.....
- .. .
xz-xzz . ......
An RIA normally ntni Inside a Web browiernnd Ultully doe« not re I |(|A< h
However, .onru RIA. nury only work ';7„Zj|,«Z''««n 1lb..« limit. ........ - » *• «•
portions within n special isolated area of Hu- - connection Tills approach allows Ilin climil syslmii Io
operating Km dient to th, ...... .......... oi dlrn. <*■
handle Incut divide. cat— ....... ............... ..... :||r( , ()l ,„ ...... .. ....... I an KIA
especially » compared to (be client .aver t .... (|W||
<in
“"“77rX— X np nrdmrruMn.... er! du.lng . ........ with ..... I........... ..........
Ana. :
AJAX intel tire XMI,llllpK<iprwl object to connnirnlcnlo with the icrver. lire I'ig. 4.1 >ltow» Um flow uf AJAX. Hew yWl
A
exact Idea about the working of AJAX. An important role I. plnyal by the XMI.IIllpltequc.l object In A '
by die user through UI (User Interface) and a JavaScript call goes to XMI.HtlpRcqu«*l objrcl. sing m < I
HTTP Request sent to the server. Now the server Interacts with Hie database using any of the server side, setlpllng langung
Servlet, orASP.net. i ■
Scanned by CamScanner
IP-35
internet Programming (MU)
■ Brows »rt
HTTP Request
XMLHttpReqi'est Business Logic
Callback)
XML Data
and
CSS data
Data Store
Presentation
Fig. 4.1
or JSON through the
• »• h fmm the database as per the requirement Server sends the ciaia in uh, —
|Qcc. 1 6|
Ans. :
In Ajax, we frequently want to update just part >V * W |nscrtA(I>cntT ext method.
InsertAdjacentHTMT. nre.od. which le« us to rasert .
trample inserMjacemu
click the button, the code inserts a new text field into the Web page, as shown in Fig. 4.3.
» InH.r«-t»ph '*'
fol a.’.'h-S
rl
11 a f
Updating part of P "
gCWMSl
0
Fig. 4.2 : The insertAdjacenthtml applied
■
*
o ns
Scanned by CamScanner
*.»> •;
■v '.■ ■■
1:-. . 7 • *'■? •■>
/ a v
-:Cr
> -. v * °Fgajg °y ?•-> .<-<«* * >r« * *’-
i</body> •, ■. odtoinsert the text field next to the <div> element:
InUift update function, we can call the <div> element’s insertAdjacentHTML
•'■ .,. .. ........... • -„ ->ott •yWTA
~7'7 Z~" • •**
' ' ... ' ■
<1Jl|
c> . . Updating part of a page </title> • ■ ’,
y?'
'< script language =' JavaScript" > .
•r ■ •’ r x :
- ••■
function update!)v - •
</head>
Here’s how we can insert the new text field after the end of the <div> element:
<heau>
function updatcQ
Dec. 16
Q 4 Explain the following AJAX.patterns :
1) submission Throttling 2) Predictive Fetch 3) Fallback patterns
Ans. :
If retrieving data from the se.er is one pari of the problem sending data to server is another. Science in AJAX page
,0 be avoided, it is important to know when to send user data to the server. One approach that could be taken is to send data
on every user interacdon. But this results in a lot of requests submitted to the server is a short period. In case of submtsston
the data to be send to the server is buffered on the client This data is then sent to the server at predefined umes. The J
typing to sending data is fine tuned such that it doesn’t seem like a delay to the user. Then a client srde function is m
begins buffering the data. It can be sent at a predefined time interval. This determination depends on the use case being us ■
the data is sent, the application continuous to gather data.
casy-soluHons
Scanned by CamScanner
Internet Programming (MU)
IP-37
2. Predictive Fetch
In case of traditional web applications, the application reacts only when there is an interaction This is called fetch on demand". The
user action Ulis the server what data should be retrieved. In the predictive fetch algorithm, the application gueoet what the user h
going to do next and retrieves the appropriate data Determining the future action of the user is just a guess based on the uurn
intentions. For eg : say a user i> reading an online article of 3 pages. It can be assumed here that if the user is reading the 1 page for
few seconds, the person will also be interested in reading the 2 page. Hence the 2 'A page can be downloaded at the background
before the user explicitly clicks on the ‘Next’. Therefore when the user clicks on next, the 2 r ' page instantaneously appean reducing
the response time. Similarly the 3 rd page can be downloaded when the user reads 2" 1 page for a few seconds. This extra data being
downloaded is cached on the client Some approach can be applied in emails. If a person starts composing a mail, it is logical to
anticipate that the mail would be sent to someone in the address book so this can be preloaded and kept. By using AJAX to fetch
information related to any possible next step, can overload the server. Therefore this algorithm has to be implemented only when it is
logical to assume that information will be requisite to completing the user's next request.
3. Fallback patterns
AH the methods work fine when there is no problem a! the server side.
The following problems can occur:
(1) The request might never make it to the server.
Q 5 Draw the diagram of AJAX application model and traditional applications web model and compare them.
Ans. :
Fig 4 4 represents the ty pical model of client and server interactions in a traditional web application, such as one which includes user
registration form.
Page 3
Form
Request 2
—
EL
(Page f S
! rereading v~
Client
,.<.««« -
z.x.— — ----------
Scanned by CamScanner
IP*
T
Jniemot Program
make* th bmw*» window
Un
c 4) an<l (of ’(* * " oaRe containing the data from I
$ fom . the bmwwr <0 !O«> « m
” I. n« -* ut I
anwhile the client has to wflit for the "/ ing on the refer to the V ■ it th
Kt IS
. 4). in time being when the X’ *”’ " ’ **„« " "’" '
frequent long period, of waiting imP“« „.j , ub miu «>' " i0 „, phtform. *> «
e
Wide Wail". If the further user internets »'* «“° in ,„ , full «»' "I’’’ lhdr underrtanding o . >
designed for n web of hypertext documents. As f sh needs the usen
rig. 4.4 leads to irregular application performance. _ t ,ncive feel of desktop |May 17, Dec, i
contents. Users started to insist a model which *ould g
l0d el with nest diagram.
Ans. : . .
4 5)
AJAX web application model dd a i ayc r kww them (B&- - '
r ,wn IL
™™ "7 n „ w 5-..1 « “ " ““ — _, to «.«».>• "“.r,*
(S!t p7) whereas lhe client-side may be ready to implemer i-dates are usd
updated by the callback metlM The.se kinds of partral W
Process'!
Process Generate
r- ----------------
Server
response reqS H
request 1
Request object
Request object
CaVback function
inn
;6
Hr.ISiAJAXMoM
Scanned by CamScanner
IP-39
Q. 7 Explain detail RUI Implementation using AJAX.
Ans. :
* *tOrS 810 t0
the difference in Web design right away. Although it has been promised for a long time
it seems that the day of its arrival
v . .
as come. The applications that provide the new enhanced user interactivity arc much better developed
y make a differwice
between an ordinary Web design and a quality Web design. Instead of the old-fashioned static approach,
ere are now many options that allow developers to put their Webpage years ahead of their competitors.
So much more can be done with tooh like AJAX to enhance the beauty, usefulness, and intensity of a Webpage that a designer
needs to consider between many possibilities. Not only is it morc eye appealing, but the changing coion of buttons when pressed the
boxes that emarge on mouse oven, identifying tags. etc.. a)l work together to make a visitor fee! better. Another good thing is that mom
Webs, us are taking advantage of is !ess crowded Web pages. There’s more white space which gives it a mote relaxed and inviting
look - causing peop.e to want to stay longer. h is possibie to achieve rich user interfaces with tire help of combination of dynamic HTML
elements like HTML and JavaScript But. such an interface has limited scope to client-side behavior and ha, minima! functional
The power of AJAX is basically included in its capacity to offer richer interface by providing its dynamic user interface supported by
powerful functionality by the use of faultless server-side invocation power. AJAX offer features to individual user interface components so
that they are ab!e to —icate with the server and exchange data without the necessity of refreshing the entire screen. To achieve this a
process is used known as Web Remoting. Them am multiple ways to perform this ptocess. More frequency used approaches by the iatest
browsen are IFrame, and XhfLHttpRequesk It is possib!e to complement. Dynamic HTML with either of these methods to create AJAX
functionality.
- ________________________ ___ ___________ ____ /
JSON
In computing, JavaScript Object Notation or JSON is an open-standard file format that uses human-readable text to transmit data
objects consisting of attribute-value pairs and array data types (or any other serializable value). It is a very common data format used for
asynchronous browser/server communication, including as a replacement for XML in some AJAX-style systems. JSON is a
language-independent data format It was derived from JavaScript, but as of 2017 many programming languages include code to generate
and parse JSON-format data. The official Internet media type for JSON is application/json. JSON filenames use the extension .json.
Douglas Crockford originally specified the JSON format in the early 2000s; two competing standards, RFC 7159 and ECMA-404,
defined it in 2013. The ECMA standard describes only the allowed syntax, whereas the RFC covers some security and interoperability
■ considerations.
Uses of JSON
1. JSON is used in JavaScript based applications created for web related features.
2. The data transfer between a server and web applications is done by JSON.
3. Over the network the structured data can be serialized and transferred through JSON.
4. JSON format is used by Web services and APIs to provide public data.
easy-soiutibns
Scanned by CamScanner
IP-40
iggiammlng (MU)
Characteristics otJSDN
irmaL
(2) JS
°Niseasy to read and write.
(3) JSON is language independ ent.
|Pec.l6l
Q- 9 Why to use JSON over XML?
Ans. :
XML
Parameter - JSON
XML nnds for extensible Markup Language.
Long form
Operations
XML is document-oriented.
Orientation JSON is data-oriented.
Readability
|bec.*16, Dec.17|
Ans. :
Mashups
A mashup in web development, is a web page, or web application, th photographs of their library
the raw source data. The main charactenst.es .„„ mqncnt iv access the data of other services, mashups are
make existing data more usetui, io*
generally client applications or hosted online. ... APIs tenable software developers to easi.y integrate data-
m the past years, mom and more Web applications have pub be t0 have
Scanned by CamScanner
l-.teme: Frora-rm ~g (MU) IP-41
Popular Mashups
Fig. 4.6 : Google Maps mashup of New York Public Library branches
Ths most popular type of mastop is a map mashup. Map mashups make up 36 percent of the mashups tracked by ProgrammableWeb
(awTv.programmableweb.com), the most comprehensive listing of mashups. t
0 ihctprv; tSW)
QvxSee (IM)
□ nx.'XtS*)
□ non (4 )
(4%)
wojr»— evtvo*
Fig, 4.7 stows the distriboaou of mastops by type. Omer types of popular mashups mix video and photos. For example, the Viral
Video Chan (vtolvideochartuErulj'medtocom) rile tracks YouTube (www.youmto.com), MySpace (www.myspax.cem), and Google
Video ( video. google.com) in order to identify the most talked about new clips, overall and by category Fig. 4.8.
easy-solniioDS
Scanned by CamScanner
IP-42
jamming (MU)
ChtWartrwLton
rr*VW.*.4
Fig. 4.8
There are many wonderful mashup services built using photos. Here are three examples .
1) Coir Pickr (krazydad.com/colrpickr). developed by Jim Bumgardner, lets us search Flickr (www.flickr.com) photos by color.
Flickr is a widely used photo-sharing site (offering both free and professional accounts) that attracts many libraries and librarians.
Use Coir Pickr to click on a color in a photo or color wheel, and it will retrieve photos that have a large concentration of that color.
2) There are also mashup tools that use photographs to create books, posters, magazine covers, and so on.
Most of us have received photograph booklets comprised of stunning images with short captions. One way to create these photograph
books is to use a mashup tool called Bookr (www. pimpampum.net/bookr). Start by searching Flickr to locate images. Then, add
these photos to a booklet page and type in the caption. Save work, and email the book to friends or publish it on a blog or library
website.
3) A mashup tool called Ad Generator (theadgenerator.org), created by Alexis Lloyd for his MFA thesis project is intended to
inform, enlighten, and entertain site visitors. The mashup randomly combines slogans and images to explore the relationship among
language, manipulation, and images. Mashups come in all shapes and sizes, from the very simple to the complex. Some mash up
search results, others introduce interesting visualizations, and still others aggregate and combine newsfeeds. Libraries have lots of
opportunities to use mashups to help liven up their websites, deliver new and interesting services, or entertain website visitors.
Ans. :
Simple mashup on web server
Web server is an integral part of any web system. Web server has the main responsibility to up the web pages. There are number of
Servers such as Apache Tomcat serves java environment. Most of the time the entire process of mashing is handled by the web server
easy solutions
Scanned by CamScanner
AffW M
MyMaihup
v/ob R«rvor
Web
Brov/aor *
6.
7, ReoponiJG Mashing
Yahoo
User
l lg. 4.9 : Browser, Server and partner site Interactions with typical mashup
The Architecture of Web server Mashups working is as per the following steps :
1. The web browser uses HTTP to send request for a page to the server,
2. The web server constructs the page by connecting to the source or partner sites, which include Google, amazon, Yahoo, etc, fn
our example Amazon gets Ute first request from the browser using SOAP over HTTP,
3. The web server gets the SOAP response back from Amazon.
4. Our example has the second request being sent to Yahoo through REST.
5. The web server receives plain old XML over I ITTP from Yahoo.
6. The web server now combines and rationalizes the data in the most suitable manner and sends die response back.
7. The data resulting from the web server is combined in an HTML format and die response is sent back to the browser.
(1) Browser remains entirely separated from the partner sites, which are actually responding to the request by providing data
(2) The web server itself works as an aggregator and proxy for the responses.
It involves a full page request being sent by (he web server, thereby reducing scalability. t
Nowadays, the JSON becomes very popular in mashup community because of its features such as readability and simplicity. JSON,
being a notation, provides a way in which objects are written so that human beings can read it easily. It has built-in JavaScript feature that
made JSON a viable mashup technology. Here we are going to discuss the communication mechanism of mashup with the help of JSON.
i The architecture of mashups in JSON implementation is shown in Fig. 4.10. The flow of JSON mashups that use dynamic Script
rnethod goes in the following steps :
1. The flow of the process starts with the browser sending request to the server by using HTTP GET.
2. The Web Server responds with a page that includes the following couple of important JavaScript functions :
(b) The Dynamic Script method is the core qf the initiation script through which a new script tag is added to the page,
specifying the source for that script tag to be the Uniform Resource Locator (URL) at some partner site.
3. The source code for the new script tag gets loaded by the browser.
4. Amazon receives an HTTP Get request sent from the browser using the loaded script.
easy solutions
Scanned by CamScanner
IP-44
Web Browser
MyMaihup
Default aspx 1. http get web server
Javascript De'a.ul.asp*
3. Add <SCRiPT> tag,
2 Rosponso
src« Amazon
Calls
Panner response Ar.ozon
wJh JSON formatted data
7. Display Fune-on process
and display the JSON
object's data
XHTML 8. Display
result
Page content
1. The communication path is considered as the main benefit of JSON approach. The browser can directly communicate with the
partner site without any help of server. This results in reduction of loads on the seiver since browser handles the entire process.
2 The built in objects provided by JSON are always easier to handle for the developers as compared to processing XML using XSL or
XPath in JavaScript
3. JSON is readable.
Disadvantages of Mashing with JSON
1 Since the browser directly communicates with the partner site, there is no possibility of consolidation of data on the server.
Scanned by CamScanner
Internet Programming (MU) |p . 45
1* Simple
PHP is very simple and easy to use scripting language. PHP mostly use syntax of C programming. The rules and regulations in PHP
are simple to understand and follow.
2. Interpreted
Rather than compiled, the PHP code is interpreted. There is no need of any compiler.
3. Faster
The execution speed of PHP is very fast as compare to other scripting languages like ASP and JSP
4. Open Source
PHP is open source. Means the software do not have any license charges and it is totally free of cost. It is freely available on internet.
5. Platform Independent
Once created, the PHP script can be executed on any machine irrespective of its platform. PHP script can be executed on number of
6. Efficiency
The efficiency of PHP is very good. PHP provides various advanced features through OOPS concepts and also a rich set of function
library which makes it efficient.
7, Flexibility
PHP is very' flexible language. It can be easily embedded with HTML. All the HTML tags can be used in PHP with all their
attributes. PHP can also integrate with other scripting languages like JavaScript or VBScript.
— ■ /
Ans.:
Use
can be decided. PHP supports
Conditional statements are use
code is executed.
<5$easy-soln ti ons
Scanned by CamScanner
statements;
else
Use
ISS ...
statements:
else
statements; . ■ ■■ ■ .
Syntax
switch (expression)
<
case constant_expression: ■
statements;
break;
case constantjexpression:
statements;
break;
defauh:
submenu;
)
Expression
It is usually name of a variable, value of which we want to check.
Constant_expression
These are the constant values with which the value of expression is compared. The statements in the case are executed, whose value
matches with the expression. If none of the constant expression is matched with the expression, then the statements written in default sfi
executed.
(II) Loops (Loop statement)
Loops are used to execute specific task repeatedly in our program. Rather than writing the code again and again we can 0
concept of loop. There are various situations when we may want to execute specific task multiple times. For example student mark
Here we want to accept details from student and want to generate the marks sheet. This task is obviously repeated for number of
In such situations we use the loops.
Scanned by CamScanner
IP-47
(i) While loop
' p is considered as an entry controlled loop. That means the condition is given at the beginning of loop. If the given
n oes not satisfy, the loop statements never get executed. If the condition is satisfied, then loop statements are repeatedly
Syntax
The do while loop is exit controlled loop. That is the condition is checked at the end of loop. Hence even if the condition does not
satisfy, the loop statements will be executed at least once.
Syntax
do
{ SWements;
Jwhilefcondilion);
J '
• PHP provides various types of functions to access and manipulate the strings. We will see some important functions.
The strtolowerQ function converts the string into lowercase format and return it.
Syntax
jstringl = "ISHITA"; .
echofc.nngl;
Output
. • . . , ■ ' . .
(2) PHP ucfirstQ function .
■ Ihis function convert the first character of string in uppercase and to nrtnn, the smng. _______
& jjsy-solu Ho n s
Scanned by CamScanner
jng (MU)
syntax
Example
slr
”kunu F ;
S rlss
uefir3t(J. tr | ) .
coho $,[►] .
?>
Output
Kuna!
<3 > PHP Icflrsto (unction d then return the strins..
rta
Tilts function converts the first character of string >n lo“'
Syntax
* ng Jcfin-t ( siring Ssir)
Example
<?php
"Phoenix":
'trl =lcfinsq$strl);
echo $strl;
Output
phoenix
(4) PHP ucwordsfl function rcise in the sentence and return the siring.
Syntax
string ucwords ( string Sstr )
Example
<?php
$strl = "my name is kunaT;
Sstrl =ucwords(Sstrl):
echo $sLrl;
...
string strrevf string Sstnng)
Example
ftasv-solunons
Scanned by CamScanner
IP-49
Output
luhaR
If not foi,nd
’ ’* wil1 relurn
FALSE. ‘
<?php
echo Slrposfl Jello friends!", "friends");
Output
0
Output
Hello world
<?php
echo chr(52) // Decimal value
echo” <br> chr(052); // Octal value
echo "<hr>\ chr(0x52); // Hex value
Output
R
(9) PHP strcmpO
This function compares two strings. If returns 0 if the two strings are equal. It is case sensitive. The chr() function returns a character
of given ASCH value.
Output
0
easy-soluuons
Scanned by CamScanner
(Mu;
1 1
‘•'■•’l' " | |h fl«» ftt< Ithr-r itif .| f
0 9
Por.pon.io.
| pnstjllinp
onto
GUI
Content
VIEW
F | g .5.1:MVCArcl'IW"‘>-'
' M (Model) stands for the raw data, the Vfview/user interface) wpresenls » ' m||ch m „ re( . |cnttf **7 '
linrmin ___ ! __ i i . . __ .n.,,., k (X/C tvnrk'S. then I i » • • '
Ans. :
1. Database Support
It is one of the most crucial aspects of every PHP development framework. We need to decide the framewotk depending
database we are going to use for web application.
For Example : 'Codelgniter' supports MySQL, Oracle, and SQLite, whereas the ‘Kohana’ framework doesn't.
2. Community and Documentation
The framework should be supported by a strong community, not just in terms of size but also in terms of activity and usefeha
Even if it’s a small community, user.should be able to get ample support from the community. A PHP framework should ahohav:
I
documentation. It should be comprehensive and up-to-date. The user guide should be relatively easy to follow.
3. Model View Controller Architecture
A framework should also use the Model View Controller architecture. Most of the good frameworks also offer libraries,
helpers, and extensions. It’s good to find a framework that lias at least (wo of these options.
Scanned by CamScanner
IP-51
XML
e.c Z Unguage is derive. fron , ZT* > tiered formal iike documents. transactions. d invoices.
Standard fonnat callcd
Language), to make it more suitable for Web- use * ° ’ SGML (Standard Generalized Markup
as follows :
1. Simplicity <_
XML can be easily understood. We can create our ow • a ca on 316 ree t0 ' eve
requirements and with our own conventions This mak” th*° P ’ °P system as per our
2.
The design process can be segmented to build the nlatform nt u • •'
a Can stored on one
on another page. It is possible to create the data * Pa Se while the formatting rules can be stored
create the website in stages and stay organiz nthe enti °Q W
° rk ° n deslgn
' XML aUows US l
°
3. Accessibility ’ %
IS makes the access of data easy and fast whenever there is need of making change in the data.
4. Standardization
1. Character
An XML document is a string of characters. Almost every legal Unicode character may appear in an XML document
The processor analyzes the markup and passes structured information to an application. The specification places requiremei
what an XML processor must do and not do, but the application is outside its scope. The processor (as the specification call
■ °ft en referred to formally as an XML parser.
Scanned by CamScanner
■Internet p r _
" — (Mu
3> Ma
P and Content
The characters
at m i • ..
wrs makino
~V "‘. iS 3
'° SiCa ' d0CUmem
“'"P™"' 'hat either begins with a start-tag and ends with a■ and ma y contain maikup
men tag Charactos
ineZ t
' ' the start-ug and end-tag. if any. are die elemen
ngofte
r elements which are called as child elements.
An example is ■ ......
'<>, w orld!</greeting>.
Another is
< line-break />.
6
- Attribute
A
" a ' ln ' bU,e is a marku
P construct consisting of a name-value pair that exists within a start-tag or emply- "' lag.
Example
f' . .....
« ry- r s"
e the names of the attributes are "src" and ait", and their values are " Rose.jpg and .
Another example is <step number="3">Connect A to B.</step>, where the name of the attribute is number M An
attnbute can only have a single value and each attribute can appear at most once in each element. In the c -
t of multiple values is desired, this must be done by encoding the Hri into a well-formed XML attribute with some
XML defines itself. UsuaHy this is either a comma or semi-colon delimited list or. if the individual values are known no to paces,
a space-delimited list can be used. <div class="inner greeting-box”>Welcome!</div>, where the attnbute class has nner
B ng box and also indicates the two CSS class names "inner" and "greeting-box".
7. XML Declaration
XML documents may begin with an XML declaration that describes some information about themselves.
Ans. :
I 1. /Long Form IhTML stands for HyperText Markup Language. XML stands for extensible Markup Language.
/ 2
' Purpose HTML was designed to display data which concentrates on XML was designed to store and transport the
look of data.. stored data.
/ 3. Markup Language ITML is a markup language itself. > ■ XML provides a framework for defining markup
languages.
... 4. Jse . F1TML is used for presentation purpose. XML is not used for presentation purpose.
easy-solutions
Scanned by CamScanner
Sr- > P«r*«wier
XML
‘ tmn.
■------- -----------
LLJSi eMt- ’XXfL'n cxm: sensitive. ______________
i iT 1 ' ------------— ' 1 " ~
f----- - 1 met oof) u? - (XML allows user defined up
/ T /Restrictions /hTML is Ctexrrk tz> syntax. £.g -no need to closelxML makes it compulsory for the user to close all
I / I
• the up. _______ _ (the tags. ______
1 8- l 'hite Space /HTML does not pmerve wiw space 'XML presenes white space.
1 9. {staTac or Dyr.am>: 'HTML ____________ _______ ________ IxML is dynamic. __________________ __________
Ans. :
DTD
DTD
vocabai of ** *S 3 W3
- helps to describe specifically the XML language.
XML language An application can tale i
•p of a DTD against the grammadcal rales and regulations of the suitable
ji Well-formed : An X.'.fL document it Cons 13
'«*=d 4as H-forrned if *s V2l,d Generallv ar. XML document is defined as :
-pen-ckne tags are
CTti'X.SD
X'.'i. Dx XLS
Syntax
j
Scanned by CamScanner
Pr
9LQ£9 m ming (MU)
. In syntax, the DTI. attributes start with <!ATTLIST keyword if die dement contains the attribute.
<l<nifnt-nainc specifics the name of the clement to which die attribute applies,
ntlribute-iiiiine specifies the name of the attribute which is included with die element-name.
<!DOCTYPE Syntax
Example
<?xml version “
<!DOCTYPE Details [
It is necessary to declare all lite attributes in Document Type Definition (DTD) using an Attribute-List Declaration which we want to
use in XML document. Attributes may appear in either start or empty tags. ATTLIST keyword should be in upper case. Duplication of
attribute names is not allowed in the attribute list for a given element.
Attribute Types
When attributes are declared, we can specify how the processor will handle the data of attribute value. The attribute types are
categorized in three different categories :
Ans. : .
Entitles In XML
example the less than « ) and the greater than ( > ) sytnM a Tr "it t " °'
one of these symbol. tire data would Ire t ta , ,et d To 7 T “*
h SCenw E lieS UScd
to indicate .tort of an entitv. Dre ______a 2 L? ‘* ’ "" «• H* W™"d (*) symbol is msened
LESS THAN
GREATER THAN
& AMPERSAND
M
quotations
&RpOS
apostropher
a» easy solutions
Scanned by CamScanner
— ......... .. frV,
XML Sitemaps? Name some different types of sitemaps. Explain main benefits of utlny tu
May 16,
0-» Bl
A *:
• gitcrnaP
s basically the map that contains information of all located resource on a website. It helps users, as well as search er. .’zs,
ldn
S' \ • a website for their required object. On the other hand it also helps them to improve their search (for wzr) -ard indexing
to ’J e (f° r searc en ines
XML Sitemaps can have two types. Index Sitemap (how many URL sitemaps a wetnite have;.
understandable by humans but search engines do un erstan resources of website with their information. Fast and secure
availability, importance, type of object, how frequently it gets changed etc. .------------------------- - ---------------------------------
Malte a general diagram for any appHcatlon
Dec. 16, May 17, Dec. 17
Should show various technoiogles/toois used for creating such application.
Ans. :
Web services
available to develop web-based applications. Some applications, are developed
WUh
offers a common p.atform which helps the various applications built on
ent plaltorms to comm • comraunicalio „ between two
A Web Service s a software. compomm , h dev Pc J. pe ~ ~
.Net
Web Service Application
Application
A Web Service is any software component which is avai.ahle on internet. The standardized XML messaging system is used by the
Web Service for communication purpose. All communications are encoded through XML.
c a s y s o I u 1i o n s
Scanned by CamScanner
IP-56
Internet Programming (MU)
Example
An XML message is sent by the client to invoke the Web Service and also waits for XML response. The Web Service is not
dependent on any operating system since the communication is done in XML. Application in any platform can interact with any other
application of any platform. Web Services are modular, dynamic, distributed and self contained software components which can be easily
published, located and also called over the network or internet. Web Services are built on the standard languages like HTML, Java, XML
and with standard protocols like TCP/IP and HTTP.
Distributed systems
Distributed systems have been a part of computer science for decades. They are systems where different components in a network,
communicate with each other and coordinate their actions only by passing messages. A component may be a program execution on a
computer or a device such as a computer or a printer. It is a rather simple definition, but it covers the entire range of systems that can be
called distributed systems. Both the general characteristics and some of the specific characteristics of distributed systems are explored.
Web services
Web services technology is a relatively new development. It is based upon the principles of distributed systems. A web service is a
set of functions that are published to a network for use by other programs. Many people regard web services as a technology only for
publishing software services on the Internet via browsers, while others regard them as the new big thing in distributed computing that is
working as general purpose architectures. Both the general characteristics and some of the specific characteristics of web services are
explored.
Evaluation
Web services contain many features which satisfy the goals of distributed systems. And in many cases they will probably be the
appropriate way of designing a distributed system.
Service
Broker
UDDI
f(x)
Service Service
Requester Provider
However there are limits to when web services can be used as foundation for distributed systems. It is probably better to use a
distributed solution internally in an organisation or system and to use a web service solution in smaller and less trivial solutions, especially
if the web service is made by an external party.
WSDL
WSDL was developed jointly by Microsoft and IBM. WSDL stands for Web Services Description Language. WSDL is the standard
format for describing a Web Service. WSDL is an XML based document which contains the information regarding Web Services like
names. of methods, method parameters and how to access the methods. WSDL also contains information regarding which operation the
Web Service will perform. WSDL is used for information exchange in decentralized and distributed environments. WSDL is a part of
UDDI, an XML-based worldwide business registry. It works as an interface between various Web Service applications. WSDL is
pronounced as wiz-dull. The WSDL describes services as collections of network endpoints, or ports.
e a s v s o I u 11 o n s
Scanned by CamScanner
Tbe W5DL frcvkies an XML format for documents tor this purpose. the abstract definitions of port*. And mess Ages ;" v
mom thesr ccocreie use or im-anoe aUovx'mg 2x reuse of be so dehnitions. ,-\ port is d*tme\l b\ Associating anetwoik
siinrss '*'■->- - rws He Hndimg. ard a col'-eonon of ports defines a service, Messages are abstract descriptions of the data being exchanged*
port types m ibsmuo: ool’oo oos of supported operations. The concrete protocol and data format specifications for a particular port
type oorsnmtes a reusable boding. 'vbere the operations and messages are then bound to .1concrete network protocol and message tonu.it.
la this *ray. WSDL describes the public interface to the NVeb service. WSDL is often used in combination with SOAP and anXML
<v±jematt> rrcxide Web senioes over the IntemeL A client program connecring to a Web senior can read the WSDl hie to determine
Any special dam ppes csed are embedded in the WSDL file in the form of XML Schema. The client can then use SOAP to auu.dh
«r coe of the opemdcms listed in the WSDL nle using for example XML over HTTP. Tbe current version of the specification
version 1.1 has rsx been approved by me W?C but version 2.0 is a W?C recommendation.
es
b?
cort Tyoe
operation
input }
cutnut 1
binding
service
Iend po -nt
am
Fi£. M : Representation of con
The acronym 01
concent cn resour.
ft'.- . Example ,
erAddiesU/employe . VUll
l ™• ’* 'K
-an iv| s olx
IBWeanofGET . the
Scanned by CamScanner
■ ■■ ■ ij
REST ttrvia
G£f
http y/Pr»»xp/.GioCe
coo /eo .ployvt
__________ _ ____
Service “
Provider 4
f .C.5
3. Can use SOAP : SO.AP can be used by the RESTfuJ Web Sendees the .'zu>beiiicuxt.4<i
4. Permits different data formal : Io RESTfd Web Serna. dt« ri dtttweti’ Jv.oaU tit* Z. /■-<■:. tV," •«'! v»» »
can be used.
1. Modekview-controller ( W VC)
Mam tanrwofo foltow the MVC par.«, * « tr.e l« to* tofo ,.«r int ,X . Tfe
is gemxaDv considemd a ®ood ptaato as it modtiarizes .n
applications, tins petmtts diffamnt newo So te pmsamoc,. «t* » «dt d'.e .«««««« atd ,-or
pltcicions.
Mos! MVC frame works follow a pusM«&ed aruhnectstre alz. ualH? ice tichnns th# do he
lts,u,w MVC
required processing, and then ‘push’ the dike io the >:iev > ’
Stripes. Diamond. CodeSgnrter <re jooc examples of tins .wUtitfctnust Ai aii'.r.uitl'’-’. 1ii« ■* irhiuv ir-, lAnteriirte
called "component-based* . These framew'otfcs Atari wrtn tiie >'iev w-yv*,. whn’Jt !tirrt 'pill* .whIu- iittm nniUip!**- . titrulleTe 3
In this architecture. .multiple cynttoliety- van t*e:m v-itt t hmg’r > /t -v ■;«*?. Fv* tpM'c<o.-
easy
Scanned by CamScanner
Internet
IP-59
q Three-tler organization
J. Frameworks typically set the control flow of a program and allow the user of the framework to ’’hook into" that flow by exposing
various events.
2. Web template system : Frameworks provide web template system which is used in web publishing to allow web designers and
developers to work with web templates for the automatic generation of custom web pages, such as the results from a search.
3. Caching : Frameworks offer Web caching which is die caching of web documents in order to reduce bandwidth usage, server load.
and perceived "lag".
4. Security : Some web frameworks come with authentication and authorization frameworks, that enable the web server y
users of the application, and restrict access to functions based on some defined criteria. Dropal is one example that provides role-
based access to pages, and provides a web-based interface for creating users and assigning litem o
Database access, mapping and configuration : Many web frameworks create a unified API to a database “ —
applications to work with a variety of databases with no code changes, and allowing programmers to work with htgher-level
6.
zzz:zz:zzzz
templates. to generate the final code that the application can use to create, read, update •
xzz—
7.
frameworks, such as Drupal and Django, match the prov,
some others use rewriting techniques to translate the pr -
Features of Django.
Loosely Coupled
elements in the stack independent to each other.
The basic aim ofDjs
Scanned by CamScanner
Internet Programming (MU) IP-60
Advantages of Django
1. Object-Relational Mapping (ORM) Support
A bridge is provided by Django between the data model and the database engine, and also gives a strong support to a large group of
DBMSs such as MySQL, Oracle, Postgres, etc.
2. Multilingual Support
Multilingual websites are supported by Django with the help of its inbuilt internationalization system. This helps user to develop
website which can support multiple languages.
3. Framework Support
There is built-in support in Django for Ajax, RSS, Caching and several other frameworks.
4. Administration GUI
5. Development Environment
A lightweight web server is provided by Django to support end-to-end application development as well as testing.
□□□
Scanned by CamScanner