C# and ASP.

NET Projects By Shivprasad Koirala Sham Shaikh
Visit us http://www.questpond.com for free interview question ebook. Mail bpb@bol.net.in to buy the book Write to the author directly at shiv_koirala@yahoo.com

The eBook is free but below are the limitation of this free ebook:-- The book has only 5 projects which are far less than what the actual book contains. -- Practical Videos and code walkthrough of the projects is not available for download. -- The book also has lot of installations provided in CD even that is not available for Download. Finally hard copy is a hard copy if you are interested below are the ways you can buy the book:• Buy directly from the Author call 09867628636. If you are buying from the Author you get a chance to meet him and believe us you will enjoy it. Please send DD of rupees 300 in favor of ( Please send us detail that you want a hard copy or Ebook CD) Shivprasad Bist E – 8 , Amar Nager , Hoechst Colony , Opposite Shriram towers Mulund West Mumbai 80. Call your city book shop MUMBAI-22078296/97/022-22070989,KOLKATA22826518/19,HYDERABAD-24756967,24756400,BANGALORE25587923,25584641,AHMEDABAD-26421611, BHATINA(PUNJAB)2237387,CHENNAI-28410796,28550491,DELHI/NEWDELHI23254990/91,23325760,26415092,24691288 Are you a Pakistani reader then contact M/s. Vanguard Books P Ltd, 45 The Mall, Lahore, Pakistan (Tel: 0092-427235767, 7243783 and 7243779 and Fax: 7245097) E- mail: vbl@brain.net.pk If you are not from india or pakistan :Page 1 of 215

Ray McLennan, director,Motilal (UK) Books of India,367 High Street. London Colney, St.Albans, Hertfordshire,AL2 1EA, U.K. Tel. +44 (0)1727 761 677,Fax.+44 (0)1727 761 357,info@mlbduk.com,www.mlbduk.com •

mail at bpb@bol.net.in Other books written by the Shivprasad Koirala and Team

Prakash books http://www.prakashbooks.com/details.php3?id=17875&c=Computer Books Amazon

Page 2 of 215

http://www.amazon.co.uk/NET-Interview-Questions-ShivprasadKoirala/dp/8183331475/sr=1-1/qid=1171080126/ref=sr_1_1/026-18911188556445?ie=UTF8&s=books

You can buy the above book from Prakash books http://www.prakashbooks.com/details.php3?id=19008&c=Computer Books Amazon http://www.amazon.co.uk/exec/obidos/ASIN/8183331033/qid%3D1136610981/0261344994-2263615#product-details

Page 3 of 215

You can buy the above book from Prakash books http://www.prakashbooks.com/details.php3?id=23073&c=Computer%20Books If you want to buy from Amazon http://www.amazon.co.uk/JAVA- interview-Questions-KoiralaShivprasad/dp/8183331734/ref=pd_ecc_rvi_2/203-1007750-6035147

Page 4 of 215

Page 5 of 215 .

............................................................................................................................................................................................................................................................................................................. 23 Behavior diagram ....................................................10 About the authors...................................................................................................................................................................................................................................................................................................................... 38 Page 6 of 215 ................................................................................................................................................................. 24 Model management diagram.................................................... 25 Deployment diagram.........................................11 Details of the book ............................................................. 27 Actors and Goals.............. 17 Iterative model ............................................................... 24 Overall Explanation of the UML diagrams............................................................................................................................................................................... 36 Estimation in projects........ 26 Use case diagram over view................................................................................................................................. 34 Composite structure diagram ............................................................. 25 Object diagram ............................................................................................................................ 26 Component diagram ............................................16 Waterfall.......................................... 25 Composite structure diagram ..................................................................................................................................................................................................................................................................................................................................................................................... 32 Class diagram .......................... 26 Overview diagram.............................................................. 26 Which diagram is important................................. 26 Package diagram ................................................................................ 33 Aggregation and composition............................................................................................... 26 Timing diagram................................................................................................................. 21 Essential documentation in projects............................................................................................................ 28 Included and Extended use case...................................................................................................................................................................................Table of Contents INTRODUCTION.................................................................................................. 36 Generalization and specialization ................................................................................................................. 26 Sequence diagram ....................................................................................................... 26 State machine diagram / Protocol state machine diagram ................................................................................................................................................................................................................... 32 Multiplicity..................................................................................................... 23 Structure diagram ......................................................... 19 Which is the best model? .............................................. 35 Reflexive associations...........................................................................................11 What’s in the CD........................................................................................................ 37 Basics of Function Points...............................................................13 The growth of a software professional...................................................................................................................................................................22 UML....................................................................................................................................................................................................................................................................................................................................................................10 Who should read this book ................................................................................................................................................................................................................................... 26 Activity diagram ........................................................... 19 V-model .......................................................................................................................................................................................................................................... 38 Application Boundary...................................................................................................................................................................................................................................................................................................................... 27 Detail Explanation of the Use Case template........................................................................................................................10 Dedication .................................................................12 PART I – THE FUNDAMENTALS ........................................................................................................................................................................... 25 Class diagram ............................................................................. 26 Use case diagram ...................................................................................................................................................... 30 Differentiate between Included use case and extended use cases?..................... 18 Evolutionary model...............................................................................................................13 SDLC (Software development Life Cycle)......................................................................................................................................................................................................22 Three views of the project from UML perspective............................................................................................................................................................................................................................ 26 Communication diagram......................................................................................................................................................................13 What does this book target..................................................................................................................................................................................................................................................................................................................................................................................................................................10 Foreword ..................................................................................13 CHAPTER 1 SDLC AND PROJECT DOCUMENTATION.............................................................................................................................. 32 Associations in Class diagrams ................................................................................................................................................. 37 Introduction to Function Points................................................................................................................................................................

.......................................................................................................................................................................................................................................................................................................................................... 101 CHAPTER 6 – FILE SEARCH MODULE...................68 CHAPTER 3 UNDERSTANDING THE IDE....................................................82 Basic SQL Commands..........................................................................................................................................88 SQL Server.............................................................................................................................................................................................................................................................................................74 CHAPTER 4 DATABASES AND ADO....................................................................................................69 Windows form Code walk through....................................................NET data provider.................................................................................65 Why OOPs...................................................................................................................74 Web Application Code walk through....................................................................................................................................................................................................................................................................................................................................................63 Testing Document....................................................................................... 46 On-Line update.....................................................................................................................................................................................................................................................................98 INTRODUCTION TO THE FUN PART ..................................................................................................................................................................................................................................................................................................................................................................93 Understanding Dataset...... 41 Data Communications....................................................81 MSDE Basics .......................................................85 ADO........................................................................... 48 Multiple sites...... 39 External Interface File (EIF) ........................................................................................................................NET data provider......................................................................................65 CHAPTER 2 OOPS PRIMER ........................NET Data Providers ........................................................................................................ 43 Distributed data p rocessing.........................................................................................................................98 CHAPTER 5 – LETS ROCK: ..................................................................................................................................................................................................................................................... 44 Heavily used configuration ........................................................................................................................................................................................... 44 On-Line data entry ............................................................................................... 47 Installation ease.............................................................................................................................................................Elementary Process........................................................................................................................................................................................................................................................... 40 DET (Data element types)............................................................................................................................... 45 End-user efficiency ........................ 48 Operational ease......................................................................................................................................................................................................... 107 Page 7 of 215 ......................................................................................................................................86 Introducing the .........................................................................................................................................................................................................66 Abstract classes and Interfaces.....................................................................................................81 Difference between SQL and MSDE..............................................................................................95 Microsoft Data Application blocks.............. 40 Record Element Type (RET)..........................................................................................................................................................................................................NET data provider.....................................................................................................................................................98 Overview of Mandelbrot project....81 Installation of MSDE............................................................................... 49 Function point template explanation..............................................98 How to start the Mandelbrot project.................................................98 What will you learn in this project........ 100 Code explanation...............................................................................................................................................................................THE MANDELBROT PROJECT......65 Fundamentals of OOPS..................................................................96 PART II – THE FUN PART......................................................................................................................................................................................................................................................................................88 The Command Object.............................................................................................NET .............................................................................................................................................................................................................................................................................................................................................................................. 38 Dynamic and static elementary process..90 The Command Object’s Methods..................64 UPDATE ADDRESS...................72 The IIS ...................................................................................................................88 ODBC..................................................................... 39 Internal Logical Files (ILF)............................................95 Sample code ........................................ 47 Reusability ..........................NET basics ......................................................................................................................................................................69 The IDE........91 Understanding DataReader ......................................................................................................................................................................................................................................................... 107 What will you learn in this project................................................................. 46 Complex processing..........................................................................................................................................................................................................................................................................................................88 OLE DB................. 49 Facilitate change ....................................................... 39 Elements of Function Points .......................................................................................................................................................................... 43 Performance ..........................................

................................................................................................................................................................................................................................................ 125 External Input (EI) explanation................................................................................................................................................................ 108 Threading Concepts.. 138 Login page explanation................................................................................ 126 Explanation of Total Estimation.................................................................. 107 Fundamentals to complete the project................................... 143 Deliverables in CD for this Project ...... 132 Class diagram.............................................................................................................................................. 163 Explanation of clsMenu and clsMenus........................................................................... 163 Entity collection relation ship..............Overview of File search Application............................................................................................................................................................................... 157 Architecture Explanation..................................................................................................................... 114 Code Explanation..................................................................................................................................................................................................................................NET .............. 159 Class Diagram Explanation........................................................................ 109 Delegates and event concept....................................................................................................................................................................................................................................................... 120 Starters Chat code........................................................................................................................................................................................ 150 Final Estimation........................... 164 Calling the validation bridge................................. 149 Explanation of EIF and EO ...................................................................................................................................................................................................................................................................... 149 Explanation for EQ ............ 119 CHAPTER 7 – RELIABLE COMPUTER CHAT APPLICATION......................................................................................................... 111 Class Diagram of File search Application ................................................................................................................................................................................................................... 119 What will you learn in this project.................................... 150 Explanation for GSC ........................................................................................................................................................................................................................................................................................................... 143 Overview of the Job Site Application......................... 161 Code Explanation....................................................................... 139 Login button click logic................................. 125 Internal Logical File (ILF) explanation...................................................... 137 Consuming the class library............................................................................................... 165 Explanation of the businessvalidation bridge......... 124 Estimation of the Chat Application......................................................... 142 CHAPTER 8 – JOB S ITE APPLICATION......................................................................................... 152 E-R Diagram Explanation................................... 150 Explanation for EI.................................................................................................... 119 Deliverables in CD for this Project ........... 151 Use Case Explanation .. 130 Details of the Use Case ............. 143 How to load the jobsite........................................................................................................... 127 Use Case ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. 149 Explanation of ILF ................................................................................................................................................................................................................................ 139 Displaying the chat message and the users.................................. 118 PART III – PROFESSIONAL PROJECTS ........................................................... 148 Estimation of the Job Site Application...................................................................................................................................................................................................................................................................................................................................................................................................................................................... 163 Explanation of the user class .................................................................................................................................................................................................................................................................................................. 165 Explanation of the reflection.............. 137 Auto refresh fundamentals.................................................................................................. 133 Code explanation................................................................................................................................................................................................................... 140 Change room and Send messages.............................................................................................................................................................................................................................................................................................................................. 119 Overview of Chat application ................................................................... 115 Enhancement in File Search Project............................................................. 143 What will you learn in this project......................................................................................................................................................................... 166 Page 8 of 215 ......... 108 File System....................................................................................................... 130 Caching fundamentals in ASP............................................................................................................. 125 External Inquiry (EQ) explanation...................................................................................................................................... 119 How to start the chat application................................................................................................................................................................................................................................................... 120 Whats wrong with the above code.........................................................................

.............................................. 173 Overview of the Quadra Client Application...............................................................................................................................................................................NET Interview Questions Book................................................................. 190 SQL Server Interview Questions Book ................................................................................................................ 184 CHAPTER 10 – POINTS TO BE NOTED IN PROJECTS ........................................................................................ 189 MSC Accounting package................... 206 Page 9 of 215 ...................... 167 Setobject to validate...................................................................... 183 Setting up the quadra client webservice...............................................................................Explanation of Validation library......................................................... Code Explanation......................................................................................................................................................................................................... 190 ...............Error! Bookmark not defined......................................................................................................... 168 Explanation of Data access.................................................................................................... 178 Use Case Explanation ................................................................................................................................................... 169 Explanation of UI .............................. 171 Deliverables in CD for this Project ........................................................................................................................... 189 Call centre project............................................................................................................................................................. 190 INTERVIEW QUESTIONS ............................................................................................................................................................ 178 Estimation of the Quadra Client Application............... 171 How to start the Quadra client....................................................................... 185 PROJECTS COMING UP IN SECOND EDITION............ 171 What will you learn in this project..................................................................................................................................................................................................................................... 181 Class Diagram Explanation...................................................................................................................................................... 172 Web service Fundamentals...................................................................... 170 CHAPTER 9 – QUADRA CLIENT W EB SERVICES ..................................................................................................................................................................................................................................................................................................................... 199 JAVA Interview Questions Book................................................................................................

Finally at the top of all thanks To two old eyes my mom and dad for always blessing me. travel and financial sectors.I am thankful to my wife for constantly encouraging me and also to BPB Publication to give new comer a platform to perform.Thanks to my family to support me.Introduction Dedication From Shivprasad koirala This book is dedicated to my kid Sanjana. I am blessed to have Raju as my Brother who always keeps my momentum moving on. point typo / grammar mistakes or Page 10 of 215 . I started this book with one of my friends Rajesh Nair and Pravin Joshi. But on the top of all. whose dad’s play time has been stolen and given to this book. Rajesh nair is almost the co-author of the book. It was his tiresome three months of continuous writing that we have finally made it. But yes that does not upset me a bit. Sainath to put his experience which has brought the value of book to an elite level. Thanks to Shaam for all the effort. give me confidence to make this book a success. No one is perfect and same holds true for me . suggest. The value they had put in the initial stages has made this book matured to a huge extent. About the authors Shivprasad Koirala He works in a big multinational company and has over 8 years of experience in software industry. From Shaam This book is dedicated to my mom and dad for all the hard work done to see this day where I am today. This book has seen its own ups and downs to reach the final light. I am also grateful to Mr. It was the worst phase of career which I had gone through. Foreword From Shivprasad Koirala First thing I never thought that I will be able to complete this book. I hope this book really serves as a good bed for freshers to make hands on and feel how projects are accomplished in international companies. He is working presently as project lead and in past has led projects in Banking. Writing is something I do extra and I love doing it. I am a simple developer like you all guys there doing an 8 hour job. But because of their own software project dead lines they had to fall of in between.So anything you want to comment.

Other than technical aspects this book also provides important points to be noted in the project. There are decent videos which explain the source code and some basic fundamentals in a detail fashion thus making yo u comfortable for real projects. Job Site client. For instance your attitude and behavior during the project. After completing the project you would like to have a glance through the questions so that you are in a better position during . use cases.com. Estimation and proper test plan. Believe me guys your harsh words would be received with love and treated to the top most priority. All professional projects have Use cases. ADO. This not only makes yo u practically confortable from coding point but also from project point of view. This is excercised by using microsft data application blocks in the job site project.e from the developer. This book shows in depth of how to increase reusability by using Microsoft Application blocks. architecture and project manager perspective. Interview questions to judge yourself during interview. Session management. Without all you guys I am not an author. test cases and design documents are executed in live projects.Technical mistakes regarding the book you can mail me at shiv_koirala@yahoo. requirement analysis. Developers who want to know how estimation.NET and many such features are explained with a project implementation which gives clearer idea of the subject. Threading. Senior and junior developers who are looking of how to do practical implementation of OOPS in project. Full source code of all six projects with proper documentation included in the CD. Who should read this book • • • • • • Developers who want to understand how project are completed using SDLC and proper documentation. Details of the book • • • • • • • • • • Book has in all six projects (Job Site. File search. Chat application. webservices. Developers who are looking at practically implementing UML. UML.NET interviews. Page 11 of 215 . Programmers who are looking for quick hands on projects. Developers who are looking at how estimation is done practically in software projects. This book will give you a three dimension view of the project i. MSDE is provided in the CD so that you can exploit sql server to the maximum during database projects. Mandel brot and batch uploading) with three professional projects completed with proper controlled SDLC and documentation.

o JobSiteCodeUnderstanding :. What’s in the CD The CD has stuffs which will make you rock.In the installable folder windows media player is provided in case you have issues viewing the videos. Page 12 of 215 .Explains the bad chat code walkthrough. o JobWebSiteFunctionalWalkThrough :.Explains how to use VS. o QuadraClientExplanation :.This video will help you to make job site project up and running.• • Before the projects detail theory explanation of UML. o FunctionPointTemplate :. • Note: .Gives a code walkthrough of the jobsite application.Explains how to use the function point template for estimation.This folder contains videos from the perspective of this book. o BadChatApplicationCodeWalkThrough :. and SDLC and design documentation is provided to the reader which will make him more confortable while executing the project. o MandelBrotCodeWalkthrough :.Explains the Mandel brot code walkthrough. Estimation.Gives a code walkthrough of the quadra client code walkthrough.Gives functionality walkthrough for the Job site application. o IISTheoryExplanation :. o StarttheJobSiteProject :.This folder has basically all the source code of projects present in this book. Some applications are coded from two perspective one from an ok developer perspective and the other from a good programmer perspective. o Mandelbrot project o Windows file search project o Chat application project.Gives you theoritcial explanation of IIS. o Job site project ( Quadra job site) o Job site client project ( Quadra client ) Videos folder: . Below are the various videos with what they explain :o IISPractical: . • Source code folder: .NET IDE in a efficient way. o WindowsIDE :.Gives a practical understanding of what exactly IIS is. Watching those videos will make you confident about the project. o QuadraClientCodeUnderstaing :. Thus giving two view points of the development perspective.Gives a detail functionality explanation of the quadr client project.

But one fine day one of my good friend just made me sit on the cycle and continuously made me drive the cycle for three hours.This folder contains following necessary installable required for this project. This software is in the CD so that we can install the SQL Client to connect to MSDE 2000. So the second aspect this book will target is not only to enable you practically but in a controlled fashion so that you give quality code rather than quantity code. Note: . In my childhood times I wanted to learn cycling. In short I learnt to ride the cycle but not in a controlled and quality manner.). That’s because all the village girls liked boys who can ride cycle :. turns etc. o SQL Server 2000 Evaluation version. THIS BOOK = INSTANT PRACTICAL + PROPER QUALITY SOFTWARE PROCESS The growth of a software professional Page 13 of 215 . In the cycle training school I was taught theory for three days and then on the fourth day I touched the cycle. Part I – The fundamentals Chapter 1 SDLC and Project documentation What does this book target The prime goal of this book is to make a programmer comfortable to work practically on C# projects adhering to proper software quality processes. That’s a different thing I learnt to control the cycle over a period of time. So I some how managed to get myself in my village cycle training school. it was a four day course. o Windows Media player and codec installable to view videos of this book. But there is one more important thing – Software quality process. o Data access application blocks for the DAL component of the project.• Installable folder: .exe) as a database for this book. But I was never confident enough to drive the cycle independently. The same holds true for Software field one actual implementation is 1000 times worth than big GURU talks. I did learn riding the cycle but for one week continuously I was struggling to manage brakes.The biggest difference between an ok programmer and good programmer is quality coding. o MSDE 2000 Database (MSDE2000A. So here's my equation for this book. LOL!!! I learnt it.

Software professional in this experience range give importance to technical documentation. Developers falling in this category think documentation as bureaucratic. The only goal he has in his mind is to complete the project.If you are self taught programmer or working in a company which is not process oriented the title of this section can sound a bit bureaucratic to you. planning or project management is not a important part. But as people become seniors why is that they start loosing technical touch. 3-5 Year of experience: . They take pride in architecture work of the project. Page 14 of 215 . When a software professional starts his career technical is the only thing for him and when he is at his peak management is everything. A good software product other than source code has proper documentation and process at place.8 Years of experience: . They take pride and enjoyment to write cryptic and heroic logic. Below is the breakup and view point depending on maturity level of software professional. When we know technical forms an important aspect of software projects. If not controlled properly they rarely will think to even comment codes.Software professional in this category have lot of maturity in technical section. They love to get involved technically. As the developer becomes senior source code becomes an insignificant entity and documentation forms the most important part of the project from his perspective.This is the time he becomes a complete senior (he becomes a bit fat). That’s a different thing as they get to more senior position they want to see themselves as project managers rather than in to technical. But they are bit soft when it comes to project planning and testing. Planning. 6 . If a professional makes a proper balance of both these entities we have the MR Perfect with us. monitoring.. But yes software professionals in this experience range have great technical enthusiasm.. escalation and estimation become prime focus for him. Source code deliverable becomes one of the smallest entities of the project. They have less focus on project planning. estimation and testing. From this book i am not trying to communicate that estimation..Developers having experience in this range give importance to source code.And I know there are still many MR Perfect in the software industry or else we would not have come so far. Every young developer in his initial part of the software career is hot blooded and full of enthusiasm. In short the right proportion between management and technical is important. estimation and source code. 9 and above Years: . Software professional in this range think source code with proper comments and technical documentation as the most important deliverable.. 0-2 Years of experience: . For these kind of young developers source code is the most important section in the complete project. As time passes by and the young developer starts gaining experience depending on the type of the company and his number of year of exp his view point changes. In fact many of the developers would like to see themselves as architecture in the coming times. People issues. He starts following processes like CMMI and SIX SIGMA religiously.

Figure 1. If we do not have documentation in project you will probably complete the project but when new people join knowledge transition becomes a huge task. Projects in this book will have all the above documents which will give us a complete view of the project. I know how difficult it is to convince juniors and developers working in small scale software house the importance of documentation and proper process to complete a project.1 : . So first thing never be a hero on a project rather work in co-coordinated fashion and make project independent of you. The biggest advantage of documentation is that the project becomes resource independent and which is a huge success for any project.Viewpoints of software developer Above figure shows how senior and junior view project deliverables. Page 15 of 215 . Yes because he knew that you are a hero of the project and your leaving will create him problems. How many times it has happened that you wanted to change your project and your project manager did not allow you?.

It can be more practical. Figure 1. In short introduce documents in project which are really needed rather than just pushing something for namesake. Any project should have entry criteria and exit criteria. For instance a proper estimation document can be an entry criteria condition. Even if you are not aware of SDLC you still must be following it unknowingly. The above said document is related to project. We need to get a broader view of the start and end of SDLC. I still remember one of my seniors who told me to document how a developer should behave in the project. But if a software professional is aware about SDLC he can execute the project in a much controlled fashion. That means if you do not have a proper estimation document in place the project will not start.Entry. It’s like if you go out for a drive you should know where to start and where to end or else you are moving around endlessly. but if it is not there it will not affect the project in any way.2 : .The best way to attain independency in project is by proper documentation. SDLC and Exit in action Above is a more global view of the how the start and end of SDLC. One of the big benefits of this awareness is that hot blooded developers will not start directly execution (coding) which can really lead to project running in an uncontrolled fashion.-). Any project started if it does not have a start and end then its already in trouble. In short SDLC defines the various stages in a software life cycle. Clear cut documentation makes new developers to join the project in much easy fashion and you can move to new heights in the organization. if half payment is not received the Page 16 of 215 . SDLC (Software development Life Cycle) Every activity has a life cycle and software developme nt process is not an exception for the same. Second it helps customer and software professional to avoid confusion by anticipating the problems and issues before hand. Now two cents!!!! For the seniors who do over documentation the project . But before we try to understand what SDLC is all about.

Build stage:. In this book we will be using use case documents to describe this stage.project will not start.Here testing is done on the source code produced by the build stage and final software is given a green flag. So there can be list of points which needs to be completed before a project starts. Page 17 of 215 . In the above figure we have the entry criteria as an estimation document and exit criteria as a signed document by the end client saying the software is delivered. Waterfall Let’s have a look on Waterfall model which is basically divided into two subtypes:• Big Bang waterfall model. In this book we will have a test plan documents for this stage. This stage is start for the maintenance stage.This stage takes basic business needs required for the project which is from a user perspective so this stage produces typical word documents with simple points or may be in a form of complicated use case documents. Big Bang waterfall model The figure shows waterfall BigBang model which has several stages and are described as below:• Requirement stage: . • Waterfall . Finally there should be end of the project also which defines saying that this is when the project will end. Deliver stage : .Use case document / requirement document is the input for this stage. Here we decide how to design the project technically and produce technical document which has Class diagram. For instance if all the test scenarios given by the end customer is completed that means the project is finished.As per use developers can select model for their project. Below is the figure that shows typical flow in SDLC which has five main models . Note: use case are explained in detail in UML section • • • • Design stage : .This stage follows the technical documents as an input so code can be generated as an output by this stage.Spiral and Incremental model. This is where the actual execution of the project takes place.Big Bang and Phased model. • Phased waterfall model. As the name suggests Waterfall means flow of water always goes in one direction so when we say waterfall model we expect every phase/stage is freezed.After succeeding in Test stage the final product/project is finally installed at client end for actual production. • Iterative . pseudo code etc. Test stage:.

3: . But in actual projects such processes are impractical.Figure 1. Now let’s try to have a look on Iterative model which also has two basic subtype as follows:Incremental model Page 18 of 215 . Iterative model Iterative model was introduced because of problems faced in Waterfall model. it is assumed that all stages are freezed that means it’s a perfect world. chunks are developed in parallel by different teams and get integrated in the final project.SDLC in action (Waterfall big bang model) In this model. But the disadvantage of this model is there is improper planning may lead to fall of the project during integration or any mismatch of co-ordination between the team may cause huge failure. In short. Phased Waterfall model In this model the project is divided into small chunks and delivered at intervals by different teams.

In this model work is divided into chunks like phase waterfall model but the difference is that in Incremental model one team can work on one or many chunks which was unlike in phase waterfall model. Spiral model This model uses series of prototype which refine on understanding of what we are actually going to deliver. Plans are changed if required as per refining of the prototype. So every time in this model refining of prototype is done and again the whole process cycle is repeated.

Evolutionary model
In Incremental and Spiral model the main problem is for any changes in between SDLC cycle we need to iterate through the whole new cycle. For instance, During the final(Deliver)stage customer demands for change we retreat the whole cycle again that means we need to update all the previous (Requirement, Technical documents, Source code & Test plan) stages. In Evolutionary model, we divide software into small units which can be earlier delivered to the customer’s end which means we try to fulfill the customer’s needs. In the later stages we evolve the software with new customers needs.

V-model
This type of model was deve loped by testers to emphasis the importance of early testing. In this model testers are involved from requirement stage itself. So below is the diagram which shows how for every stage some testing activity is done to ensure that the project is moving as planned. For instance, • In requirement stage we have acceptance test documents created by the testers. Acceptance test document outlines that if these test pass then customer will accept the software. • In specification stage testers create the system test document. In the coming section system testing is explained in more elaborate fashion. • In design stage we have integration document s created by the testers. Integration test documents define testing steps of how the components should work when integrated. For instance you develop a customer class and product class. You have tested the customer class and the product class individually. But in practical scenario the customer class will interact with the product class. So you also need to test is the customer class interacting with product class properly. • In implement stage we have unit documents created by the programmers or testers. Lets try to understand every of this testing phase in more detail. Unit Testing

Page 19 of 215

Starting from the bottom the first test level is "Unit Testing". It involves checking that each feature specified in the "Component Design" has been implemented in the component. In theory an independent tester should do this, but in practice the developer usually does it, as they are the only people who understand how a component works. The problem with a component is that it performs only a small part of the functionality of a system, and it relies on co-operating with other parts of the system, which may not have been built yet. To overcome this, the developer either builds, or uses special software to trick the component into believe it is working in a fully functional system. Integration Testing As the components are constructed and tested they are then linked together to check if they work with each other. It is a fact that two components that have passed all their tests, when connected to each other produce one new component full of faults. These tests can be done by specialists, or by the developers. Integration Testing is not focused on what the components are doing but on how they communicate with each other, as specified in the "System Design". The "System Design" defines relationships between components. The tests are organized to check all the interfaces, until all the components have been built and interfaced to each other producing the whole system. System Testing Once the entire system has been built then it has to be tested against the "System Specification" to check if it delivers the features required. It is still developer focused, although specialist developers known as systems testers are normally employed to do it. In essence System Testing is not about checking the individual parts of the design, but about checking the system as a whole. In fact it is one giant component. System testing can involve a number of specialist types of test to see if all the functional and non- functional requirements have been met. In addition to functional requirements these may include the following types of testing for the non- functional requirements: • • • • • Performance - Are the performance criteria met? Volume - Can large volumes of information be handled? Stress - Can peak volumes of information be handled? Documentation - Is the documentation usable for the system? Robustness - Does the system remain stable under adverse circumstances?

There are many others, the need for which is dictated by how the system is supposed to perform. Acceptance Testing

Page 20 of 215

Acceptance Testing checks the system against the "Requirements". It is similar to systems testing in that the whole system is checked but the important difference is the change in focus: Systems testing checks that the system that was specified has been delivered. Acceptance Testing checks that the system will deliver what was requested. The customer should always do acceptance testing and not the developer. The customer knows what is required from the system to achieve value in the business and is the only person qualified to make that judgment. This testing is more of getting the answer for whether is the software delivered as defined by the customer. It’s like getting a green flag from the customer that the software is up to the expectation and ready to be used.

Figure 1.4: - V model cycle flow

Which is the best model?
In the previous sectio n we looked through all the models. But in real projects, hardly one complete model can fulfill the entire project requirement. In real projects, tailor model are proven to be the best because they share features from all models such as Waterfall, Iterative, Evolutionary models etc and can fit in to real life time projects. Tailor model are most productive and benefited for many organization. As it is an educational book we will build up virtual project for clear understanding the process so we will use Big Bang waterfall model. In waterfall project output of every stage will be freezed as explained earlier no changes will be accepted once the requirement document is freezed.

Page 21 of 215

Essential documentation in projects
In the previous section we discussed the various SDLC lifecycle models. For every stage in the model we have documents created according to phases such as:• Requirement stage we have the Use case document • Design stage we have the Technical document • Build stage we have the source code • Test stage we have the Test result document • Deliver stage we have the sign off document There are different documentation for every project and these documents change from company to company and project to project. For instance, some company will have 3 documents and some will have 12 documents in a project depending upon project manager or the policy of the company to execute a project. This book will include only 5 documents in a project which are as follows:• Requirement document • Estimation document • Use case document • Technical document • Test plan document • Source code Let’s try to understand in detail each document used in a software project • Requirement document:-A requirement document can be a single English document, probably a recorded audio or video conversation or can be a complicated use case. In short it’s something raw which comes from the end client. • Estimation document: - After getting requirement from the user we can judge cost for the project. In this book we will be using the function point estimation model. There is a complete chapter which is dedicated to function point in this book. • Use case document:- This is a section of UML which basically describes in detail the requirement document which serves as an input to the Design stage • Technical document:- This document contains detail of how the project being executed such as pseudo code, class diagram, objects diagram, etc. • Test result document : - This document is written by the testers which describe the test plan which needs to be executed and thus giving project a green flag to production. • Source code: - This is not basically a document but one of the important deliverable which maps to the execution phase of SDLC cycle.
Note: - See the SDLC in action figure given above which shows how the documents are mapped to SDLC cycle.

UML
The main object of UML is to make the project understanding more crisp and clear. It is a global computer industry modeling language to communicate between software professional in a project. UML helps us to create documents, artifacts & also give Page 22 of 215

For instance in the below figure you can see the Invoice header will have multiple invoice details. The structure and relation between Invoice header and Invoice detail will never change. two rooms etc) can vary.Project static nature UML has four types of structure diagram :1) Class diagrams 2) Object diagrams 3) Component diagrams Page 23 of 215 . But yes the invoice can pass through multiple stages like open invoice.visualization so that we can understand the complex software engineering process of a project. Three views of the project from UML perspective There are 12 diagrams in UML they are divided into 3 main views as below:• • • Structure diagram Behavior diagram Model management diagram Structure diagram They are used to show static structure of an application. Same holds true when we talk about software industry there are static part and dynamic part of project. Let’s try to understand what the word static signifies. Figure 1.5: . For example classes in project will rarely change. For instance in a civil construction when the engineer makes a model of a civil construction. Yes the attributes and methods in the class will change as user adds new functionalities. The outer structure of the building and bridge will remain same but yes the inner part of the structure for instance the structure of room and passages (one room. closed invoice or pending invoice which is dynamic.

closed invoice and paid invoice. For instance an invoice can have lot of states for instance open invoice. Payment and common routines are grouped and organized. This is a dynamic nature of the project. Page 24 of 215 . In UML to represent this kind of dynamic nature there are five diagrams. 1. Use Case diagrams Sequence diagrams Activity diagrams Collaboration diagrams State chart diagrams Model management diagram Model management diagram gives a view how different application modules are managed . In a typical software project we can have business validations.Project behavior in action The above figure shows how the invoice section moves dynamically by making transition from one state to other state. 2. Let’s try to understand what does a dynamic structure of a project means. They are used to show dynamic structure of an applicatio n. Figure 1. grouped and classified. 4. And your software will change the invoice object from one state to other state. Business validations of a project are of very dynamic nature. For instance the below figure shows how Accounting.4) Deployment diagrams Behavior diagram UML gives us five Behavior diagram.6: . 3. 5.

Model Management diagram in action UML provides three diagrams by which we can get the Model Management view. Models Overall Explanation of the UML diagrams Class diagram Use to show real-world entities. elements of analysis and design.7: . Page 25 of 215 . such as a test or an operatio n call Composite structure diagram Use to show the how something is made. Especially useful in complex structures-ofstructures or component-based design. Packages 2. or implementation classes and their relationships Object diagram Use to show a specific or illustrative example of objects and their links. Below are the three diagrams:1.Figure 1. Subsystems 3. Often used to indicate the conditions for an event.

software artifacts (deliverable or running software items). Component diagram Use to show organization and relationships among the system deliverables Package diagram Use to organize model elements and show dependencies among them Activity diagram Use to the show data flow and/ or the control flow of a behavior Captures workflow among cooperating objects Use case diagram Use to show the services that actors can request from a system in actor and role form.action scenarios (seque nces of behavior) for the same collaboration (a set of elements working together to accomplish a goal) Sequence diagram Use to focus on message exchange between a group of objects and the order of the messages. State machine diagram / Protocol state machine diagram Use to show the life cycle of a particular object. and software environments (like operating systems and virtual machines). But in real projects we do not draw all the diagrams instead we look towards the complexity of the project or necessity of the project and accordingly we decide the diagrams and then Page 26 of 215 . Communication diagram Use to focus on the messages between a group of objects and the underlying relationship of the objects Timing diagram Use to show changes and their relationship to clock times in real-time or embedded Systems work Which diagram is important In above section we have seen the basic definitions of all the UML diagrams. or the sequences an object goes through or that an interface must support. Overview diagram Use to show many different inter. the hardware platforms.Deployment diagram Use to show the run-time architecture of the system.

For instance in an accounting application accountant forms as an actor and for the same accounting application we have cashier and charted accountant as another form of actors for the system.diagrams are added to the technical document or the requirement document. So basically it defines the actions of the user in the system. cancel ticket. The best way to identify a use case is by extracting verbs of the requirement document given by the end customer. So booking. canceling and refunding of a ticket are goals performed by an actor. The first one is the Use case diagram and explained as the follows Use case diagram over view It’s a user functionality which the user wants to be completed by the system. Normally software users are the actors. Let’s try to understand in detail the two basic diagram used in the project. Stake holders provide requirement to your project and oppose in case of any issues. The figure below shows the diagrammatic view to represent relationship between actors and goals. It basically defines verbs of the system. refund ticket done by the system. But the diagram does not show the details of the goals. canceling a ticket and refunding a ticket. For example Travel Company’s director wants to book ticket. • Secondary Actor:-While Secondary Actor contacts other actors or use cases to meet the Primary Actor’s goal. Actors are stake holders of the system. In the below example we have Ticket Reservation system here travel agent is a actor who is using reserving ticket application and booking a ticket. Every actor has goal to perform when using the system.This actor actually initiates the use case on the system. There are two types of actors:• Primary Actor:. Page 27 of 215 . Actors and Goals Every use case will have the below two components actors and goals. So in this book we will use two basic diagrams extensively:• Use case diagrams • Class diagrams The other diagram will be used if required and their respective explanation will be provided at the same time.

• Use case: .Figure 1. • Description:-It basically describes the details of a user case in a textual form. Use case templates can be used to expand on the above diagram in more detail manner. • Use case name:. • Primary actor:-Primary Actor is nothing but the user who actually initiates the goal.8:. QUEST POND 002 etc as there are N number of use cases in a project. So in “Make booking” use case the travel agent acts as a primary actor and the director as the secondary actor. UC002 or QUEST POND 001. Canceling a ticket etc in actual which represents an action.It is a particular action taken by the user on the system or task get done from the system in the form such as booking a ticket. But he is not interested in making a booking as that’s the work of the travel agent. Detail Explanation of the Use Case template Below is the use case template which we will be using in most of our project. For example in a travel agency the director sees the report booking done by customers. In the next section we will go through a use case template which we will use in most of the project.In order to identify particular use case we do unique numbering to it like UC001. So here the director acts as a primary actor who is fully interested in how much booking is done over a period of time. So let’s understand every section of the template. Page 28 of 215 .Actors and Goals in action So for the same we need to document it using use case documents which is explained in the coming section. But in case of “View booking” use case the travel agent acts as a secondary actor and the director as a primary actor.

This is the basic action by which the main scenario of the use case starts such as login onto the system or to make booking of tickets we actually perform actions like click on Login----File----New----Booking menu which in return opens the page of booking section. Pre-condition:. • Success scenario:-Success scenarios indicate when this use case is successful. o Once the changes are done the travel agent updates the information and prints out the ticket.These are conditions in a use case to be considered as prerequirements such as to book a air ticket we need to have server connection and also we have to validate in to the system then only the actor can book a ticket for the customer. o He enters Ticket Number. o Finally he adds the ticket to the system and prints the ticket. For example from where does • Page 29 of 215 . o Travel agent goes to the ticket booking form. Failed end conditions:-This state signifies when the use case will fail. Note and open issues: . The main scenario and the alternate scenario have many steps in common but with a slight difference. o Travel agent is then popped with all details regarding the ticket booking.• • • • • • Trigger:.Things which makes use case starts through an actor is called Trigger. For instance below is the alternate scenario step which is different than the main scenario:o Travel agent logs in to the system. Actions : .These are assumptions which we define for the system. Main scenario:-It describes the basic step which should be executed by the user. o Travel agent goes to the ticket booking form and enters the ticket number. o Travel agent makes changes to the existing information. For instance below steps show the main scenario steps :o Travel agent logs in to the system. For example the ticket is printed successfully. For when User Id and Password is not proper id displayed on the Login screen it signifies login failed condition. Travel routes of the customer. email is sent to the customer etc etc. Assumptions: .Alternate scenarios are steps which have a slight different flow other than the main scenario. • Alternate scenario: . For example user starts the application. details of the customer etc.Some pending task about the use case which the customer needs to make more clarification.

So once you go through those use case you will have good understanding of the same. Page 30 of 215 . greeting cards and cassettes always have to execute the check credit card (common use case).exactly the booking of air tickets happens. Figure 1. is it directly from the customer itself or from the traveling agency. Included use case:-Below figure shows the included use case in an shoppingmall.In every project we have use case documents as a part of requirement gathering. greeting cards and cassettes but the payment is always done through the credit card. Included and Extended use case In use cases we come across identical sequences between the actors and the system if such kind of common sequence is not identified in use case document it can lead to redundancy in the project.Use Case template Note: .com project and uses the Included use case in the form of “check credit cards” for customers. Because the requirement document trickles down to the technical document which can lead to lot of redundancy coding. Included and extended are the types of use cases which can be used to club together such common sequences.9:. So here flowers. So we make the check credit card use case as an included use case. Let’s try to understand the following example of a customer where he orders the flowers.

Extended use case system:-While writing use case it is possible to have multiple version of the same use case.11: . So update customer use case is an Extension of add new customer use case. For instance you have to add a new customer and then you can also update a customer.Figure 1.Included Use case in action This kind of common interaction can be put in a common use case and called whenever needed. Figure 1.10:.Extended Use Case Page 31 of 215 .

This section carries operation or method to act on the attributes. address class.This is the first section or top most section of the Class which represents the name of the Class (clsCustomer). Class defines the static structure of the project. • Methods: . In the below figure you can see how the class diagram looks. Page 32 of 215 .12: . By using Class we can create uniform objects. phone class in short there is relationship between the classes.Three sections of the class In the previous section we have seen what basically the class is. So by grouping and relating between the classes we create module and these are termed as Association. Class diagram In this book for all projects the other diagram that will be extensively used is the class diagram. Let’s try to understand according to the numbering:• Class name:. But if use case can be delivered later and have steps in common then its base use case forms an Extended use case type of relationship. A class represents family of an object. The one thing in common is that they have some common steps in sequence.This is the second section or the middle section of the class which represents the properties of the system. In order to associate them we need to draw the arrowed lines between the classes as shown in the below figure. • Attributes:. For instance. a module named ‘customer detail’ cannot be completed by customer class in order to complete the whole module we need customer class.Class is basically prototype which helps us create objects.Differentiate between Included use case and extended use cases? If you need to deliver the use case with the base use case then it will form an included use case type of relationship. Figure 1. Basically there are three important sections which are numbered as shown in the below. Now in the next section we will have a look on Association relationship between these classes Associations in Class diagrams A single Class cannot represent the whole module in a project so we need one or more classes to represent a module.

In order to represent multiplicity of classes we have to show notations like (1…. If you look at the below figure the customer class is basically associated with the address class and also observes the notations (*. (0…. 1)’ means “(zero or at least one)” respectively.Direction signs in UML Multiplicity Multiplicity can be termed as classes having multiple associations or one class can be linked to instances of many other classes.13:. 0 and 1).In this figure.If you look at the right hand side the (1….*) as shown in below figure. Note: ‘*’ means “many” where as ‘(0.Order is paid by Payments class There are four signs showing the flow:- Figure 1. Page 33 of 215 . we can see Order class and the Payment class and arrowed line showing relationship that order class is paid using payment class in other words order class is going to be used by payment class to pay the order. In case payment class using the order class then the marked arrow should be right to left showing the direction of the flow.14:. Now towards left hand side we have (0…. Figure 1.*) notation indicating that address class can exist without or many customer class can link him. The left to right marked arrow basically shows the flow that order class uses the payment class.*).*) notation indicates that at least one or many instance of the address class can be present in the customer class.

In other words lifetime of the university depend on the lifetime of department.15: .The filled diamond represents the aggregation and the empty diamond represents the composition. In the same figure we have defined second Association between the department and the Professor. Aggregation Association signifies that the whole object can exist without the Aggregated Object. The university cannot exist without department which means that university will be closed as the department is closed.Figure 1. You can see the figure below for more details. For example in the below figure we have three classes university class. if the professor leaves the department still the department continues in other words department is not dependent on the professor this is called as Composition Association.Multiplicity in Classes Aggregation and composition In this Association there are two types mainly Aggregation Association and Composition Association. department class and the Professor Class. Page 34 of 215 . In this case. Note: .

16: . In the below figure we have shown two diagrams one is normal diagram other is Composite structure diagram and the simplicity can easily be identified.17: .Figure 1.Composite Structure diagram Page 35 of 215 .Aggregation and composition in action Composite structure diagram When we try to show Aggregation and Composition in a complete project the diagram becomes very complicated so in order to keep it simple we can use Composite structure diagram. In the composite diagram the aggregated classes are self contained in the main class which makes it simpler to read. Figure 1.

In the below figure there are three classes to show Generalization and Specialization relationship. All phone types have phone number as a generalized property but depending upon landline or mobile you can have wired or simcard connectivity as specialized property. corporate office or Regional office.18: . This is the way we can read the diagram Regional address object is blocked by zero or one instance of Head office object.Reflexive associations In many scenarios you need to show that two instances of the same class are associated with each other and this scenario is termed as Reflexive Association. For instance in the below figure shows Reflexive Association in the real project. In many instance you will see some of the classes have same properties and operation these classes are called super class and later you can inherit from super class and make sub classes which have their own custom properties. In this diagram the clsphone represent Generalization whereas clslandline and clsmobile represents specialization.Reflexive association Generalization and specialization In Generalization and Specialization we define the parent-child relationship between the classes. Page 36 of 215 . Figure 1. One of the address objects is Head office and we have linked the address object to show Reflexive Association relatio nship. Here you can see customer class has multiple address class and addresses can be a Head office.

Please read this chapter again and again so that you do not have issues while going through the estimation sheets in every project.Generalization and Specialization Note: . In this book we will be using one of the most used estimation technology function points to do estimation. Albrecht in the mid 1970s.In all the projects in the book we will be using class diagram heavily. The method was first published in 1979. several versions of the Function Point Counting Practices Manual have been coming out. and to assist in developing a mechanism to predict effort associated with software development. Introduction to Function Points “This document contains material which has been extracted from the IFPUG Counting Practices Manual. “The best way to understand any complicated system is breaking the system in to smaller subsystem and try to understand those smaller sub-systems . Estimation in projects One of the important sections in any project is estimation. It was an attempt to overcome difficulties associated with lines of code as a measure of software size. then later in 1983. In 1984 Albrecht refined the method and since 1986.” Function Point Analysis was developed first by Allan J.Figure 1. Any project started with out estimation means the software company has already decided to work for charity.19:. It is reproduced in this document with the permission of IFPUG. Page 37 of 215 . when the International Function Point User Group (IFPUG) was set up.

Elementary Process As said in introduction FPA is breaking huge systems in to smaller pieces and analyzing them.In Function Point you break complicated huge system into smaller systems and estimate those smaller pieces. There are two types of major boundaries: • • Internal Application Boundary External Application Boundary I will state features of external application boundary. EP is smallest unit of activity that is meaningful to the user. thus we can identify Tax website reporting as External Application. Software application is combination of set of elementary processes. Application Boundary The first step in FPA is defining boundary.” Basics of Function Points Following are some terms used in FPA [Function Point analysis]. Example: Your Company is developing an “Accounts Application” and at the end of accounting year. Tax department has his own website where companies can connect and report there Tax transaction. Tax department application has other maintenance and reporting screens been developed by tax software department. External Application Boundary can be identified using following litmus test: • Does it have or will have any other interface to maintain its data. so that internal application boundary would be self explained. When elementary processes come together they form a software application. which is not developed by you. So Tax online interface has other interface to maintain its data which is not your scope. • Does your program have to go through a third party API or layer? In order your application interacts with Tax Department Application probably your code have to interact through Tax Department API. • The best litmus test is to ask yourself do you have full access over the system. then total up all the subsystem estimate to come up with final estimate. EP must be self contained and leave the application in a consistent state. you have to report to tax department. If you have full rights or command to change then its internal application boundary or else external application boundary. These maintenance screens are used internally by the Tax department. Page 38 of 215 .

Internal Logical Files (ILF) Following are points to be noted for ILF: • ILF are logically related data from user point of view. Data moves from the input screen inside application.Do not make a mistake of mapping one to one relationship between ILF and technical database design. Caution: . • ILF can have maintenance screen or probably not. we can define elementary process as small units of self contained functionality from user perspective. • They reside in Internal Application boundary and are maintained through elementary process of application. Transaction exported in export files in XML or any other standard. Dynamic elementary process moves data from internal application boundary to external Application boundary or vice-versa. Example Supplier database design will have tables like Supplier.So. Elements of Function Points Following are the elements of FPA. Dynamic and static elementary process There are two types of elementary process: • Dynamic Elementary process. but from ILF point of view its only Supplier. As logically they are all Supplier details. Examples of static elementary process: • In a customer maintenance screen maintaining customer data is static elementary process. SupplierPhonenumbers. Display reports which can come from external application boundary and internal application boundary. Static elementary process maintains data of application either inside application boundary or in external application boundary. • Static Elementary process. Supplier Address. Examples of dynamic elementary process: • • • Input data screen where user inputs data in to application.Note:-Elementary process is not necessarily completely independent or can exist by itself. then FPA can go very misleading. Page 39 of 215 . The main difference between ILF and technical database is ILF is logical view and database is physical structure (Technical Design).

EIF is maintained by external application. Example: . Page 40 of 215 . • If there is no sub-group of ILF then count the ILF itself as one RET.Figure 1.20: . EIF is used only for reference purpose and are not maintained by internal application.So Supplier. • A group of RET’s within ILF are logically related. Supplier Address and Supplier phone numbers are RET’s.Supplier had multiple addresses and every address can have multiple phone numbers (See detail image below which shows database diagrams). EIF reside in external application boundary. Most probably with a parent child relationship. Record Element Type (RET) Following are points to be noted for RET • RET are sub-group element data of ILF or EIF.ILF logical relationship External Interface File (EIF) • • • • They are logically related data from user point of view.

So “Supplierid_fk” in supplieraddress table is counted as DET. it should be counted only once.Figure 1.ILF logical relationship Please note the whole database is one supplier ILF as all belong to one logical section. DET should be non-recursive field in ILF. Same folds true for “Supplieraddressid_fk”. So by default you will Page 41 of 215 .21:. Supplierid field from user point of view never exists at all . • • File Type Reference (FTR) Following are points to be noted for FTR: • FTR is files or data referenced by a transaction. RET quantifies the relationship complexity of ILF and EIF. DET should not repeat in the same ILF again. Count foreign keys as one DET. So count each ILF or EIF read during process. “Supplierid” does not qualifies as DET but its relationship in “supplieraddress” table is counted as DET. its only from software designing aspect. DET (Data element types) Following are the points to be noted for DET counting: • Each DET should be User recognizable. Example in the above given figure we have kept auto increment field (Supplierid) for primary key. • FTR should be ILF or EIF. • If the EP is maintaining an ILF then count that as FTR. so does not qualifies for DET.

A calculator application does not maintain any data. In this EP some input request has to enter the application boundary.No hard and fast rules that only simple reports are EQ’s. EQ does not contain any derived data. EP is self contained and leaves the business in consistent state. Derived data is not part of ILF or EIF. Derived data is not just mere retrieval but are combined with additional formulae to generate results. External Output (EO) Following are points to be noted for EO: • It’s a dynamic elementary process in which derived data crosses from Internal Application Boundary to External Application Boundary. • EI may maintain ILF of the application. • Process should be the smallest unit of activity that is meaningful to end user in business. they are generated on fly. Example: . when data comes from User Interface to Internal Application. Example: .always have one FTR in any EP. Simple reports form good base as EQ.User Interaction Screens. but still the screen of calculator will be counted as EI.Simple view functionality can also be counted as EQ. External Input (EI) Following are points to be noted for EI: • It’s a dynamic elementary process [For definition see “Dynamic and Static Elementary Process” Section] in which data is received from external application boundary. Output results exits the application boundary. EQ does not update any ILF or EIF. • • • • • Note:. • EO can update an ILF or EIF. EQ activity should be meaningful from user perspective. External Inquiry (EQ) Following are points to be noted for EQ: • • • • It’s a dynamic elementary process in which result data is retrieved from one or more ILF or EIF. DET and processing logic is different from other EQ’s. but still should be counted as EI as it helps passing data from External Application Boundary to Internal Application Boundary. Derived data means any complex calculated data. Page 42 of 215 . • Most of time User Screens will be EI. Examp le: An import batch process running from command line does not have screen. but it’s not compulsory rule. again no hard and fast rule.

Application is batch but has remote data entry and remote Printing. Application is more than a front-end. Table :. DET is different from other EO’s. When you submit a function point to a client. summary etc. what's the Performance level the user is expecting etc these other factors are called GSC.Exporting Accounts transaction to some external file format like XML or some other format. Second Important difference is in EQ its non-derived data and EO has derived data. They relate only to application. Application is batch but has remote data entry or remote Printing. Which later the external accounting software can import.• • • EP is self contained and leaves the business in a consistent state. All the above discussed sections are counting Sections.So this ensures to us that we do not count EO’s twice. count. he normally will skip everything and come to GSC first. These are external factors which affect the software a lot and also the cost of it. Application includes online data collection or TP (Teleprocessing) front end to a batch process or query system. Data Communications How many communication facilities are there to aid in the transfer or exchange of information with the application or system? Rating 0 1 2 3 Description Application is pure batch processing or a standalone PC. GSC gives us something called as VAF (Value Added Factor). but supports only one Type of TP communications protocol. Major difference between EO and EQ is that data passes across application boundary. There are 14 points considered to come out with VAF (Value Added factor) and its Associated rating table.Data Communication 4 5 Distributed data processing Page 43 of 215 . But there are other things also to be considered while making software. like are you going to make it an N-Tier application. Example: . General System Characteristic Section (GSC) This section is the most important section. Which means EQ is a simple report but EO can have complex derived data like sum. They have derived data or formulae calculated data. and supports more than One type of TP communications protocol. Application is more than a front-end.

stated user performance requirements are stringent enough to require performance analysis tasks in the Design phase. and/or implementation phases to meet The stated user performance requirements. development.Processingdeadlinerequirementswithi nterfacing systems Are constraining.How are distributed data and processing functions handled? Rating 0 1 2 3 4 5 Description Application does not aid the transfer of data or processing Function between compone nts of the system. Performance and design requirements were stated and Reviewed but no special actions were required. Table :.Distributed data processing Performance Did the user require response time or throughput? Rating 0 1 2 Description No special performance requirements were stated by the User.Nospec ialdesignforCPU utilization was required. performance analysis tools were used in the design. Responsetimeorthroughputiscriticalduringpeakhours. In addition.Performance 3 4 5 Heavily used configuration How heavily used is the current hardware platform where the application will be executed? Rating Description Page 44 of 215 . Application prepares data for end user processing on another component of the system such as PC spreadsheets and PC DBMS Data is prepared for transfer. Distributed processing and data transfer are online and in Both directions. then is transferred and processed on another component of the system (not for end-user Processing). Response time or through put is critical during all business hours. No special design for CPU utilizationwasrequired. Distributed processing and data transfer are online and in One direction only. Processing functions are dynamically performed on the most Appropriate component of the system Table :. Processing deadline is for the next business day. In addition.

quarterly. No special effort is needed to meet the Restrictions. and/or installation phases. Development. but are less restrictive than a typical application.Transaction rate On-Line data entry What percentage of the information is entered On-Line? Rating 0 1 2 3 4 5 Description All transactions are processed in batch mode. daily. Annually) is anticipated. monthly. Operational restrictions do exist. in addition. M orethan30% of transactions is interactive data entry. In addition. seasonally. Table :. Specific processor requirement for a specific piece of the Application is included. Table :. 5 High transaction rate(s) stated by the user in the application requirem ents or service level agreements are high enough to require perform ance analysis tasks and.Heavily used configuration Transaction rate How frequently are transactions executed. Stated operation restrictions require special constraints on the application in the central processor or a dedicated Processor. Table :.g. 8% to15% of transactions is interactive data entry. 2 Weekly peak transaction period is anticipated. 4 High transaction rate(s) stated by the user in the application requirements or service level agreements are high enough to Require performance analysis tasks in the design phase. Some security or timing considerations are included. 16% to23% of transactions is interactive data entry. 3 Daily peak transaction period is anticipated. there are special constraints on the application in The distributed components of the system. etc. monthly.? Rating Description 0 No peak transaction period is anticipated. require the use of performance ana lysis tools in the design.. 1 Peak transaction period (e. 1% to7% of transactions is interactive data entry.0 1 2 3 4 5 No explicit or implicit operational restrictions are included.Online data entry Page 45 of 215 . weekly. 24% to30% of transactions is interactive data entry.

highlighting. Four to five of the above.user efficiency factors which govern how this point is rated.End user efficiency factor Description None of the above. Six or more of the above. maximize defaults. Six or more of the above. dynamically generated menus) Menus Online help and documents Automated curs or movement Scrolling Remote printing(via online transactions) Preassigned function keys Batch jobs submitted from online transactions Cursor selection of screen data Heavy use of reverse video. jumps.End-user efficiency Was the application designed for end-user efficiency? There are seven end. Table : End user efficiency Rating 0 1 2 3 4 5 On-Line update How many ILF’s are updated by On-Line transaction? Rating 0 Description None of the above. Page 46 of 215 . Six or more of the above. and stated requirements for end-user efficiency are strong enough to require use of special tools and processes to demonstrate that the objectives have been achieved. Sr no 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 End-user Efficiency Factor Navigational aids(for example. colors underlining. One to three of the above. Table :. count as six items). minimize keystrokes. use of templates).As few screens as possible to accomplish a business function Bilingual support(supports two languages. and other indicators Hard copy user documentation of online transactions Mouse interface Pop-up windows . but there are no specific user Requirements related to efficiency. count as four items) Multilingual support (supports more than two languages. function keys. and stated requirements for end-user efficiency are strong enough to require design tasks for human factors to be included (for example.

or failed edits Complex processing to handle multiple input/output possibilities. Table :. Any three of the above. In addition. for example. for example. missing data values. Online update off our or more control files is included.Complex processing factor Rating 0 1 2 3 4 5 Description None of the above. Volume of updating is low and recovery easy. special audit processing)and/or application specific security Processing Extensive logical processing Extensive mathematical processing Much exception processing resulting in incomplete transactions that must be processed again. Less than 10% of the application considered Page 47 of 215 . Online update of major internal logical files is included. Highly automated recovery procedures With minimum operator intervention are included. protection against data lost is essential and has been specially designed and programmed in the system. high volumes bring cost considerations into the Recovery process. multimedia.1 2 3 4 5 Online update of one to three control files is included. Reusable code is used within the application. In addition. Any one of the above. incomplete ATM transactions caused by TP interruption. All five of the above Table :.Complex processing 5 Reusability Was the application developed to meet one or many user’s needs? Rating 0 1 2 Description No reusable code. Any two of the above. Any four of the above. Volume of updating I slow and recovery is easy.Online update Complex processing Does the application have extensive logical or mathematical processing? S r no 1 2 3 4 Complex Processing Factor Sensitive control(for example. or device independence Table :.

and recovery procedures? Rating 0 1-4 Description No special operational considerations so other than the normal Back. and the application is customized by the user at source code level. The application was specifically packaged and/or documented to ease re-use. except as Page 48 of 215 . or all of the following items apply to the Application. Ten percent (10%) or more of the application considered more than one user's needs. The impact of conversion on the project is not considered to be important.reusability Installation ease How difficult is conversion and installation Description Rating 0 No special considerations were stated by the user. Table :. The impact of conversion on the project is Considered to be important. Each item has a point Value of one. and conversion and installation guides were provided And tested. 1 No special considerations were stated by the user but special setup is required for installation. 2 Conversion and installation requirements were stated by the user and conversion and installation guides were provided and tested. Select all that apply. 3 Conversion and installation requirements were stated by the user. Table : Installation ease Operational ease How effective and/or automated are start-up. automated conversion and installation Tools were provided and tested. automated conversion and installation Tools were provided and tested.up procedures were stated by the user. and the application is customized for use by means of user parameter maintenance. and no special setup is required for installation.3 4 5 more than one user's needs. 5 In addition to 3 above. 4 In addition to 2 above. some. back up. The application was specifically packaged and/or documented to ease re-use. One.

Unattended operation means no operator intervention is required to operate the system other than to startup or shutdown the application. back-up. and the application is designed to operate only under identical Hardware and software environments. and/or logic applied to only one internal logical file (count as one item). and the application is designed to operate only under similar Hardware and or software environments. The application is designed for unattended operation.up. back-up. 3 Needs of multiple sites were considered in the design. 2 Needs of multiple sites were considered in the design. Automatic error recovery is a feature Of the application.5 noted otherwise. but no operator intervention is required(count as Two items). The application minimizes the need for tape mounts.Multiple sites Facilitate change Was the application specifically designed. and supported to facilitate change?. developed. Table: . but operator intervention is required. and recovery processes were provided. 4 Documentation and support plan are provided and tested to support the application at multiple sites and the application is as described by 1 or 2. Effective start.up. Effective start. 1 Needs of multiple sites were considered in the design. and the application is designed to operate under different Hardware and or software environments. and recovery processes were Provided. Table :. 5 Documentation and support plan are provided and tested to support the application at multiple sites and the application is as described by 3. and supported to be installed at multiple sites for multiple organizations? Description Rating 0 User requirements do not require considering the needs of More than one user/installation site. for example. Page 49 of 215 .operational ease Multiple sites Was the application specifically designed. developed. The application minimizes the need for paper handling. The following characteristic s can apply for the application Sr no 0 1 Facilitate factors None of above Flexible query and report facility is provided that can handle simple requests.

and/or logic combinations on one or more internal logical files (count as three items).Then VAF is calculated from the equation below:VAF = 0. Any two of the above.GSC has not been accepted in software industry widely. Rating 0 1 2 3 4 5 Note: . Any four of the above. Read GSC acceptance in software industry Rating Tables for All elements of Function Points Below shown are look up tables which will be referred during counting.EI rating table Page 50 of 215 . and/or logic applied to more than one internal logical file (count as two items). but changes take effect only on the next business day. Many software companies use Unadjusted Function point rather than adjusted. ISO has also removed GSC from its books and only kept unadjusted function points as the base for measurement. Any three of the above.Facilitate change All the above GSC are rated from 0-5. All five of the above Table :. Any one of the above. for example.65 + ((sum of all GSC factor)/100). EI Rating Table FTR Less than 2 Equal to 2 Greater than 2 Data Elements 1to 4 3 3 4 5 to 15 3 4 4 Greater than 15 4 6 6 Table :.2 3 4 5 Flexible query and report facility is provided that can handle requests of average complexity for example. Business control data is kept in tables that are maintained by the user with online interactive Processes and the changes take effect immediately (count as two items) Table : Facilitate change factors Description None of the above. Business control data is kept in tables that are maintained by the user with online interactive Processes. Flexible query and report facility is provided that can handle complex requests.

then this should be the FP (Function Point).EO rating table EQ Rating Table FTR Less than 2 2 or 3 Greater than 2 Data Elements 1 to 5 6 to 19 3 3 3 4 4 6 Table :.EQ rating table Greater than 19 4 6 6 ILF Rating Table RET 1 RET 2 to 5 Greater than 6 EIF Rating Table RET 1 RET 2 to 5 Greater than 6 Data Elements 1 to 19 7 7 10 20 to 50 7 10 15 51 or more 10 15 15 51 or more 7 10 10 1 to 19 20 to 50 5 5 5 7 7 10 Table :. The rest down tables also show the same things. You can also see the video of how to use the estimation sheet which will automate your estimation to a great extent. Note :.We have provided a excel template for estimation. These tables will be there before us when we are doing function point count. if your DET (data element) exceeds >15 and FTR (File Type Reference) is greater than 2. if your DET count (Data Ele ment) and FTR (File Type Reference) exceed these limits. EO Rating Table FTR Less than 2 2 or 3 Greater than 2 Data Elements 1 to 5 4 4 5 6 to 19 4 5 7 Greater than 19 5 7 7 Table :.ILF rating table. Page 51 of 215 . The best is put these values in Excel with formulae so that you have to only put quantity in the appropriate section and you get the final value. then the Function Point count is 6. Example.This table says that in any EI (External Input).

Formula for VAF = 0. EI. RET. Page 52 of 215 . • • • • • Counting the ILF. you can calculate Man/Days Let’s try to implement these details in a sample customer project. FTR (this is basically all sections discussed above): This whole FP count will be called as "unadjusted function point". Following is the scope of the customer screen:• Customer screen will be as shown below. Adding total of all 14 GSC to come out with total VAF. • After putting the customer code and Customer name. On basis of performance factor. DET. Sample Customer Project We will be evaluating the customer GUI. • Every Customer can have multiple addresses.Steps to Count Function Points This section will discuss the practical way of counting the FP and coming out with a Man/Days on a project. Make estimation how many function points you will do per day. Then put rating values 0 to 5 to all 14 GSC.65 + (sum of all GSC factor/ 100). update functionality. • Customer will have add. So we will just scope what the customer GUI is all about. Formula: Total function point = VAF * Unadjusted function point. EIF. Finally. make the calculation of adjusted function point. • Credit Card check is a external system. EQ. They will be verified credit card check. This is also called as "Performance factor".

• Credit Card System Following the ILF counting rules • ILF are logically related data from user point of view. check box active. There is one EIF in the above form. all add and update buttons. So according to the above ILF ranking table Number of DET 9 Number of RET 1 Total function 7 Table :. Customer and Customer addresses belong logically to customer category. There is only one RET. • ILF reside in Internal Application boundary and are maintained through Elementary process of application.Figure:. all text boxes. the customer addresses. Customer resides in inside application boundary as we have full access over it.1.ILF for the customer Page 53 of 215 . the address list box.22 Custom screen There is one ILF in the above screen: • The customer ILF. So hence goes the counting below for ILF ILF Customer Description There are total 9 DETs. even the credit check button.

EI Credit Card Information Number of DET Description The credit card information referenced is EIF. • EI may maintain ILF of the application. So according to the above ranking table Number of RET 1 1 Total function 5 Table :. • So there are two EI one for Add and one from update. one is the address and the second is the credit card information and third is customer himself.EIF lie outside the application boundary. all text boxes.Looking at the above rating table the total FP is 5. In this sample project Customer ILF is maintained. There are 3 FTRs. check box active. but it’s not compulsory rule. It is two because processing logic for add and update is different. all add and update buttons. even the credit check button.EI for the customer Following EIF rules define in the previous sections: • It’s a dynamic elementary process [For definition see “Dynamic and Static Elementary Process” Section] in which data is received from external Application boundary. And RET 0. So according to the above ranking table Number of DET Number of FTR 9 3 Total function 6 Table :.EI for the add customer EI Update Customer Description Number of DET Number of RET Page 54 of 215 . Customer detail is received from external boundary that is customer input screen. Note this file is only referenced for credit card check. There's only one textbox credit card number and hence one DET is put in the side column. EI Add Customer Description There are total 9 DETs. the address list box.

Credit card check process can be complex as the credit card API complexity is still not known. Data that is credit card information crosses from credit card system to Customer system. Here the customer screen has add and update.There are total 9 DETs. UPDATE. The customer details is displayed Page 55 of 215 .EI for the update customer While counting EI I have seen many people multiplying it by 3. all text boxes. check box active. There are 3 FTRs.EO to check the credit card Following are rules to recognize EQ: • It’s a dynamic elementary process in which result data is retrieved from one or more ILF or EIF. But later when some refers to your FP sheet he will be completely lost. Look for RET counting rules defined in previous section. Following are rules to recognize EO : • Data should cross application boundary and it should involve complex logic. and DELETE). So according to the above ranking table Number of DET 1 Number of RET 1 Total function 4 Table :. all add and update buttons. The customer code is inputted from the same screen. one is the address and the second is the credit card information and third is customer himself. So according to the above ranking table 9 3 Total function 6 Table :.That means we are going to do all CRUD functionality (ADD. • In this EP some input request has to enter the application boundary. the address list box. Note if there are no RET we count default as one. For editing the customer we will need to retrieve the customer details. EO check credit card Description One DET Credit Card number and one RET credit card itself.This is not fair as it just shows laziness of the Cost estimation team. even the credit check button. I can say the 2 * 6 that's = 12 FP for this EI customer. • Output results exits the application boundary.

Customer Address. Language we will use.• while the customer is editing the customer data. Customer Name. EQ Display Customer Edit Information Description There are 5 DETs to be retrieved Customer Code. we have to calculate and tabulate the GSC and come out with the VAF. Only customer details and customer address will be referenced. In order to make it adjusted function point. EQ does not contain any derived data. Number of DET Number of FTR 5 2 So according to the above ranking table Total function 3 Table :. The above customer data which is displayed does not contain any complex calculations.Please note we have said this as Unadjusted functio n as we have not accounted other variance factor of project (Programmers leaving job.Total of all function point So unadjusted function point comes to 31. Credit Card number. let’s add the total function point got from above tables: Function Point Section Name Counted ILF Customer EO Credit Card check system 4 EIF credit card information 5 EI Customer (Add and 12 update) EQ display customer edit 3 information Total Unadjusted 31 Function Points Table :. what architecture etc etc). GSC Data communications Distributed data processing Performance Heavily used configuration Transaction rate On-Line data entry End-user efficiency On-Line update Value(0-5) 1 1 4 0 1 0 4 0 Page 56 of 215 . Active.EQ to display customer edit So now.

65 + (22/100) = 0. For build and fix model we will not deliver any of the documents and the only document delivered will be source code.GSC VAF = 0. Calculating the Adjusted FP = VAF * Total unadjusted FP = 0. But as said it up to the project manager to change according to scenarios.87 * 31 = 26. But for Prototyping models in addition to the documents above we will also need to deliver the Rough prototype.Complex processing 0 Reusability 3 Installation ease 4 Operational ease 4 Multiple sites 0 Facilitate change 0 Total 22 Table :. Source code and testing plans. That’s why programmer works at night. The main intention of introducing this section is because estimations are heavily affected by which software life cycle you follow. we say that we will complete 3 FP per day that is 9 working days. Now calculating the Efficiency factor. So. I know upper manager people will say make it 7 FP per day and over load the programmer.87. be very particular with this factor. the whole customer GUI is of 9 working days (Note do not consider Saturday and Sundays in this). Because deliverables change according to SLDC model the project manager chooses for the project.Phase wise distribution of effort The above sample is total 100 % distribution of effort across various phases. implementation (coding) and testing . Considering SDLC (System Development Life Cycle) Before reading this section please refers to different SDLC cycles in previous chapters. Percentage distribution effort 10% of total effort 20% of total effort Total effort given by unadjusted FP Testing 10% of total effort Table :. design. = 0. We will divide the estimation across requirement.In what way the estimation has to divide across all deliverables is all up to the project manager and his plans.Ok now from the above function point estimation the estimation is 9 days let’s try to divide it across all phases. Example for waterfall model we will have Requirement documents. So now. So according to SDLC model deliverables change and hence the quotatio n.97 = rounded to 27 FP. Now we know that the complete FP for the customer GUI is 27 FP. Phase Requirements Design Phase Coding Page 57 of 215 . Design documents. This factor affects the whole FP like anything.65 + ((sum of all GSC factor)/100).

2 * Function Points 20-25 % of total effort can be allocated to testing phase.8 days 9 Days Requirements Design Phase Coding Testing Total 0. Total number of Test Cases = (Function Point) raised to power of 1.9 days 1. Every company has his quotation format accordingly. Test cases are non-deterministic. So no hard and fast rule of quotation template. Just a small comment about test cases.com/mac/resources/ templates.9 days 12.2. That means if test passes it takes “X” amount of time and if it does not then to amend it take “Y” amount of time etc etc. So we have allocated total man days derived from unadjusted FP in coding and then percentage of it is distributed across other phases. Final Estimation One programmer will sit on the project with around 1000 $ salary / Month. One of the important point to note is the estimation derived from unadjusted FP is 9 days and percentage of that man days is distributed across the total SDLC cycle. But for execution we have taken the 100 % of the man days derived from unadjusted FP.Phase wise effort distribution of man days The above table shows the division of project man/days across project.This is as suggested from caper Jones. Use case points .aspx?pid=templates has good collection of decent temp lates. XYZ SOFTWARE COMPANY Page 58 of 215 . FP . But still if interested http://www. Now let’s put down the final quotation. SMC) gives you total estimation of execution and not for other activities like documentation etc.6 days salary comes to 290 dollars approx. The upper quotation format is in its simplest format. So his 12. Any estimation technology (COCOMO.6 Days Table :.Phase Percentage distribution effort 10 % of total effort 20 % of total effort 100 % as given by the unadjusted FP 10 % of total effort Distribution of man/ days across phases 0. Number of Acceptance Test Cases = 1.microsoft.

In this book we have shipped a complete book “How to prepare software Quotation”.65 + (GS/100). This free E-book basically explains in detail manner other estimation technology widely used in projects.20090DATAENTRY Quantity Description Discount Taxable Total 1 Customer Project 0% 0% 466 dollars Quotation Valid for 100 days Goods delivery date with in 25 days of half payment Quotation Prepared by: . California. GSC and VAF. So the formulae is VAF = 0. Here’s the table with every five incremental values in formulae and plot. rather than they base line UAFP or construct there own table depending on company project history. Note: . Most of the software companies do not use GSC.SPEG department XYZ. but they also use UAFP rather than AFP.xls is provided with the CD which has all estimation details which you can refer for practical approach. GSC Acceptance in Software industry GSC factors have been always a controversial topic. Table – Final bill CustomerSampleFP.XYZ estimation department Approved by :. In this experiment we will assume UAFP = 120 and then lot graph with GSC increment of five.To: TNC Limited. Western road 17. FP 78 84 90 96 102 108 114 120 126 132 138 144 150 156 GSC 0 5 10 15 20 25 30 35 40 45 50 55 60 65 Page 59 of 215 . Let’s do a small experiment to view relationship between FP. AFP. ISO has also adopted function point as unit of measurement. Quotation number: 90 Date: 1/1/2004 Customer ID: Z.

• If the GSC value is zero then VAF is 0.23:. So the VAF = 1.65. half of 70. UAFP = FP VAF should be one. Here’s the example to demonstrate GSC problem. So the graph starts from UAFP*0.65 + (70/100) = 1. It also captures that nature of complexity is linear.FP versus VAF The following are the observation from the table and plot:• Graph is linear. In order that VAF does not have any affect i. VAF will be one when GSC is 35 i. That means complexity increases.e. So in order to complete value “1” value “0. That means complexity decreases.e.65.65” is required. Page 60 of 215 .GSC acceptance Figure 1. GSC is applied throughout FP even when some GSC does not apply to whole function points.35. • When GSC > 35 then AFP > UAFP. So the maximum value of VAF = 0. • When GSC < 35 then AFP < UAFP.GSC = 35 AFP = UAFP.65? There are fourteen GSC factor from zero to five. Readers must be wondering why 0. Note value is 0.65” is taken. But following is the main problem related to GSC.35 when GSC is 35 to complete the one factor “0.162 70 Table :.

Let’s take 11th GSC factor “installation ease”. GSC with installation eases “5” GSC with installation ease with FIVE GSC Value(0-5) Data communications 1 Distributed data processing 1 Performance 4 Heavily used configuration 0 Transaction rate 1 On-Line data entry 0 End-user efficiency 4 On-Line update 0 Complex processing 0 Reusability 3 Installation ease 5 Operational ease 4 Multiple sites 0 Facilitate change 0 Total 23 Page 61 of 215 . GSC with installation ease with ZERO GSC Value(0-5) Data communications 1 Distributed data processing 1 Performance 4 Heavily used configuration 0 Transaction rate 1 On-Line data entry 0 End-user efficiency 4 On-Line update 0 Complex processing 0 Reusability 3 Installation ease 0 Operational ease 4 Multiple sites 0 Facilitate change 0 Total 18 Table : GSC with installation ease zero VAF = 0.83 = 83 Function Points. So we change out GSC table with installation ease to 5. So the FP = 100 * 0. The project is of 100 UAFP and there is no consideration of installation previously by client so the 11th factor is zero. But later the client demanded for full blown installation for the project with auto updating when new version is released.65 + (18/100) = 0.83.

CHGA: .88 = 88. This value is achieved by counting all new EP (Elementary process) given in change request. It’s rare that customer removes functio nalities (at least in India).This is VAF factor which is because of CR. updating any database structure changes etc etc.This is new function points added. DELFP: . but if they ever estimator has to take note of it by counting the deleted elementary process. VAFB: .Table :. VAFA: . To make an auto updation for a software versioning can no way be done in 5 function points .88 so the FP = 100 * 0. Do not count elements which are not affected. ILF.Function points which are affected due to CR. In one of our huge projects we had good programmers. Example previously the application was desktop and now is changed to web so the GSC factor is affected.When CR is for removing some functionality this value is counted. Function point group has come out with a methodology called as “Enhancement Function Points”.65 + (23/100) = 0. Well from this book point of view we have to evaluate this changes which can be addition or deletion of requirements. deleting the old version . So that’s the reason GSC is not accepted in software industry. Believe me programmers get pissed if the customer is changing his plans every fortnight. it time to count total Function points of the application. EI. Best ways is baseline you’re UAFP and make your estimation on base of UAFP.Again removal affects Value added factor. EO and EQ which are affected.GSC with Installation ease 5 So VAF = 0. The difference is of only 5 FP which from no way a proper effort estimate. FTR. Total Function points = [UFPB + ADD + CHGA] – [CHGB – DELFP] Page 62 of 215 . Once we are through with calculating enhanced function points. just think downloading new version. Down is the formulae Formulae of EFP (Enhanced Function Points) = (ADD + CHGA) * VAFA + (DELFP) * VAFB ADD: . This value is achieved by counting all DET. very enthusiastic. Enhancement Function Points Major software project fail not because of programmer’s or project managers but due to moody and changing customers. The project started of well but customer called ten times in a day to change something or other.

EQ. EO. EIF.25 :. DELFP: . We also input how much FP a programmer can complete in one day. EO. Below is the image snippet which shows the various sections in the total estimation sheet.Function points previously counted before enhancement. In both Jobsite and chat application you can find the estimation sheet.GSC is the total of all GSC section from the GSC sheet.Changed function points before enhancements. Enhancement function points is not covered from practical angle in this book and is left to the user’s as exercise. 3 . 4 .UFPB: .Newly added functionality which leads to new function points after enhancements. Figure 1. CR (Change request) is covered in more detail in Change request chapter. CHGB: . When you open the sheet you can see the below section as shown in figure below.Different sections in FP template The main Action takes place in total estimation sheet. CHGA: . EIF.ILF. Function point template explanation In order to use FP in our project in easy fashion we will be using function point excel template to automate our estimation.Deleted function points. Please refer the function point chapter in case you have doubts regarding what is EI. This depends on what kind of programmer are you recruiting on the project. EIF. Page 63 of 215 . Let’s try to understand in numbered fashion what exactly the sheet means:1 . ADD: . 2 .Changed function points counted after enhancements. EO. Total Estimation has the full consolidation of the estimation. EI. EQ etc. EO and EQ sheets.Based on GSC we get the total adjusted function points. For instance if you have seniors in your project then you can enter probably 2 FP per day as seniors will be more productive.These columns are pulled from individual ILF. EQ and EI.This column (Unadjusted function points) is the total of ILF. EI and GSC serves as an entry she et for all the necessary inputs.

In this column we define how many developers will be working on the project. Figure 1.26:. Testing Document The success of every project is test. So we need to assign 100 % to execution and from that 100 % we take whatever percentage and distribute it to the other phases. Below is the simple paste of a sample. So basically we define steps with pass and failed conditions. 7 .Total Estimation Template Note: . This is basically an address application.Here we distribute percentage wise man days according to the SDLC phases. This free E-book basically explains in detail manner other estimation technology widely used in projects.You can also watch the video explanation of the FunctionPoint Template from the CD. But one important point to be noted is the total FP is nothing but the execution phase of the project. In this book we have shipped a complete book “How to prepare software Quotation”. 6 . The below action is when user updates the address. Page 64 of 215 . test and test.5 . All the professional projects in this CD have a test plan at the end.Based on number of developers defined in 6 we get project schedule which is nothing but Total Man day divided by number of developers.

For example. o Change some information in all the three fields. It also enables programmers to create relationships between one object and another. Failed condition o The system is not able to update the address data. test plan . estimation and a technical document. To understand the importance of OOP we need to first understand the problem with procedural/structural programming practices.Update Address Steps for the test: o Start the Address book application o Select one of the addresses from the address data grid.All the professional projects in this book will all have the above documentation in project folder. eliminate redundant code. since the modules were tightly integrated changes in one part of the module inadvertently breaks the other part. we need to understand some of the fundamental aspects of OOP. Note :. Chapter 2 OOPs Primer Why OOPs Object oriented programming enables programmers define not only the data. o Press Update button Passed condition o System should save the changed information and display the newly entered data in the grid below. but also its associated behaviors/functions that can be applied to the data. So why OOP? OOPs facilitates code reuse. Procedural programming was suitable for small projects. objects can inherit characteristics from other objects. easy management of software complexity etc. Address details will be displayed on the textboxes above. with minimum maintenance. But as the program grew in size. along with it grew the maintenance nightmare. The next big problem with procedural programming was with respect to reusability. To understand how OOP practices enable us to write better. team-development. It was very difficult to write truly reusable code. Page 65 of 215 . Also. Team development was not truly achievable. maintainable software. That means every professional project will have use case document .

Classes provides a mechanism to abstract the required attributes such as first name. a last name and so on. The private key shows how the complication is hidden from the external world. The “:” says that clsJobSeeker is the child of clsUser class and that’s how we define inheritance in C#. the parent class implementation is often visible to the subclasses. we need to be familiar with some of the terms programmers frequently use while developing object oriented software. you might want to define a class of “Person”. For e. Object can have both attributes/data and behaviors. For e. An object is an instance of a class. Every person will share some common characteristics/attributes like first name. address etc.g. talking etc. The only way to access these data is through public interfaces provided by the functions. This is one way to achieve reusability in OOP. We share some common attributes like we both have a first name.g. This term refers to the fact that with inheritance. Inheritance models “is-a” relationship. Below is how practically encapsulation and inheritance is implemented in C#. public class clsJobSeeker : clsUser { private string _JobSeekerName. The data is hidden from the outside word. Classes are also known as “Abstract Data Type or ADT”. a “car” is an automobile. Classes and Objects The class represents or defines the common characteristics/attributes of an object of a particular type. Abstraction Abstraction refers to the act of representing essential features without unnecessarily including the background details or information i. The purpose is to reveal as little as possible about the inner workings of the class. It is a representation of a real world thing. last name. Encapsulation(or Information Hiding) Encapsulation is a technique where data and its associated behaviors(function) are wrapped in a single unit (Class). last name in case of “Person” class and functions to operate on these attributes. In this case the “automobile” is called the base class and “car” is called as derived class or inherited class. We have some common behaviors like walking. For e. A class is made up of attributes and behavior..e. So. representing a complex problem in simple terms.Fundamentals of OOPS To understand the fundamentals of OOPS. You. Inheritance Inheritance is a technique with which an object of one class acquires attributes and behaviors from an object of another class. Page 66 of 215 . me are instance of the “Person” class. Attributes are defined in terms of member variables and behavior is expressed in terms of function. This type of reuse is often called white-box reuse. a class serves as a blueprint for similar type of object.g.

Because objects are treated only as "black boxes.e. private string _PhoneNumber. Ine the below scenario clsUser is composed of clsMenus objects. So we create clsMenus object inside the clsUser class.private string _SurName.g. So if the external consumer who is using this component calls only the login method it loads all the user and if they pass the userid then it will load only that user details. an operation may exhibit different behavior in different instances. } Polymorphism The ability of different objects to respond to the same message in different ways is called polymorphism. Method overloading is an example of static polymorphism whereas overriding would be an example of dynamic polymorphism. Polymorphism is also the ability of an object to take more than one forms. There are two methods Login and Login with userId. private string _Address. Composition models “has-a” relationship. There are basically two types of polymorphism i. static and dynamic polymorphism." this type of reuse is often called blackbox reuse Below is the code snippet which shows how composition is implemented in C#. Below is how we implement polymorphism in project practically. public void login() { } public void login(int intUserId) { } Page 67 of 215 . for e. public class clsUser { private clsMenus objMenus = new clsMenus(). } Composition When reuse is achieved by composing another object. This approach requires that the objects have well-defined interfaces since the internals of the objects are unknown. The behavior depends upon the types of data used in the operation. the technique is known as composition.

A message consists of three parts (i) A receiver object (ii) A method the receiver knows how to execute (iii) Parameters. and have the same return value. When one class depends on another class they are said to be coupled. We cannot have any implementation code in the interface. but leave the implementation of other methods until a specific implementation of that class is needed. properties and indexers. The more any one object knows about any other object in the system. as the method specified in the abstract class. Coupling Object coupling describes the degree of interrelationships among the objects that make up a system. and each implemented method must receive the same number and type of arguments.Message An object in isolation is of no use. Interface’s members can be events. makes sense. coupling is a measure of how two items. Classes can inherit from only one abstract class. a class or method. but does not have any knowledge of the implementation details of the other class they are said to be loosely coupled. they are said to be tightly coupled. Interface An interface is a reference type and it contains only abstract members. Abstract classes and Interfaces Abstract Class Abstract are classes that cannot be instantiated. Its value comes from its interactions with other objects. This interaction takes place through messages. Cohesion Cohesion is a measure of how much an item. methods. In other words. The interface contains only declaration for its members. When one class relies on the implementation of another class. When one class interacts with another class. if any. High cohesion is desirable. Objects with low cohesion are more likely to be changed. A method is highly cohesive if it does one thing and only one thing. Page 68 of 215 . A class can implement multiple interfaces. When implementing an abstract class. the tighter the coupling is between those objects. Abstract classes are useful when creating components because they allow you specify an invariant level of functionality in some methods.g. you must implement each abstract method in that class. are interrelated. The entire client which uses the interface must fulfill the contract by implementing the interface. such as classes or methods. Always try for loose coupling among objects. or not at all implemented. and are frequently either partially implement ed. An interface is also known as a “contract”. say for e.

implemented functionality among all implementations of your component. VC++ and VFP had Visual studio and so on. If the functionality you are creating will be useful across a wide range of disparate objects. To develop as simple windows UI (User Interface) it use to take hours. In today’s competitive world no language can come up if there is no RAD tool companion with the language. To display a simple window or a command button itself was a huge task. Below is how interface and abstract classes are used in project. oh yes and programmers are humans. VB6. either far from the reality of OOPS. compiling was luxury.NET have Visual Studio. JAVA has ECLIPSE. As this is a C# Page 69 of 215 . use an abstract class.In this project book have a close look ah the Chapter 3 Understanding the IDE The IDE Humans are lazy. In order to define a interface we use the interface keyword and to define abstract class we use the abstract keyword. use an interface. public interface iEmployee { } public abstract class clsEmployee : iEmployee { public clsEmployee() { } } Note :. If you go back to the good old times.Decide between Abstract class and Interface If you want to provide common. whereas interfaces are best suited for providing common functionality to unrelated classes. whereas interfaces contain no implementation for any members. We still remember people first writing the whole code on a book and then sitting on the computer.NET as the RAD tool.60 % of the software projects do not use OOPS or are chat application and job site of how the classes are made. In the same way C# and VB. Abstract classes allow you to partially implement your class. Abstract classes should be used primarily for objects that are closely related. In order to increase programmer’s productivity and reduce redundancy RAD (Rapid Application Development) tools where introduced.

Web Application is accessed using a browser over a network such as intranet or internet.NET you will see something as show in the below figure.NET Web application”.Windows applications are programs which run under Microsoft windows operating system.Different types of projects in Visual Studio Note: . Class library etc. The only reason we have chosen C# is because of the huge concentration that Microsoft gives to it. Concentrate on the two important templates “Windows Application” and “ASP.This book will be using C# as the language to demonstrate all projects. On the left hand side of the pane you can see you can create these templates using any of the languages. excel or a simple MSN chat application are some examples of windows application. For instance word. On the right hand side pane you can see different project templates like Windows application. When you try to create new project using VS. Page 70 of 215 . Note: .projects books lets get introduced to this beautiful tool which will help us to develop C# projects effectively and in more speedy manner. Figure 3. But let’s not get confused by all the templates at once.1: .

On the left hand side you can see the tool box which has reusable components like text boxes .Complete IDE view When you open a new project using Visual Studio. The above whole environment is called as the IDE (Integrated development environment).. On the right hand side of the pane you can see the solution explorer.. In order to build the project yo u can click on the build option. combo box etc which you can drag on the designer pane.. Solution explorer gives view of your files and folder structure in your project. The major part of the whole IDE is occupied by the designer pane (its marked with double head arrows as shown above). But surely as time passed by you praised the effectiveness and speed by which you can use drilling machine rather than hammer.2: .NET you will see a complicated environment as shown in the above figure. Don't panic.You remember the first time you took a drilling machine to put nails on the wall and found how complicated it was as compared to a simple hammer. Solution is a combination of one or more projects (We will come to projects concept when we actually develop the project). Page 71 of 215 .Figure 3. You have two options one is you can build the project or you can build the solution.

Compile.But yes you did it. Let’s try to understand this sample code as we will frequently come across it. Below figure depicts the pre-defined code inserted by the designer. Windows form Code walk through When you created the above application you will see the designer has some code which is already present by default.3: . If you get the above screen you have already made your first C# project. Page 72 of 215 .Figure 3. Definitely it has no practical importance…. Debug and Run C# Projects In order to run the application you will need to press F5 or click on Debug – Start.

Because InitializeComponent () is called by the constructor it will be executed only once when the form object is created.Forms namespace. In the above figure we have also mapped the sequence with code snippets.NET languages that must implement Windows Forms applications. This is the entry point for any windows application.Code walk through for Windows application A Windows Form is a Windows Form because it inherits its functionality from the System. The constructor in turn calls the InitializeComponent() method. With single threaded model we can ensure that communication with COM components works perfectly well. You can also see “[STAThread]” attribute marked on the method. The InitializeComponent () section is the section where you can do all initialization activity.Figure 3. InitializeComponent () section can also be used to bind the event handlers with the method names.Windows. The main entry point of the application is the “static void main ()” method. Every form is a class. Second section which is executed is the constructor of the form or UI. The “[STAThread]” ensures that the thread in which the application runs is single threaded. This namespace is used across all . COM components run under single thread apartment and it’s essential that the entity using him sho uld also run in a single thread.4: .e. Page 73 of 215 . So you can easily visualize that there are four important sequences and below is a detail explanation of the same:• • • The first code snippet to execute is the main entry method i. All windows application will follow the above sequence defined in the image. This attribute is especially meant for COM Interop used in application. Static void Main ().

questpond. Figure 3. for e. :. As you see from below figure the web server sits between the websites & end user. The IIS In this section we will discuss about IIS (Internet Information Service) which is basically an answer to Microsoft’s web server.g.IIS and user interaction Web Application Code walk through Page 74 of 215 .com • The webserver processes the page and sends back the HTML/ASP page back to the end user. Here is the process how it actually interacts with the server:• User request for a website from his browser.• The InitializeComponent () section then triggers the Form1_Load event.5 .www.

As you can see in the below figure.NET then creates a project file on IIS.NET and IIS Now we have understood the fundamental of IIS. it is a file which says what kind of file are present in a project.aspx.csproj file: . Let us try to understand how VS. From the below figure you can see visual studio creates project which is default named as “webapplication1” with some default files. As you can see in the below figure we have opened “csproj” file in notepad you can see that it is actually pointing towards other file such as assemblyinfo. VS. The default important files created are:• WebApplication1. The developer opens the VS.NET interacts with the IIS.config • Webform1.Different files in web application Now let’s try to understand every individual file in more detail: • Webapplication1.NET and request visual studio to create a web project.asax • AssemblyInfo. We always open this file using VS.csproj • Global.7: .cs • Web.sys etc.cs / resx / .Figure 3.NET and that in turn loads all the other files.In short.aspx Figure 3.This file is like a index file and also defines which file is present in a visual studio project. Page 75 of 215 .6: -.

So let’s understand the events in more detail fashion. When we say application end it can Page 76 of 215 .CSproj data • Global.8: . Once this event has occurred it does not happen again for every user. It is used to cleanup memory and variables.asax file: .asax file you will find the following events.It allows you to write code in application level event.Figure 3. • Application_End: In end when application ends this event happens. If you open global. The first four events are very important rest all are included for knowledge sake which are as follows :• Application_Start: This event happens once in the beginning when any user hits IIS application. Try to open in notepad you will come across many events.

Description. Version etc.• • happen both when the server restarts.cs in notepad you will get more attributes like below figure Page 77 of 215 . Application_BeginRequest etc. Session_Start: This event happens when any new user visits the websites.cs file :. Configuration.asax. Figure 3. when IIS resets and when you change the global.Try to open assemblyinfo.Global. Application_Error. Session_End: This event actually happens when user close the browser.9:.asax 2) assemblyinfo. The other events are Application_Init.This file basically contains all information about assembly such as Company. Application_Disposed.

Lets have a look on example of Web.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="sConnectionString" value="Provider=SQLOLEDB.Password= mypwd.For instance. It is basically in XML format.config file :.cs file 3) Web. Lets try to open in notepad and understand in detail the web.config file is a perfect place to save application configuration settings in ASP.Initial Catalog=mydatabase." /> Page 78 of 215 . This is used to define settings for ASP.config file and can easily access in ASP.10:-assemblyinfo.User Id=myuser.net application.config file which are as follows:Web.config file:<?xml version="1.net. if we consider database connection string it can be placed in web.This is the most important file in the web project.Data Source=myserver.net.Figure 3.and connection can also be changed to other database server if required.

config file is used to handle web application errors.11:. ASPNET Windows account is required to to access ASP. <appSettings> define custom settings of ASP.12:.AppSettings("sConnectionString").com and 3 modes which decides the status ‘ON’.config .questpond.NET resource. The <add> child element of the <appSettings> adds value pair and can easily be accessible from your application as follows:ConfigurationSettings.</appSettings> <system.web /> </configuration> Figure 3. So it will redirect to default URL www. Here identity is required to access the application.13:. ERROR STATUS CODE generate the error number in this case we have no. Figure 3.The AppSettings tag As you observe a new section <appSettings> has added to web.Impersonation Page 79 of 215 .questpond.NET application.config file is <identity> settings. Disabled and Enabled for remote machines respectively.CustomErrors Section Another important section of web.com Figure 3. • <customErrors> section of web. The default URL in our example is www. Lets try to understand the following syntax of customErrors. For instance. 404. this account is by default. ‘OFF’ and ‘REMOTEONLY’ means Enabled.

init event:. Tracing and Authorization & Authentication etc. For example : . As we dive in to projects you will easily able to map the below events.In below figure we have a button click event.net lifecycle in action. • page_unload event : .14:.net.NET Web. where it shows ASP. • Control event: . Towards left if we look there are four events • page.Impersonate is act by which application (ASP.This is a basic event in which triggering or firing is done by the user. Page 80 of 215 .Impersonation for Windows Account The ASP. Binding of data with the UI can be done in the Page_load event. Below is the figure. The whole point is to understand the sequence of events to put right code in right event.In this event we basically loads the controls. In the below figure you will find two sections the left section is the sequences of events happens and the right section shows actual coding which happens behind ASP.NET) is executed by authenticated (ASPNETWindows) account while accessing is provided by IIS.config file can control many more settings like Session State. • page_load event.In this event we attach the event handlers with the controls.In this event we can write clean up code to close the page. Here we can specify an specific account instead of ASPNET Windows account by changing the syntax as follows Figure 3.

we have provided setup of “MSDE2000A”. But there are round about ways by which you can manage MSDE 2000:• Old command line utility OSQL. It’s primarily provided as a low cost option for developers who need database server which can easily be shipped and installed. NOTE: .516 TB1.EXE. Being educational material we are going to use “MSDE2000” as database which is a scaled down version of SQL server 2000.048. microsoft. Microsoft has its own database called SQL server. It can serve as good alternative for Microsoft Access database as it over comes quiet a lot of problems which access has.Figure 3. Below is a complete list which can give you a good idea of differences:• Size of database: . It does not mean that you can not have more than eight concurrent operations but the performance degrades. 85% projects in IT industry are database driven. “SQL server express edition” is the scaled down form of SQL 2005 you can download from “http://www. Page 81 of 215 . As compared to SQL SERVER 2000 you can have 32.ASP. redistributable and cut short version of the giant SQL SERVER database.In CD. Database is the most important part in a project. • ? SDE does not have support facility for SQL mail. Query analyzer or Profiler. M • MSDE 2000 does not have GUI administrative tool such as enterprise manager. • MSDE does not provide OLAP and Data ware housing capabilities.0 and this book is targeted for huge audience so we have kept backward compatibility. As MSDE does not have any UI (user interface) which help to maintain objects of the database so we will be using client tools of SQL server for the same. Client tools can be installed using “SQLEVAL” setup provided in the CD. Eight connection performance degradation is implemented by using SQL SERVER 2000 work load governor (we will be looking in to more detail of how it works).15: . We have avoided using SQL 2005 in this book because for that we need VS.com”.MS ACCESS and MSDE have a limitation of 2GB while SQL SERVER has 1.NET MSDE Basics In this chapter we will be looking how to deal with persistent data.NET 2.NET page life cycle Chapter 4 Databases and ADO.767 concurrent connections.NET 2005 and . • Performance degrades in MSDE 2000 when maximum number of concurrent operations goes above 8 or equal to 8. Difference between SQL and MSDE MSDE is a royalty free.

S ? QL SERVER WEB Data administrator installs a web based GUI which you can use to manage your database. For any details refer http://www.There are two major differences first is the size limitation (2 GB) of database and second are the concurrent connections (eight concurrent connections) which are limited by using the work load governor.microsoft. There are lots of third party tools which provide administrative capability GUI (Graphic User Interface). Summarizing: .Installation of MSDE2000 Page 82 of 215 .NET IDE Server Explorer: . Figure 4.Inside VS. MSDE does not support Full text search.1: .exe” from CD and click ‘install’ > accept agreement ‘I agree’ > select target folder for installation shown as below. Installation of MSDE Let us make walk through of how to install MSDE and create database objects.• • • • • VS. • Run “MSDE2000A.aspx?familyid=c039a798 -c57a-419e-acbc-2a332cb7f959&displaylang=en SQL-DMO objects can be used to build your custom UI.NET IDE you have a functionality which can give you a nice GUI administrative tool to manage IDE.com/downloads/details.

‘sa’ password specifies password for ‘sa’ user in SQL server. password and security mode as shown in the figure.2: . So we need to go to services and “start” the same as figure below Page 83 of 215 . In order to install “SQL2000Client” run ‘SQLEVAL.exe’ setup from the CD and select ‘Client tools only’ as shown in the figure below. Figure 4.Select the client tool for installation • The instance created by the MSDE is actually registered as ‘Service’ in the windows services. • Figure 4.3: .• Once the installation is completed we need to create new instance in which we can create database as shown in the figure below we need to run the setup command prompt with the following parameter using instance name.Creating the database instance As we have said earlier we do not have user friendly ‘UI’ to manage MSDE so will be using “SQL2000ClientTools” to connect MSDE.

Start the service • Now let us connect to MSDE instance using the client tools so click on Start > Program > Microsoft SQL server > click ‘Enterprise manager’ > click ‘Microsoft SQL server’ > right click on SQL server groups > click new SQL server registration > Add server.e. if you remember we have provided ‘sa’ user and ‘sa’ password so add the same and click ‘Finish’.Setting up instance NOTE: -enlarged view of command prompt is shown in below figure. Figure 4. if you remember while creating instance we have given mode as ‘SQL’ so w need to e follow the second option in the authentication mode dialog box i. SQL server should be registered to your Enterprise Manager.Figure 4. while adding server you need to do as our example “PERSONAL/MyJobsite” and click “add” button > authentication mode.5 :. SQL server login > add user ID and password for SQL server.4: . Page 84 of 215 .

7: . Let us make a quick walk through of basic SQL syntax in order to run SQL commands we need to open Enterprise Manager > click on ‘Tools’ in the menu bar > click on ‘SQL Query Analyzer’. This will open up a window where you can write a command and execute the same as the below screen shots.Figure 4.Create new database Basic SQL Commands In order to manipulate and create object in database we need to use SQL (Structured Query Language).6: -Connectionstring setup • In order to create database. Figure 4. right click on database > click new database > give database name. Page 85 of 215 .

net is the latest kid on the data access framework block. DELETE: .This command creates a login table with two fields. SELECT with criteria: .net uses XML (Extensible Markup Language) behind the scenes as is indicated in the figure below. connection is made to the data store as and when only required i. Figure 4.Simple SQL statement ADO.net works in disconnected mode unlike earlier data access technologies which used to work in connected mode.Running the query analyzer Below are the basic SQL commands which you need to create new project and then • • • • • • CREATE TABLE: . UPDATE: . INSERT: . user name and password and both field are of 20 characters each.This command inserts data into the login table with the value (user name = shiv1 and password = shiv1).Figure 4. What this implies is that.9: .This SQL command updates the password for the given user name. SELECT: -This type of command selects all the data from login table.e.8: . ADO. Page 86 of 215 .This will select the data where [user name = “shiv1”] is. ADO.This basically deletes the particular value from the login table.NET basics ADO. while reading or updating data.

The .Below is the simplified diagram view of primary objects in the ADO. Here in ADO. in adapting different databases with less changes.NET as a bridge between consumers and database.NET framework class library provides the following namespaces that contains types for ADO.Data.SqlTypes System.NET or data providers is to make consumers more adaptable. NOTE : .Data System.NET object model. Microsoft has introduced ADO.Data.10: .Odbc Page 87 of 215 .NET classes are divided into two sections: • Consumers • Data providers. For example.Data. if we want to connect to ORACLE then the consumers needs to use the oracle ADO.OleDb System.Data.net architecture The two main components of the ADO. • SQL Server Database Let us try to understand the above three entities step by step: • Consumers are basically windows forms and web forms which is interacted by the end user directly but consumers cannot connect to database directly instead they have to go through data providers.SqlClient System.Common System.net architecture are the Data Provider and the DataSet.Data.net architecture. • • • • • • System. Figure 4. Let us dig into the details of the ADO.NET data provider.NET.One of the most important aspect of ADO.ADO.

ConnectionTimeout : The number of seconds to wait when attempting to establish a connection.OleDb namespace contains the types which you can use to access and manipulate data in OLE DB data sources. Page 88 of 215 .Data. The System. This provider uses its own protocol to communicate with SQL Server and does not support the use of ODBC Data Source Name (DSN as it is commonly known).NET data provider This data provider is used for connecting to OLE DB data sources including MS SQL Server 6. Let’s have a look at some of the important properties and methods of the Connection Object.NET data provider This data provider is used for connecting to MS SQL Server 7. SQL Server. The Connection Object’s Properties The following are the common properties of the connection class: • • • ConnectionString : The string used to connect and open a data source. Database: The current database or the database to which to connect. SQL Server SqlCommand SqlConnection SqlDataAdapter SqlDataReader OLE DB OleDbCommand OleDbConnection OleDbDataAdapter OleDbDataReader ODBC OdbcCommand OdbcConnection OdbcDataAdapter OdbcDataReader Table: .Data. ODBC.NET provides us a way to connect to the data source. The System.important members of the Data Provider Namespaces The Connection Object The connection object in ADO.NET Data Providers The following are the important data providers in ADO. After the specified number of seconds is elapsed an exception is thrown. The System.Data.NET data provider This is the data provider for ODBC databases.net OLE DB.5 and earlier.Introducing the .SqlClient namespace contains the types which you can use to access and manipulate data in the above data provider.0 and later versions.Odbc namespace contains the types to connect to these types of databases. This is the provider to use if we need to connect to MS Access database. Connection object also supports transactions.

In the OleDbConnection class.Data. This method destroys the connection object. Broken. Invoking this method returns a command object. Its value is a bitwise combination of the members of the System. Closing a connection rolls back any pending transaction. • • • Page 89 of 215 . this property represents the path and filename of the data source. If connection pooling is enabled. Dispose: As usual once we are done with the work. CreateCommand: This method is used to create a command object associated with the connection. the connection object is returned to the pool. The OleDbConnection class has a property named Provider which is This property is a string Note: not available in other connection classes.e. Open: This method is used to open a database connection.• • DataSource: This property represents the source of the data store. Connecting. this is the name of the instance of database server to which to connect. The Connection Object’s Methods The following are the common methods of the connection cla sses: • • BeginTransaction: This method is used to initiate/begin a transaction. In the SqlConnection class. containing the name of the OLE DB provider. Executing. State: This property represents the state of the connection. Closed. Close: This method is used to close the database connection. Fetching and Open. This method returns a Transaction object. we can clean up the resources by disposing off the connection.ConnectionState enumeration i.

” con.Initial Catalog=orderdb. Just use the correct connection object and you are done with it.Dispose().Dispose(). con.ConnectionString = @"Provider=Microsoft. Let’s connect to an Access database /// Build the connection object OleDbConnection con = new OleDbConnection(). So. /// Clean up the connection con. con.Data Source=c:\order. /// Close the connection con.Data Source=localhost. See the similarities in the above code.OLEDB.Close().Open().Close().Jet.mdb". The Command Object The command object represents an SQL statement or stored procedure that can be executed on the server. The following are the common properties of the command classes.4. con.Let’s see an example of connection object in action.ConnectionString = @"Provider=SQLOLEDB. Page 90 of 215 .Open(). con. Let’s connect to MS SQL Server 2000 database SqlConnection con = new SqlConnection (). now you have got a basic idea of how to connect to different databases.0. /// Open the connection con.

TableDirect. UpdatedRowSource: The property of the Command object specifies how results from calling the Update () method of the DataAdapter are applied to the DataRow. Parameters : This property represents the collection of parameter object within the command object.e. ExecuteReader: Executes a select SQL statement and returns the result as a DataReader object. insert or delete SQL statement and returns the number of records affected by the execution. CommandType : This represents the type of the command to be executed.CommandType enumerations i. StoredProcedure. ExecuteNonQuery : Executes an update. Prepare : Compiles the command on the data source. Connection: This represents the connection object used by the Command object. CreateParameter: Creates a parameter object. The value of the CommandType property can be one of the members of the System. This is one of the way by which you can optimize your query where only single value is returned. The value of this property determines how the value of the CommandText property is interpreted. CommandTimeout : The number of seconds the command object will wait before terminating and attempt to execute a command.• • CommandText: The SQL statement or the name of the stored procedure to execute at the database server. • • Page 91 of 215 . Transaction: This property represents the transaction object with which the command object is associated. ExecuteScalar: Executes the command object’s query that returns a single value. and Text. • • • • • The Command Object’s Methods The following are the common methods of the command classes: • • • • Cancel: Cancels the execution of the command object. On timeout and exception is thrown.Data.

• Dispose: Releases the resources on the Command object. con.Initial Catalog=orderdb. Used to force garbage collecting. con.Data Source=c:\order. con. /// Build the command object SqlCommand cmd = new SqlCommand ().CommandText = sql. /// Associate the connection object with the command object cmd. /// Assign the sql to the commandtext property cmd.0.Connection = con. by using the Dispose method you automatically call the Connection object's Close method as well Let’s see an example of command object in action. Let’s build an OLE DB command object string sql = " select * from customers".Open(). Let’s build a SQL command object string sql = " select * from customers". Page 92 of 215 . Incidentally.Data Source=localhost.4. /// Build the command object OleDbCommand cmd = new OleDbCommand().Open().ConnectionString = @"Provider=SQLOLEDB.Jet. ensuring no resources are being held after our connection is used. con.”. /// Build the connection object SqlConnection con = new SqlConnection (). /// Build the connection object OleDbConnection con = new OleDbConnection().ConnectionString = @"Provider=Microsoft.OLEDB.mdb".

forward cursor over a rowset of ADO. The DataReader is implemented in ADO. One of the most important features of DataSet is that it always gets disconnected from database. its’ important to note that the “cursor” or logical row pointer in the returned data is just before the first row. Hopefully. which allows the data to be read by column name or index position.net as SqlDataReader. /// Associate the sql with the CommandText property cmd. Understanding DataReader DataReader plays a very important role in the overall ADO.CommandText = sql. It’s important to note that the all the DataReader class implements IDataReader interface. The important methods of DataReader are noted below: • • • • Read: The read method moves the record pointer to the first row. if tomorrow you need to write your own DataReader for your own customized database. OdbcDataReader. NextResult: This method is equivalent to ADO’s NextRecordset method. Read() will return true as long as there is an additional row to be read./// Associate the connection object with the command object cmd. The DataReader is the read-only. HasRows checks if any data exists. and OleDbDataReader etc. and is used instead of the Read method.NET v1. you get your feet with the command object too. in short it does not know which Page 93 of 215 . you need to call .Read() method once to read any data. HasRows: This method is introducted in .net framework. if the DataReader is opened with multiple set of data [multiple SQL statements].Connection = con.NET data. So. DataSet can be considered as simplified RDBMS in memory. then you know what to do. IsClosed: This method is used to determine whether DataReader is closed or not.1. Let’s see what’s more in store for us. This method is used to move to the next set of data. So. Close: Closes the DataReader • Understanding Dataset Data Set is the memory representation as shown in the figure below. When you get the results into the DataReader.

Internal dataset structure • DataAdapter:-It is functionally most complex object in Data provider. It contains four command objects: • Update Command • Insert Command • Select Command • Delete Command As you expect. Data relation collection: .data it is carrying and also goes a step further that it can contain data from multiple databases. DataSet is composed of two primary objects: • • Data table collection: . It is a bridge between a Connections and a Data Set. that DataAdapter uses the ‘SelectCommand’ to fill a DataSet and the remaining three commands to transmit changes back to the data source as required.Object contains one or more data relation. TableAdapter are strong type of DataAdapter. columns and constraints. You can manipulate the SelectCommand property of DataAdapter at run time to retrieve data from any table in the database specified by its connection. In real terms TableAdapter contains Page 94 of 215 .11: .Object that has multiple data tables and in turn data tables have rows. Figure 4. but the TableAdapter is specific to DataTable in a typed DataSet. Data relation provides simple way of navigating from master row in one table to related row in another table for example you can navigate from a customer table to customer’s address table using data relation collection object within a data set.

Dataset loading process Understanding Dataset Difference between DataSet and DataReader The major differences between DataSet and DataReader are:• DataReader provides forward-only and read-only access to data.NET let us look at one complete sample code for the same. while the DataSet object can hold more than one table (in other words more than one row set) from the same data source as well as the relationships between them. Page 95 of 215 . (4) and (5) Now we open connection object and SQL data reader object.both DataAdapter object and Connections object as private properties and also adds some additional functionality that makes connecting to data source both simpler and more powerful. In the below code snippet we are going to call a “StoredProcedure” – “getUserByUserNameAndPassword”. (2) and (3) As said before. • • Sample code Now that we have gone through the theory of ADO. Dataset can move back and forth as compared to datareader which can only move in forward direction. the “StoredProcedure” takes two parameters “UserNameAndPassword” in these two steps we create the command object and two parameters objects. This “StoredProcedure” takes two parameters “UserNameAndPassword” below sample code is numbered and let us try understand the same: (1) In this step we open the connection object “SqlConnection” class takes the connection string as an input to its constructor. Dataset is a disconnected architecture while DataReader is connected architecture. they can only forward it.12: . DataSet can persist contents while DataReader cannot persist contents. The command object has two important parameters “CommandType” and “CommandText” we have set the “CommandText” to store procedure name and “CommandType”as store procedure. Figure 4.

Figure 4. Page 96 of 215 .ADO.In order to use ‘Microsoft Data Application Blocks’ you need to install “DataAcessApplicationBlock. But in actual projects it is difficult to write all these steps again and again for every stored procedure.13: .NET basic code Microsoft Data Application blocks In the previous section we have looked at various steps to connect to database using ADO. Microsoft made one step advanced by introducing “Microsoft Enterprise Library” to increase reuse and bring down the development time. So let us look at how to use ‘Microsoft Data Application Blocks’ to increase the productivity in the project. Note: .exe” from the setup provided in the CD.NET.

If you count the number of code lines it has been reduced from “15 lines” to “1 line” as shown in the below figure.NET Page 97 of 215 . Figure 4. Below is the code snippet which calls the same stored procedure which was shown in the previous section.”.Data.DLL’ in your project and also include the same namespace using the statement “using Microsoft ApplicationBlock.15: .14: .Execution using ADO.Path of the Data application block DLL Once you have installed ‘Microsoft Data Application Blocks’ setup you will get the following files as shown in the figure below you need to get refer the ‘Microsoft.Data.Figure 4.ApplicationBlocks.

In this book we will always use “Microsoft Data Application Blocks” to connect to the database. It’s like growing up from a junior programmer to a senior programmer.16: . methods like fillrectangle. Well it’s interesting and will make your first C# Page 98 of 215 . Chapter 5 – Lets rock: . So the fun part will be more of logic warm up and the second section will be targeted towards becoming professionals.Figure 4. So lets start the journey of a developers life from rags to riches.The Mandelbrot project What will you learn in this project In this project you will learn the following things:• • Use structures in project Graphic objects like bitmaps.One line execution Let us understand the code (1) There are three important parameters which you need to pass to the SQL helper class “SqlHelper” is a static class so we do not need to create object of the same but for the current scenario we need to get the SQL data reader so we are calling the Execute Reader method. The main intension of segregating in two parts is one is for warm up and the other is moving towards professionalism. drawrectangle etc. Note: . The first parameter is the connection string followed by the stored procedure name and input parameters. Overview of Mandelbrot project Let’s start with a small project on Mandelbrot. Are you confused by the name or you must be thinking what kind of project is this. Part II – The Fun part Introduction to the fun part This book we have divided in to two parts the fun part and the professional part. There are two projects in fun part and three projects in professional part of the book.

So complex number has two parts one real and other imaginary one for instance 3 + i2. For example. Now that you have understood complex numbers lets move ahead to understand Mandelbrot set. It is a set of collection of complex numbers. -9 etc. So when you square an imaginary number you can get a negative number. you find a number that can be squared to get that number. A normal number is like 1. When you take the square root of a number.project more interesting. Let me give you some gurugyan (Knowledge) about Mandelbrot. To determine that is whether a number is inside the set or outside the set we use the following equation:- Page 99 of 215 . We are going to go bit mathematical in this so tolerate me. Mandelbrot set is set of numbers which reside inside the set. Figure 5.1: .The Mandelbrot So let’s first define Mandelbrot. 3i squared is -9. That means if we multiple -2 X -2 we will get a 4 which is a positive number. When we multiply any normal number with itself we can never get a negative result. Ok so what is a complex number? Let me revise for your guys what is a complex number. The number I is defined to be the square root of -1. But yes just as we enter maths below figure shows the mathematical art generated by Mandelbrot and yes we are going to display the same thing. -2. This means that I squared is equal to -1. This means that you can not take the square root of a negative number and get a real number.

How to start the Mandelbrot project Figure 5. In the first case. the number we are testing is part of the Mandelbrot set. Z changes and the magnitude of Z also changes. As we iterate our equation. The magnitude of Z will do one of two things. So the number Z keeps changing throughout the test. where the magnitude of Z stays small. or it will eventually surpass two. Once the magnitude of Z surpasses 2.2 : .Z = Z2 + C C is the number we are testing. So what are you guys waiting for lets get the above decent Mandelbrot image. If the magnitude of Z eventually surpasses 2. So was we test and plot the graph we should get the above image. it will increase forever. but it changes as we repeatedly iterate this equation. With each iteration we create a new Z that is equal to the old Z squared plus the constant C.Open the Mandelbrot solution Page 100 of 215 . Z starts out as zero. the number is not part of the Mandelbrot set. It will either stay equal to or below 2 forever.

Run the Mandelbrot solution Code explanation The complete project is in the CD in WindowsMandelBrot folder. constructors. A C# structure is a value type and the instances or objects of a structure are created in stack. operators and even other structure types.Figure 5. <modifiers> struct <struct_name> { //Structure members } Where the modifier can be private. indexers. Below is over all structure snippet. The struct is the required keyword. For example Page 101 of 215 . properties. constants. The general form of a structure declaration in C# is as follows.3 : . The keyword struct can be used to declare a structure. public. Click on WindowsMandelBrot solution file to open the project. The structure in C# can contain fields. Ok first let me revise what is a structure?. methods. We have one structure and two classes. A structure in C# is simply a composite data type consisting of a number elements of other types. internal or public.

} The objects of a struct can be created by using the new operator as follows. 2 .The structure represent the complex number. public int y. The classes are reference types while a struct is a value type in C#. The individual members of a struct can be accessed by using the dot (. Remember that unlike classes. 4 .The final solid classes which define the implementation for Julia and MandelBrot. The one big reason why MandelBrot and Julia class is inheriting from fractal is because they have lot of things in common. MandelBrot and Julia class inherit from the fractal class. Page 102 of 215 . 3 . points in a co-ordinate systems etc are good examples for struct types.struct MyStruct { public int x.Defines the structure for complex number. But C# structs are useful for small data structures that have value semantics. mstruct. mstruct. Complex numbers.y = 90.) operator as showing below.x = 70. the strcut object can also be created without using the new operator The structs in C# seems to similar to classes. So the below code structure snippet has one structure and 3 classes. So below is the numbered explanation:1 . But they are two entirely different aspects of the language. MyStruct mstruct = new MyStruct(). The objects of class types are always created on heap while the objects of struct types are always created on the stack.Fractal abstract class which has some basic methods which will be then overridden by its child classes MandelBrot and Julia.

5 : .Classes in project The physical project is as shown in figure below.Return the value if the complex number.Figure 5. 1 . 2 .cs is the UI part of the project.The private properties m_Real and m_Imaginary which will hold value of the complex. FrmMandelBrot.Set and get properties for m_real and m_Imaginary.cs is the file in which we have one structure and three classes as explained in the previous section. 1 .FrmMandelBrot. Figure 5.cs class to make the mandelBrot and Julia display.cs consumes the clsFractal. 2 .clsFractal. 3 . Page 103 of 215 . FrmMandelBrot uses the graphics object to display the same on the form. Below is the numbered explanation of the figure.Project structure The structure complex has two properties m_real and m_Imaginary.4 : . Below is the numbered explanation of the same.

MandelBrot and Julia inherit from Fractal class.6 : . MandelBrot and Julia.the Complex structure object Below is the code snippet of the three classes Fractal. You can see in the code snippet below 1 and 2 define the boundary of the corner and side for MandelBrot as well as Julia respectively. Fractal forms the parent class.Figure 5. Page 104 of 215 . In both the constructur we have defined the boundary between which the plot should happen.

2 and 3 define the factor and the construct the color array of 256 colors.We have also made the Color() array static so that it stays in memory and shared across all objects. Below is the numbered explanation of the same. 1 . This inner class loads the 256 color array in in.Use the FromArgB function to fill the array with all color values.Class structure In the Fractal class we have an inner class called as ColorMap. Page 105 of 215 . 4 .Define the total colors that are 512. The whole point of making this method is basically we do not need to construct the whole color array again and again.Figure 5.memory so that we can use the same to plot the graph.7: .

Below is the code snippet.5.Loop with the given width and iterations. 4.Create the object of the complex structure with the range within which the complex number should fluctuate. Page 106 of 215 .8: .Figure 5. 1 and 2 .We create a Bitmap object with a specific height and width on which we will draw the Julia or the MandelBrot set. We have numbered the same so that we can understand every line of it.6 and 7 -. Also use the color array defined in the static object to plot the graph. 3 . We are using drawrectangle to plot the results.Loading colors The draw function forms the heart of the project.

But it can serve as good warm project for start up.The draw function Note: .Though this project is simple and does not really construct somethng fruitful. Using the system. User should be able search files by File name.io namespace for the file search. You can go through the same for better understanding. Overview of File search Application In this chapter we will develop a simple file search application. Keyword and File type. Page 107 of 215 . There is also a video of the mandelbrot code walkthrough in the CD.Figure 5. Chapter 6 – File search module What will you learn in this project • • Threading.9:. Following are the key features of File search module:• • User should be able specify the folder location in which file and its contents has to be searched. Threading and Threading.

• • • Keyword is any data with in the file. User can restrict the search to specific file types like *. We need two things from the project perspective browse the folders . * . For instance you have a word document which has word called as “C# projects”. Fundamentals to complete the project In order to complete the above project we need the following fundamental understanding:• • • File system concepts. methods. Threading concepts.txt. and properties that are necessary for working with directories and files. user should be able to search by putting the same in the keyword section.1: .IO namespace offers classes. Page 108 of 215 . The System.doc. Delegates and event concept. As such file system is huge by itself but we will only see what’s needed from the current project perspective. While searching huge file list the program should not hang. browse files with in folders to check if the any file with that name exits and read the file contents so that we can check if the keyword exist in the file contents. File System As the whole project is based on searching files.NET. Figure 6. we need to understand how file system works in .File search application Above figure gives a pictorial expectation of the project.

To read a file is a five step process.GetFiles(strDir. // Close file file.Read). strDirectory is the directory which is browsed.You must be wondering at this point why we are discussing threading as it’s not required in the current project. FileAccess. If you read the overview again you will see one of the requirements is.IO namespace. the application should not hang while searching large directories. strDir is the directory and strFiletype specify which types of files to be searched for instance *. // use the stream reader class to get the streamreader object StreamReader sr = new StreamReader(strFileName). foreach (string strDir in Directory.IO. Below is the code snippet for the same. Threading Concepts Note: . // Read contents of file into a string string strFileData = sr. This is one of the Page 109 of 215 .doc . // Open the file stream object specifying the mode in which it FileStream file = new FileStream(strFileName.GetDirectories(strDirectory)) If you want to browse the files you need to use the GetFiles function from the Directory class.ReadToEnd(). foreach (string strFile in Directory. // Close StreamReader sr. If you want to browse through the directory we can use GetDirectories from the Directory class.First thing is to include the namespace System. FileMode. Be low is the code snippet for the same. using System.Open. strFileType)) If you want the read the file we can use the FileStream and the stream reader class.Close(). Below is a sample code snippet with detail commenting.Close(). *.txt etc.

Let’s say we want to find the defaultaliases file. The below figure will give you a clear indication of the heavy duty we will be performing in this project. Page 110 of 215 . From a simple user perspective this can be very annoying. Figure 6. You must be wondering what is heavy duty in this project. In short it’s possible in a word application you can open multiple word documents. For instance while you are reading this book its possible that you are also chatting on messenger. Every process has an execution sequence and this execution sequence is called as thread. For instance in this application if you just move ahead with a simple search while looping through huge directory application will completely freeze out. Below figure shows a folder structure for SQL Server directory. In order to find default aliases you need to make seven recursive. This memory is allocated for this application only and can not be shared by other applications. Physical separation of memory and resources is called as process. The file is lying in the 1033 folder.2: . In short the processor is dividing himself between two activities with out the user knowing it. Multitasking refers to an operating system's ability to run more than one application at a time. word is doing a spell check. So let’s first define what multi. In order the application does not hang we need move the entire heavy duty search on a different thread. So you start from the top branch Microsoft SQL Server and go on inside recursively searching for the file. process is and later move to define threads. Executing multiple code paths in one instance is termed as threading. Just think if you windows search starts hanging will you really use it. When an application is running memory is allocated for that application. For instance when you are typing in a word document it’s possible in the back end.tasking. Every word document is allocated its own memory and is not mixed with other opened word document in the same instance.Recursive call to find a file The above recursive calling is very much heavy duty process.important things while doing project forecasting unseen problems and uses the right approach.

Thread is created by using the thread class and passing the method which will run on the thread. This recursive mechanism logic then runs on a separate thread. Delegates and event concept One more core concept we will need in this project is delegates and events. So here’s what we will like to do we start the file search recursive mechanism and go to do something else. Below is the code snippet of how to use threads. } In short our heavy duty recursive logic should run on a different thread.NET starts in its primary thread whose entry point is defined in static Main () method in the project.Run(). Note: . As said before the file recursive search is a heavy duty mechanism. Such kind of small decision while implementing projects shows the programmers thinking and the approach. Below is the code snippet which starts our windows search application. Event-based programming is one of the features of object oriented programming.There are two types of programmers one who can complete a project and the other who completes a project with elegancy and proper decision making. In the above code snippet search is the heavy duty and resource intensive method. It begins with a call to Application. Note: . Thread objthread = new Thread(new ThreadStart(Search)).By default . When the logic receives some Page 111 of 215 . The main purpose of events is to decouple functiona lity of one object from other object that will depend or use it. It’s possib le to code this project with out using delegates and events but then there will too much heavy coupling between modules.Run(new frmFileSearch()).Threading is a specialized area by itself. As this is a projects book we will look in to fundamentals and implementation rather than going in to depth. [STAThread] static void Main() { Application. So we have created a new thread and directed that it should run on the newly created thread objThread. For more details on threading refer MSDN. Second using events are clean approaches to implement asynchronous mechanism.

We can also associate multiple methods with a delegate. Now let’s try to understand the second concept what are events? Delegates are main bricks for events in C#. delegate is type safe. Using a delegate is a four step process: • Declare the delegate public delegate void SimpleDelegate() • Create a delegate object and bind the delegate to a method SimpleDelegate simpleDelegate = new SimpleDelegate(MyFunc). • Invoke the method by using the delegate object simpleDelegate(). Any event has a publisher and a subscriber as shown in figure below.NET we will need to use delegates and events. A delegate is like a pointer to a method. We define a delegate to specify the signature of methods we would like to call through the delegate. We can then create a delegate object and bind it to any method whose signature matches that of the delegate.file names or keywords matching it raises events and send the information to the user and then again continues further with its recursive logic. Unlike a simple function pointer. The publisher pushes events and subscriber then uses those events to call the event handlers. Note: . Page 112 of 215 . In order to achieve events in . These types of delegates are called as multi-cast delegate.

HandleLog(ErrorLogger). myClass.Log += new MyClass. • Declare a event based on that delegate public event HandleLog Log. Three at the publisher end and two at the subscriber end. • Fire the event public void Error(string strErrorMessage) { Log(message). Page 113 of 215 .Publisher and Subscriber in events There are total five steps to get events working in C#. } • • Subscriber subscribes the event.3: . Event handler finally caches the event to perform actions. • Declare a delegate public delegate void HandleLog(string logMessage).Figure 6.

Where ErrorLogger is the method which will be fired when events are received by the subscriber. “frmFileSearch” is the main UI which was shown in overview section of this project. frmF ileSearch class is the UI of the project and is responsible for the following functionalities :• • Capture from the user folder path. For instance you can see from class diagram of this project how all the file reading and searching capabilities has been allocated to “clsFileReader” and the Page 114 of 215 . “clsFileReader” class is responsible for the following functionalities :• Browse directory.4: .Class diagram for File search application Note: . Class Diagram of File search Application Figure 6. Display results on the data found. file name to search.One of the important aspects while designing your system in project is proper separation of responsibilities. Above is the class diagram it has two entities one is the GUI which is “frmFileSearch” and the other is the class “clsFileReader”.In this book we will be using UML diagrams to understand the project design in a better fashion. You can revisit the UML chapter specified in this book in the beginning sections. In the next section you will be clearer on how we will be actually using Events and Delegates for this project. Note: . keywords etc. • Browse files with in directories • Raise events when its finds a match to the “frmFileSearch” UI.

strFileName: . We have defined four properties for the class which will set by the UI:• • • • strDirectory: . The time you start mixing this responsibilities you can no more use the components individually. strKeyword :. Code Explanation Note: . Page 115 of 215 . Below is the code snippet which defines the properties and methods. You can find code in the source code folder in “File Search” folder. First let’s make a code walkthrough of clsFileReader class. We have defined two methods Search and Doesexist.Directory in which file has to be searched.File name which has to be searched in the directories. It has two delegates FoundContent (this delegate will be called when keywords are found in the file content) and FoundFile (this delegate will be called when file name specified is found in the directory). In this section we will make a code walkthrough of important code snippets in the file search project.“frmFileSearch” is a simple GUI which just sends which file to search in which folder. For each of these delegates we have events objFoundContent and objFoundFile. Search method does a recursive search to find the files.This property will accept which types of file the search has to be restricted.Keyword which has to be searched with in the file content. strFileType: .You can find code walkthrough for this application in video “File Search code walkthrough” in Video folder.

ToLower().GetDirectories(strDirectory)) { // Loop through the file foreach (string strFile in Directory.ToLower())!= -1) { objFoundFile(strFile). // First loop through the directory foreach (string strDir in Directory.Trim().5: .clsFileReader code walkthrough The most important part is the recursive search subroutine Search (). Below is the code snippet which shows the search subroutine.Length != 0) { FileInfo objFileInfo = new FileInfo(strFile). // Check the file name specified is same as the file name given // by the user if (objFileInfo.Name.IndexOf(strFileName. We have put inline comments so that you can understand the logic of the same. } Page 116 of 215 .Figure 6. strFileType)) { if (strFileName.GetFiles(strDir.

You can see in the above code snippet at the end we are calling the Search () method recursively. This recursive call will // continue until we have browsed all the directory inside the directory.} // If there is keyword specified by the user then see that it exists with // in the file contents. One for the directories and other for the files inside the directory.strKeyWord)) { objFoundContent(strFile). Page 117 of 215 . strDirectory = strDir. // Create the clsFileReader class object clsFileReader objclsReader = new clsFileReader(). From the UI code the Search button click is where all the UI action is happening. } } There are two important for each loop in the above code.Items. // Create the object of delegate and attach the files with the delegates FoundFile objFoundFile = new FoundFile(addFile). } // In a directory we can have multiple sub directories. FoundContent objFoundContent = new FoundContent(addContent).EventArgs e) { try { // Clear the lstFiles so that we do not get the old data lstFiles. The next part is the UI code.Clear(). System. private void btnSearch_Click(object sender.Length != 0) { if (doesExist(strFile. if (strKeyWord. Search().Trim(). So make a //recursive call to the Search() method again. The most important section is the recursive call which is made to the subroutine itself so that we can browse any directory depth.

// Finally Start the thread objthread. For instance if it’s a doc file it will open using the word application. } catch(Exception ex) { MessageBox.objFoundContent += objFoundContent.Text. When user right clicks on the list box he will be given two options :o To open the file.Show(ex. When user clicks to open the folder he will be taken to the folder where the file is located. objclsReader.strDirectory = txtFilePath.Text. objclsReader. But the type is not known then it should open which application will be used to open these kinds of files.Text. • Page 118 of 215 .ToString()).Start().strKeyWord = txtKeyWord. // As search is a heavy duty method save run this on a separate thread Thread objthread = new Thread(new ThreadStart(objclsReader.Text. objclsReader. }} Enhancement in File Search Project You can do the following enhancement in the file search project:• • • Display the total number of counts for the data found.// Attach the delegate with the event objclsReader. o To browse to the folder.strFileType = txtFileType.objFoundFile += objFoundFile.Search)). // Set the necessary four properities from the textboxes of the UI objclsReader. objclsReader.strFileName = txtFileName. When user clicks on the file he the file will open in the default application if specified.

doc In the source code folder TestingDocumentChatApplication. Once he enters the room he sees a list of user in the room. architecture and estimation. For past one year the company sales have grown into multiples geographical location. But they can enter there invoice number with there user id.doc Overview of Chat application Reliable computers is a mid-scale organization mainly into selling of computers. Where the small customers can have chat with customer support engineers. User will not be validated in the chat room. proper documentation.xls TechnicalDocumentChatApplication.doc FunctionPoints. For instance MRX (INV23847). 50 users can login at a time. User id should be unique in the system. Following are the requirement for the Web Chat application:• • • • • • User logs in using user id. Page 119 of 215 . So the company wants to builds Web Chat application. Chapter 7 – Reliable Computer Chat Application What will you learn in this project • • How to use application. session and cache objects. Deliverables Requirement and Use Case document Estimation Technical Document Source Test document Name of the file / Folder Reliable Chat Application Version. Deliverables in CD for this Project All the below deliverables are in folder ChatApplication. He can then sent message and the engineer can reply for the same. In this section we will have professional projects with complete SDLC cycle. Currently in order to give customer support Reliable computers uses phone to interact with his client but this medium is not very cost-effective from small customer’s point of view. Client pull technologies using the Meta refresh tag.Part III – Professional Projects After you have walked through the fun part it’s now time to become a bit professional. Currently.

1 : .In CD for the chat application we have two type of code one with proper SDLC cycle which is present in ChatApplication folder. Enter the name alias as ChatApplication and click ok. Then we will code the same application with proper SDLC cycle. Note :.aspx and you application sho uld start successfully. Once with a mind set of how an ok programmer will code and one how a good programmer will code.Solution explorer of Ok Ok Chat Application Page 120 of 215 . The other folder NotPlannedChat has the chat application which is coded from an ok ok programmer perspective. Starters Chat code The difference between a programmer and a good programmer is coding with elegenace and maturity. In this section we will look in to how an ok programmer will code.How to start the chat application • • • • • • Copy the chat application folder on your hard drive. If everything is fine enter http://localhost/ChatApplication/Login. Finally close the dialog box by clicking apply. After copying the chat application right click and select properties. In order to see what the exact difference is between an ok programmer and good programmer we will code the chat application twice. Figure 7. Then click on the Web Sharing tab and click share this folder You will popped up with a dialog box. This will also clear differences between good and bad programming.

transfer command. 2 and 3 – If the user does on exists then we add the user to the arraylist and set session(“UserName”) variable.When the user clicks login command button we call the CheckDoesUserExist method.aspx is the main login page. checkDoesUserExist method checks if the user already exists in the Cache["users"] object.Messages. 1 . Below is the numbered explanation of the same.2 :.When a user logs in we add the username to Cache["Users"] object. If the user already exists then we throw an exception saying that the user already exists.aspx. We have also enclosed the checkDoesUserExist method in try catch and later displayed the error in lblErrorMsssage label. SendMessage. In case if the user already exists in the cache users object it will throw an error. If we do not have any errors in the checkDoesUserExist method we transfer the control to Chat. Page 121 of 215 .aspx is the file which displays the messages sent by user.aspx is the form in which the user types the chat message and sends it. Below is the numbered explanation of the same. We validate that the user is unique in this section. Figure 7. saveToCache method updates the arraylist to the Cache Users.Login.Bad code solution explorer Below is the code snippet of the login page code behind. 3 and 4 .aspx and sendMessage. 4 and 5 :.aspx is the HTML frame in which we display Messages.In the project explorer we have four important files as shown in the figure below.Chat.aspx page using the server. 2 . 1 .

Figure 7. So lets understand the below code snippet in numbered fashion.aspx page. 1 and 2 . In this section we will look in to the other cache object i.e cache[“Messages”].In the page load we load the cache users and messages object in two page level variables arrayUserList and arrayUserMessages.Login page source code Below is the code snippet of messages. So we check if the cache users or the messages object is not null then load both the variables accordingly.3 :. Cache messages object stores the messages which are sent by the user. We have two types of cache object one which stores users and the other stores messages. 3 – LoadUsers and loadMessages sub routine loads the messages and users data in the user interface control. The user cache object was discussed in the previous section. Page 122 of 215 .

When we say byref means any change in object will also affect the other object. If the arrayUserMessages variable is updated that will also update the Cache[“Messages”] object because both the objects are linked byref. Page 123 of 215 .Code snippet for Messages. addMessage subroutine is called in every cmdSendMessage button click.Figure 7. So any changes in arrayUser Messages variable will affect Cache[“Messages”] data also.aspx page. Below is the numbered explanation of the code snippet.Please read byref and byval fundamental from MSDN you will have a good idea of what we are discussing. 2 – addMessage subroutine adds the user messages to the array list with user name appended.aspx Below is the code snippet sendmessage. Note: .4 : . 1 – We load the cache messages object in arrayusersMessages variable which is a page variable.

But as we said previously the difference between a coder and a developer is quality code. For instance if we want to add room functionality in the above application we need to change in lot of places. So let’s try to understand what are the issues with the above coded chat application. Every car runs but it’s important to evaluate which one runs with elegance and efficiency. This can lead to maintenance problems in future. In the same fashion every code runs but we need ask ourselves question will this code consume future changes. In the next section we will first start with estimation and then move ahead with design document and execution Page 124 of 215 . • The first thing to be no ted in the above application if we have two cache objects one for the user and other for the chat messages. is it efficient . So in case if we want to add room’s future we need to add one more cache object. This leads to many scattered cache object through out the application. • So now that we know the issues with the above code. The application is not object oriented which means that the application is not flexible to consume future changes.Figure 7. Let’s complete this project with dignity like a developer.5 :. can it be taken by new programmers for maintenance etc. Coder is a bad word given to any programmer fo r the bad quality code.Send message code snippet What’s wrong with the above code If you run the above application it works fine. If you have read above code walkthrough it will also make you think that it looks good.

Estimation of the Chat Application In the chat application folder we have given you the estimation document. NOTE: . Figure 7. Because it does not refer to any external file and does not have sub groups so we have kept the values File Type Reference (FTR) =1 and Record Element Types (RET) =1. and it is simple and meaningful from user perspective. These three entities become EQ because results exit the application boundary (from the chat variables on the web sites).EQ of chat application Page 125 of 215 . Currently. showUser and displayMessage is retrieved from corresponding Internal Logical Files (ILF). it is retrieved from one or more ILF. Below is the EI table which is taken from estimation sheet. 27 man days is the estimation for chat application project we will be using Function Points to estimate it.6: .EI of chat application External Inquiry (EQ) explanation As shown in the EQ table below three elementary process showRoom.7: . In this section we will explore how we have reached to that estimation. External Input (EI) explanation We have identified two elementary processes in which data is received from the external application boundaries for this chat application. Figure 7.Please refer to FUNCTION POINTS chapter for more clarification.

EIF and EO in chat application Page 126 of 215 . User and Message forms the ILF. We do not have any complex query outputs which derive data from internal to external application boundaries hence there is no EO. External Output (EO) and General System Characteristic (GSC) explanation In this chat application we do not have any externa l application so there is no EIF.Internal Logical File (ILF) explanation As we know fundamentally ILF resides in the internal application boundary and are maintained through elementary process.8: . Figure 7. Figure 7.ILF of chat application External Interface File (EIF). one is “user ID” and other is “Password”. One of the most important criteria to identify ILF is that they are logically related data from user perspective. In this chat application Rooms. As it is a simple application we have kept all the GSC value as 1.9: . While the Data Element Type (DET) values taken in the table we have considered one complete DET for Rooms and Message but for User ILF we have two DET.

Page 127 of 215 . • Calculating adjusted Function Points. • Calculating Man Days.GSC for chat application Explanation of Total Estimation Once all the counting is done we need to convert the Function Points into Man Days.Figure 7. Below is the process of conversion as follows: • Calculating unadjusted Function Points. • Distributing Man Days across SDLC phase.10: .

From 18.Figure 7. 20% for technical stage and 5% for testing stage. So the procedures of calculating is that the percentage of execution time is distributed for every phase and finally added to execution of man days.96 man days we have taken 20% for requirement stage.11: .96 man days as the execution man days. It does not consider time period for requirement.Total Estimation for Chat application Below is the figure which shows how man days are calculated for chat application. Now let’s look at how we distribute the man days across the SDLC phase. One of most important point to know is any estimation methodology always gives execution man days. technical design and testing phase. Page 128 of 215 . For this Chat application we had calculated 18.

12: .SDLC phase estimation distrubution NOTE: -For more details refer to chat application folder in the CD provided.Figure 7. Page 129 of 215 .

Use Case Figure 7.13: . Reliable computers and their users. User clicks on the log-in button. • User then types the name and selects Failed End conditions Action Main Scenario Page 130 of 215 . User types chat application on URL of the browser. Use Case Use Case Name Description Primary Actor Trigger Pre-condition Assumption Rel001 Login This uses depicts the flow of how user will login into the chat application. • User types chat application on URL of the browser which in turn opens the main page. • In the main page of application user is popped up with ‘Enter user name’ option and various ‘rooms’ option drop down menu. NA No password is currently present for the system Rooms will remain constant as explained in the assumption section of this document Duplicate user name is not allowed in the chat application.Use case diagram for the chat application Details of the Use Case In this project we have ana lyzed three uses cases as explained below.

NA Use Case Use Case Name Description Rel003 Change room This use case depicts how the user will be Page 131 of 215 . • Message is then seen by the user and other users in the room. • User then clicks on the send button. Reliable computers and their users. After entering the unique name the user is finally logged in the application. Application then checks whether the user name is unique in the system if not then user is popped up with error message that “user already exist”. 1. NA NA Here messages are send and received successfully. User types the messages and clicks ‘send’ button. NA User is logged in the system Cannot see messages of other rooms. 1. User wants to send messages to the room. • User types the message to be sent in the room. NA Note and Open Issues 2 Sending messages Use Case Use Case Name Description Primary Actor Trigger Pre-condition Assumption Failed End conditions Action Main Scenario Action Alternate Scenario Success Scenarios Note and Open Issues Rel002 Sending messages This uses depicts how user will be sending messages in the chat application. Opens page of a selected room in that other user names and their messages can be seen.• • Action Alternate Scenario Action Alternate Scenario Success Scenarios NA NA one of the room from drop down menu and then clicks on the ‘Log-in’ button.

Reliable computers and their users. • System then changes the user to the other room.NET In ASP.Primary Actor Trigger Pre-condition Assumption Failed End conditions Action Main Scenario Action Alternate Scenario Success Scenarios Note and Open Issues changing room during the chat session. Any data in the cache object is shared between all users connected to the same IIS website. Page 132 of 215 . • User clicks on the room which he want to go. directories or external events this was not possible with old application object in classic ASP. • Cache can be configured to expire after specific number of seconds or depending on changes happening to other entities like file.NET we are provided with cache object. User wants to change room during the chat session. For this chat application we will use cache object to share data between all the users. User is not able to change room and can not see messages and users in other room. • Cache object are thread safe while application object are not. NA Caching fundamentals in ASP. But following is the difference between the application object and cache object. User clicks on the change room button during the chat session. Below are the methods of the cache class. NA User is already logged in to the chat application. • User then clicks on the change room button. Currently for this project we need to share chat messages. NA NA User has successfully changed the room and can see the messages and users of the changed room. rooms etc which can be done by the cache object.

Cache class methods In the below diagram we have also shown ho w session. Insert Insert the specified item into the cache. Figure 7. You can see in the below figure User1 .14: . Application and Cache object in action Class diagram Page 133 of 215 . Session2 and Session3 are unique for every user. Session object are private to the users while cache and application objects are shared between users. GetEnumerator Returns a dictionary enumerator object to iterate through all the valid items stored in the cache.Session. Remove Removes the specified item from the cache. Retrieves the value of specified ‘n’ item to the cache. Currently session is not related to the project but try to understand from knowledge perspective. application and cache object works.Method Add Get Description Adds the specified items to the cache. Table: . User2 and User3 have common application and cache object while Session1 .

15: . We have not used inheritance because we do not want to increase the complexity of the architecture. So the class diagram very typically signifies that we have many rooms and each room has users as well as messages.it of both classes. So in technical scenario “clsRooms” have many “clsRoom” objects and “clsRoom” has “clsUsers” and “clsMessages”. The class diagram depicts the actual scenario of the chat application in real world. Figure 7. “clsMessage” is a simple class with a message property while “clsMessages” inherits from collection base and stores each object of “clsMessage”. In technical sense we can associate the “clsMessages” object with any room or user. In the same way we have association of “clsUsers” and “clsMessages” with “clsUser” and “clsMessage” respectively. Collection base is a member of system and collections “clsMessages” has add message methods which takes user name and message as a input it then creates object of “clsMessage” and add it to the collection. room and messages and the whole class diagram will be built from these nouns. Page 134 of 215 . Currently we have designed for both of these classes in a very abstract manner.Relation ship between all classes • “clsMessage” and “clsMessages” class:In the below figure we have pasted the snap.If you carefully read the use case properly we can extract three nouns from them users. Below is the class diagram for the chat application “clsRooms” forms the top most objects which the client will consume. One of the things to be noted in the class diagram is naming convention are plural as well as singular for example we have “clsRoom” and “clsRooms” which means that class “clsRooms” have collection of “clsRoom” object.This class diagram is not only easy to understand but also scalable.

o getUser: .16: .Figure 7.This function takes user name and returns back the room in which the user is currently present.In the below figure we have pasted the snap-it of both classes. “clsUser” is a simple class with two properties ‘user name’ and ‘room’. “clsRoom” object is aggregated inside the “clsUser” class.This takes user name and returns “clsUser” object. o removeUser: .It checks if duplicate name exists in the user’s collection. o checkUser: . ‘user name’ is the value which the user will enter on the log-in screen of the chat application.This method takes two parameter user name and the room object and associates the user with the room.Message and Messages class • “clsUser” and “clsUsers” class:.It removes the user from the user’s collection. Page 135 of 215 . This room object signifies which room this user currently belongs too. The “clsUsers” class has five methods which are as follows: o getRoom: . o addNewUser: .

o checkUser: . o loginMethod: . Page 136 of 215 . So one of the important things to be noted is every class performs his work independly.In the below figure we have pasted the snap.it of both classes. He then takes the new room and adds the user to the new room. • The beauty of the “clsRooms” class is that it calls “clsRoom” for performing the functionalities and “clsRoom” in turn calls either “clsMessages” or “clsUsers” depending on the functioning.This method selects the current room where the user logged in and removes the user from the room.User and Users class “clsRoom” and “clsRooms” class: . So let try to understand how the “clsRooms” operates. o sendMessage: . There are four methods in “clsRooms” as follows. “clsRooms” is a collection of objects “clsRoom” has “clsMessages” and “clsUsers” collection logically messages and users form part of a room the clients main interface will be “clsRooms”.Figure 7.this method selects the current room and send messages to that room. o changeRoom: .This checks user method calls the check user method of “clsRoom” who in turn calls the check user method of “clsUsers” class.This type of method first calls the check user method and then adds the user to the room.17: .

Room and Rooms class Code explanation Consuming the class library The project is divided into two main parts mainly into GUI and class library as shown in the below figure.18: . Page 137 of 215 .Figure 7.

aspx” page after every 10 seconds.aspx”.Refresh rate for the chat application Page 138 of 215 .20: .aspx” page.19: . Figure 7.It is used to send the messages.Figure 7.aspx:. • SentMessages.aspx: .Solution explorer of the chat application The GUI part has all the aspx pages the end user comes in contact with GUI part. • Chat.21: . • Messages.aspx” and “SentMessages. As seen in the below figure the metatag says to refresh the “Messages. The GUI part has following aspx pages:• Login.aspx: -It basically just displays the messages to the user.This is a frame which combines “Messages.It takes the user ID and password and allows you to select the room to enter the chat application.aspx: . Figure 7.Frames for chat application Auto refresh fundamentals Chat applications are very dynamic. The end user screen should be capable of seeing the latest messages we some how need to ping the server for new messages so in order to achieve this we have used the HTML metatag in “Messages.

Figure 7. • Finally loads the rooms in combo box you can see final output page in the same figure. Below is the code snap it of the page load event of Login. As discussed before we will be using cache API to share messages and rooms across the users. • If the rooms object are already present then it type casts from the cache object to the module variable “objRooms”.aspx pages. clsMessage) etc.Login page flow Login button click logic Page 139 of 215 .Login page explanation As we all know from class diagram “classrooms” is the main class of all the classes (clsRoom.22: . The following are the sequences occurred in the page load event: • If the cache object is NULL it creates rooms object and assign it to the cache object.

Page 140 of 215 . The load messages method loads the messages in the room. If the first two events are successfully done then we redirect the user to the chat page. Figure 7. • The load user’s method loads the users in the room.Login button click logic Displaying the chat message and the users When the user is finally logged in the rooms below snaps are executed to display messages and users. • • • We set the user name and select room in the session variable. NOTE: .The simplicity of above code is because of the proper class diagram which shows relationship between users. NOTE: session variables are private to the user.After user puts the user ID and password in the login screen and clicks the login button the below shown snap it figure is executed and the following events takes place: • We call the login method of the “clsRooms” class. In case of any error we cache the exceptions and display the same on the “lblError” label. Let’s try to understand the explanation of the code from below snap it: • The “objRooms” object is taken from cache object and currently logged in room. NOTE: we have already explained in the class diagram how the login method works. Object is taken from the “objRooms” object taken from the session variable Session[“RoomIndex”]. rooms and messages.23: .

Figure 7.Message and user class Page 141 of 215 .24: .

• Send message method is used to send the messages in the particular room which is denoted by “objRooms” object. Finally it sets the room index and session variable.If the GUI code is kept simple all the business logic is in classes which makes the architecture more decent. Page 142 of 215 .Figure 7.25: . NOTE: . The change room method takes user name and the new room where the user wants to go. • Change room object is done by calling the change room method of “objRooms” object.Loading messages and users Change room and Send messages Below is the code snap it which explains how the GUI will add new messages and change room.

Business Validation Page 143 of 215 .Gives a walkthrough of how we can load the job site project and run the same.NET and SQL Server. How to load the jobsite In the CD we have provided “FullJobsite” folder if you open the folder you will find various other sub folders like Business Objects.doc FunctionPoints.Figure 7. • JobSiteCodeUnderstanding :.26: . Database designing in complete third normal form for the project. Business Validation.Gives a functionality walk through. How to write your own rules engine.xls Left to te readers In the source code folder Left to the readers • JobWebSiteFunctionalWalkThrough :. • StarttheJobSiteProject :.Sending message in chat application Chapter 8 – Job Site Application What will you learn in this project • • • • • How to write a good object oriented project How to implement Microsoft data application blocks.Gives a detail understanding of the job site code. How to use ADO. Deliverables in CD for this Project Deliverables Requirement and Use Case document Estimation Technical Document Source Test document Videos Name of the file / Folder UseCases.

This folder consists of the UI (User Interface) part of the project.cs have their respective classes. • • In the CD provided to you we have folder named “FullJobsite” copy this folder from CD to your local drive for instance (c:) so after copying to local drive you will have the following path written on the address bar “c:\ FullJobsite”.cs and Menu. TheJobSite. Data Access: . Solution: -It has .sln file this unites all the project subunits together and to make the project development more easy.It basically has the data access layer of the project.It is clients to our projects which observes and see what jobs are posted by the company and inform to the job seeker. Build. TheJobSite: . Business Objects: -It contains objects required for the project such as ‘user. and BACKUP etc. you will be prompted with a screen ‘SQL server Enterprise Manager’ in this window under the ‘console root’ there is a ‘database’ folder right click onto this folder and create ‘New Database’ with a name ‘Jobsite’ as shown in the following figure below Page 144 of 215 . Testing and Delivery document.Library. BACKUP: . Documents: -It consists of Requirement. GetServiceGetJobs. Data Access. Documents. GetServiceGetJobs: . In this section we will understand how to load the complete Jobsite project.cs’ which has self-contained clsUser and clsUsers class similarly other classes like Jobseeker.It is basically back up of the database in our project so that you can load the SQL server database very easily. Business Validation: -It basically acts as a bridge between Business Objects and Business Validation Library. Design. Go to the SQL server by clicking Start>Programs>Microsoft SQL server>Enterprise Manager. It uses the SQL Helper class or Microsoft Application Blocks to connect to the SQL Server. Business Validation Library: -It consists of all the validation required for the project. Solution.

Create a new database • After creating a database named ‘Jobsite’ we will now load a BACKUP of a project provided in the CD and now in your local drive “c:\ FullJobsite\ BACKUP” with the following steps: - Right click ‘Jobsite’ folder>All Task>Restore Database>click ‘From Device’>select device>click Add>give path “c:\ FullJobsite\ BACKUP” as shown in the below figure Figure 8.1 : .Restore database Page 145 of 215 .2: .Figure 8.

Figure 8. In the ‘FullJobsite’ folder there is a subfolder named ‘WebServiceGetJobs’.Give Alias name • Similarly same changes for sharing for the ‘WebServiceGetJobs’.4 : . In the ‘FullJobsite’ folder there is a subfolder named ‘TheJobsite’.Backup path • As this project is web you need to do following changes before starting it. right click on it>properties>click‘WebSharing’>add ‘TheJobsite’ folder as sharing as shown in the following figure Figure 8.3: . right click on it>properties>click‘WebSharing’>add ‘GetServiceGetJobs’ folder as sharing as shown in the following figure Page 146 of 215 .

• Figure 8.Config file.Config file: • One for database • Other for the Business Validation DLL Path To edit Web.7 (B): . It should be same as Figure (A) arrowed 1 = Figure (B) arrowed 1 Figure 8.5 : .6 (A): . open ‘FullJobsite’ folder>open ‘Solution’ folder>open ‘JobSiteSolution’>open ‘JobSiteSolution.Configurations for the jobsite • You have to provide the path where the ‘BusinessValidationLibrary.Alias name for WebserviceGetjobs Now two important settings should be done in the Web.config file and edit it as shown in the following figure Figure 8.dll’ is.Path of the validation library DLL Page 147 of 215 .sln’>view Solution Explorer>open web.

Till today the working procedures are manually operated but due to recent heavy demand now the company is thinking of going automated with the help of information technology.Config file and making changes in the properties properly. Page 148 of 215 .Jobsite home age Note – You can watch the Start jobsite video in case you have issues. Figure 8. you will see a Login screen as shown in the following figure and you have loaded the project ‘JobSite’ properly and ready to run it. press the “ctrl and F5” key together. once again have a check whether you have properly loaded the • After editing Web. Quadra has now multiplied its business four times the current one. Quadra mainly acts as intermediate between the jobseekers and the company trying to meet the needs of employee and the employer so they want a website which can consume their current workload so following are their requirements in bulleted form: • There are two types of users ‘jobseekers’ and ‘companies’. Note: database. Overview of the Job Site Application Quadra is a multinational company mainly into recruiting business over a period of time.• While installation of the database if you have changed the user ID and password then you have to make the same changes in the connection string Note: .we have kept the default user ID and password for the database.8 : .

• • Estimation of the Job Site Application The estimation is pretty simple and straight forward. You can find the estimation document in the Jobsite folder in the CD. “Job description” in short describes the work profile of the candidate and “closed” specifies the vacancies of jobs are filled up. But still let’s make a walk through of how we have arrived to this estimation. Below is the image which explains in details regarding the same. Explanation of ILF In this project we have six logical files which we maintain. • ‘Jobseekers’ can apply for any job posting posted by any company and jobseeker should be able to see a list of posting to which he can apply.9: . • The system should have enough flexibility to enable and disable validation on run time. We are also not referring to any external system so we do not have any EIF in this project.Any kind of users should have login “user id” and “password”. Both kind of user ‘jobseekers’ and ‘companies’ need to register themselves with Quadra website to access the services. ‘Jobseeker’ can see the report to which company he has applied and the ‘companies’ can see the report of job seeker who has applied for it. Page 149 of 215 . • ‘Jobseeker’ cannot apply to a job more than one time. o ‘Companies’ can post multiple jobs posting in order to make job posting following details are needed “closed” and “job description”. Total Man days has come to 43 man days in approximation. Figure 8. • To register for ‘jobseeker’ “user name” and “password” should be the two compulsory fields other fields may be included on company’s requirement. • To register for ‘companies’ following are the fields: o ‘Companies’ should login with their own unique ‘user name” and “password”.ILF for jobsite project Explanation of EIF and EO Because we do not have any complex output there is EO in this project. The description section defines which DET we are referring to. Below is the section wise explanation of the same. • There should be two types of “job reports” one for ‘Jobseekers’ and one for ‘companies’.

10: . Figure 8.EI in jobsite application Explanation for GSC In real projects lot of thought has to be put when you define your GSC. One is for the jobseeker which says which jobs he has applied for and second report is for the company in which we display who has applied for the jobs.11:. If you make a walkthrough of the project you can easily figure out which are the EI in the project.EQ in jobsite application Explanation for EI There are five EI’s in the project. Figure 8. But for simplicity sake currently we assume as one for all the sections.Explanation for EQ There are two simple reports in the project. Page 150 of 215 .

One of most important point to know is any estimation methodology always given in the execution point. 20% for technical stage and 5% for testing stage. From 29. • Distributing Man Days across SDLC phase.49 man days we have taken 20% for requirement stage. By using two developers we can complete the project in 21.38 man days. Page 151 of 215 .12:. Below is the figure which shows how man days are calculated for chat application. • Calculating adjusted Function Points. • Calculating Man Days. For this jobsite application we had calculated 29. technical design and testing phase.Figure 8. Now let’s look at how we distribute the man days across the SDLC phase. It does not consider time period for requirement. Below is the process of conversion as follows: • Calculating unadjusted Function Points. So the procedures of calculating are that the percentage of execution time is distributed for every phase and finally added to execution of man days.49 man days as the execution man days.GSC for jobsite application Final Estimation Below is the final estimation using 1.5 FP per day as baseline. Once all the counting is done we need to convert the Function Points into Man Days.

Figure 8.14: .Final Estimation of job site application Use Case Explanation Below are the use cases for this project. In the first section we will have a pictorial look and then a detail explanation for the same is given in a tabular format. Figure 8.13: .Logon and Logoff Page 152 of 215 .

System validates userid and password is wrong. User opens the home page of the website 1. 2. Login User Name is required 2. 4. Post jobs and Who Applied. Userid and Password does not exists in the system. 6. System is again redirected to the same login page with a Page 153 of 215 . If the user is a jobseeker he sees Maintain User . Step1 to Step3 in executed from the first action(User opens the home page of the website). If he is a Company he will see maintain company . Wrong userid and password entered 1.16 : .Figure 8.Register jobseeker and Apply jobs Use Case Use Case Name Description Primary Actor Trigger Pre-condition Assumption Failed End conditions UC001 Login in the Jobsite This use case depicts the flow of how a jobseeker or a company will login in to the Jobsite Jobseeker and Companies User opens the job URL Action Main Scenario Action Alternate Scenario 1. 2.15: . 3. 5. Apply jobs and Whom I applied. User is displayed a login screen with Userid and Password field.Register Company and post jobs Figure 8. 3. Password is required. User open the job site URL. System validates the user and check if he is a jobseeker or a company. User enters the userid and password. 3.

3. Company 1. User logs off and goes to the main login page Success Scenarios Note and Open Issues Use Case Use Case Name Description Primary Actor Trigger Pre-condition Assumption Failed End conditions Action Main Scenario UC003 Register User This use case depicts the flow of how jobseeker and companies can register in the jobsite. User enters the following details Username.Success Scenarios error message saying that UserId and Password does not exist . User is on the main menu page 2. Password. User clicks on the Log off button 3. 1. User is able to login in the home page and see the respective menus depending on whether it’s a company or a jobseeker. 2. User is then taken to the log in page of the website. 2. Jobseeker and Companies User wants to register with the website User opens the job website 1. 5. User is not able to login in to the website wants to register with the website User opens the website User clicks on register company link. Job Seeker wants to register with the website Action Page 154 of 215 . User does not log of the system and still sees the same main menu page User clicks on the Log off button on the menu page 1. User is then displayed with a message saying “You have been registered successfully go to the Login page to login”. After the user fills in all information he clicks the update button. Note and Open Issues Use Case Use Case Name Description Primary Actor Trigger Pre-condition Assumption Failed End conditions Action Main Scenario UC002 Log Off This use case depicts the flow of how a jobseeker or a company will log of from the Jobsite Jobseeker and Companies User wants to log from the jobsite User is already logged in to the website 1. 4. Organization Name. Organization Phone and Address.

Company user clicks on post jobs. Jobseeker Name and Resume. User enters the new job description which the user should see. 4. Company user then enters a job description and opens the new job so that job seeker can apply to the job. 4. After registration user is able to login in to the website UC004 Post jobs This use case depicts how companies will post jobs Companies Companies wants to post new jobs Companies should be logged on in to the website Companies are not able to post jobs and jobseeker can not apply for new jobs. User clicks on the jobseeker register link. Company user uses his userid and password and logs on in to the website. Posted jobs by companies can be applied by job seekers. 3. 1. User wants to edit the job. User clicks on Post new job 1. Action Main Scenario Success Scenarios Note and Open Issues Use Case Use Case Name Description Primary Actor Trigger Pre-condition Assumption Page 155 of 215 . UC005 Apply jobs This use case depicts how jobseeker can apply for jobs Jobseeker Jobseeker wants to apply for jobs. Once the user fills in all details. 3. 4. Step1 and 2 is executed from the main scenario. 3.Main Scenario Success Scenarios Note and Open Issues Use Case Use Case Name Description Primary Actor Trigger Pre-condition Assumption Failed End conditions Action Main Scenario 1. 5. 1. If all the information is proper user is displayed message saying “You have been registered successfully go to the Login page to login”. He clicks update button to update the information. User enters the following details Username . After that company clicks on Add jobs. Password . User fills all the information and clicks on the update button. 2. He can also update if he wants to open or close the job. User clicks on the job which he wants to edit. Phone . 1. User opens the website 2. 2. Jobseeker is logged on in to the jobsite. Address . Surname .

Company User logs on the website and clicks who applied. Company user is logged on inside the jobsite. In this list he is not shown the jobs which he has already applied. User clicks on apply jobs 1. 2. User clicks on apply jobs 1. User can then check saying which jobs he wants to apply for. Success Scenarios Page 156 of 215 .Failed End conditions Action Main Scenario Success Scenarios Note and Open Issues Use Case Use Case Name Description Primary Actor Trigger Pre-condition Assumption Failed End conditions Action Main Scenario Success Scenarios Note and Open Issues Use Case Use Case Name Description Primary Actor Trigger Pre-condition Assumption Failed End conditions Action Main Scenario Jobseeker can not apply for jobs. Company user fails to get proper report of the jobseeker who has applied for the job. UC006 View Applied jobs This use case depicts a report by which the user can view applied jobs. 3. Company user is viewed list of Jobseeker can view the report where he can view who has applied for the job with his resume. Jobseeker is logged on in to the jobsite. 2. Jobseeker can apply for jobs. 4. User logs on the website and clicks whom I applied. Company User clicks on Who Applied. job seeker name. 2. surname. Once he has finished with jobs he wants to apply he clicks the update button. User logs on the website and clicks apply jobs. User is viewed list of jobs he has applied till now. Jobseeker can view the report of the applied jobs. Jobseeker failed to get a proper report of the applied jobs. Page is then refreshed and list of jobs are shown. 5. 1. Jobseeker Jobseeker wants to view how many jobs he has applied till now. User is show a list of job which he has not applied for. UC007 View who applied for the job This use case depicts a report by which the companies can view who applied for jobs. Company user Companies want to view who has applied for the job.

address and phone number. So in this table we have the UserType_FK and the MenuId_FK fields which define the relationship. Figure 8. UserType will have value 1 when he is a jobseeker and value 2 when he is a company. The Login table is simple with UserName . Menu Master table has the MenuName and the ASPX page where it will redirect to when we click on the menu.17 : . MenuMaster and Login user relationship.Menu and Menu master In our project we have two types of user. Below is the Menu . So the Login table is further extended in two tables Organization and the JobSeeker table. Let us understand the ER diagram step by step. The first diagram shows the ER relation ship and the next the actual data. Password and the UserType. ER diagram basically gives you a idea how your database structure will look like. Note and Open Issues E-R Diagram Explanation Below is the explanation of the ER diagram. MenuUser table is a many to many relationship table which defines the relationship of user and which menu they can see. Page 157 of 215 . In both these tables the UserId_fk key defines the relationship.

Below is the ER diagram which shows the rules tables of the project.19 :.18 :. Rule tables has basically all the rules of the project.Different users in the system There are two main operations which are performed in this project company want to post jobs and applicant will apply for the same. The job posting table defines which company has posted jobs and the jobApplication table defines who have applied to the jobs. Action has the action of the project for instance Page 158 of 215 .Job Application and Job Posting If you note one of the important requirement in the project is that validation has to be flexible. Both these table have relationship defined by using UserId key. Figure 8.Figure 8.

Login, Delete user, Apply jobs etc which is represented in ActionMaster. Every action is associated with a rule which is defined by the ActionRules table.

Figure 8.20:- The rules engine

Architecture Explanation
The Architecture is pretty simple if you think and pretty complex if you think. Below is a bird eye view of the architecture. We have the following sections and corresponding is there explanation:• • • UI: - This is the UI through which the user will interact with our system. Currently it is the ASPX pages. Business layer: - This section has the business objects of the system like User, Company, Jobseeker, Posting etc. Please note these are just value object and denote strong type classes. Validation layer: - This section has all the validations of the project. Any business object passes through this validation layer. This validation layer takes rules from the rules table depending on action and applies to the object. Below is the code snippet of the validation class. You can see from the figure below it is just a collection of validations in the project.

Page 159 of 215

Figure 8.21: - Validation library • Business Validation Bridge Business Bridge basically stands between the validation engine and the Business objects. Technically Business Bridge takes the loaded business objects and invokes the methods from the validation engine using reflection. • Data Access Data Access layer is the main connector to the SQL Server database. Technically the Data Access layer uses Microsoft application blocks to connect to database. • SQL Helper SQL Helper is a part of Microsoft Data Application blocks. Microsoft Data Application blocks are given a part of the CD. • SQL Server SQL Server is the database. SQL Helper is the actual section which connects to the physical SQL Server database. Below are two figures one which shows the various section in the project and the other shows how these section is mapped actually in the project.

Page 160 of 215

Figure 8.22: - Architecture of the project

Class Diagram Explanation
Let’s go through the class diagram explanation of the project. In our project there are two types of user Jobseekers and Company Users. So we have three classes as shown in the figure below clsUser, clsJobSeeker and clsCompanyUser. ClsUser has common properties like Username, Password etc. clsJobSeeker and clsCompanyUser then inherit clsUser to define user specific properties. clsBusinessValidation class is the bridge who takes the business objects and validates the objects using BusinessValidationLibrary project. Every business object will have one object of clsBusinessValidation class. So there is a 1-1 relation ship between clsUser,clsJobSeeker ,clsCompanyUser and clsBusinessValidation .

Figure 8.23: - Class diagram from user, jobseeker and company user

Page 161 of 215

The heart of the whole project is the clsBusinessValidation class. The clsBusinessValidation class uses the clsBusinessValidationLibrary class for validation. clsBusinessValidationLibarary is nothing but collection of business validation which fire depending on objects , action and rules. See the Action table ER diagram for more details.

Figure 8.24 :- Rules engine Every user has menus depending on rights given to him. So you can see in the below diagram clsMenu is aggregated in clsUser class. Again we have the clsBusinessValidation class which will tie up the business objects with the validation library.

Figure 8.25 : - User and Menu relationship In our project we have two types of actions performed by the company and jobseeker type of users i.e. Apply jobs and postjobs. PostJob action has lot of things common with Applyjob. So we have created a inheritance relationship between clsPostJob and clsApplyJob. Again we have the clsBusinessValidation class which will tie up the business objects with the validation library.

Page 162 of 215

4. Below is the numbered explanation of the same. 1 – This defines the private variables of the class. clsMenus is collection of clsMenu class type.cs you will have clsMenu and clsMenus. Same way you have clsUser and clsUsers again the same thing clsUser is the entity and clsUsers is the collection.JobPosting and Applyjob Code Explanation Entity collection relation ship All business objects are divided in to two part single entity and multiple entities. Page 163 of 215 . For instance in Menu.LoadbyUserType method will load all the menus in the collection according to userType. Explanation of clsMenu and clsMenus Below is the class code snippet of clsMenu and clsMenus. _MenuDescription defines the menu description and _menuAspxPageName defines the Page name which the menu will redirect once clicked.26:. 3 – clsMenus defines a collection class which will store strongly types collection of clsMenu. 2 – Public property which do the set and get for both the private variables.Figure 8.

Let us try to understand in numbered fashion looking at the figure below. 1 – clsDbAccess object is aggregated to fire SQL to the SQL Server database.28:. 2 – The relation ship between user and menus is of one as to many and aggregated relationship.Figure 8. Figure 8. All our collection objects are loaded in the same way. So clsMenus class object is create in the clsUser class.27:.Code snippet of clsmenu and clsMenus In the below figure you can see how loadbyUserType is coded.Load by usertype code snippet Explanation of the user class Below is the detail explanation of the user class. then calls the DB which in turns fires the stored procedure and gets the datareader and finally loops and loads the menu collection. It has three steps first it creates the object of clsDbAccess. That means one user can have many menus. Page 164 of 215 .

Login method which validates if the user is valid or not. The whole base of validation engine is using reflection.The set and get properties of the class clsUser. 4 – As this is a business object we have the private properties of the class. connects to the library and fires validation according to the action table data. If you make a code walk through it basically uses the clsBusinessValidation class. Below is the numbered code snippet and the explanation. At any moment Page 165 of 215 .29:.3 – clsBusinessValidation is the bridge which connects the business object to library using reflection. 1 – Addbusinessobject – This method basically adds the business objects which are o be validated. The Addbusinessobject method adds the business object to this collection base. Lets try to understand in detail. Using reflection we can browse through the attributes and methods of the class and invoke them dynamically. Figure 8. 8 . 7 – Validate method which validates if the object is proper or not. Explanation of the businessvalidation bridge The core logic of the rules engine lies in clsBusinessValidation class. 6.User class code snippet Calling the validation bridge This is the heart of the project the validation engine. clsBusinessValidation basically inherits from collection base. 5 – GetMenus function is basically to get the objmenus collection of clsMenus type.

config file we have given the path where the DLL is physically. It basically takes the state for which it is validating and loads the rules from the ActionRules and rules table. 6 – Loop through all the business object we want to validate and set the same. 7 – Dynamically invoke the rules using the methodname specified in the ActioRules and Rules table. 2 – The validate method basically uses reflection and calls the validation library methods.30:.businessvalidation code snippet Explanation of the reflection The validate method is crucial as it forms the heart of the rules engine. 3 – Get the type of the validation library. 4 – Create a instance of the object because we need to invoke methods on the object. 1 – Load the rule s from the ActionRules and Rules tables. In web. Page 166 of 215 . Figure 8. Below is the numbered explanation of the same. 2 – All the rules are in validation library DLL. 5 – get th setObjecttoValidate method so that we can pass the business objects we need to validate.of time we can have more than one business object for validation so we have implemented collections. We will understand the same in detail manner in the next section. We load the Assembly using the assembly namespace.

Page 167 of 215 .31: .Figure 8.Reflection code snippet Explanation of Validation library The validation library is where all our business validation lies. In the below code snippet you can easily visualize all the methods which are checking the object data.

32: . Page 168 of 215 .BusinessValidation Library Setobject to validate Method In order to validate the business validation library engine also needs the object.Figure 8. So we pass the same to the setObjecttoValidate method which in turns sets the object inside the library.

Page 169 of 215 . These all stored procedures are invoked from clsDbaccess class. All our database operations are written in stored procedures. Below is the figure which shows the mapping.SetobjectToValidate Explanation of Data access The data access is a done using the clsdbAccess class.Figure 8.33:.

e. create the object and use it. For instance to add a new company we create the clsCompanyUser object.34 : . set the properties and call the update method.Figure 8. Step 1 is where we set all the properties and Step 2 is where we call the update method. in the same manner we can use Menu . The below code snippet shows how company user object is used . All the business objects are used in same fashion i. Job objects etc. Page 170 of 215 .Data access layer maps to the stored procedures Explanation of UI UI of the project is pretty simple.

QuadraClientCodeUnderstaing :.In case you have issues understanding the code. Chapter 9 – Quadra Client Web services What will you learn in this project • • How to consume webservices How to implement security in webservices.This video explains the functionality of Quadra client.Gives a code walkthrough for quadra client. You can watch the code walkthrough video of the jobsite which is provided in the CD.xls Left to the readers as exercise In the source code folder Left to the readers as exercise QuadraClientExplanation :.35 : . Page 171 of 215 . Deliverables in CD for this Project Deliverables Requirement and Use Case document Estimation Technical Document Source Test document Videos Name of the file / Folder Left to the readers as exercise Estimation.Consuming business objects in client Note :.Figure 8.

1 : . In Solution Explorer.Update web reference • Once the proxies are updated. click windows consumer>right click ‘service jobs’>update ‘Web Reference’> click “Yes to all” as shown in the figure below. Page 172 of 215 . This will update the web service proxie s in case it is not up to date.How to start the Quadra client ‘WebServiceGetJobs’ is a client to our project. • • If the Web Sharing of ‘WebServiceGetJobs’ not done previously then it should be done. build the project and run it. To load it we have to make the following changes: • Note that the ‘JobSite’ should be properly running properly. Right click ‘WebServiceGetJobs’ folder>Properties>Web Sharing>Share this folder>Click Add. If everything goes properly we should get the below screen. Figure 9.

In this project at both ends we have C# as a language.2:. Note: . For instance in our job application we have exposed functionality to get recent jobs. C# or any other language who understand XML. For instance we have a java client which is consuming the job web Page 173 of 215 . The ideal scenario is when we have different language other than C# consuming the server. This scenario does not reflect the actual use of web service.Figure 9. So now we can consume this service either using JAVA . Because the functionality is exposed in XML it can be consumed by other languages.Quadra client running successfully Web service Fundamentals Microsoft introduced web services so that we can expose our functionality in XML which can then be consumed by hetrogenous languages.

We have used web service for this scenario as it will save lot of time in integration and thinking from future perspective .service.Add web reference After you click on add web reference you will be popped with a screen as sho wn in figure below. • The first step is to add reference and generate proxy for the webservice. So we click on Web services on the local machine. So as shown in the figure below we right click on the windows consumer client and click on add web reference. The screen shows which web services do you want to add to the project and generate proxy. Below are the steps to add reference to the webservice. Currently our webservice is hosted in the local machine itself. Page 174 of 215 . what if tomorrow we have scenarios where some other language other than C# have to consume this service.3:. • Figure 9.

Figure 9. Click on it to generate proxy. Your client will refer the same using the proxy name. Page 175 of 215 .Bro wse web services • In the local web service we can see our quadra job service getJobs.Web service getJobs • Once you click on getJobs you will popped with a screen below which says what name you would like to name proxy.5: .Figure 9.4: .

You can do the following.Figure 9. Web service exposes its functionality using WSDL i. The below display shows the functionalities exposed through the web service. You will get the below screen. Web service e Description language. Page 176 of 215 . Also note the ASMX file on the browser URL.6: .e. Basically you can know what functionalities is exposed by the web service using the ASMX file. Set the web service project as start up. Click on the Login link.Add reference • In case you want to test the webservice.7:.Set the webservice project as start up • After you have set the web service as start up run the project. So the below screen is generated by reading the WSDL file made by the web service. Figure 9. Click on the login link.

8 :. Page 177 of 215 .Exposing functionalities of the webservice • Once you click on login link you will get the below screen. Enter a valid userid and password and click invoke. Using the ASMX ( which internally uses WSDL) we can invoke the web service with proper data with out actually making the UI.Figure 9. If everything is successful then you should get a bla nk screen.

After having a discussion with top management Quadra came out with a solution and decided to launch “Quadra Client”. Estimation of the Quadra Client Application Page 178 of 215 . This ‘user ID’ and ‘Password’ is same which he has received from the jobseeker registration form. As soon as any company posts a new job the same will be displayed on the Quadra client.Figure 9.9 :. In order to use a “Quadra Client” user has to login the “Quadra Client” using the same Quadra ‘user ID’ and ‘Password’ given in the website. 2) A “Quadra Client” will then ping the job site with in a particular period of time. “Quadra Client” will ha ve the following features: 1) “Quadra Client” will be a desktop client which the end user or jobseeker will install in his desktop machine.Login web service invoked Overview of the Quadra Client Application This project is enhancement of first project. Quadra successfully launches its website but they want some serious value addition for jobseeker.

EI for the quadra client Page 179 of 215 .10:.12:.Below is the detail estimation explanation of the quadra client. There are no complex report in the system so there are no EO’s also. Figure 9. Figure 9.EIF for quadra client EQ There is one simple display for the recent jobs posted so there is one EQ in the system. Figure 9. EIF There are two external data which we refer in the system on is for login and second for the displaying the jobs. ILF and EO There are no ILF in the system because it’s a simple webservice and does not maintain any logical files as such.11:.EQ for the quadra client EI We have two sections in which data passes from one boundary to other that is the login section and second the job display section.

• Calculating Man Days.5 FP per day as baseline.13: . Below is the figure which shows how man days are calculated for chat application.GSC As usual we have considered GSC as 1. Below is the process of conversion as follows: • Calculating unadjusted Function Points. Once all the counting is done we need to convert the Function Points into Man Days. • Calculating adjusted Function Points. Figure 9.GSC for quadra client Total Estimation Below is the final estimation using 1. • Distributing Man Days across SDLC phase. Page 180 of 215 .

One of most important point to know is any estimation methodology always gives execution (development and coding) estimation. For this jobsite application we had calculated 10. technical design and testing phase. Page 181 of 215 . 20% for technical stage and 5% for testing stage. From 10. Below are the diagrams and the explanation of the use cases. Figure 9. By using two developers we can complete the project in 7 man days approximately.53 man days as the execution man days. It does not consider time period for requirement. First user logs in to quadra client second he views the jobs.14: .Quadra client estimation Use Case Explanation Basically there are two use case in this system. So the procedures of calculating is that the percentage of execution time is distributed for every phase and finally added to execution of man days.Now let’s look at how we distribute the man days across the SDLC phase.53 man days we have taken 20% for requirement stage.

1. User is able to see recent jobs posted by companies. Userid and Password does not exists in the system. If he is a valid user user can see job recently posted. 5. Action Main Scenario Action Alternate Scenario Success Scenarios Note and Open Issues Use Case Use Case Name Description Primary Actor Trigger 1. Login User Name is required 2. 3. 3. Step1 to Step3 in executed from the first action 2.15 :. User opens the quadra client. Password is required.Figure 9. System validates the user and checks if he is a valid user. Wrong userid and password entered 1. 4. 3. System validates userid and password is wrong. UC002 View recent posted jobs in quadra client This use case depicts how jobs will be viewed using quadra client Jobseeker User wants to view jobs using quadra client Page 182 of 215 . User enters the userid and password. System is again redirected to the same login page with a error message saying that UserId and Password does not exist . 2. User opens the home page of the website 1.Quadra client use cases Use Case Use Case Name Description Primary Actor Trigger Pre-condition Assumption Failed End conditions UC001 Login in the Quadra client This use case depicts the flow of how a jobseeker will login in to the quadra client Jobseeker User double clicks and opens the quadra client. User is displayed a login screen with Userid and Password field.

System waits for 2 minutes. Step2 to Step4 is repeated with two minutes time interval.Pre-condition Assumption Failed End conditions Action Main Scenario User is already logged in to quadra client 1. YOu can also see the code snippet after the explanation. Both the methods are attributed as webmethod true so that they can be exposed as a webservice and also are stateful. 3. Just after the figure we have numbered the steps as 1 . serviceJobSite class is the webservice class. The webservice stands on the previous classes of the jobsite database Page 183 of 215 . But you can only expose functionality which are in disconnected mode. After two minutes system goes to the server to get the job list again. Webservice are used bascially to expose the functionality in XML so that we can use the same across hetrogenous languages. 4. We have added a new class by name servicejobsite. It has two methods Login and getJObs. Login method is useful to check whether the user exists in the system.Defining the use case loop Class Diagram Explanation The class is pretty simple. The third method is a bit tricky let’s try to understand what the use of that method is. Many time in projects you will see this need because steps are same in alternate scenarios of the use case.16:. 5. User is disconnected from the quadra client User logs in to the quadra client 1. ServiceJobSite class is just a webservice which exposes the class functionality of the job site. User logs in to the quadra client 2. Figure 9. User sees a list of jobs currently posted. The true value indicates that the method is stateful. 1 and 2 are the methods which are exposed as webmethod. User logs off and goes to the main login page Success Scenarios Note and Open Issues In this use case (UC002) one of the worth looking thing is how we have depicted the repetitive steps of the refresh mechanism. 1. 2 and 3. Below is the use case snippet figure of how the loop is written.

So convertdatareadertodataset basically converts the datareader to dataset so that we can expose the same through webservice. Both the methods are numbered. Figure 9. One of the important point to note is webservices are my default stateless and to make it stateful you need to use the HttpContext object.class diagram for the webservice Figure 9. 2 we have set the object to a session variable so that we can get the same object is subsequent request. In the login method in 1 we have set the properties and in the second step i.17 : . Below is the expanded version of the code snippet for both login and getjobs method.18 :. Datareader is a connection oriented object which the webservice can not expose.e. Page 184 of 215 .access layer which returns only datareader.Methods exposed through webservice Code Explanation Let’s make a code walkthrough of inner details of the webservice.

Figure 9. In practical scenarios it is very difficult to control the end customer. building quality software and skating on ice are both easy to do provided requirements are frozen.nobody said on his death bed that he would have liked to spend more time in the office. In the second step we get the datareader .your life and your family. The best way to control changes is by taking official sign offs from the end Customer.. convert to dataset and pass back the same to the client.getJobs function in action Chapter 10 – Points to be noted in projects Here are some important points which can really make you work efficiently in projects.Using the clsUser inside webservice getJobs is pretty simple object. But if you can at least control the changes it will help you manage the project comfortably.20 :.. Love your work but not your project or the company.Figure 9.. Many developers after a certain amount of time become possessive about the project and the company. Don’t become a zombie . Try to come on time and go on time. • Page 185 of 215 . The first thing we check is whether he has logged in to the webservice.19 :. • There is life outside projects. As the saying goes. Try to freeze your requirements before the start of the project. Do a professional job but don’t end up marrying the project or the company. So that you do not get saturated and work on the project for a longer time and effectively. This is done by checking the session variable set in the login method.

Sometimes stepping back makes the project move further Tackle bigger problems of the project first. Avoid ego issues during the project. team leader. Do not make projects your learning ground.unfortunately you were born with only two hands.what’s smarter. Keep yourself flexible and compromise with quality when you have deadlines…. Yes it is possible that they are your friends. Do not hide it. The best way to complete any project is to start those screens which are used by the customer more often. That’s the key to success for any software project. senior developers and then juniors. Every project starts with talking about stars but later ends up somewhere else.. design patterns etc etc. Every project has parasite developers.• • • • • • • • • • Do not try to be a hero in the project. For instance every project has non-frequent masters code them later and start the transaction screens first. Do not talk about stars. your team is only as strong as its weakest link. analyze and fix it. Maintaining a right project hierarchy is very important i. The moment you consider them as a Page 186 of 215 .always be aware of this. Many times in a project developers and managers get stuck up with ego issues. So believe in distributing the load equally which is not only good for the project but also for you in the long run. Many time developers end up doing nitty gritty work and forget the bigger part of the project. the A model. In many projects developers try to implement new technologies in mid of the project just by hearing jargons. There’s a thin line between helping somebody cross a tough hurdle and carrying him on your shoulders . Because heroes also have to go through all the hardships. Do not try to be an octopus . Test and Test. Some times practical deadlines make it impossible to implement these features. Yes. project manager. In a model you have one senior person at the top. These fundamentals are important but it should end up with only jargons. full database normalization. Remember. give them hints but do not do complete coding for them. On any level if you have too much concentration you will have ego issue and promotion issues. In short every project has developers who constantly take help from others thus bringing down their productivity. Step in to help others when they are stuck but you should know when to step out as well. Developers talk about concepts of OOPS. Project managers have this jargon of thinking of every one as a resource. That’s bookish thinking. any one working in a project is finally a human being with emotions. but think for a moment . Customer’s pay heavily for making software so do not make it a learning ground. The right proportion of people from each grade is important. Do not hide your defects.If you are a project manager you should analyze such kind of developers and take effective action at the very beginning which may even mean removing the resource from the project. Do not cheat and leave the same till it goes to the end client. Do not treat your project people as a resource.believe me it’s not a sin if a customer is giving you unreasonable deadlines. Developers are the best guys who know where the code will crash.e. giving a person one fish everyday from your catch or teaching him how to fish. Test.If you are a developer avoid doing their work from start to finish.

you get the point. If any resource is working on a project for more than a year his performance comes down. If you think you have done something good show it. mineral resources. etc which become empty some day . Moreover the word resource reminds you of water resources. advertise it. oil & natural gas resources. In case you are maintaining some other developers’ code do not criticize the code. let your actions do the talking.don’t be a preacher. Page 187 of 215 . make it visible. This is a time tested rule . Remember juniors respect their seniors only if they sit with them for development and understand their difficulties. Avoid unnecessary meetings. If you are working in a maintenance project upgrade yourself time to time. Getting into egos and politics will only complicate things.people only respect leaders who lead from the front rather than issue orders from the rear .this is painfully true in the software industry more than anywhere else. If you are a project manager in the project do not make it a compulsory rule that you will never touch coding. Make yourself visible. Peace of mind is the most important thing. Avoid getting into project politics. Who knows in what circumstances the project was made .• • • • • • • resource they will also consider you as a resource. Change is the only constant in life . It will help you during your assessment. In your own interests wipe off the word from your vocabulary. Prepare a proper KT plan and bring in new resources and roll the old resources off for some better prospects.

for others the lure of going onsite. much like starting up a car and then there are those whom you just cannot coax into doing their job.else you will end up spending your time and energy pushing these worn out cars and get exhausted. Recognize & reward efforts . you may need to inevitably remove them from the project much like sending broken down cars to the garage .too many times it happens that people are working in isolation with no recognition for their efforts.• • • • • • • • • • Identify what makes the other person tick . Assume that your best developers will not last the entire length of the project. for some awards. Keep the environment relaxed and don’t impose unnecessary restrictions.delegate the right tasks to the right people. Use delegation effectively .as a Project Manager this is one of your primary responsibilities. TEAM WORK MAKES THE DREAM WORK Page 188 of 215 .it could be a small gesture like presenting an ipod to a star performer but it means a lot to people.you only need to navigate them and they will reach the goal.you are eventually responsible for final delivery of the project. Keep the team motivated . People will also realize that their efforts are being noticed . Handle people issues in a sensitive manner . as a PM it is mandatory you realize what makes people tick and utilize it for achieving the end goal. In this way you will also indirectly help your key developers to become better leaders which boosts their long term career prospects .for some it could be gaining technical knowledge. This will greatly help you in handling bigger projects involving more than 50 developers. The occasional team outings. Spend 80% of your time with the top 20% of the developers who are the champions in the project. Catch people doing something right genuine praise for a job well done is one of the strongest motivators for people. Whatever it is. You will get more output generated in this manner. Have a back up plan in place in case some of your best developers quit midway through the project. Be an empowering leader. scout for team members who are better than you are and assign tasks respectively. Average developers need to be pushed into action and monitored continuously.use the staff welfare budget wisely.people don’t care how much you know until they know how much you care. Finally remember. You will end up building a strong and loyal team who rise to the occasion when needed. Build leadership across your team across all levels. At the same time remember delegation is not abdication .building people is an ongoing exercise to be done on a daily basis and not something to be remembered only during the annual appraisal meetings. Don’t spread yourself too thin. Proactive quality developers are like fast moving cars . dinners go a long way in keeping people happy . The best leaders are those who consistently surround themselves with people who are better than they are in a certain area and develop synergy towards achieving the common goal.

They buy huge bulk of phone numbers from DFL telecom limited located in US. ERS wants a IT solution which should provide the following functionality :• • • User should be able to upload every day phone data received fro DFL telecom. Call centre project ERS call centre is an mid cap firm mainly in to mobile business. Note :. They do marketing using their call centre division located in India.com. This check will be done on the basis of phone number.The ERS call centre then makes cold calls to these numbers to generate sales.This project will need a good knowledge of windows process and knowledge about reporting system like crystal. Page 189 of 215 . There will be an report which will be used by management to see how much data is duplicate and how much is fresh and pay accordingly to DFL telecom. System should upload the data and check if any duplicate data has come back. You can mail your source code to shiv_koirala@yahoo.Projects coming up in second edition In second edition we will be convering the following projects. But if you can complete the same on your own send us the code with documentation and we will review and send it across. For every phone number they pay 50 cents.

NET Interview question .com. How do you sign an assembly ?)? How to add and remove a assembly from GAC? What is Delay signing ? What is garbage collection? Can we force garbage collector to run ? Page 190 of 215 .What is MSIL or CIL .How do we generate strong names or what is the process of generating string names . Balance sheet and profit/loss report. SQL Server Interview questions and Java Interview questions.What are situations when you register . DBSS is looking for a IT solution which will have the following functionalities :• • Voucher and cash entry according to company gains and spendings Will generate Trial balance. If you want to buy those book you can get it from any BPB book shop mentioned in this books first page or else you can mail the same to bpb@bol.MSC Accounting package DBSS accounting firm software company wants to develop accounting package for Mid size companies. Below are all the questions from my three Interview question . How do we apply strong names to assembly ? . What is use of SN.in or bpb@vsnl.EXE .NET Interview Questions Book Basic .NET assembly in GAC ?) ? What is concept of strong names (Twist :. Interview questions Once you are done with hands on project its time to find a job. . What is JIT?) What is the CLR? What is the CTS? What is CLS(Common Language Specification)? What is Managed Code? What is Assembly ? What are different types of Assembly? What is NameSpace? What is Difference between NameSpace and Assembly? If you want to view a Assembly how to you go about it (Twist : What is ILDASM ?) ? What is Manifest? Where is version information stored of a assembly ? Is versioning applicable to private assemblies? What is GAC (Twist :.NET Framework questions What is IL? (Twist :.net.

What caution needs to be taken in order that .threading ? Can we have multiple threads in one App domain ? Which namespace has threading ? Can you explain in brief how can we implement threading ? How can we change priority and what the levels of priority are provided by .NET ? What are types of compatibility in VB6? Threading What is Multi.NET components in COM (Twist :.NET? When we use windows API in .Sleep() in threading ? How can we make a thread sleep for infinite period ? What is Suspend and Resume in Threading ? What the way to stop a long running thread ? How do i debug thread ? Page 191 of 215 .NET and C# ? What’s difference between System exceptions and Application exceptions? What is CODE Access security? NET Interoperability How can we use COM Components in .What is CCW (COM callable wrapper) ?.NET ? How do you do object pooling in .NET components is compatible with COM ?) ? How can we make Windows API calls in .NET (Twist : What is RCW ?)? Once i have developed the COM wrapper do i have to still register the COM in registry? How can we use .What is reflection? What are different type of JIT ? What are Value types and Reference types ? What is concept of Boxing and Unboxing ? What’s difference between VB.NET ? How many types of Transactions are there in COM + .NET ? What does Addressof operator do in background ? How can you reference current thread of the method ? What's Thread.tasking ? What is Multi.NET is it managed or unmanaged code ? What is COM ? What is Reference counting in COM ? Can you describe IUKNOWN interface in short ? Can you explain what is DCOM ? How do we create DCOM object in VB6? How to implement DTC in .threading ? What is a Thread ? Did VB6 support multi.

SponsorshipTime .Join() in threading ? What are Daemon thread's and how can a thread be created as Daemon? When working with shared data in threading how do you implement synchronization ? Can we use events with threading ? How can we know a state of a thread? what is a monitor object? what are wait handles ?(Twist :.What's Thread.What are the limitation of constructors for Single call SAO ?) How can we call methods in remoting Asynchronously ? What is Asynchronous One-Way Calls ? What is marshalling and what are different kinds of marshalling ? What is ObjRef object in remoting ? What is a WebService ? What is UDDI ? What is DISCO ? What is WSDL? What the different phase of acquiring a proxy object in Webservice ? What is file extension of Webservices ? Which attribute is used in order that the method can be used as WebService ? What are the steps to create a webservice and consume it ? Do webservice have state ? Page 192 of 215 .What is a mutex object ?) what is ManualResetEvent and AutoResetEvent ? What is ReaderWriter Locks ? How can you avoid deadlock in threading ? What’s difference between thread and process? Remoting and Webservices What is an application domain? What is .RenewonCallTime and LeaseManagerPollTime? Which config file has all the supported channels/protocol ? How can you specify remoting parameters using Config files ? Can Non-Default constructors be used with Single Call SAO?(Twist :.NET Remoting ? Which class does the remote object has to inherit ? What are two different types of remote object creation mode in .NET ? Describe in detail Basic of SAO architecture of Remoting? What is the situation you will use singleton architecture in remoting ? What is fundamental of published or precreated objects in Remoting ? What are the ways client can create object on server in CAO model ? Are CAO stateful in nature ? In CAO model when we want client objects to be created by “NEW” keyword is there any precautions to be taken ? Is it a good design practice to distribute the implementation to Remoting Client ? What is LeaseTime.

NET ? What are abstract classes ? What’s a Interface ? What is difference between abstract classes and interfaces? Page 193 of 215 .NET? How can you cache different version of same page using ASP.NET ? What are the other ways you can maintain state ? What are benefits and Limitation of using Hidden fields ? What is ViewState ? Do performance vary for viewstate according to User controls ? What are benefits and Limitation of using Viewstate for state management? How an you use Hidden frames to cache client data ? What are benefits and Limitation of using Hidden frames? What are benefits and Limitation of using Cookies? What is Query String and What are benefits and Limitation of using Query Strings? OOPS What is Object Oriented Programming ? What’s a Class ? What’s a Object ? What’s the relation between Classes and Objects ? What are different properties provided by Object-oriented systems ?(Twist :.NET session ? Is Session_End event supported in all session modes ? What are the precautions you will take in order that StateServer Mode work properly ? What are the precautions you will take in order that SQLSERVER Mode work properly ? Where do you specify session state mode in ASP.What’s difference between Association . Aggregation and Inheritance relationships?) How can we acheive inheritance in VB.Caching Concepts What is application object ? What’s the difference between Cache object and application object ? How can get access to cache object ? What are dependencies in cache and types of dependencies ? Can you show a simple code showing file dependency in cache ? What is Cache Callback in Cache ? What is scavenging ? What are different types of caching using cache object of ASP.Can you explain different properties of Object Oriented Systems?)(Twist :.NET session and compare ASP.NET cache object ? How will implement Page Fragment Caching ? What are ASP.NET session with classic ASP session variables? Which various modes of storing ASP.

NET? In below sample code if we create a object of class2 which constructor will fire first ? What’s the significance of Finalize method in .NET maintain state in between subsequent request ? What is event bubbling ? How do we assign page specific attributes ? Administrator wants to make a security check that no one has tampered with ViewState . as clients can forget to call Dispose method? In what instances you will declare a constructor to be private? ASP.NET What’s the sequence in which ASP.NET)/Static(C#) variables? What is Dispose method in .NET Collection classes located ? What is ArrayList ? What’s a HashTable ?(Twist :.NET events are processed ? In which event are the controls fully loaded ? How can we identify that the Page is PostBack ? How does ASP.NET? Why is it preferred to not use finalize for clean up? How can we suppress a finalize method? What’s the use of DISPOSE method? How do I force the Dispose method to be called automatically.NET ? Why can not you specify accessibility modifier in Interface ? What are similarities between Class and structure ? What’s a difference between Class and structure’s ? What does virtual keyword mean ? What are shared (VB. how can we ensure this ? Page 194 of 215 .NET ? Can you prevent a class from overriding ? What’s the use of “MustInherit” keyword in VB.What is a delegate ? What are event’s ? Do events have return type ? Can event’s have access modifiers ? Can we have shared events ? What is shadowing ? What’s difference between Shadowing and Overriding ? What’s difference between delegate and events? If we inherit a class do the private variables also get inherited ? What are different accessibility levels defined in .NET ? Whats the use of “OverRides” and “Overridable” keywords ? Where are all .What’s difference between HashTable and ArrayList ? ) What are queues and stacks ? What is ENUM ? What is nested Classes ? What’s Operator Overloading in .

NET? How does authorization work in ASP.Config” ? What’s a SESSION and APPLICATION object ? What’s difference between Server.NET? What’s difference between Datagrid .ASAX file ? What order they are triggered ? Do session use cookies ? How can we force all the validation control to run ? How can we check if all the validation control are valid and proper ? If you have client side validation is enabled in your Web page . datalist or repeater ? Difference between ASP and ASP.NET ? How do I send email message from ASP.NET? How can we create custom controls in ASP.Redirect ? What’s difference between Authentication and authorization? What is impersonation in ASP.Config” file ? Where is ViewState information stored ? What’s the use of @ OutputCache directive in ASP. Datalist and repeater ? From performance point of view how do they rate ? What’s the method to customize columns in DataGrid? How can we format data inside DataGrid? How will decide the design consideration to take a Datagrid .NET authentication process works? What are the various ways of authentication techniques in ASP.NET ? What are different IIS isolation levels? Page 195 of 215 .config” and “Machine.NET ? How can you enable automatic paging in DataGrid ? What’s the use of “GLOBAL.NET ? Can you explain in brief how the ASP.NET ? How many types of validation controls are provided by ASP.What’s the use of @ Register directives ? What’s the use of SmartNavigation property ? What is AppSetting Section in “Web.NET ? Can you explain what is “AutoPostBack” feature in ASP.NET ? How do we enable tracing ? What exactly happens when ASPX page is requested from Browser? How can we kill a user session ? How do you upload a file in ASP. Does that mean server side code is not run? Which JavaScript file is referenced for validating the validators at the client side ? How to disable client side script in validators? I want to show the entire validation error message in a message box on the client side? You find that one of your validation is very complicated and does not fit in any of the validators . so what will you do ? What is Tracing in ASP.NET? What are major events in GLOBAL.ASAX” file ? What’s the difference between “Web.Transfer and response.

NET? How do you implement prototype pattern in .NET ? What is the use of connection object ? What is the use of command objects and what are the methods provid ed by the command object ? What is the use of dataadapter ? What are basic methods of Dataadapter ? What is Dataset object? What are the various objects in Dataset ? How can we connect to Microsoft Access .NET ? What is difference between dataset and datareader ? What are major difference between classic ADO and ADO.How can cancel all changes done in dataset ? .NET architecture ? What are the two fundamental objects in ADO.How do we get changed value dataset ? ) Page 196 of 215 .NET? What is three tier architecture? Have you ever worked with Microsoft Application Blocks.NET? ) How can we implement singleton pattern in .NET?(Twist: .How to implement cloning in .NET has the data functionality classes ? Can you give a overview of ADO.NET projects ? What are steps involved to fill a dataset ?(Twist :. What is shallow copy and deep copy ?) What are the situations you will use a Web Service and Remoting in projects? Can you give a practical implementation of FAÇADE patterns? How can we implement observer pattern in .NET ? .How can you implement MVC pattern in ASP. Oracle etc ? How do we connect to SQL SERVER .NET What is the namespace in which . which namespace do we use ? How do we use stored procedure in ADO. Foxpro .NET Architecture What are design patterns ? What’s difference between Factory and Abstract Factory Pattern’s? What’s MVC pattern? (Twist: ..NET and how do we provide parameters to the stored procedures? How can we force the connection object to close after my datareader is closed ? I want to force the datareader to return only schema of the datastore rather than data ? How can we fine tune the command object when we are expecting a single row or a single value ? Which is the best place to store connectionstring in .How can we use dataadapter to fill a dataset ?) What are the various methods provided by the dataset object to generate XML? How can we save all data from dataset ? How can we check that some changes have been made to dataset since it was loaded ?(Twist :. if yes then which? What is Service Oriented architecture? ADO.

How add/remove row’s in “DataTable” object of “DataSet” ? What’s basic use of “DataView” ? What’s difference between “DataSet” and “DataReader” ? How can we load multiple tables in a DataSet ? How can we add relation’s between table in a DataSet ? What’s the use of CommandBuilder ? What’s difference between “Optimistic” and “Pessimistic” locking ? How many way’s are there to implement locking in ADO.can you explain the star schema for OLAP ? ) What is DTS? What is fillfactor ? (Twist :.NET ? How can we perform transactions in .what are different types of locks in SQL SERVER ?) What are different locks in SQL SERVER ? Can we suggest locking hints to SQL SERVER ? What is LOCK escalation? What are the different ways of moving data/databases between servers and databases in SQL Server? What are advantages of SQL 2000 over SQl 7.NET? What’s difference between Dataset.When does plage split occurs ?) What is RAID and how does it work ? What's the difference between DELETE TABLE and TRUNCATE TABLE commands? What are the problems that can occur if you do not implement locking properly in SQL SERVER ? What are different transaction levels in SQL SERVER ?(Twist :. clone and Dataset.0 ? What is the difference between a HAVING CLAUSE and a WHERE CLAUSE? What is difference between UNION and UNION ALL SQL syntax ? How can you raise custom errors from stored procedure ? What is ACID fundamental and what are transactions in SQL SERVER ? What is DBCC? Page 197 of 215 . copy ? SQL SERVER What is normalization? What are different type of normalization? What is denormalization ? What is a candidate key ? What are different types of joins and whats the difference between them ? What are indexes and What is the difference between clustered and nonclustered indexes? How can you increase SQL performance ? What is the use of OLAP ? What's a measure in OLAP ? What are dimensions in OLAP ? What are levels in dimensions ? What are fact tables and dimension tables in OLAP ? (Twist :.

Explain in short all types of diagrams in UML ?) What are advantages of using UML?(Twist: .Do I need all UML diagrams in a project? Give a small brief explanation of all Elements in activity diagrams? Explain Different elements of a collaboration diagram ? Explain Component diagrams ? Explain all parts of a deployment diagram? Describe various components in sequence diagrams? What are the element in State Chart diagrams ? Describe different elements in Static Chart diagrams ? Explain different elements of a Use Case ?(Twist: .What is Modeling and why UML ?) What’s the sequence of UML diagrams in project?(Twist: .How did you implement UML in your project?) Just a small Twist: .What’s difference between Activity and sequence diagrams?(I leave this to the readers)) Project Management What is project management? Is spending in IT project’s constant through out the project? Who is a stakeholder ? Can you explain project life cycle ?(Twist :.What is purpose of Replication ? What are different type of replication supported by SQL SERVER ? What is BCP utility in SQL SERVER ? What are different types of triggers in SQl SERVER 2000 ? If we have multiple AFTER Triggers on table how can we define the sequence of the triggers ? What is SQl injection ? UML What is UML? How many types of diagrams are there in UML ?(Twist :.How many phases are there in software project ?) Are risk constant through out the project ? Can you explain different software development life cycles ? What is triple constraint triangle in project management ? What is a project baselines ? What is effort variance? How is normally a project management plan document organized ? How do you estimate a project? What is CAR (Causal Analysis and Resolution)? How do you handle change request? What is internal change request? Page 198 of 215 .

DML and DCL concept in RDBMS world? Page 199 of 215 .Two of your resources have conflict’s between them how would you sort it out ?) How do you start a project? How did you do resource allocations? How do you do code reviews ? SQL Server Interview Questions Book Database Concepts What is a database or database management systems (DBMS)? What’s difference between DBMS and RDBMS ? What are CODD rules? Is access database a RDBMS? What’s the main difference between ACCESS and SQL SERVER? What’s the difference between MSDE and SQL SERVER 2000? What is SQL SERVER Express 2005 Edition? What is SQL Server 2000 Workload Governor? What’s the difference between SQL SERVER 2000 and 2005? What are E-R diagrams? How many types of relationship exist in database designing? Can you explain Fourth Normal Form? Can you explain Fifth Normal Form? What’s the difference between Fourth and Fifth normal form? Have you heard about sixth normal form? What is Extent and Page? What are the different sections in Page? What are page splits? In which files does actually SQL Server store data? What is Collation in SQL Server? Can we have a different collation for database and table? SQL Revisiting basic syntax of SQL? What are “GRANT” and “REVOKE’ statements? What is Cascade and Restrict in DROP table SQL? What is a DDL.What is difference between SITP and UTP in testing ? What are the software you have used for project management? What are the metrics followed in project management?(Twist: .What metrics will you look at in order to see the project is moving successfully?) You have people in your team who do not meet there deadlines or do not perform what are the actions you will take ? (Twist :.

NET code in SQL SERVER 2005? How can we drop a assembly from SQL SERVER? Are changes made to assembly updated automatically in database? Why do we need to drop assembly for updating changes? How to see assemblies loaded in SQL Server? I want to see which files are linked with which assemblies? Does .NET CLR and SQL SERVER run in different process? Does .NET controls SQL SERVER or is it vice-versa? Is SQLCLR configured by default? How to configure CLR for SQL SERVER? Is .NET feature loaded by default in SQL Server? How does SQL Server control .NET run-time? What’s a “SAND BOX” in SQL Server 2005? What is a application domain? Page 200 of 215 .NET Integration What are steps to load a .What are different types of joins in SQL? What is “CROSS JOIN”? You want to select the first record in a given set of rows? How do you sort in SQL? How do you select unique rows using SQL? Can you name some aggregate function is SQL Server? What is the default “SORT” order for a SQL? What is a self-join? What's the difference between DELETE and TRUNCATE ? Select addresses which are between ‘1/1/2004’ and ‘1/4/2004’? What are Wildcard operators in SQL Server? What’s the difference between “UNION” and “UNION ALL” ? What are cursors and what are the situations you will use them? What are the steps to create a cursor? What are the different Cursor Types? What are “Global” and “Local” cursors? What is “Group by” clause? What is ROLLUP? What is CUBE? What is the difference between “HAVING” and “WHERE” clause? What is “COMPUTE” clause in SQL? What is “WITH TIES” clause in SQL? What does “SET ROWCOUNT” syntax achieves? What is a Sub-Query? What is “Correlated Subqueries”? What is “ALL” and “ANY” operator? What is a “CASE” statement in SQL? What does COLLATE Keyword in SQL signify? .

How are .NET Appdomain allocated in SQL SERVER 2005? What is Syntax for creating a new assembly in SQL Server 2005? Do Assemblies loaded in database need actual .NET DLL? Does SQL Server handle unmanaged resources? What is Multi- tasking ? What is Multi- threading ? What is a Thread ? Can we have multiple threads in one App domain ? What is Non-preemptive threading? What is pre-emptive threading? Can you explain threading model in SQL Server? How does .NET and SQL Server thread work? How are exception in SQLCLR code handled? Are all .NET libraries allowed in SQL Server? What is “Hostprotectionattribute” in SQL Server 2005? How many types of permission level are there for an assembly? Can you name system tables for .NET assemblies? Are two version of same assembly allowed in SQL Server? How are changes made in assembly replicated? Is it a good practice to drop a assembly for changes? In one of the projects following steps where done, will it work? What does Alter assembly with unchecked data signify? How do I drop an assembly? Can we creat SQLCLR using .NET framework 1.0? While creating .NET UDF what checks should be done? How do you define a function from the .NET assembly? Can compare between T-SQL and SQLCLR ? With respect to .NET is SQL SERVER case sensitive? Does case sensitive rule apply for VB.NET? Can nested classes be accessed in T-SQL? Can we have SQLCLR procedure input as array? Can object datatype be used in SQLCLR? How’s precision handled for decimal datatypes in .NET? How do we define INPUT and OUTPUT parameters in SQLCLR? Is it good to use .NET datatypes in SQLCLR? How to move values from SQL to .NET datatypes? What is System.Data.SqlServer? What is SQLContext? Can you explain essential steps to deploy SQLCLR? How do create function in SQL Server using .NET? How do we create trigger using .NET? How to create User Define Functions using .NET? How to create User Defined Create aggregates using .NET? What is Asynchronous support in ADO.NET? What is MARS support in ADO.NET? What is SQLbulkcopy object in ADO.NET ?

Page 201 of 215

How to select range of rows using ADO.NET? ADO.NET Which are namespaces for ADO.NET? Can you give a overview of ADO.NET architecture ? What are the two fundamental objects in ADO.NET ? What is difference between dataset and datareader ? What are major difference between classic ADO and ADO.NET ? What is the use of connection object ? What are the methods provided by the command object ? What is the use of dataadapter ? What are basic methods of Dataadapter ? What is Dataset object? What are the various objects in Dataset ? How can we connect to Microsoft Access , Foxpro , Oracle etc ? What’s the namespace to connect to SQL Server? How do we use stored procedure in ADO.NET? How can we force the connection object to close? I want to force the datareader to return only schema? Can we optimize command object when there is only one row? Which is the best place to store connectionstring ? What are steps involved to fill a dataset ? What are the methods provided by the dataset for XML? How can we save all data from dataset ? How can we check for changes made to dataset? How can we add/remove row’s in “DataTable” object of “DataSet” ? What’s basic use of “DataView” ? What’s difference between “DataSet” and “DataReader” ? How can we load multiple tables in a DataSet ? How can we add relation’s between table in a DataSet ? What’s the use of CommandBuilder ? What’s difference between “Optimistic” and “Pessimistic” locking ? How many way’s are there to implement locking in ADO.NET ? How can we perform transactions in .NET? What’s difference between Dataset. clone and Dataset. copy ? Whats the difference between Dataset and ADO Recordset? Notification Services What are notification services? What are basic components of Notification services? Can you explain architecture of Notification Services? Which are the two XML files needed for notification services? What is Nscontrols command? What are the situations you will use “Notification” Services?

Page 202 of 215

Service Broker What do we need Queues? What is “Asynchronous” communication? What is SQL Server Service broker? What are the essential components of SQL Server Service broker? What is the main purpose of having Conversation Group? How to implement Service Broker? How do we encrypt data between Dialogs? XML Integration What is XML? What is the version information in XML? What is ROOT element in XML? If XML does not have closing tag will it work? Is XML case sensitive? What’s the difference between XML and HTML? Is XML meant to replace HTML? Can you explain why your project needed XML? What is DTD (Document Type definition)? What is well formed XML? What is a valid XML? What is CDATA section in XML? What is CSS? What is XSL? What is Element and attributes in XML? Can we define a column as XML? How do we specify the XML data type as typed or untyped? How can we create the XSD schema? How do I insert in to a table which has XSD schema attached to it? What is maximum size for XML datatype? What is Xquery? What are XML indexes? What are secondary XML indexes? What is FOR XML in SQL Server? Can I use FOR XML to generate SCHEMA of a table and how? What is the OPENXML statement in SQL Server? I have huge XML file which we want to load in database? How to call stored procedure using HTTP SOAP? What is XMLA ?

Page 203 of 215

Data Warehousing/Data Mining What is “Data Warehousing”? What are Data Marts? What are Fact tables and Dimension Tables? What is Snow Flake Schema design in database? What is ETL process in Data warehousing? How can we do ETL process in SQL Server? What is “Data mining”? Compare “Data mining” and “Data Warehousing”? What is BCP? How can we import and export using BCP utility? What is Bulk Insert? What is DTS ? Can you brief about the Data warehouse project you worked on? What is an OLTP (Online Transaction Processing) System? What is an OLAP (On- line Analytical processing) system? What is Conceptual, Logical and Physical model? What is Data purging? What is Analysis Services? What are CUBES? What are the primary ways to store data in OLAP? What is META DATA information in Data warehousing projects? What is multi-dimensional analysis? What is MDX? How did you plan your Data ware house project? What are different deliverables according to phases? Can you explain how analysis service works? What are the different problems that “Data mining” can solve? What are different stages of “Data mining”? What is Discrete and Continuous data in Data mining world? What is MODEL is Data mining world? How are models actually derived? What is a Decision Tree Algorithm? Can decision tree be implemented using SQL? What is Naïve Bayes Algorithm? Explain clustering algorithm? Explain in detail Neural Networks? What is Back propagation in Neural Networks? What is Time Series algorithm in data mining? Explain Association algorithm in Data mining? What is Sequence clustering algorithm? What are algorithms provided by Microsoft in SQL Server? How does data mining and data warehousing work together? What is XMLA ? What is Discover and Execute in XMLA?

Page 204 of 215

Integration Services/DTS What is Integration Services import / export wizard? What are prime components in Integration Services? How can we develop a DTS project in Integration Services? Replication Whats the best way to update data between SQL Servers? What are the scenarios you will need multiple databases with schema? How will you plan your replication? What is a publisher, distributor and subscriber in “Replication”? What is “Push” and “Pull” subscription? Can a publication support push and pull at one time? What are different models / types of replication? What is Snapshot replication? What are the advantages and disadvantages of using Snapshot replication? What type of data will qualify for “Snapshot replication”? What’s the actual location where the distributor runs? Can you explain in detail how exactly “Snapshot Replication” works? What is merge replication? How does merge replication works? What are advantages and disadvantages of Merge replication? What is conflict resolution in Merge replication? What is a transactional replication? Can you explain in detail how transactional replication works? What are data type concerns during replications? Reporting Services Can you explain how can we make a simple report in reporting services? How do I specify stored procedures in Reporting Services? What is the architecture for “Reporting Services “? Database Optimization What are indexes? What are B-Trees? I have a table which has lot of inserts, is it a good database design to create indexes on that table? What are “Table Scan’s” and “Index Scan’s”? What are the two types of indexes and explain them in detail? What is “FillFactor” concept in indexes? What is the best value for “FillFactor”? What are “Index statistics”? How can we see statistics of an index?

Page 205 of 215

How do you reorganize your index, once you find the problem? What is Fragmentation? How can we measure Fragmentation? How can we remove the Fragmented spaces? What are the criteria you will look in to while selecting an index? What is “Index Tuning Wizard”? What is an Execution plan? How do you see the SQL plan in textual format? What is nested join, hash join and merge join in SQL Query plan? What joins are good in what situations? 298 Transaction and Locks What is a “Database Transactions “? What is ACID? What is “Begin Trans”, “Commit Tran”, “Rollback Tran” and “Save Tran”? What are “Checkpoint’s” in SQL Server? What are “Implicit Transactions”? Is it good to use “Implicit Transactions”? What is Concurrency? What kind of problems occurs if we do not implement proper locking strategy? What are “Dirty reads”? What are “Unrepeatable reads”? What are “Phantom rows”? What are “Lost Updates”? What are different levels of granularity of locking resources? What are different types of Locks in SQL Server? What are different Isolation levels in SQL Server? If you are using COM+ what “Isolation” level is set by default? What are “Lock” hints? What is a “Deadlock” ? What are the steps you can take to avoid “Deadlocks” ? How can I know what locks are running on which resource?

JAVA Interview Questions Book

OOPS and CORE JAVA What is JVM (Java Virtual Machine)? What is JIT (Just- in-Time) Compilation? What is Object Oriented Programming? What’s a Class? What’s an Object? What’s the relation between Classes and Objects?

Page 206 of 215

extension and system class loader? Can you explain how can you practically do dynamic loading? How can you copy one array in to a different array? Can you explain the core collection interfaces? Can you explain in brief the collection classes which implement the collection interfaces? What’s the difference between standard JAVA array and ArrayList class? What’s the use of “ensureCapacity” in ArrayList class? How can we obtain an array from an ArrayList class? What is “LinkedList” class for? Can you explain HashSet class in collections? what is LinkedHashSet class? what is a TreeSet class? what’s the use of Comparator Interface? How can we access elements of a collection? What is Map and SortedMap Interface? Have you used any collection algorithm? Why do we use collections when we had traditional ways for collection? Can you name the legacy classes and interface for collections? What is Enumeration Interface? Page 207 of 215 . Extension and System Class loader? Can you explain the flow between bootstrap.What are different properties provided by Object-oriented systems? How do you implement inheritance in Java? How can we implement polymorphism in Java? What’s an interface and how will you go about implementing an interface? What is an Abstract class? What are Abstract methods? What’s the difference between “Abstract” classes and “Interfaces”? What’s difference between Static and Non-Static fields of a class? What are inner classes and what’s the practical implementation of inner classes? What are packages? What is a constructor in class? Can constructors be parameterized? Can you explain transient and volatile modifiers? What is the use if “instanceof ” keyword? What are Native methods in Java? Explain in depth Garbage collector? How does the garbage collector determine that the object has to be marked for deletion? Can you explain “finalize()” method? How can we force the garbage collector to run? What’s the main difference between “Switch” and “If ” comparison? What’s the use of JAVAP tool? What are applets? In which package is the applet class located? What are native interfaces in Java? what are Class loader’s? what is Bootstrap.

sleep? How to stop a thread? What is wait() and notify() ? Can you explain how Scheduling and Priority works in threads? Can you explain Yielding in threading? what are daemon threads? Page 208 of 215 . Can you explain the concept? what is a StringBuffer class and how does it differs from String class? what is the difference between StringBuilder and StringBuffer class? What is Pass by Value and Pass by reference? How does JAVA handle the same? What are access modifiers? what is Assertion? Can you explain the fundamentals of deep and shallow Cloning? How do we implement Shallow cloning? How do we implement deep cloning? What’s the impact of private constructor? What are the situations you will need a constructor to be private? Can you explain final modifier? What are static Initializers? If we have multiple static initializer blocks how is the sequence handled? Define casting? What are the different types of Casting? Can you explain Widening conversion and Narrowing conversion? Can we assign parent object to child objects? Define exceptions? Can you explain in short how JAVA exception handling works? Can you explain different exception types? Can you explain checked and unchecked exceptions? Can we create our own exception class? What are chained exceptions? What is serialization? How do we implement serialization actually? What’s the use of Externalizable Interface? Threading What’s difference between thread and process? What is thread safety and synchronization? What is semaphore? What are monitors? What’s the importance of synchronized blocks? How do we create threads? what’s the difference in using runnable and extends in threads? Can you explain Thread.what’s the main difference between ArrayList / HashMap and Vector / Hashtable? Are String object Immutable.

“CachedRowset”. “JdbcRowset” and “WebRowSet” relation ship? what are the different types of resultset? Explain the concept of “PreparedStatement “statement interface? What’s the difference between “Statement” and “PreparedStatement”? How can we call stored procedure using JDBC? Can you explain “CallableStatement” interface in detail? How do you get a resultset object from stored procedure? How can we do batch updates using “CallableStatement” Interface? Define transactions? what is ACID in transaction? what are the four essential properties of a transaction? Explain concurrency and locking? What are different types of locks? What are the different types of levels of resource on which locks can be placed? Define lock escalation? What is Table level and Row level locking? What are the problems that can occur if you do not implement locking properly? What are different transaction levels? Twist: .what are different types of locks? What is difference between optimistic and pessimistic locking? What are deadlocks? How can we set transaction level through JDBC API? Page 209 of 215 . “RowSet”.JDBC How does JAVA interact with databases? Can we interact with non-relational sources using JDBC? Can you explain in depth the different sections in JDBC? Can you explain in short how you go about using JDBC API in code? How do you handle SQL exceptions? If there is more than one exception in SQLException” class how to go about displaying it? Explain Type1.Java driver? Define meta-data? What is DatabaseMetaData? Can you explain “ConnectionFactory” class? I want to display tables of a database how do I do it? Define “ResultSetMetaData”? What is the difference between “ResultSet” and “RowSet”? Can “ResultSet” objects be serialized? Can you explain “ResultSet”. Type3 and Type4 drivers in JDBC? What are the advantages and disadvantages of using JDBC-ODBC bridge driver? What are the advantages and disadvantages of using Native-API/ Partially Java Driver? What are the advantages and disadvantages of using Net-Protocol/ All-Java driver? What are the advantages and disadvantages of using Native-protocol/ All. Type2.

servlet” package? What’s the use of ServletContext? How do we define an application level scope for servlet? What's the difference between GenericServlet and HttpServlet? Can you explain in detail javax.Explain step by step of how to implement filters? what’s the difference between Authentication and authorization? Explain in brief the directory structure of a web application? Can you explain JSP page life cycle? What is EL? how does EL search for an attribute? What are the implicit EL objects in JSP? How can we disable EL? what is JSTL? Can you explain in short what the different types of JSTL tags are? How can we use beans in JSP? What is <jsp:forward> tag for ? What are JSP directives? what are Page directives? what are include directives? Can you explain taglib directives? How does JSP engines instantiate tag handler classes instances? Page 210 of 215 .Can you explain transaction control in JDBC? What are Savepoints in a transaction? Servlets and JSP What are Servlets? What are advantages of servlets over CGI? Can you explain Servlet life cycle? What are the two important API’s in for Servlets? Can you explain in detail “javax.servlet.http package? What’s the architecture of a Servlet package? Why is HTTP protocol called as a stateless protocol? What are the different ways we can maintain state between requests? What is URL rewriting? What are cookies? What are sessions in Servlets? What’s the difference between getSession(true) and getSession(false) ? What’s the difference between “doPost” and “doGet” methods? Which are the different ways you can communicate between servlets? What is functionality of “RequestDispatcher” object? How do we share data using “getServletContext ()”? Explain the concept of SSI? What are filters in JAVA? Can you explain in short how do you go about implementing filters using Apache Tomcat? Twist: .

what’s the difference between JavaBeans and taglib directives? what are the different scopes an object can have in a JSP page? what are different implicit objects of JSP? what are different Authentication Options available in servlets? Can you explain how do we practically implement security on a resource? How do we practically implement form based authentication? How do we authenticate using JDBC? Can you explain JDBCRealm? Can you explain how do you configure JNDIRealm? How did you implement caching in JSP? EJB What is EJB? what are the different kind of EJB’s? you are designing architecture for a project how do you decide whether you should use session. entity or message driven bean? Can you explain “EJBHome” and “EJBObject” in EJB? Can client directly create object of session or entity beans? Can you explain the concept of local interfaces? What are the limitations of using Local object? Which application server have you used for EJB ? Can you explain step by step practically developing and deploying EJB component? what is Passivation and Activation in EJB? Can beans who are involved in transaction have “Passivation” process? How does the server decide which beans to passivate and activate? In what format is the conversational data written to the disk? Can you explain in brief Life cycle for Stateless and Stateful beans? Struts What’s MVC pattern? Define struts? Can you explain the directory structure for a struts folder in brief ? Can you give an overview of how a struts application flows? Twist: .What are action and action form classes in Struts? XML and Web Services What is XML? What is the version information in XML? What is ROOT element in XML? If XML does not have closing tag will it work? Is XML case sensitive? What is the difference between XML and HTML? Page 211 of 215 .

What are the different types of references JNI supports? Twist: . C# or VB.How to do you delete global objects? how does the native language C or C++ understand data types in JAVA? Can you explain exception handling in JNI? Page 212 of 215 .NET directly? What are JNI functions and pointers? How does the garbage collector know JNI objects are no more used? Twist: . currency and Dates according to proper Locale format? what are resource bundles? How do we load a resource bundle file? How can we do inheritance in resource bundles? JNI What is Native Interface in JAVA? Can you say in brief steps required to implement Native interfaces in Java? Can JNI be used for VB6.Is XML meant to replace HTML? Can you explain why your project needed XML? What is DTD (Document Type definition)? What is well formed XML? What is a valid XML? What is CDATA section in XML? What is CSS? What is XSL? What is element and attributes in XML? What are the standard ways of parsing XML document? In What scenarios will you use a DOM parser and SAX parser? What is XSLT? Define XPATH? What is the concept of XPOINTER? What is a Web Service ? What is DISCO ? What is SOAP ? What is WSDL ? Can you explain UDDI ? Can you explain JAXP ? What is a XML registry? What is JAXR? What is JAXM? Can you explain how JAXM messaging model works? Can you explain JAX-RPC? Internationalization Can you explain i18n and l10n? Can you explain internationalization and localization? What is Locale? How do we display numbers.

What is Ishikawa diagram ? What is pareto principle ? Twist :.threading scenarios? What are the advantages and disadvantages of using “JNI”? Architecture What are design patterns ? What is the difference between Factory and Abstract Factory Patterns? What is MVC pattern? Twist: .How to implement cloning in JAVA? What is shallow copy and deep copy ? Can you give a practical implementation of FAÇADE patterns? How can we implement observer pattern in JAVA? What is three tier architecture? What is Service Oriented architecture? What is aspect oriented programming? Project Management What is project management? Is spending in IT projects constant through out the project? Who is a stakeholder ? Can you explain project life cycle ? Twist :.What is 80/20 principle ? How do you handle change request? What is internal change request? What is difference between SITP and UTP in testing ? What is the software you have used for project management? What are the metrics followed in project management? Twist: .How can you implement MVC pattern in Servlets and JSP? How can we implement singleton pattern in JAVA? How do you implement prototype pattern in JAVA? Twist: .What metrics will you look at in order to see the project is moving successfully? You have people in your team who do not meet there deadlines or do not perform what are the actions you will take ? Page 213 of 215 .How many phases are there in software project ? Are risk constant through out the project ? Can you explain different software development life cycles ? What is triple constraint triangle in project management ? What is a project baselines ? What is effort variance? How is normally a project management plan document organized ? How do you estimate a project? What is CAR (Causal Analysis and Resolution)? What is DAR (Decision Analysis and Resolution) ? What is a fish bone diagram ? Twist:.What are limitations for “JNIEnv” pointer in multi.

Two of your resources have conflicts between them how would you sort it out ? What is black box testing and White box testing? What’s the difference between Unit testing.Explain in short all types of diagrams in UML ? What are advantages of using UML? Twist: . COCOMOII and COCOMOIII? What is SMC approach of estimation? How do you estimate maintenance project and change requests? UML What is UML? How many types of diagrams are there in UML ? Twist :.What is Modeling and why UML ? What is the sequence of UML diagrams in project? Twist: .How did you implement UML in your project? Just a small Twist: .Do I need all UML diagrams in a project? Give a small brief explanation of all Elements in activity diagrams? Explain Different elements of a collaboration diagram ? Explain Component diagrams ? Explain all parts of a deployment diagram? Describe the various components in sequence diagrams? Page 214 of 215 .What is your company’s productivity factor ? Do you know Use Case points? What is COCOMO I.Twist :.Define Elementary process in FPA? What are the different types of elementary process in FPA? What are the different elements in Functions points? Can you explain in GSC and VAF in function points? What are unadjusted function points and how is it calculated? Can you explain steps in function points? What is the FP per day in your current company? Twist :. Assembly testing and Regression testing? What is V model in testing? How do you start a project? How did you do resource allocations? How will you do code reviews ? What is CMMI? What are the five levels in CMMI? What is continuous and staged representation? Can you explain the process areas? What is SIX sigma? What is DMAIC and DMADV ? What are the various roles in Six Sigma implementation? What are function points? Twist: .

What are the element in State Chart diagrams ? Describe different elements in Static Chart diagrams ? Explain the different elements of a Use Case ? Twist: .What is the difference between Activity and sequence diagrams?(I leave this to the readers) Page 215 of 215 .

Sign up to vote on this title
UsefulNot useful