Вы находитесь на странице: 1из 9

SIX MONTH INDUSTRIAL TRAINING MID-TERM REPORT (DEC MAY 2012) Submitted in the partial fulfillment of the requirements

s for the 8th semester curriculum of degree of Bachelor of Engineering in Computer Science &Engineering at PANJAB UNIVERSITY, CHANDIGARH

Under the guidance of: ge Sandeep Kumar Gupta Bamber Director rofessor(PU, Chd.) Sakaar Microsolutions. ai rofessor(PU, Chd.)

Training Inchar Dr. Sukhvinder Singh Assistant P Sh. Surinder S Khuran Assistant P

Swami Sarvanand Giri Panjab University Regional Centre, Hoshiarpur Acknowledgement Words often fail to express ones inner feelings of gratitude to his benefactors a nd mentors with a dispense of indebtedness, I thank my trainer who have enrich ed me with the experience and helped at different time during the entire course of training. I wish to express my deep sense of gratitude to my Director, Sandeep Kumar Gupta for his able guidance and useful suggestions who helped me lot during the train ing in solving my problems & clearing my doubts. I take immense pleasure in than king Dr. Sukhvinder S Bamber and Mr. Surinder S Khurana for having permitted me to undergo training at Sakaar Microsolutions. I feel, without this consistency in efforts and explaining the methodologies in such a lucid manner, it would never have been enhance my technical skills. Chall enging assignments and Industry exposure I got equipped me with techniques with which I can complete any task, starting from scratch. Finally, yet importantly, I would like to express my heartfelt thanks to my belo ved parents for their blessings, my friends/classmates for their help and wishes for the successful completion of this training.

Table of Contents 1. About Sakaar Microsolutions 4

2. 3. 4. 4.1 4.2 4.3 4.4 4.5 4.6 5. 5.1 5.2 5.3

Introduction to Work Assigned Work Progress in Detail Technical skills acquired till date Servlet & JSP 13 Apache TOMCAT 14 MySQL 15 HTML, CSS & JavaScript 15 Data Access Object Pattern (DAO Pattern) MVC Design Pattern 17 Future Scope and Conclusions 18 HTML5 18 Jasper Report 18 Conclusion 19

6 8 13

16

About Sakaar MicroSolutions Sakaar Micro Solutions is a leading Web Development Company in India offering hi gh quality and cost effective offshore web development services to organizations around the world. We constantly upgrade the skill levels of our resources so th at professional level of competency is ensured through our services. As a prof essional web development Company, our key strength lies in effectual web applica tion development . Since our inception, we have been able to build a great numbe r of stylish yet functional websites and portals for global clients. We, the Web Developement Team at Sakaar Micro Solutions, recognize the role pl ayed by technology and internet enabled software in converting simple static web sites to powerful applications oriented dynamic value centres. The use of databa se management techniques, structured back-ends and easy-to-use customer interfac es make the site an interactive, two-way communication and transaction channel b etween the organization and its target group. We make use of latest Microsoft Technologies and Linux Platforms to build practi cal and easy-to-implement applications for our client s websites. These range fr om Knowledge Management Kits, Discussion Boards and Data Libraries to Shopping C arts and Payment Gateways. The Company specializes in offering customized soluti ons to clients which suit their business needs best. In other words, we believe in the evolution of simple websites to interactive co st saving and revenue generating centres. We can develop advance systems that ca n handle mass amounts of data and transactions. It doesn t matter how small or b ig your Company is, we have Web Development solutions for any size of budget. Ja va Application Development India offers J2EE consulting, desktop application dev elopment and Java web application development. We have completed lot of project on JAVA based features as a Swing to highlight window application. MLM Software: MLM is abbreviation for Multi-Level Marketing, a hierarchical mark eting system in which the goal of salespersons is not only to buy and sell the p

roduct in question, but also to recruit others to buy and sell the product in qu estion, who will in turn recruit others...ad infinitum. Each salesperson receive s a portion of the entrance fee paid by his / her recruits, and a portion of the profits earned by all salespersons below him / her in the sales chain. This is also called as multilevel marketing, multi-level marketing, matrix marketing, ne twork marketing etc. Multilevel marketing (MLM) plans, also known as "network" or "matrix" marketing, are ways of selling goods or services through distributors. These plans typical ly promise that if you sign up as a distributor, you will receive commissions for both your sales of the plan s goods or services and those of other people yo u recruit to join the distributors. Multilevel marketing plans usually promise t o pay commissions through two or more levels of recruits, known as the distribut or s "downline." Our MLM solutions are customizable to any business logic and an y downline structure i. e. Matrix / Unilevel / Australian / Binary. Whatever is your business logic, we have a comprehensive solution for you. E-Commerce is nothing but exchange of goods and services for money, being conduc ted via electronic medium like the Internet. Customers opt for online stores bec ause they can be more convenient than brick and mortar stores. However, one of t he biggest challenges of conducting an online business is making sure that the c ustomers trust clients website. To be a successful online store, clients need to instill trust in their customers. Your online business needs to provide a stron g framework for trust, where the customers can purchase the client products and/ or services at display with ease and in a fully secure environment. This is wher e Sakaar Micro Solutions steps in and helps you in every possible way in providi ng powerful, effective, secure, customized and reliable e-commerce solutions.

Introduction to work assigned During the training, I learnt many new technologies & learnt the best practices to be a good software developer & write clean & maintainable code .Maintainabili ty is the biggest cost in the lifecycle of the software. Hence writing a maintai nable & flexible code is important. In order to implement the new skills which I have acquired during the training. I have worked upon the project Online Nation al Polling. We live in a democracy and voting is one of our fundamental duties a s responsible citizens of the country.The project Online National Polling is des igned to provide a normal voter or citizen with a secure interface to interact w ith their candidates, caste vote, and view results in such a convenient way that is accessible from anywhere at any time. One person, one vote a guiding principle of Indian suffrage is devalued when votes are lost, miscounted, or erroneously discarded. Hence using the modern technology for the polling system can help sav ing the country from this awful electoral predicament.The idea of the project is to summarize all the efforts that were taken as an individual effort in order t o make a system capable enough to replace all the manual procedures that undergo ne to carry an election process from beginning to the end and display of the res ult. The main objective of this software is to increase the overall voting perce ntage. It will be used at the time of elections. Through this software people ge t their voter-id card easily and each voter will get a unique id no. to caste th eir valuable vote. Technologies required to implement the project as a web based platform:

Java/J2EE Client Side Technologies HTML, JavaScript, Ajax. Following is the list of the work which I have performed during training: Implementation & practice of the HTML & CSS concepts to improve the design & loo k & feel of the web page. Implementation & practice of the concepts of JavaScript to create dynamic & user interactive pages & for the validation of user input & to handle the events in the page. Implementation & practice of AJAX to improve the performance of webpage. Implementation & practice of servlets & its concept to handle all the requests f rom the webpage. Various concepts of servlets like Servlet API, various listener s in servlets etc. to handle the requests. Implementation & practice of JSP to dynamically create the view in webpage from the data retrieved from the java POJO classes or the controller. Practice of var ious concepts in JSP like JSP standard functions, JSTL, EL expressions & EL func tions. Implementation & practice of MVC pattern & DAO pattern to provide flexibility & maintainability of the web project. This pattern logically separates different l ayers in the project so that changes in one layer dont affect other. Implementation & practice of the various SQL queries to retrieve & insert data i nto the database. Implementation & use various idioms of the collection hierarchy.

Work Progress in Detail During the 2 months training on different technologies, I explored the technolog ies in depth. I use to implement all the concepts and sub topics of a particular topic right after the training on the day it was discussed. The assignment rela ted to Collection is implemented with special emphasis due to its scope & import ance. With the knowledge of the learned technologies & skills, I have implemente d these in my current project i.e. Online National Polling. Project is being imp lemented using the java technology (JSP & Servlets) & client side technology HTM L, CSS & JavaScript. Details of the project are as described below. The main objectives of this project is to develop a online voting system to work in conjunction with the existing manual voting system so that 100% voting can b e achieved during the election time. This system provides an easy-to-use, faster , efficient and robust platform for the users to cast their precious votes durin g the election time from their homes only. This system also provides users to lo ok into the profiles of various candidates participating in the election & help them decide to choose their leaders. Candidates can register for their nominatio n through this system & can also run their election campaign through forums and chat-room. . The system would show the current statistics as well on the web sit e about how many votes which candidates have got & later when the voting ends th e administrator can add the manual poling results to the database to calculate t he final results which will immediately be flashed on the site. This system also allows candidates to modify selected portions of their profile after registrati on for nomination like the promises they make about the things to do after winni ng the election, their previous works, their experiences and a comprehensive abo ut me, etc. Different reports are generated at the end of elections for the det ailed analysis of results like percentage voting in different areas, percentage

of votes which each candidate get etc. Various functionality in the project is a s under: Online registration for the voter id card which will be verified and after verif ication only the registration will be validated and a voter id will be issued (a photograph will have to be uploaded). You can also think about any other secure method like digital signature. Those already having a voter id card can register for the online voting system, they will use their voter id as their user name and a separate password will be used for secure authentication. The election commission will be able to use the site to let the candidates regis ter for their nomination on the site and their officers will validate it. Candid ates can run their election campaign through forums and chat-room. A detailed profile of all the candidates constituency wise will be maintained so that voters can always know about the candidates of their area. Once registered when ever polling is done in any area that areas people will be able to vote for their favorite candidates. Mechanism to ensures duplicates voting (online & offline) is not happening. The system would show the current statistics as well on the web site about how m any votes which candidates have got. Later when the voting ends the administrator can add the manual poling results t o the database to calculate the final results which will immediately be flashed on the site. Candidates should be able to modify selected portions of their profile after reg istration for nomination like the promises they make about the things to do afte r winning the election, their previous works, their experiences and a comprehens ive about me, etc Generation of various reports of the statistical data during the voting.

Data Flow Diagram Context Level DFD of Online National Polling

Details Information

Query Information

1 Level DFD of Online National Polling

Use-Case Diagram:

Technical Skills acquired till date Following is the exhaustive list of skills I have acquired during the course of time so far: Servlet & JSP: Java Servlet technology and Java Server Pages (JSP pages) are server-side techno logies that have dominated the server-side Java technology market; they ve becom e the standard way to develop commercial web applications. These technologies br ing the Write Once, Run Anywhere paradigm to web applications. More importantly, if used effectively by following best practices, servlets and JSP pages help se parate presentation from content. Best practices are proven approaches for devel oping quality, reusable, and easily maintainable servlet- and JSP-based web appl ications. For instance, embedded Java code (scriptlets) in sections of HTML docu ments can result in complex applications that are not efficient, and difficult t o reuse, enhance, and maintain. Best practices can change all that. Servlets support a request and response programming model. When a client sends a request to the server, the server sends the request to the servlet. The servlet then constructs a response that the server sends back to the client. Servlets r un within the same process as the HTTP server. When a client request is made, th e service method is called and passed a request and response object. The servlet first determines whether the request is a GET or POST operation. It then calls one of the following methods: doGet or doPost. The doGet method is called if the request is GET, and doPost is called if the request is POST. Both doGet and doP ost take request (HttpServletRequest) and response ( HttpServletResponse). Serv lets are Java classes that can generate dynamic HTML content using print stateme nts. What is important to note about servlets, however, is that they run in a co ntainer, and the APIs provide session and object life-cycle management. Conseque ntly, when you use servlets, you gain all the benefits from the Java platform, w hich include the sandbox (security), database access API via JDBC, and cross-pla tform portability of servlets. The JSP technology--which abstracts servlets to a higher level--is an open, free ly available specification developed by Sun Microsystems as an alternative to Mi crosoft s Active Server Pages (ASP) technology, and a key component of the Java 2 Enterprise Edition (J2EE) specification. Many of the commercially available ap plication servers (such as Tomcat, BEA Web Logic, IBM Web Sphere, Live JRun, Ori on, and so on) support JSP technology. A JSP page is basically a web page with t raditional HTML and bits of Java code. The file extension of a JSP page is .jsp rather than .html. When a JSP page is called, it will be compiled (by the JSP en gine) into a Java servlet. At this point the servlet is handled by the servlet e

ngine, just like any other servlet. The servlet engine then loads the servlet cl ass (using a class loader) and executes it to create dynamic HTML to be sent to the browser, as shown in Figure 1. The servlet creates any necessary object, and writes any object as a string to an output stream to the browser. The next time the page is requested, the JSP engine executes the already-loaded servlet unles s the JSP page has changed, in which case it is automatically recompiled into a servlet and executed. Apache TOMCAT: Apache Tomcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specificati ons are developed under the Java Community Process. Apache Tomcat is developed i n an open and participatory environment and released under the Apache License ve rsion 2. Apache Tomcat is intended to be a collaboration of the best-of-breed de velopers from around the world. We invite you to participate in this open develo pment project. Apache Tomcat powers numerous large-scale, mission-critical web applications acr oss a diverse range of industries and organizations. Apache Tomcat, Tomcat, Apac he, the Apache feather, and the Apache Tomcat project logo are trademarks of the Apache Software Foundation. Tomcat 7.x implements the Servlet 3.0 and JSP 2.2 s pecifications. It requires Java version 1.6, although previous versions have run on Java 1.1 through 1.5. Tomcat is an application, a product of Software founda tion, that enables you to make a standalone PC work as a Server. This helps in t asks such as programming using Java Server Pages (JSP). By installing this softw are you can use your PC as a server and do any related task that a server does. To avail this benefit you need to download and install Tomcat (7.0 is the latest version) and configure it thereafter. The Java Servlet and Java Server Pages sp ecifications are developed under the Java Community Process Apache Tomcat develo ped in an open and participatory environment and released under the Apache Licen se Version 2. Apache Tomcat is intended to be a collaboration of the best-of-bre ed developers from around the world. Apache Tomcat powers numerous large-scale, mission-critical web applications across a diverse range of industries and organ izations. MySQL: MySQL is the world s most popular open source database software. With its superi or speed, reliability, and ease of use, MySQL has become the preferred choice fo r Web, Web 2.0, ISV, Telecom companies and forward-thinking corporate IT. MySQL is a key part of LAMP (Linux, Apache, MySQL, PHP / Perl / Python), the fast-grow ing open source enterprise software stack. More and more companies are using LAM P as an alternative to expensive proprietary software stacks because of its lowe r cost and freedom from platform lock-in. We want the MySQL database to be: The best and the most-used database in the world for online applications Available and affordable for all Easy to use Continuously improved while remaining fast, secure and reliable Fun to use and improve Free from bugs HTML, CSS & JavaScript: HTML, CSS & JavaScript are the client side technologies which are very important for client side interaction of the user. HyperText Markup Language (HTML) is th e main markup language for web pages. HTML elements are the basic building-block s of webpage. HTML is written in the form of HTML elements consisting of tags en closed in angle brackets within the web page content. HTML elements form the bui lding blocks of all websites. HTML allows images and objects to be embedded and can be used to create interactive forms. It provides a means to create structure d documents by denoting structural semantics for text such as headings, paragrap hs, lists, links, quotes and other items. It can embed scripts in languages such as JavaScript which affect the behavior of HTML web pages. Cascading Style Shee ts (CSS) is a style sheet language used for describing the presentation semantic s (the look and formatting) of a document written in a markup language. Its most

common application is to style web pages written in HTML and XHTML, but the lan guage can also be applied to any kind ofXML document, including plain XML, SVG a nd XUL. JavaScript is a prototype-based scripting language that is dynamic, weak ly typed and has first-class functions. It is a multi-paradigm language, support ingobject-oriented,[5] imperative, and functional[1][6] programming styles. Data Access Object Pattern (DAO Pattern): Many real-world Java 2 Platform, Enterprise Edition (J2EE) applications need to use persistent data at some point. For many applications, persistent storage is implemented with different mechanisms, and there are marked differences in the A PIs used to access these different persistent storage mechanisms. Applications c an use the JDBC API to access data residing in a relational database management system (RDBMS). The JDBC API enables standard access and manipulation of data in persistent storage, such as a relational database. The JDBC API enables J2EE ap plications to use SQL statements, which are the standard means for accessing RDB MS tables. However, even within an RDBMS environment, the actual syntax and form at of the SQL statements may vary depending on the particular database product. Thus there is a dirsct dependency between the application code & data access cod e. Such code dependencies in components make it difficult and tedious to migrat e the application from one type of data source to another. When the data source changes, the components need to be changed to handle the new type of data source . DAO pattern allows the application to change the underlying technology for the data persistence without allowing the application or user to know about the cha nge. Use a Data Access Object (DAO) to abstract and encapsulate all access to the dat a source. The DAO manages the connection with the data source to obtain and stor e data. The DAO implements the access mechanism required to work with the data s ource. The data source could be a persistent store like an RDBMS, an external se rvice like a B2B exchange, a repository like an LDAP database, or a business ser vice accessed via CORBA Internet Inter-ORB Protocol (IIOP) or low-level sockets. The business component that relies on the DAO uses the simpler interface expose d by the DAO for its clients. The DAO completely hides the data source implement ation details from its clients. Because the interface exposed by the DAO to clie nts does not change when the underlying data source implementation changes, this pattern allows the DAO to adapt to different storage schemes without affecting its clients or business components. Essentially, the DAO acts as an adapter betw een the component and the data source. MVC Design Pattern: Model View controller is a classical design pattern used in applications who nee ds a clean separation between their business logic and view who represents data. MVC design pattern isolates the application logic from the user interface and p ermitted the individual development, testing and maintenance for each components . This design pattern is divided into three parts. 1. Model- In MVC the model is the code that carries out some task. It is built w ith no necessary concern for how it will "look and feel" when presented to the u ser. It has a purely functional interface, meaning that it has a set of public f unctions that can be used to achieve all of its functionality. This component ma nages the information and notify the observers when the information changes. It represents the data when on which the application operates. The model provides the persistent storage of data, which manipulated by the controller. 2. View- The view renders the contents of a model. It accesses enterprise data t hrough the model and specifies how that data should be presented. It is the view s responsibility to maintain consistency in its presentation when the model cha nges. This can be achieved by using a push model, where the view registers itsel f with the model for change notifications, or a pull model, where the view is re sponsible for calling the model when it needs to retrieve the most current data. 3. Controller- The controller handles all request coming from the view or user i nterface. The data flow to whole application is controlled by controller. It for warded the request to the appropriate handler. The controller translates interac tions with the view into actions to be performed by the model. In a stand-alone GUI client, user interactions could be button clicks or menu selections, whereas

in a Web application, they appear as GET and POST HTTP requests. The actions pe rformed by the model include activating business processes or changing the state of the model. Based on the user interactions and the outcome of the model actio ns, the controller responds by selecting an appropriate view. Future Scope and Conclusions HTML 5: HTML5 is the hottest thing in web development. HTML5 is the newest version of th e HyperText Markup Language that was developed in the late 80 s in order to desc ribe documents that linked to each other. In its early days, HTML s role was sim ple...to help describe a document s structure and to allow cross-linking of docu ments. There are a couple of great new approaches that are taking place in the H TML5 description. HTML5 has its many new syntactical features, which include the <video>, <audio>, and <canvas> elements, as well as the integration of SVG cont ent. Due to these new elements, it will be very easy to integrate multimedia and graphical content to web without using flash and third party plug-in. There are also another new elements like <section>, <article>, <header> and <nav> which e nrich the semantic value of the document. HTML5 thus bring more tags to the libr ary for improving the structure & design of the webpage. It also provides more o ption to the user for finding out where you are in the world and sharing that in formation with people through Geolocation. New HTML5 geolocation APIs make loca tion, whether generated via GPS or other methods, directly available to any HTML 5-compatible browser-based application. One of the great new improvments in HTM L5 is the development of rich media tags like audio and video. Fully programmabl e with JavaScript, these tags offer incredible ease of use while also offering p owerful flexibility through extensive access to media elements through programmi ng. Jasper Reports: Jasper Reports architecture is based on declarative XML files which by conventio n have an extension of jrxml that contains the report layout. A lot of third-par ty design tools were produced to generate your jrxml file in a smooth way (like iReport or Jasper Assistant) Design file is supposed to be filled by report s re sult which is fetched from database, XML files, Java collection, Comma-separated values or Models. Jasper can communicate with those data-sources and more, it c an merge any number of data-sources together and manipulates the results of any combinations. This communication goes through JDBC, JNDI, XQuery, EJBQL, Hiberna te or existing Oracle PL/SQL. You also can define your own data-source class and pass it to jasper engine directly. After defining your report design layout in jrxml format and determining your data source(s) jasper engine does the rest of work. It compiles your design file and fills it with results fetched from data-s ource and generates your report to the chosen exporting format (PDF, Excel, HTML , XML, RTF, TXT , etc.) Use of Jasper reports in the project helps to generate th e statistical data in the project in various formats to help provide the clear & interactive view of the large & complex data. Conclusion The Java 2 Platform, Enterprise Edition (J2EE) defines the standard for developi ng multitier enterprise applications. The J2EE platform simplifies enterprise ap plications by basing them on standardized, modular components, by providing a co mplete set of services to those components, and by handling many details of appl ication behavior automatically, without complex programming. Use of Java in the project helps improve the security of the project. Other advantages include plat form independence which allows it to work in any OS like windows, Mac, Linux etc . & due to free availability of the Java based sources ,development cost is very less. Thus Java is very useful for developing Enterprise application. Developin g my current project with Java helps improve the modularity & structure of the p roject. During my training, I have considerably improved my Java concepts & lear nt the good programming practices.