Bcs 053 Web Programming Study Notes
Bcs 053 Web Programming Study Notes
Contents
Block 1 Client Side.......................................................................................................................................3
Unit 1 – Web 2.0 and XHTML/HTML5......................................................................................................3
Web 2.0 and its difference from Web 1.0 – Page 6..............................................................................3
Technologies of Web 2.0 – Pages 6 & 7................................................................................................3
Blogging – Page 8.................................................................................................................................3
Social Networking - Page 8..................................................................................................................4
Web Services – Page 9.........................................................................................................................4
Data Streaming – Page 12....................................................................................................................4
Unit 2 – Style Sheets................................................................................................................................5
Cascading Style Sheets – Page 32 & CYP 1...........................................................................................5
CSS Rules format with an example – Page 32......................................................................................5
Class selector with an example – Page 43............................................................................................5
The Box Model of HTML – Page 45 & CYP 3.........................................................................................5
Div and span tags with example – Page 48..........................................................................................6
Unit 3 – Introduction to XML...................................................................................................................7
Need for XML – Page 57.......................................................................................................................7
XML Schema – Page 67-68...................................................................................................................7
Unit 4 – Programming with JavaScript – DOM and Events.......................................................................8
Definition of an Event – Page 93..........................................................................................................8
Unit 5 – Introduction to WAP and WML..................................................................................................9
WML Difference from HTML – Pages 106 & 109..................................................................................9
WML select Element – Page 114..........................................................................................................9
Block 2 Server Side....................................................................................................................................10
Unit 1 – The Server Side Scripting..........................................................................................................10
Static and Dynamic Web Pages – Page 7............................................................................................10
2 Tier and N Tier Architecture – Page 9-10........................................................................................10
MVC Architecture with a Diagram – Page 11.....................................................................................10
Request and Response – Page 15......................................................................................................11
Safe Methods – Page 16....................................................................................................................11
- PHP
- Ruby
- ASP.NET
- Java Server Pages
Blogging – Page 8
- A blog is an informational website maintained by its blogger (or author).
- It contains discrete entries or posts which are displayed in reverse chronological order (most
recent post appears first)
- Types of blogs
o Textual (most common)
o Art (art blogs)
o Music (mp3 blogs)
- In above example, the rule says that all the <p> elements should appear in Verdana font.
- If a server stores a web page as seen by users exactly as HTML and CSS, it is a static web page.
- Every user will see the same information on the web site.
- Sites designed in early stages of WWW were static. These were useful in showing brochure like
fixed content about an organization.
- For editing, the web administrator would manually edit the static HTML pages or change images
and their links on the HTML pages and reload them on the server.
- Main tools used for this editing were text editors like notepad.
- It was felt static websites were not flexible and lacked user interaction.
- User wanted that a web page be catered specifically to their requirements.
- This would require more user interaction.
- Therefore, websites now consist of JavaScript or Applets at the client side, as well as they may be
created at the server as per user interaction using a rich set of server side languages and
database tools.
- In general, whenever you want that parameters should not be visible in the URL, you should use
POST method else use GET method.
Scriptlets – Page 33
- In scriptlets, all scripting elements are grouped together
- Executed at request time, and makes use of declarations, expressions, and JavaBeans
- Can be written anywhere in the page
- Contains valid java expressions within <% %> tag which get inserted into _jspService() method of
generated servlet
- Syntax
o <% scriptlet code %>
- Or in XML:
o <jsp:scriptlet> code fragment </jsp:scriptlet>
Cookies – Page 61
- A cookie is a small piece of data sent from a website and stored in a user’s browser while a user
is browsing the website
- The cookie is sent alongside every request from the browser to the website thereafter.
- It is basically information about the user viz, username, password, id number, etc.
- When the cookie is sent from the browser, the server uses this information to identify the user
- Typically cookies are set at the beginning of the JSP page as they are sent as part of the HTTP
headers.
- Example on page 61
- Methods used
o Cookie cookieOne = new Cookie (“name”, “value”);
o Response.addCookie(cookieOne);
o Request.getCookies();