1 / 30

Welcome to Advanced programming

Welcome to Advanced programming. Spring 2011 Introduction. Instructor. Atif Aftab Ahmed Jilani Email: atif.jilani@nu.edu.pk URL: www.atifjilani.web.officelive.com Group: http://groups.yahoo.com/group/Advanced_Prog_Spring11 Office: Room (215-F 2 nd Floor Computer Science Block)

zamora
Download Presentation

Welcome to Advanced programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Welcome to Advanced programming Spring 2011 Introduction

  2. Instructor • Atif Aftab Ahmed Jilani • Email: atif.jilani@nu.edu.pk • URL: www.atifjilani.web.officelive.com • Group:http://groups.yahoo.com/group/Advanced_Prog_Spring11 • Office: Room (215-F 2nd Floor Computer Science Block) • Office Ext: 325 Office Hours: Displayed outside my office. Don’t visit other than these hours without a prior appointment, through email

  3. Overview of Course Goal is to give students a roadmap and make it easier for them to learn the details on their own • If you work hard, you will know the basics of a lot of different technologies and libraries • You will understand when they are used and the relative strengths and weaknesses The course will help to utilize the incredible power of component oriented, Network Centric and distributed computing of JAVAJ2SE and J2EE to create effective, scalable, maintainable, and adaptable applications to solve an extremely wide range of problems.

  4. Course is really 3 mini-courses Advanced (Client-Side) Functionality • Functionality that is useful even in single-process applications • Covers Objects, Classes, Streams, Collections, reflection, serialization, and beans. An Introduction to Distributed Computing • Builds on first part of course (especially streams, reflection and serialization) • Covers threads, sockets, and RMI

  5. Course is really 3 mini-courses Intro to Client-Server Frameworks • Redoes the RMI examples using a variety of different server APIs • Uses RMI (the “java” way to do distributed programming) as a source of intuition • JDBC, XML, Servlets, Java Server Pages JSPs, Java Server Faces JSF, Enterprise Beans etc

  6. Target Student Comfortable with Java • Has built, or could build, a single-user application Wants an overview of recent developments Wants an overview of client-server programming in Java Seeking for good carrier as a Sun Certified Java Developer

  7. Lecture Format Start with Q & A Main Lecture • No any short break in the middle This is not entirely a lecture course • There are in-class labs

  8. Outside of Class Download code and lecture materials from the margalla course folder Walk through examples and browse Javasoft documentation (2 to 3 hours) Do homework (some number of hours)

  9. Feel welcome • …with stupid questions • …to help your peers with new bright ideas. • (never share syntax though) • …to have fun and explore

  10. Cheating vs. Helping • Read the “Code of honor”. • Dare to talk with your peers. • Share ideas, not code/syntax. • Mention it in the report. • Don’t get stuck for too long. • This is a high pace course. • Don’t sit at home. Get up early and join your peers on campus. • Don’t cheat. • There are two kinds of people. Those who listen, and those who should listen.

  11. What is Java? • New and Effective OOP language • Run-time Environment (tools, class library, documentation) • Compiled for speed • Interpreted • Portable (architectural-neutral via JVM) • Directly supported by major OS’s • Apple, Linux, HP, Hitachi, IBM, Windows, Novell, Silicon Graphics, Sun, Tandem

  12. Write Once Run Anywhere

  13. What Can Java Do? • Two types of Java Programs • Applets • run within a Java-enabled browser • Applications • a standalone program that runs directly on the Java platform, examples • servers • servlet

  14. Java Platform Features • The essentials: Objects, strings, threads, numbers, input and output, data structures, system properties, date and time, and so on • Applets: The set of conventions used by applets. • Networking: URLs, TCP (Transmission Control Protocol), UDP (User Datagram Protocol) sockets, and IP (Internet Protocol) addresses. • Internationalization: Programs can automatically adapt to specific locales and be displayed in the appropriate language.

  15. Security: Both low level and high level, including electronic signatures, public and private key management, access control, and certificates. • Software components: Known as JavaBeansTM, can plug into existing component architectures. • Object serialization: Allows lightweight persistence and communication via Remote Method Invocation (RMI). • Java Database Connectivity (JDBCTM): Provides uniform access to a wide range of relational databases.

  16. Object Oriented Benefits • Better software design • different way of thinking about software • software can more closely models real world problem being addressed • domain experts can more easily participate in initial software design • Easier to maintain • changes are more localized • Easier to extend • easy to make extensions to existing functionality • Less code to write

  17. Features Important for Internet Language • Secure • Portable • sizes of primitive data types are the same in all implementations • don’t have to recompile to run on another platform • Fast • Simple to release

  18. Features Important to Developer • Object-Oriented (benefits discussed earlier) • Productive • fewer compiles are needed than with C/C++ • faster development cycle since linking is not required • Familiar • syntax resembles C and C++ • Garbage collection • avoids memory leaks (failing to free memory that will no longer be used) • avoids accessing freed memory • Extensible

  19. Aspects of C/C++ Improved in Java • Time consuming links • Confusing features • multiple inheritance, operator overloading, templates • Dangerous features • unsafe casts between unrelated types(Now controlled through generics) • array access w/o bounds checking • lack of memory management (garbage collection) • Non-OO features

  20. Reasons to Select Java • Web-based applications • common interface to applications/data inside and outside company • Portability • even for non-web-based applications • applications will run on all major platforms • Distributed Applications • RMI is easier and less expensive than CORBA but lacks services • Networking • supports TCP and UDP sockets • can access remote data using a variety of protocols

  21. Reasons to Select Java (Contd.) • Multithreading • can utilize multiple processors • more natural style of coding for some applications • Object-oriented • encourages better software design • easier to maintain, extend and reuse • Garbage collection • software is less prone to errors • Productivity • fewer source files need to be compiled when changes are made • eliminates time to repeatedly link executables during development

  22. Examples of Java’s Versatility • Standalone Application: TicTacToe • Applet: TicTacToe • Servlets: SelfTest Web site • Mobile Computing: Cell phones

  23. TicTacToe Standalone

  24. TicTacToe Applet

  25. SelfTest Website (using Java Servlets)

  26. PDA and Cell Phone

  27. JDK Editions • Java Standard Edition (J2SE) • J2SE can be used to develop client-side standalone applications or applets. • Java Enterprise Edition (J2EE) • J2EE can be used to develop server-side applications such as Java servlets and Java ServerPages. • Java Micro Edition (J2ME). • J2ME can be used to develop applications for mobile devices such as cell phones.

  28. Java IDE Tools • Borland JBuilder • NetBeans Open Source by Sun • Sun ONE Studio by Sun MicroSystems • Eclipse Open Source by IBM • And so on…

  29. Tentative Marks Distribution

More Related