
CS6501/ CS6501 internet programming M.I.E.T. ENGINEERING COLLEGE (Approved by AICTE and Affiliated to Anna University Chennai) TRICHY – PUDUKKOTTAI ROAD, TIRUCHIRAPPALLI – 620 007 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING COURSE MATERIAL CS6501 - INTERNET PROGRAMMING III YEAR - V SEMESTER M.I.E.T./CSE/III/Internet Programming CS6501/ CS6501 internet programming M.I.E.T. ENGINEERING COLLEGE (Approved by AICTE and Affiliated to Anna University Chennai) DEPARTMENTTRICHY OF –COMPUTER PUDUKKOTTAI SCIENCE ROAD, &TIRUCHIRAPPALLI ENGINEERING – 620 007 SYLLABUS (THEORY) Sub. Code : CS6501 Branch / Year / Sem : CSE/III/V Sub.Name : INTERNET PROGRAMMING Staff Name : P.RAMESH SYLLABUS CS6501 INTERNET PROGRAMMING L T P C 3 1 0 4 UNIT I JAVA PROGRAMMING 9 An overview of Java – Data Types – Variables and Arrays – Operators – Control Statements – Classes – Objects – Methods – Inheritance - Packages – Abstract classes – Interfaces and Inner classes – Exception handling - Introduction to Threads – Multithreading – String handling – Streams and I/O – Applets. UNIT II WEBSITES BASICS, HTML 5, CSS 3, WEB 2.0 8 Web 2.0: Basics-RIA Rich Internet Applications - Collaborations tools - Understanding websites and web servers: Understanding Internet – Difference between websites and web server- Internet technologies Overview –Understanding the difference between internet and intranet; HTML and CSS: HTML 5.0 , XHTML, CSS 3 UNIT II I CLIENT SIDE AND SERVER SIDE PROGRAMMING 11 Java Script: An introduction to JavaScript–JavaScript DOM Model-Date and Objects,- Regular Expressions- Exception Handling-Validation-Built-in objects-Event Handling- DHTML with JavaScript. Servlets: Java Servlet Architecture- Servlet Life Cycle- Form GET and POST actions- Session Handling- Understanding Cookies- Installing and Configuring Apache Tomcat Web Server;- DATABASE CONNECTIVITY: JDBC perspectives, JDBC program example - JSP: Understanding Java Server Pages-JSP Standard Tag Library(JSTL)- Creating HTML forms by embedding JSP code. UNIT IV PHP and XML 8 An introduction to PHP: PHP- Using PHP- Variables- Program control- Built-in functions- Connecting to Database – Using Cookies-Regular Expressions; XML: Basic XML- Document Type Definition- XML Schema DOM and Presenting XML, XML Parsers and Validation, XSL and XSLT Transformation, News Feed (RSS and ATOM). M.I.E.T./CSE/III/Internet Programming CS6501/ CS6501 internet programming UNIT V INTRODUCTION TO AJAX and WEB SERVICES 9 AJAX: Ajax Client Server Architecture-XML Http Request Object-Call Back Methods; Web Services: Introduction- Java web services Basics – Creating, Publishing ,Testing and Describing a Web services (WSDL)- Consuming a web service, Database Driven web service from an application – SOAP TOTAL (L:45+T:15): 60 PERIODS TEXT BOOKS: 1. Deitel and Deitel and Nieto, ―Internet and World Wide Web - How to Program‖, Prentice Hall, 5th Edition, 2011. 2. Herbert Schildt, ―Java-The Complete Reference‖, Eighth Edition, Mc Graw Hill Professional, 2011. REFERENCES: 1. Stephen Wynkoop and John Burke ―Running a Perfect Website‖, QUE, 2nd Edition,1999. 2. Chris Bates, Web Programming – Building Intranet Applications, 3rd Edition, Wiley Publications, 2009. 3. Jeffrey C and Jackson, ―Web Technologies A Computer Science Perspective‖, Pearson Education, 2011. M.I.E.T./CSE/III/Internet Programming CS6501/ CS6501 internet programming M.I.E.T. ENGINEERING COLLEGE Sub. Code : CS6501 (Approved by AICTE and Branch/Year/SemAffiliated to Anna University : CSE/III/V Chennai) Sub Name : Internet programmingTRICHY – PUDUKKOTTAI ROAD,Staff Name TIRUCHIRAPPALLI :P.Ramesh – 620 007 COURSE OBJECTIVE Students will be able to: 1. Learn Java Programming. 2. Understand different Internet Technologies 3. Design and implement dynamic web page with validation using JavaScript objects and by applying different event handling mechanisms. 4. Learn server side programs using Servlets and JSP. 5. Be exposed to java specific web services architecture COURSE OUTCOMES On completion of course the students will be able to: 1. .Demonstrate how the real time logics are applied to basic java programs. 2. Understand, analyze and apply the role languages like HTML, CSS and protocols in the workings of web and web applications. 3. Create and communicate between client and server using Java and create a good, effective and dynamic website. 4. Understand about network and security programming using Java and know about the application of dynamic page functionality in web pages using Servlets, and JSP. 5. Design and implement simple web page in PHP, and to present data in XML format 6. Make clear a web services and client presentation using AJAX. Prepared by Verified By STAFF NAME HOD P.RAMESH Approved by PRINCIPAL M.I.E.T./CSE/III/Internet Programming CS6501/ CS6501 internet programming UNIT I JAVA PROGRAMMING 1.1 AN OVERVIEW OF JAVA Java is an Object-Oriented Language. As a language that has the Object Oriented feature, Java supports the following fundamental concepts: 1.1.1 C++ Vs Java Object - Objects have states and behaviors. Example: A dog has states - color, name, breed as well as behaviors -wagging, barking, eating. An object is an instance of a class. Class - A class can be defined as a template/blue print that describes the behaviors/states that object of its type support. Objects in Java: Let us now look deep into what are objects. If we consider the real- world we can find many objects around us, Cars, Dogs, Humans, etc. All these objects have a state and behavior. If we consider a dog, then its state is - name, breed, color, and the behavior is - barking, wagging, running If you compare the software object with a real world object, they have very similar characteristics. Software objects also have a state and behavior. A software object's state is stored in fields and behavior is shown via methods. So in software development, methods operate on the internal state of an object and the object-to- object communication is done via methods. Classes in Java: A class is a blue print from which individual objects are created. A sample of a class isgiven below public class Dog{ String breed; int age; String color; void barking(){ } void hungry(){ } void sleeping(){ } } M.I.E.T./CSE/III/Internet Programming Subject code/Name: CS6501 internet programming 1.2 Data Types and Variables Type Capacity Range Default value byte 1B ( 8 bits) -27 to 27 - 1 0 short 2B (16 bits) -215 to 215 – 1 0 int 4B (32 bits) -231 to 231 – 1 0 long 8B (64 bits) -263 to 263 – 1 0.0L float 32 bits IEEE 754 floating point 0.0f double 64 bits IEEE 754 floating point 0.0D boolea n 1 bit True / False False ‗\u0000‘ to char 16 bits ‗\uffff‘ NA A class can contain any of the following variable types. Local variables: Variables defined inside methods, constructors or blocks are called local variables. The variable will be declared and initialized within the method and the variable will be destroyed when the method has completed. Instance variables: Instance variables are variables within a class but outside any method. These variables are instantiated when the class is loaded. Instance variables can be accessed from inside any method, constructor or blocks of that particular class. Class variables: Class variables are variables declared with in a class, outside any method, with the static keyword. A class can have any number of methods to access the value of various kinds of methods. In the above example, barking(), hungry() and sleeping() are methods. Below mentioned are some of the important topics that need to be discussed when looking into classes of the Java Language. 1.3 Array Normally, array is a collection of similar type of elements that have contiguous memory location. Java array is an object the contains elements of similar data type. It is a data structure where we store similar elements. We can store only fixed set of elements in a java array. M.I.E.T./CSE/III/Internet Programming Subject code/Name: CS6501 internet programming Array in java is index based, first element of the array is stored at 0 index. Advantage of Java Array Code Optimization: It makes the code optimized, we can retrieve or sort the data easily. Random access: We can get any data located at any index position. Disadvantage of Java Array Size Limit: We can store only fixed size of elements in the array. It doesn't grow its sizeat runtime. To solve this problem, collection framework is used in java. Example: class Testarray{ public static void main(String args[]){ int a[]=new int[5];//declaration and instantiation a[0]=10;//initialization a[1]=20; a[2]=70; a[3]=40; a[4]=50; //printing array for(int i=0;i<a.length;i++)//length is the property of array System.out.println(a[i]); } } Output: 10 20 70 40 50 1.4 OPERATORS AND CONTROL STATEMENTS M.I.E.T./CSE/III/Internet Programming Subject code/Name: CS6501 internet programming Java provides a rich set of operators to manipulate variables. We can divide all the Java operators into the following groups − Arithmetic Operators Relational Operators Bitwise Operators Logical Operators Assignment Operators Misc Operators The Arithmetic Operators Arithmetic operators are used in mathematical expressions in the same way that they are used in algebra. The following table lists the arithmetic operators − Assume integer variable A holds 10 and variable B holds 20, then − Show Examples Operator Description Example Adds values on either side of the + (Addition) A + B will give 30 operator. Subtracts right-hand operand from left- - (Subtraction) A - B will give -10 hand operand. Multiplies values on either side of the * (Multiplication) A * B will give 200 operator. Divides left-hand operand by right-hand / (Division) B / A will give 2 operand. Divides left-hand operand by right-hand % (Modulus) B % A will give 0 operand and returns remainder. ++ (Increment) Increases the value of operand by 1. B++ gives 21 -- (Decrement) Decreases the value of operand by 1.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages167 Page
-
File Size-