100% found this document useful (1 vote)
1K views

BCS 053 Web Programming Solved Assignment 2019 20 PDF

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
100% found this document useful (1 vote)
1K views

BCS 053 Web Programming Solved Assignment 2019 20 PDF

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 26
www.techiya.in BCA Solved Assignment 2019-20 Course Code : BCS-053 Course Title: Web Programming Assignment Number: BCA (5)/53/Assignment/2019-20 Q1. a) What are the features of Web 2.0 that makes it different than that of Web 1.0? What is Web 3.0? What is a search engine? Explain how it is able to find information from the WWW. Explain the term "Web Services" and "Streaming". List the protocols/software that would be required to implement Web Services. List the features of any four different Web 2.0 technologies. ‘Ans: Adobe Flash, Microsoft Silverlight and JavaScript are used as rich web technologies in delivering web 2.0 in addition to Ajax, RSS and Eclipse. Its applications are based on the reorganized download methodology that made BitTorrent so fruitful that each downloader of content is also a server, sharing the workload and making the content more accessible. It can be a powerful lure for an enterprise; with interactivity promising to fetch more employees into daily contact at a lower cost. The use of web 2.0 technologies and tools aids greater participation in projects and idea sharing, thus ideally leading to better thought out design and more efficient production, strengthening bonds with customers and improving communications with partners. Web 3.0 is slated to be the new paradigm in web interaction and will mark a fundamental change in how developers create websites, but more importantly, how people interact with those websites. Computer scientists and Internet experts believe that this new paradigm in web interaction will further make people's online lives easier and more intuitive as smarter applications such as. better search functions give users exactly what they are looking for, since it will be akin to an artificial intelligence which understands context rather than simply comparing keywords, as is currently the case. Search engine is a service that allows Internet users to search for content via the World Wide Web (WWW). A user enters keywords or key phrases into a search engine and receives a list of Web content results in the form of websites, images, videos or other online data. Our gateway to the world: the World Wide Web (WWW) is made from information that travels across the Internet. When you look at a website, a program running on your computer (a web browser such as Google Chrome or Mozilla Firefox) pulls the information you need off a powerful, centralized computer (a web server). Each server may be firing pages out to hundreds, thousands, or millions of browsers at more or less the same time. A single web page might be downloaded from just one server orit could be built from separate parts downloaded from dozens of different servers all over the world. Web services The term Web services describes a standardized way of integrating Web-based applications using the XML, SOAP, WSDL and UDDI open standards over an Internet protocol backbone. XML is used to tag the data, SOAP is used to transfer the data, WSDL is used for describing the services available and UDDI is used for listing what services are available. Used primarily as a means for businesses to communicate with each other and with clients, Web services allow organizations to communicate data without intimate knowledge of each other's IT systems behind the firewall Streaming Streaming media is video or audio content sent in compressed form over the Internet and played immediately, rather than being saved to the hard drive. With streaming media, a user does not have to wait to download a file to play it. Because the media is sent in a continuous stream of data it can play as it arrives. Users can pause, rewind or fast-forward, just as they could with a downloaded file, unless the content is being streamed live. Web 2.0 technologies are commonly associated with web development and web design that facilitates interactive information sharing, interoperability, user- centered design and collaboration on the World Wide Web. Examples of Web 2.0 services include web-based communities, social-networking sites, video-sharing sites, wikis, blogs, mashups and folksonomies. Ql. b) Create a registration form using HTML for a Banking application. The form asks for the following information — Account Number (it should be of 16 decimal digits), Name of Account Holder (assume that joint accounts are not allowed), City and State of account holder (both should be selected from drop down lists, default value for City should be Lucknow and State be Uttar Pradesh), email ID (it should be validated), and selectable list of choice of services (using check boxes) such as Passbook Viewing, Money Transfer, Cheque Book issues, Bank Draft Issue etc. The form should include a SUBMIT button. You must also create a CSS file for this form. This CSS file should define font family; a bigger font size (16 points) for headings and for normal text font size of 12 points; font colour should be dark blue for the headings and dark green for normal text. The background colour of the entire form should be light yellow. Also write the code using JavaScript that validates the entered data when the user presses Submit button. You must demonstrate the form at the time of viva. Ans: Registration Form 46 || key == 8); www-techiya.in

REGISTRATION FORM


City
Account Number
Account Holder Name
State
E-mail ID





Services View Passbook Money Transfer
Bank Draft Issue
‘cheque">Cheque Book ‘submit" style='width:100' value="Submit">
echiya.in Q1. c) Using tables and Lists create two web pages first showing the timetable of the theory and practical counselling sessions of BCA with proper headings. This table should include Semester, course code, course name, batch number, session date and time and Venue (lecture room number or lab number). The second page should display an unordered list, displaying batch number and name of students in that batch. You should use
tags and create an internal CSS file which formats the web pages as follows: i. The content of the table heading should be in Italics. ii, The table heading should be shaded and every alternate row of table should have light blue as fill colour. The background of the table should be light green. The font of the unordered list should be Arial with font size 12 points. iv. You must demonstrate how change in CSS can change the display at the time of Viva. Ans: Timetable.html BCA Time Table

BCA Timetable


IIiiilIlIlillillililill
SemesterCourse CodeBatch NumberDate & TimeLab Number
IBCS- 011215-09-19,08:00AM-11PM08
ECO-01114-09-19, 08:00AM- 11:00AM15
lBCS-12215-09-19, 12:00PM- 01:00PM
BCSL-013¢/td>114-09-19, 03:00PM- 05:00PM07
IFEG-02115-09-19, 02:00PM- 5:00PM07
IIMCS- 011115-09-19,08:00AM-11PM05
114-09-19, 08:00AM- 11:00AM09
MCS-019115-09-19, 12:00PM- 01:00PM01
MCS-013114-09-19, 03:00PM- 05:00PM06
BCSL-021115-09-19, 02:00PM- 5:00PM10
BCSL-022115-09-19, 02:00PM- 5:00PM10
illMCS- 021122-09-19,08:00AM-11PM05
MCS-023121-09-19, 08:00AM- 11:00AM09
MCS-014121-09-19, 12:00PM- 01:00PM01
MCS-031121-09-19, 03:00PM- 05:00PM06
BCSL-032122-09-19, 02:00PM- 5:00PM10
BCSL-033122-09-19, 02:00PM- 5:00PM08
BCSL-034122-09-19, 03:00PM- 06:00PM05

Student.html Syllabus of BCS-053

Students in Batch


Batch 1

    Aryan
      Rohan
    Kirti
    Akash
      Divya
      Mayank
      Zayed
        Shikha
        Keshav
        Arman

      Batch 2

        Krish
        Rahul
        Raj
        Simran
        Priya
        Sandy
          Akhtar
          Salim
          Renu
          Ryan
        Q1. d) A Book store maintains the list of its Books using XML, Each Book has a unique ISBN number (you may use 13 digit ISBN number only) and should be used as an attribute in XML document. The document should also store the Book Title, One or more author names, price of the book and number of copies available in the store. Create an XML documents containing information of five such Book records. Also create the DTD for the XML document created by you. Ans: Book.dtd Book.xml 1865423597561 Iron Man Marvel 500 80 1802142035620 The Hulk Marvel 300 60 1756265412002 Avengers Marvel 700 200 178200032564 Spiderman Marvel 400 250 1852310003246 Captain Americac/Title> <Author>Marvel</Author> <Price>350</Price> <Copies>90</Copies> </Book> </BookStore> Q1. e) Write and demonstrate JavaScript code that changes the text entered in a text box of a form to uppercase when the user leaves that text box. You must use event handling. Make suitable assumptions, if any Ans: HTML <input type="text" name="keywords" class="uppercase" /> JavaScript S(function() { §(‘input').focusout(function() { // Uppercase-ize contents this.value = this.value.toLocaleUpperCase(); DM D Q1. f) What are the Objectives of WAP? Explain the working of WAP model. Explain the following WML elements with the help of an example: Ans: The objectives of the WAP Forum are: © To bring Internet content and advanced data services to digital cellular phones and other wireless terminals. © To create @ global wireless protocol specification that will work across different wireless network technologies. 10 * To enable the creation of content and applications that scale across a very wide range of wireless bearer networks and wireless device types. © To embrace and extend existing standards and technology wherever appropriate. ‘When it comes to actual use, WAP works as follows - © The user selects an option on their mobile device that has a URL with Wireless Markup language (WML) content assigned to it. © The phone sends the URL request via the phone network to a WAP gateway using the binary encoded WAP protocol. © The gateway translates this WAP request into a conventional HTTP request for the specified URL and sends it on to the Internet. © The appropriate Web server picks up the HTTP request. © The server processes the request just as it would any other request. If the URL refers to a static WML file, the server delivers it. Ifa CGI script is requested, it is processed and the content retumed as usual. © The Web server adds the HTTP header to the WML content and returns it to the gateway. © The WAP gateway compiles the WML into binary form. © The gateway then sends the WML response back to the phone. © The phone receives the WML via the WAP protocol. © The micro-browser processes the WML and displays the content on the screen. 1. Table The <table> element along with <tr> and <td> is used to create a table in WML. WML does not allow the nesting of tables Actable> element should be put with-in <p>...</p> elements 2. Images The <img> element is used to include an image in a WAP card. WAP-enabled wireless devices only supported the Wireless Bitmap (WBMP) image format. u 3. WBMP images can only contain two colors: black end white. The file extension of WBMP is ".wbmp" and the MIME type of WBMP is image/vnd.wap.wbmp" Select and Input The <select>..</select> WMI elements are used to define a selection list and the <option>...</option> tags are used to define an item in a selection list. Items are presented as radio buttons in some WAP browsers. The <option>...</option> tag pair should be enclosed within the <select>...</select> tags. The <input/> element is used to create input fields and input fields are used to obtain alphanumeric data from users. Q2. a) Differentiate between the following with the help of a diagram/example, if needed: (i) Three tier architecture and MVC architecture The three tiers may seem similar to the model-view-controller (MVC) concept; however, topologically they are different. A fundamental rule ina three tier architecture is the client tier never communicates directly with the data tier; in a three-tier model all communication must pass through the middle tier. Conceptually the three-tier architecture is linear. However, the MVC architecture is triangular: the view sends updates to the controller, the controller updates the model, and the view gets updated directly from the model. From a historical perspective the three-tier architecture concept emerged in the 1990s from observations of distributed systems (e.g,, web applications) where the client, middle ware and data tiers ran on physically separate platforms. Whereas MVC comes from the pre decade (by work at Xerox PARC in the late 1970s and early 1980s) and is based on observations of applications that ran on a single graphical workstation; MVC was applied to distributed applications later in its history. us wwwtechiya.in (ii) GET 1) In ese of Get request, only limited amount of data can be sent becuse data i ent in header 2) Get request is not secured because data is exposed in URL bar. 3) Get request cam be bookmarked. 4) Get roquast is idempotent . 1t means sacond request willbe Ignored until response of first request is delivered 5) Get request Ismore efficient anc use more than Post (iii) BASIS FOR COMPARISON Basic Processing Languages involved Affect Security Client side scripting and Server side seri GET and POST methods POST In case of post request, large amount of data can be sent because data is cent in body. bar. Post request is secured because dita isnot exposed in URL Post request cannot be bookmarked. SERVER-SIDE SCRIPTING Works in the back end which could not be visible at the client end. Requires server interaction. PHP, ASP.net, Ruby on Rails, ColdFusion, Python, etcetera. Could effectively customize the web pages and provide dynamic websites. Relatively secure. 13 Post request ie non-idempotent. Post request isless efficient and used less than get. CLIENT-SIDE SCRIPTING Works at the front end and script are visible among the users. Does not need interaction with the server. HTML, CSS, JavaScript, etc. Can reduce the load to the server, Insecure (iv) (wy) Q2. b) Expl HTTP server and Web Container HTTP Server: It provides HTTP Request and HTTP response. It handles request from client only through HTTP protocol. It contains Web Container. Web Application mostly deployed on web Server. EX: Servlet JsP Web Container: it maintains the life cycle for Servlet Object. Calls the service method for that servlet object. pass the HttpServietRequest and HttpServletResponse Object. JSP and JavaScript JavaScript is a Java language; however, it is of a different dialect. It makes use of the ECMASCript standard and is considered a dynamic, weakly typed, prototype based language that just so happens to have first class functions. This suggests the extent to which many different languages have had on JavaScript; however, it was designed to appear as Java — only in a format that is more feasible for non-programmers to work with. JSP pages are required to be compiled to Java bytecode classes in order tobe able to be executed. However, this compilation only really occurs one time — each time a change takes place to the source JSP file. This is because Java is a compiled language, and not a scripting language — meaning the code must, essentially, be translated to make the JSP compatible with the server. with the help of an example/diagram or write code for the following using JSP: (i) Use of dynamic includes option in JSP. The "\sp:include" tag includes the response or output of the pages dynamically. By using jsp:include tag, the included files are processed separately and included with final response only at runtime, that's why itis also called as jsp dynamic include. include.jsp 14 (i) <%@ page language="java" contentType="text/html; charset=ISO-8859- 1" pageEncoding="1S0-8859-1"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO- 8859-1"> <title>jsprinclude example This is a page
        Write a Scriptlet that displays first n natural numbers and their sum. You may assume n=10. You must use looping construct for the same. import java.util.Scanner; public class Exercise11 { public static void main(String[] args) { int i, n, sum=t { Scanner in = new Scanner(System.in); System.out.print("Input number: "); n= in.nextint(); t system.out.printin("The first n natural numbers are : "+n); for(i=1;i<=nji+4) { System.out.printin(i); sume } System.out.printin("The Sum of Natural Number upto "+n+ " terms: " +sum); } } ‘www.techiya.in JSP Life cycle JSP Life Cycle is defined as translation of JSP Page into serviet as a JSP Page needs to be converted into servlet first in order to process the service requests. The Life Cycle starts with the creation of JSP and ends with the disintegration of that. 1. Translation ~ 2. Compilation - Servet demo_jsp java is created 3. Classtoading - demo_jsp java isloaded into demo_jsp.class 4. Instantiation - Servlet demo_jsp is instantiated 6. Request Processing - 5. initialisation - Servlet Servlet demo_jspjava is demo_jsp is initialised executed using service method 7. Destroy - Servlet demo_jsp is destroyed 16 ww ti ™ hiya.in Use of ISP implicit objects -request and response SP implicit objects are created during the translation phase of JSP to the servlet. These objects can be directly used in scriplets that goes in the service method. They are created by the container automatically, and they can be accessed using objects. Request: © The request object is an instance of java.servlet.http.HttpServletRequest and it is one of the argument of service method © It will be created by container for every request. © It will be used to request the information like parameter, header information, server name, ete. © It uses getParameter() to access the request parameter. Response: © "Response" is an instance of class which implements HttpServletResponse interface * Container generates this object and passes to _jspservice() method as parameter © "Response object" will be created by the container for each request. © It represents the response that can be given to the client * The response implicit object is used to content type, add cookie and redirect to response page. Any one action element other than include. setProperty This property is used to set the property of the bean. We need to define a bean before setting the property Syntax: Enter the value of x, yand z Value of x: Value of y: Value of 2: calculate.jsp Enter the value of x, y, and z to calculate <%= "

        The value is "4(Integer.parselnt(request.getParameter("t1"))*Integer.parselnt(request.getP arameter("t2"))/Integer.parselnt[request.getParameter("t3")))+"

        "%> in Demonstrate the use of cookies by creating two cookies using JSP - username and password. Also write the JSP code to displays the values stored in these cookies on a web page. Ans: Cookie.jsp <%@ page language="java" contentType="text/html; charset=1S0-8859-1" pageEncoding="ISO-8859-1"%>
        Username:
        Password:
        Content-Type" content="text/html; charset=ISO-8859- Main_cookie,jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%4> <% Cookie username = new Cookie("username", request.getParameter("username"’)); Cookie email = new Cookie("password", request.getParameter("password")}; username.setMaxAge(60"60*10); password. setMaxAge(60*60*10); // Add both the cookies in the response header. response.addCookie| username ); response.addCookie| password ); 96> Cookie JSP Username: <%= request.getParameter("username")%> Password: <%= request.getParameter("password")%> ext/html; charset-ISO-8859-1"> d) Explain the process of application development and deployment; and develop and deploy the following application using this process: Develop and deploy a student management system for a small institute. A student can enroll for only one course at the institute by paying fee. The information about the student is recorded in a database table. You must create two database tables for this application; Student table should keep track of student ID, name, course code, fee paid; the Course table should have details like course code, course title, teacher name, start date, duration, fee of course. Your application should be able to enroll a new student; display list of all the students of a course; and add or delete a course. Make and state suitable assumptions. Ans: The process of software development and deployment services in India goes through a series of stages in step wise fashion that almost every developing company follows. Known as the ‘software development life cycle,’ these six steps include planning, analysis, design, development & implementation, testing & deployment and maintenance. Let’s study each of these steps to know how the perfect software is developed. 1. Planning: Without the perfect plan, calculating the strengths and weaknesses of the project, development of software is meaningless. Planning kicks off a project flawlessly and affects its progress positively. 2. Analysis: This step is about analyzing the performance of the software at various stages and making notes on additional requirements. Analysis is very important to proceed further to the next step. 3. Design: Once the analysis is complete, the step of designing takes over, which is basically building the architecture of the project. This step helps remove possible flaws by setting a standard and attempting to stick to it. 4, Development & Implementation: The actual task of developing the software starts here with data recording going on in the background. Once the software is developed, the stage of implementation comes in where the product goes through a pilot study to see if it’s functioning properly. 5. Testing: The testing stage assesses the software for errors and documents bugs if there are any. 6. Maintenance: Once the software passes through all the stages without any issues, it is to undergo a maintenance process wherein it will be maintained and upgraded from time to time to adapt to changes. Almost every software development Indian company follows all the six steps, leading to the reputation that the country enjoys in the software market today.

      You might also like