$& Name of Student +,atinder -aur. 'lass /$*%E'H +'SE. (ni0 Roll No*122342556372
DEPAR%MEN% O) 'OMP(%ER S'IEN'E AND ENGINEERING S(R8A S'HOO9 O) ENGINEERING AND %E'HNO9OG8:$APROR
April: ;216
'ER%I)I'A%E
I hereby certify that the work which is being presented in the B.Tech. Major Project Report entitled <HOME DESIGN HAVEN=: in partial fulfilment of the re uirements for the award of the $ac elor of %ec nolo#& in 'omputer Science > En#ineerin# and submitted to the !epartment of "omputer #cience $ %ngineering of #urya &orld Institutions of 'cademic %(cellence Rajpura PB is an authentic record of my own work carried out during a period from )anuary *+,- to 'pril *+,- under the super.ision of ER* Ajit sin# : 'SE Department. The matter presented in this project has not been submitted by me for the award of any other degree elsewhere.
Head !epartment of "omputer #cience $ %ngineering #urya &orld Institutions of 'cademic %(cellence / Bapror / Rajpura
2
#ignature of the #tudent 3)atinder kaur4 This is to certify that the abo.e statement made by the candidate is correct to the best of my:our knowledge.
A'BNOC9EDGMEN%
I am highly grateful to the Reenu #harma/ 1O! "#%/ #urya "ollege of %ngineering $ Technology/ Rajpura/ for minor project. I would like to e(presses my gratitude to other faculty members of "omputer #cience $ %ngineering department of ##%T/ Rajpura for pro.iding academic inputs/ guidance $ encouragement throughout this period. The help rendered by )atinder kaur/ #uper.isor 3%r.'jit singh4 for e(perimentation is greatly acknowledged. ;inally/ I e(press my indebtedness to all who ha.e directly or indirectly contributed to the successful completion of my industrial training.
,A%INDER
Abstract of Project
The project 01ome !esign 1a.en."om2 is a part of our < month degree course as per under the norms and regulations of the Punjab Technical 5ni.ersity/ )alandhar. 1ome !esign 1a.en."om is an online shopping website. It is a website which is used to sell items room=s product like li.ingroom/ dinningroom/ bedroom/ washroom/ kidsroom/ kitchen product/ window and stairs and see interior and e(terior designs etc. Online shopping is the process whereby consumers directly buy goods/ ser.ices etc. from a seller interacti.ely in real>time without an intermediary ser.ice o.er the internet. This project aims to pro.ide shopping cart solutions to all types of customers o.er the internet world. 5ser should register first before going to buy any item using this &ebsite. &eb forms included in this web application are 'dmin Panel which includes pages like 'dd 6ew Product/ 5pdate Product/ !elete Product/ Manage 1ome Page/ and Manage Orders. 'nother &eb ;orms are 1ome/ Product/ ?allery/ 'bout 5s/ "ontact 5s/ My "art/ 7ogin/ Buyer !etails/ !isplay Products/ ;orgot Password/ 5ser Registration/ and #hipping. This system is all about the con.erting the shopping system from manual to online. "ustomer can buy products online after login to the site. 'dministrator can add product to database. 'dministrator can edit or delete the products from the database. This project is aimed at de.eloping a &eb application that depicts online #hopping of electronic items. 5sing this software/ companies can impro.e the efficiency of their ser.ices. Online #hopping is one of the applications to impro.e the marketing of the company=s products. This web application in.ol.es all the features of the online shopping.
9IS% O) %A$9ES
PAGE NO 1@ ;2 56 56
9IS% O) )IG(RES
)IG NO*
,., ,.* ,.B ,.,.A ,.< ,.D ,.E ,.C ,.,+ ,.,, ,.,* *., *.* *.B *.*.A *.< *.D *.E *.C
)IG NAME
The .6et ;ramework Output for #imple Program in "@ Output for ' Program to build a Pyramid Output for ' Program for %(ception 1andling Output for ' Program for Threading 6ew project !ialog Bo( ' new &indows 'pplication ' new ;orm #olution %(plorer !ebugging Traditional !ata 'ccess 'rchitecture '!O.6%T !isconnected !ata 'ccess 'rchitecture #!7" Phases 7e.el + !;! 7e.el , !;! #hopping Proccess 1ome Product Page Testimonial ?allery Product !escription
7
PAGE NO*
,* ,A ,C *A *< *D *E *E *C B* BB BB A< A< AD AE AC <+ <, <* <B
*.,+ *.,,
<<A
*.,*
*.,B *.,*.,A *.,< *.,D *.,E *.,C *.*+ *.*, *.** *.*B *.**.*A *.*< *.*D *.*E
"art
Buy 6ow Buyer !etails Order 'bout 5s "ontact 5s 'dmin 7ogin 'dd 6ew Product 5pdate Product !elete Product Manage Orders Manage 1ome ;orgot Password Product Table "art Table Register Table Orders Table
<<
<D <E <C D+ D, D* DB DDA D< DD DE DC E+ E, E*
INDED
SNO
1. 1*1 1*;
'ON%EN%
TR'I6I6? R%PORT .6%T ;R'M% &ORF '!8'6T'?%# O; .6%T ;R'M%&ORF !I#'!8'6T'?%# O; .6%T;R'M%&ORF "@ 7'6?5'?% ' #IMP7% "@ PRO?R'M ' "O6#O7% 'PP7I"'TIO6 &I6!O& 'PP7I"'TIO6 '#P.6%T 'BO5T PRO)%"T
PAGE NO
,, ,, ,* ,B ,B ,,< *< B< -D -D -E -C A+ A+ A+ A,
1*5
1*6 1*E 1*4 1*@ 1*7 ;. ;*1 ;*; ;*5 ;*6 ;*E ;*4 ;*@
!'T' ;7O& !I'?R'M PRO""%## !%T'I7# !%#I?6 O; T1% #IT% !'T'B'#% PROB7%M R%PORT 7I#T O; PROB7%M# ;'"%! !5RI6? T1% PRO)%"T #O75TIO6 TO T1% PROB7%M# ;5T5R% #"OP% R%;%R%6"%
AA AE AC DC EB EB EEE<
5*; 5*5 6.
10
applications. 'nd other classes let you work with databases/ manage security/ access files/ and perform many other functions. 'lthough it=s not apparent in this figure/ the classes in the .6%T ;ramework "lass 7ibrary are organiGed in a hierarchical structure. &ithin this structure/ related classes are organiGed into groups called namespaces. %ach namespace contains the classes used to support a particular function. ;or e(ample/ the #ystem.&indows.;orms namespace contains the classes used to create forms and the #ystem.!ata namespace contains the classes you use to access data. % e 'ommon 9an#ua#e Runtime/ or "7R/ pro.ides the ser.ices that are needed for e(ecuting any application that=s de.eloped with one of the .6%T languages. This is possible because all of the .6%T languages compile to a common intermediate language. The "7R also pro.ides the "ommon Type #ystem that defines the data types that are used by all the .6%T languages. That way/ you can use more than one of the .6%T languages as you de.elop a single application without worrying about incompatible data types.
12
)i#? 1*1 % e *Net )rame"or1*; Ad0anta#es of *Net )rame"or,. Multi 7anguage Platform 3"/ "II/ "@ /)@/ ;@4. *. #upports both windows and web applications. B. "ode reusability. -. !rag and drop facility. A. %asy to write code.
1*5 Disad0anta#es of *Net )rame"or,. Platform dependent. *. Only Microsoft windows can support .6et. 7inu( and Mac do not support.6et or any of its applications.
13
%&peFsafe !esign of the language makes it impossible to ha.e uninitialiGed .ariables/ to inde( arrays beyond their bounds/ or to perform unchecked type casts. "@ has a unified type system . 'll "@ types/ including primiti.e types such as int and double / inherit from a single root object type. Thus/ all types share a set of common operations/ and .alues of any type can be stored/ transported/ and operated upon in a consistentmanner. ;urthermore/ "@ supports both user>defined reference types and .alue types/ allowing dynamic allocation of objects as well as in>line storage of lightweight structures. To ensure that "@ programs and libraries can e.ol.e o.er time in a compatible manner/ much emphasis has been placed on .ersioning in "@=s design. Many programming languages pay little attention to this issue/ and/ as a result/ programs written in those languages break more often than necessary when newer .ersions of dependent libraries are introduced. 'spects of "@=s design that were directly influenced by .ersioning considerations include the separate .irtual and o.erride modifiers/ the rules for method o.erload resolution/ and support for e(plicit interface member declarations.
14
O(%P(% ?
)i#? 1*; Output for Simple Pro#ram in 'G % e Jusin#J Directi0e The first line of the abo.e program is using a directi.e/ which declares that the current file can use members of the indicated namespace without using the memberQs fully ualified name. &ithout this directi.e/ all references to the identifier N"onsoleN would ha.e to be preceded by N#ystemN and a period/ because "onsole is a member of the #ystem namespace 'll datatypes in .6%T must be declared as a member of a namespace. Namespace Declaration The line that reads Nnamespace "onsole'pplication, N/ declares that anything declared within the curly braces is a member of the N "onsole'pplication,N namespace .
15
'lass Definition The code within the namespace declaration defines a public class named NProgramN that has a single static method named NMainN. The method is the entry point of the application . $od& of t e Main Met od The body of the method is a series of statements seperated by semicolons. The body make use of two methods of the "onsole class/ Read7ine and &rite7ine. The Read7ine method accepts one line of keyboard input from the user/ and returns the entered te(t as a string. The &rite7ine method writes te(t to the screen The final line of the method is a bit of a hack that ensures that the program stays running until the user hits the N%nterN key.
1*4*; Variables
There are two kinds of types in "@H .alue types and reference types. 8ariables of .alue types directly contain their data whereas .ariables of reference types store references to their data/ the latter being known as objects. &ith reference types/ it is possible for two .ariables to reference the same object and thus possible for operations on one .ariable to affect the object referenced by the other .ariable.
%&pe of Variable
Possible 'ontents
16
' .alue of that e(act type ' null reference/ a reference to an object of any reference type/ or a reference to a bo(ed .alue of any .alue type ' null reference/ a reference to an instance of that class type/ or a reference to an instance of a class deri.ed from that class type
"lass type
Interface type
' null reference/ a reference to an instance of a class type that implements that interface type/ or a reference to a bo(ed .alue of a .alue type that implements that interface type ' null reference/ a reference to an instance of that array type/ or a reference to an instance of a compatible array type ' null reference or a reference to an instance of that delegate type
'rray type
!elegate type
The actions of a program are e(pressed using statements. "@ supports se.eral different kinds of statements/ a number of which are defined in terms of embedded statements. ' block permits multiple statements to be written in conte(ts where a single statement is allowed. ' block consists of a list of statements written between the delimiters K and P. Declaration statements are used to declare local .ariables and constants. EIpression statements are used to e.aluate e(pressions. %(pressions that can be used as statements include method in.ocations/ object allocations using the new operator/ assignments using O and the compound assignment operators/ and increment and decrement operations using the II and >> operators. Selection statements are used to select one of a number of possible statements for e(ecution based on the .alue of some e(pression. In this group are the if and switch statements. Iteration statements are used to repeatedly e(ecute an embedded statement. In this group are the while/ do/ for/ and for each statements. ,ump statements are used to transfer control. In this group are the break/ continue/ goto/ throw/ and return statements.
17
The tr&Fcatc statement is used to catch e(ceptions that occur during e(ecution of a block/ and the try>finally statement is used to specify finaliGation code that is always e(ecuted/ whether an e(ception occurred or not.
18
Output:
)i#? 1*5 Output for A Pro#ram to build a P&ramid 1*4*E 'lasses and objects
"lasses are the most fundamental of "@=s types. ' class is a data structure that combines state 3fields4 and actions 3methods and other function members4 in a single unit. ' class pro.ides a definition for dynamically created instances of the class/ also known as objects. "lasses support inheritance and polymorphism/ mechanisms whereby deri.ed classes can e(tend and specialiGe base classes. 6ew classes are created using class declarations. ' class declaration starts with a header that specifies the attributes and modifiers of the class/ the name of the class/ the base class 3if any4/ and the interfaces implemented by the class. The header is followed by the
19
class body/ which consists of a list of member declarations written between the delimiters K and P. The following is a declaration of a simple class named PointH public class Point K public int (/ yJ public Point3int (/ int y4 K this.( O (J this.y O yJ P P Accessibilit& %ach member of a class has an associated accessibility/ which controls the regions of program te(t that are able to access the member. There are fi.e possible forms of accessibility. These are summariGed in the following table. 'ccessibility Meanin#
Public
Protected
'ccess limited to this class and classes deri.ed from this class
Internal
protected internal
'ccess limited to this program and classes deri.ed from this class
20
Pri.ate
1*4*@ In eritance
"lasses can inherit from another class. This is accomplished by putting a colon after the class name when declaring the class/ and naming the class to inherit fromRthe base classRafter the colon/ as followsH "@ public class ' K public '34 K P P public class B H ' K public B34 K P P The new classRthe deri.ed classRthen gains all the non>pri.ate data and beha.ior of the base class in addition to any other data or beha.iors it defines for itself. The new class then has two effecti.e typesH the type of the new class and the type of the class it inherits. In the e(ample abo.e/ class B is effecti.ely both B and '. &hen you access a B object/ you can use the cast operation to con.ert it to an ' object. The B object is not changed by the cast/ but your .iew of the B object becomes restricted to 'Qs data and beha.iors. 'fter casting a B to an '/ that ' can be cast back to a B. 6ot all instances of ' can be cast to BRjust those that are actually instances of B. If you access class B as a B type/ you get both the class ' and class B data and beha.iors. The ability for an object to represent more than one type is called polymorphism
1*4*7 'onstructors
"@ supports both instance and static constructors. 'n instance constructor is a member that implements the actions re uired to initialiGe an instance of a class. ' static constructor is a member that implements the actions re uired to initialiGe a class itself when it is first loaded.
22
' constructor is declared like a method with no return type and the same name as the con> taining class. If a constructor declaration includes a static modifier/ it declares a static constructor. Otherwise/ it declares an instance constructor. #ynta( for constructorsH Public classname34 K ::body of constructorJ P
1*4*3 Destructors
' destructor is a member that implements the actions re uired to destruct an instance of a class. !estructors cannot ha.e parameters/ they cannot ha.e accessibility modifiers/ and they cannot be in.oked e(plicitly. The destructor for an instance is in.oked automatically during garbage collection. The garbage collector is allowed wide latitude in deciding when to collect objects and run destructors. #pecifically/ the timing of destructor in.ocations is not deterministic/ and destructors may be e(ecuted on any thread. ;or these and other reasons/ classes should implement destructors only when no other solutions are feasible.
1*4*12 Arra&s
'n array is a data structure that contains a number of .ariables that are accessed through computed indices. The .ariables contained in an array/ also called the elements of the array/ are all of the same type/ and this type is called the element type of the array. 'rray types are reference types/ and the declaration of an array .ariable simply sets aside space for a reference to an array instance. 'ctual array instances are created dynamically at runtime using the new operator. The new operation specifies the length of the new array instance/ which is then fi(ed for the lifetime of the instance. #ynta( for declaration of arrayH Int LM aO new int LAMJ
1*4*11 Interfaces
'n interface defines a contract that can be implemented by classes and structs. 'n interface can contain methods/ properties/ e.ents/ and inde(ers. 'n interfaces does not
23
pro.ide implementations of the members it definesRit merely specifies the members that must be supplied by classes or structs that implement the interface.
A pro#ram for EIception Handlin#? using #ystemJ using #ystem."ollections.?enericJ using #ystem.7in J using #ystem.Te(tJ namespace %(ceptionU1andling K
24
class Program K static .oid Main3stringLM args4 K try K int a O ,J int b O +J int c O a : bJ "onsole.&rite7ine3c4J P catch 3%(ception e(4 K "onsole.&rite7ine3e(.Message4J P "onsole.Read7ine34J P P P
Output:
)i#? 1*6 Output for A Pro#ram for EIception Handlin# 1*4*15 % readin#
25
' thread is a se uence of instructions e(ecuted within the conte(t of a process. Multi % readin# is achie.ed when a program uses multiple e(ecution threads allowing each thread to share the "P5 concurrently depending on the priority assigned to these threads. This helps in the optimum usage of #ystem Resources. Our application shows how multiple threads 3in our case two4 run on different le.el of priorities. &e will discuss the whole program part by part. A Pro#ram for t readin# using #ystemJ using #ystem."ollections.?enericJ using #ystem.7in J using #ystem.Te(tJ using #ystem.ThreadingJ namespace Threading K class Program K static .oid Main3stringLM args4 K for 3int i O ,J i S ,,J iII4 K Thread.#leep3,+++4J "onsole.&rite7ine3i4J P "onsole.Read7ine34J P P P
Output:
26
)i#? 1*E Output for A Pro#ram for % readin# 1*@ Cindo"s application
&indows ;orms 3∈orms4 is the name gi.en to the graphical application programming interface 3'PI4 included as a part of Microsoft .6%T ;ramework/ pro.iding access to nati.e Microsoft &indows interface elements by wrapping the e(tant &indows 'PI in managed code. &hile it is seen as a replacement for the earlier and more comple("II based Microsoft ;oundation "lass 7ibrary/ it does not offer a paradigm comparable to ModelV8iewV "ontroller. #ome after>market and third party libraries ha.e been created to pro.ide this functionality. The most widely used of these is the 5ser Interface Process 'pplication Block/ which is released by the Microsoft patterns $ practices group as a free download that includes the source code for uick start e(amples.
27
To create your first &indows form project/ click the ;ile menu again. This time/ select 6ew Projectfrom the menu. &hen you do/ youQll see the 6ew Project dialogue bo( againH
The ob.ious difference from the "onsole 'pplication you created in the pre.ious section is the blank ;orm in the main window. 6otice the %oolboI/ though/ on the left hand side. &eQll be adding controls from the Toolbo( to that blank )orm1 you can see in the image abo.e. If you canQt see the Toolbo(/ you may just see the Tab/ as in the following imageH
6otice the #olution %(plorer on the right side of your screen. 3If you canQt see the #olution %(plorer/ click its entry on the 8iew menu at the top of 8isual "@ %(press.4 If you compare it with the #olution %(plorer when you created your "onsole 'pplication/ youQll see thereQs only one difference > the ;orm.
Both ha.e the same usin# lines/ a namespace/ a class called Program/ and a Main Method. The Main Method is the entry point for your programme. The code between the curly brackets of Main will get e(ecuted when the programme first starts. The last line in the Cindo"sApplication1 code abo.e is the one that Runs ;orm, when the 'pplication starts. 9ou can do other things here. ;or e(ample/ suppose you had a programme that connects to a ser.er. If it finds a connection then it loads some information from a database. In the Main Method/ you could check that the ser.er connection is OF. If itQs not/ display a second formJ if itQs OF/ then display the first form . But donQt worry if all that code has you scratching your head. The thing to bear in mind here is that a method called Main starts your programme. 'nd Pro#ram*cs in the #olution %(plorer on the right is where the code for Main li.es. But we wonQt be writing code in the Program.cs file/ so we can close it. 1a.e a look near the top of the coding window/ and youQll some tabsH
Right click the Program.cs tab and select 'lose from the menu that appears. 9ou should now see your form again 3you may ha.e a #tart tab as well. 9ou can close this/ if you want4. The menu has options for Vie" 'ode and Vie" Desi#ner. The !esigner is the ;orm you can see at the moment. "lick Vie" 'ode from the menu to see the following
30
window appear 3you can also press the ;D key on your keyboard in earlier .ersions/ and "TR7 I '7T I + in .ersion *+,*4H The code has a lot more usin# statements than before. !onQt worry about these for now. They just mean Nusing some code thatQs already been writtenN. The code also says partial class )orm1. ItQs partial because some code is hidden from you. To see the rest of it 3which we donQt need to alter4/ click the plus symbol ne(t to ;orm,.cs in the #olution %(plorerH
'gain/ you see partial class )orm1/ which is the rest of the code. "lick the plus symbol ne(t toCindo"s )orm Desi#ner #enerated code. 9ouQll see the followingH
31
InitialiGe"omponent is code 3a Method4 that is automatically generated for you when you create a new &indows 'pplication project. 's you add things like buttons and te(t bo(es to your form/ more code will be added here for you. But you donQt need to do anything in this window/ so you can right click the ;orm,.!esigner.cs tab at the top/ and click "lose from the menu. "lick back on the ;orm,.cs tab at the top to see you form again. If the tab is not there/ right click ;orm,.cs in the #olution %(plorer on the right. ;rom the menu/ select 8iew !esigner. 1ereQs what you should be looking atH ItQs in !esigner .iew that weQll be adding things like buttons and te(t bo(es to our form. But you can run this programme as it is. ;rom the !ebug menu at the top/ click #tart !ebugging 3Or you can just press the ;A key on your keyboard.4 &hen you click #tart !ebugging/ 8isual "@ will Build the programme first/ and then run it/ if it can. If it canQt run your programme youQll see error messages. But you should see your form running on top of 8isual #tudio. It will ha.e its own Red W/ and itQs own minimiGe and ma(imiGe buttons. "lick the Red W to close your programme/ and to return to 8isual "@ %(press. ;rom now on/ when we say Run your programme/ this is what we meanH either press ;A/ or click!ebug T #tart !ebugging.
spreadsheets like Microsoft %(cel/ you=re probably already accustomed to storing data in tabular form. It=s not much of a stretch to make the leap from spreadsheets to databases.
33
)i#? 1*1; ADO*NE% Disconnected Data Access Arc itecture Different components of ADO*NE%
Before going into the details of implementing data access applications using '!O.6%T/ it is important to understand its different supporting components or classes. 'll of the generic classes for data access are contained in the #ystem.!ata namespace. 'lass !ata#et !ataTable !ataRow Description The !ata#et is a local buffer of tables or a collection of disconnected recordsets ' !ataTable is used to contain data in tabular form using rows and columns. Represents a single record or row in a !ataTable
!ata"olumn Represents a column or field of a !ataTable !ataRelation Represents the relationship between different tables in a !ata#et. "onstraint Represents the constraints or limitations that apply to a particular field or column.
%A$9E 5F '9ASSES
34
'!O.6%T also contains some database specific classes. This means that different database system pro.iders may pro.ide classes 3or dri.ers4 optimiGed for their particular database system. Microsoft itself has pro.ided the specialiGed and optimiGed classes for their #X7 ser.er database system. The names of these classes start with Q# lQ and are contained in the #ystem.!ata.# l"lient namespace. 'lass # l"onnection/ Ole!b"onnection # l"ommand/ Ole!b"ommand # l!ata'dapter/ Ole!b!ata'dapter # l!ataReader/ Ole!b!ataReader # lParameter/ Ole!bParameter Description Represents a connection to the database system Represents #X7 a uery ' class that connects to the database system/ fetches the records and fills the !ata#et ' stream that reads data from the database in a connected design Represents a parameter to a stored procedure
%A$9E 6F'9ASSES
Accessin# Data usin# ADO*NE% !ata access using '!O.6%T in.ol.es the following stepsH !efining the connection string for the database ser.er !efining the connection 3# l"onnection or Ole!b"onnection4 to the database using a connection string !efining the command 3# l"ommand or Ole!b"ommand4 or command string that contains the uery !efining the !ata 'dapter 3# l!ata'dapter or Ole!b!ata'dapter4 using the command string and the connection object "reating a new !ata#et object If the #X7 command is #%7%"T/ filling the !ata#et object with the results of the uery through the !ata 'dapter Reading the records from the !ataTables in the !ata#ets using the !ataRow and !ata"olumn objects If the #X7 command is 5P!'T%/ I6#%RT or !%7%T%. The dataset will be updated through the data adapter 'ccepting to sa.e the changes in the !ata#et to the database
35
#ince we are demonstrating an application that uses both #X7 #er.er and 'ccess databases we need to include the following namespaces in our applicationH Imports #ystem.!ataImports #ystem.!ata.Ole!b
1*@*E SK9
Most large>scale databases use the structured uery language3#X74 to facilitate user and administrator interactions. This language offers a fle(ible interface for databases of all shapes and siGes. The first important point to make is that database transactions are made in #X7/ whether you realiGe it or not. 6owadays/ there are a large number of graphical user interfaces 3?5Is4 that simplify database administration tasks. If youQre a #X7 #er.er user/ you may be familiar with tools like %nterprise Manager. There are also uite a few third>party applications that interact with different databases 3in fact/ many of these can work with multiple database platforms simultaneously.4 !id you e.er wonder how these applications workY That=s rightZ They use #X7Z The front> end translates your mouse clicks and te(t entries into #X7 and then 0speaks2 to the database in the uni.ersal language of #X7.
1*7 ASP*Net
36
'#P.6%T is a web platform that pro.ides all the ser.ices that you re uire to build enterprise>class ser.er>based web applications. '#P.6%T is built on the .6%T ;ramework/ so all .6%T ;ramework features are a.ailable to '#P.6%T applications. 9our applications can be written in any language that is compatible with the common language runtime 3"7R4/ including 8isual Basic and "@. To create '#P.6%T web applications/ you can use 8isual #tudio. In addition/ a free standalone productR8isual #tudio %(press for &ebRis a.ailable that includes the core set of web design features from 8isual #tudio. 5ser controls in '#P.6%T can be written in different languages/ including "II and )a.a. &hen a browser re uests an '#P.6%T file/ the '#P.6%T engine reads the file/ compiles and e(ecutes the scripts in the file/ and returns the result to the browser as plain 1TM7. ASP*NE% 6*E Pro.ides links to topics that describe the .ersion of '#P.6%T that is part of the .6%T ;ramework -.A and links that describe how to create web applications by using 8isual #tudio *+,* and 8isual #tudio %(press *+,* for &eb. ASP*NE% 6 Pro.ides links to topics that describe the .ersion of '#P.6%T that is part of the .6%T ;ramework - and links that describe how to create web applications by using 8isual #tudio *+,+ and 8isual &eb !e.eloper *+,+ %(press. ASP*NE% 5*E Pro.ides a link to topics that describe the .ersion of '#P.6%T that is part of the .6%T ;ramework B.A and that describe how to create web applications by using 8isual #tudio *++E and 8isual &eb !e.eloper *++E %(press %dition.
ShtmlT SbodyT Sform runatONser.erNT SaspH'dRotator 'd.ertisement;ileON'd,.(mlN runatONser.erN On'd"reatedONchangeUurlN targetONUblankN :T S:formT SpTSa hrefONad,.(mlN targetONUblankNT8iew WM7 fileS:aTS:pT S:bodyT S:htmlT $utton The Button control is used to display a push button. The push button may be a submit button or a command button. By default/ this control is a submit button. ' submit button does not ha.e a command name and it posts the &eb page back to the ser.er when it is clicked. It is possible to write an e.ent handler to control the actions performed when the submit button is clicked. ' command button has a command name and allows you to create multiple Button controls on a page. It is possible to write an e.ent handler to control the actions performed when the command button is clicked. ShtmlT SbodyT Sform runatONser.erNT SaspHButton idONbutton,N Te(tON"lick meZN runatONser.erN On"lickONsubmitN :T S:formT S:bodyT S:htmlT DropDo"n9ist The !rop!own7ist control is used to create a drop>down list.%ach selectable item in a !rop!own7ist control is defined by a 7istItem elementZ ShtmlT SbodyT Sform runatONser.erNT SaspH!rop!own7ist idONdrop,N runatONser.erNT SaspH7istItemTItem ,S:aspH7istItemT SaspH7istItemTItem *S:aspH7istItemT SaspH7istItemTItem BS:aspH7istItemT SaspH7istItemTItem -S:aspH7istItemT SaspH7istItemTItem AS:aspH7istItemT
38
SaspH7istItemTItem <S:aspH7istItemT S:aspH!rop!own7istT SaspHButton Te(tON#ubmitN On"lickONsubmitN runatONser.erN:T SpTSaspHlabel idONmessN runatONser.erN:TS:pT S:formT S:bodyT S:htmlT H&per9inThe 1yper7ink control is used to create a hyperlink. ShtmlT SbodyT Sform runatONser.erNT SaspH1yper7ink Image5rlON:banners:w<.gifN 6a.igate5rlONhttpH::www.wBschools.comN Te(tON8isit &B#choolsZN TargetONUblankN runatONser.erN :T S:formT S:bodyT S:htmlT Ima#e The Image control is used to display an image. ShtmlT SbodyT Sform runatONser.erNT SaspHImage runatONser.erN 'lternateTe(tONImage not a.ailableN Image5rlON:banners:w<.gifN:T S:formT S:bodyT S:htmlT Ima#e$utton The ImageButton control is used to display a clickable image.
39
ShtmlT SbodyT Sform runatONser.erNT SpT"lick on the imageHS:pT SaspHImageButton runatONser.erN Image5rlONsmiley.gifN On"lickONget"oordinatesN:T SpTSaspHlabel idONmessN runatONser.erN:TS:pT S:formT S:bodyT S:htmlT
Re!uired)ieldValidator?F %nsures that the user does not skip an entry. Re uired entry. 'ompareValidator?F "ompares a userQs entry against a constant .alue/ against the .alue of another control 3using a comparison operator such as less than/ e ual/ or greater than4/ or for a specific data type. Ran#eValidator?F "hecks that a userQs entry is between specified lower and upper boundaries. 9ou can check ranges within pairs of numbers/ alphabetic characters/ and dates Re#ularEIpressionValidator?F "hecks that the entry matches a pattern defined by a regular e(pression. This type of .alidation enables you to check for predictable se uences of characters/ such as those in e>mail addresses/ telephone numbers/ postal codes/ and so on.
40
'ustomValidator?F "hecks the userQs entry using .alidation logic that you write yourself. This type of .alidation enables you to check for .alues deri.ed at run time.
security uestion that the user must answer to reco.er a password. If you do/ the PasswordReco.erycontrol asks the uestion and checks the answer before reco.ering the password. The PasswordReco.ery control re uires that your application can forward e>mail message to a #imple Mail Transfer Protocol 3#MTP4 ser.er. 9ou can customiGe the te(t and format of the e>mail message sent to the user by setting the Mail!efinition property. % e 'reate(serCiHard 'ontrol The "reate5ser&iGard control collects information from potential users. By default/ the 'reate(serCiHard control adds the new user to the '#P.6%T membership system. The 'reate(serCiHard control gathers the following user informationH 5ser name Password "onfirmation of password %>mail address #ecurity uestion #ecurity answer This information is used to authenticate users and reco.er user passwords/ if necessary. % e ' an#ePass"ord 'ontrol The "hangePassword control allows users to change their password. The user must first supply the original password and then create and confirm the new password. If the original password is correct/ the user password is changed to the new password. The control also includes support for sending an e>mail message about the new password.
The ?rid8iew control is the successor to the !ata?rid control a.ailable in earlier .ersions of '#P.6%T. 'long with the added ability to take ad.antage of the capabilities of data source controls/ the ?rid8iew control offers impro.ements such as the ability to define multiple primary key fields/ impro.ed user interface customiGation using bound fields and templates/ and a new model for handling or canceling e.ents. DetailsVie" 'ontrol
42
The !etails8iew control renders a single record at a time as a table and pro.ides the capability to page through multiple records/ as well as to insert/ update/ and delete records. The !etails8iew control is often used in master>detail scenarios where the selected record in a master control such as a?rid8iew control determines the record displayed by the !etails8iewcontrol. Data9ist 'ontrol The !ata7ist control renders data as table and enables you to display data records in different layouts/ such as ordering them in columns or rows. 9ou can configure the !ata7ist control to enable users to edit or delete a record in the table. 3The !ata7ist control does not take ad.antage of the capabilities of data source controls for modifying dataJ you must supply this code yourself.4 The !ata7ist control differs from the Repeater control in that the!ata7ist control e(plicitly places items in an 1TM7 table/ where as theRepeater control does not.
1*7*4 Ho" Master Pa#es CorMaster pages actually consist of two pieces/ the master page itself and one or more content pages.
43
Master Pa#es ' master page is an '#P.6%T file with the e(tension .master 3for e(ample/ My#ite.master4 with a predefined layout that can include static te(t/ 1TM7 elements/ and ser.er controls. The master page is identified by a special[ Master directi.e that replaces the [ Page directi.e that is used for ordinary .asp( pages. The directi.e looks like the following. S\[ Master 7anguageON"@N \T The [ Master directi.e can contain most of the same directi.es that a[ "ontrol directi.e can contain. ;or e(ample/ the following master>page directi.e includes the name of a code>behind file/ and assigns a class name to the master page. S\[ Master 7anguageON"@N "ode;ileONMasterPage.master.csN InheritsONMasterPageN \T In addition to the [ Master directi.e/ the master page also contains all of the top>le.el 1TM7 elements for a page/ such as html/ head/ and form. ;or e(ample/ on a master page you might use an 1TM7 table for the layout/ animg element for your company logo/ static te(t for the copyright notice/ and ser.er controls to create standard na.igation for your site. 9ou can use any 1TM7 and any '#P.6%T elements as part of your master page. Replaceable 'ontent Place olders In addition to static te(t and controls that will appear on all pages/ the master page also includes one or more "ontentPlace1older controls. These placeholder controls define regions where replaceable content will appear. In turn/ the replaceable content is defined in content pages. 'fter you ha.e defined the "ontentPlace1older controls/ a master page might look like the following. S\[ Master 7anguageON"@N \T SZ!O"T9P% html P5B7I" N>::&B"::!T! W1TM7 ,.,::%6N NhttpH::www.wB.org:TR:(html,,:!T!:(html,,.dtdNT Shtml (mlnsONhttpH::www.wB.org:,CCC:(htmlN T Shead runatONser.erN T StitleTMaster page titleS:titleT S:headT SbodyT Sform idONform,N runatONser.erNT StableT
44
StrT StdTSaspHcontentplaceholder idONMainN runatONser.erN :TS:tdT StdTSaspHcontentplaceholder idON;ooterN runatONser.erN :TS:tdT S:trT S:tableT S:formT S:bodyT S:htmlT 'ontent Pa#es 9ou define the content for the master pageQs placeholder controls by creating indi.idual content pages/ which are '#P.6%T pages 3.asp( files and/ optionally/ code>behind files4 that are bound to a specific master page. The binding is established in the content pageQs [ Page directi.e by including aMasterPage;ile attribute that points to the master page to be used. ;or e(ample/ a content page might ha.e the following [ Page directi.e/ which binds it to the Master,.master page. S\[ Page 7anguageON"@N TitleON"ontent PageN\T MasterPage;ileON]:MasterPages:Master,.masterN
In the content page/ you create the content by adding "ontent controls and mapping them to "ontentPlace1older controls on the master page. ;or e(ample/ the master page might ha.e content placeholders called Main and;ooter. In the content page/ you can create two "ontent controls/ one that is mapped to the "ontentPlace1older control Main and the other mapped to the "ontentPlace1older control ;ooter/ as shown in the following figure. Replacin# place older content 'fter creating "ontent controls/ you add te(t and controls to them. In a content anything that is not inside the "ontent controls 3e(cept script blocks for ser.er results in an error. 9ou can perform any tasks in a content page that you do '#P.6%T page. ;or e(ample/ you can generate content for a "ontent control ser.er controls and database ueries or other dynamic mechanisms.
S\ [ Page 7anguageON"@N MasterPage;ileON]:Master.masterN TitleON"ontent Page ,N \T SaspH"ontent I!ON"ontent,N "ontentPlace1olderI!ONMainN RunatON#er.erNT Main content. S:aspH"ontentT SaspH"ontent I!ON"ontent*N "ontentPlace1olderI!ON;ooterN RunatON#er.erN T
45
;ooter content. S:aspHcontentT The [ Page directi.e binds the content page to a specific master page/ and it defines a title for the page that will be merged into the master page. 6ote that the content page contains no other markup outside of the"ontent controls. 3The master page must contain a head element with the attribute runatONser.erN so that the title setting can be merged at run time.4 9ou can create multiple master pages to define different layouts for different parts of your site/ and a different set of content pages for each master page.
1*7*@ Session
&hen you are working with an application on your computer/ you open it/ do some changes and then you close it. This is much like a #ession. The computer knows who you are. It knows when you open the application and when you close it. 1owe.er/ on the internet there is one problemH the web ser.er does not know who you are and what you do/ because the 1TTP address doesnQt maintain state. '#P sol.es this problem by creating a uni ue cookie for each user. The cookie is sent to the userQs computer and it contains information that identifies the user. This interface is called the #ession object. The #ession object stores information about/ or change settings for a user session. 8ariables stored in a #ession object hold information about one single user/ and are a.ailable to all pages in one application. "ommon information stored in session .ariables are name/ id/ and preferences. The ser.er creates a new #ession object for each new user/ and destroys the #ession object when the session e(pires. &hen does a #ession #tartY
' new user re uests an '#P file/ and the ?lobal.asa file includes a #essionUOn#tart procedure ' .alue is stored in a #ession .ariable ' user re uests an '#P file/ and the ?lobal.asa file uses the SobjectT tag to instantiate an object with session scope &hen does a #ession %ndY ' session ends if a user has not re uested or refreshed a page in the application for a specified period. By default/ this is *+ minutes. If you want to set a timeout inter.al that is shorter or longer than the default/ use the %imeout property.
46
47
#ay QgoodbyeQ to the days when you stood in line waiting/ and waiting/ and waiting some more for a store clerk to finally check out your items. Online shopping transactions occur instantly>sa.ing you time to get your other errands doneZ 'dditionally/ unlike a store/ online shopping has friendly customer ser.ice representati.es a.ailable *- hours a day/ D days a week to assist you with locating/ purchasing and shipping your merchandise. This system is all about the con.erting the shopping system from manual to online. "ustomer can buy products online after login to the site. 'dministrator is adding product to database. 'dministrator can edit or delete the products from the database. 'fter buying and making payment the products are send to customers address that he has gi.en. "ustomer can write feedback for the product or ser.ices. 'dmin can see daily sell and feedback gi.en by customer. 'dministrator is adding the deli.ery report to the database. Both admin and customer can see the deli.ery report
;*; Purpose
Online shopping tries to enhance access to care and impro.e the continuity and efficiency of ser.ices. !epending on the specific setting and locale/ case managers are responsible for a .ariety of tasks/ ranging from linking clients to ser.ices to actually pro.iding intensi.e shopping and deli.ery ser.ices themsel.es. Many people choose to conduct shopping online because of the con.enience. ;or e(ample/ when a person shops at a brick>and>mortar store/ he has to dri.e to the store/ find a parking place/ and walk throughout the store until he locates the products he needs. 'fter finding the items he wants to purchase/ he may often need to stand in long lines at the cash register.
Hard"are Re!uirements
ProcesserH Intel P- "P5 ,.<+?1^ Memor&H *?B or abo.e of R'M Hard Dis-H -+ ?B or abo.e Monitor? Preferably "olor Printer? 1P 7aser)et *+,+ #eries
Soft"are Re!uirements
)ront endH 8I#5'7 #T5!IO *+,* 3'#P.6%T4 O*S.H &indows *++D.
49
;*5 Objecti0e
The objecti.e of our project is to de.elop a ?5I 3?raphical 5ser Interface4 based software i.e. platform independent $ user friendly and which can be fit easily. This software helps customer to find different products/ their features/ and new updates easily. It is designed such a way that one can .iew all the updates of the product from any place through online. The software will help in easy maintaining and updating products in the website for the administrator. 'lso uick and easy comparison of different products for the customers. To shop while in the comfort of your own home/ without ha.ing to step out of the door. #ell at lower rate due to less o.er head. Pro.ide home deli.ery free of cost. To be able to easily sa.e money and compare prices from website to website. Online resellers tent to sell at a lower price due to less o.erhead e(penses. ;eatures included in our software areH> Platform Independent 's our software is coded in '#P.6et so it is platform independent i.e. it can work on any operating system whether it is any .ersion of Microsoft windows 3CE/ WP/ 8ista 3all .ersions4/ D4. Reduced data redundanc& 's we are using !BM# 3!atabase Management #ystem4 in the back end of our software/ redundancy rate is less as compared to file system so it will o.ercome the problems of data duplicacy. )ast EIecution 's our software is ?5I based and it contains many new features which will make the e(ecution faster than any other pre>e(isting software=s. 'ost Efficient !ue to the remo.al of data redundancy from the software/ duplicity of data is eliminated and wastage of memory is also o.ercome. 's we know that storage de.ices are cost consuming so by sa.ing space we are sa.ing money and pro.iding cost effecti.e software. Securit&
50
;*4 Modules
The modules used in this software are as followsH 9o#in? This module has a drop down list bo( from where we ha.e to select ADMIN or (SER. The ADMIN has all the rights in the software including updating the status of his site. The other fields in login are username and password. If the username and password are correct then it is directed to ne(t page.
51
Ne" user? This module is for the users who do not ha.e their account. 1ere user is allowed to create an account to login. The account creation is done by filling the registration form with user details such as name/ phone/ email etc. Product? This module has information regarding the mobiles such as its name/ model/ color/ price informationJ its features etc.The ADMIN has the authority to 'dd/ !elete/ and 5pdate etc. The (SER can only .iew the Mobile/ add to cart only those in the stock etc. Accessories? This module consists of .arious a.ailable accessories of the Mobile with its name and picture/ price information etc. Searc ? This module helps the customer to ease his search based on his budget or interest. The search can be done on different categories like mobile model name/ model number/ color/ price etc 'art? 5ser can select any number of Mobile and add to the cart. 1e can also remo.e from the cart if he dislikes it later. Pa&ment? This module describes the payment done by the customer. The payment information can include information like the model purchased/ uantity/ mode of payment 3cash/ loan4 etc. Stoc-s? This gi.es the details regarding the products a.ailable for sale.
;*@*1 SD9' P ases Phases in #!7" are Planning/ 'nalysis/ !esign/ Implementation and Maintenance. The #ystem !e.elopment 7ife "ycle is an application of the system approach to the task of the de.eloping and using a computer based system. 's such/ the system life cycle is a methodology/ but its pattern is being influenced by the need to de.elop system more uickly. More responsi.e system de.elopment can be achie.ed by refining the life cycle and using the computer based de.elopment tools. S8S%EM DEVE9OPMEN% 9I)E '8'9E PHASES ;easibility 'nalysis !esign Implement Test Maintenance
Economic )easibilit&
;or any system if the e(pected benefits e uals to e(pected costs/ the system can be judged to be economically feasible. In economic feasibility/ cost benefit analysis is done in which e(pected costs and benefits are e.aluated. In economic feasibility/ the most important is cost>benefit analysis. 's the name suggests/ it is an analysis of the costs to be incurred in the system and benefits deri.ed from the system.
$e a0ioral )easibilit&
Before starting the project de.elopment/ the project team must also analyGe the working en.ironment of their project. They should find whether their project is feasible for running under these conditions. 'fter the analysis of the en.ironment of operation of this project/ we found that the project is feasible to run under its working conditions. The designs are translated into code computer program by using a con.entional programming language. Ine.itable system will need maintenances V hopefully we ha.en=t done anything wrong but the people will demand e(tra things to be added or e(isting things to be changed o.er time. This paradigm is the oldest and most widely used approach to system de.elopment. In other words/ if you are unsure whether your solution will deli.er the outcome you want/ then a Project ;easibility #tudy will help gain that clarity. !uring the ;easibility #tudy/ a .ariety of QassessmentQ methods are undertaken. The outcome of the ;easibility #tudy is a confirmed solution for implementation.
De0elopment Ris"an the system elements be designed so that necessary function and performance are achie.ed within the constraints during analysisY
54
Once the answers to these uestions are clear/ the team can mo.e on to the ne(t step of de.elopment. &e ha.e decided to use the P1P language as our platform of de.elopment after checking its compatibility with our implementation needs. The reason for choosing P1P as our platform was its fle(ible compatibility with our concept of de.elopment.
%ec nolo#&
1as the rele.ant technology progressed to a state that will support the systemY 're the system de.elopers capable enough to meet the objecti.es of the undertaken projectY
;*@*6 Anal&sis
?ather the re uirements for the system at this stage including a detailed study of the users. #ystem 'nalysis is an e(plicit formal in uiry carried out to help someone who can identify a better "ourse of action and make a better decision than he might otherwise ha.e made. #ystems analysis usually has some combination of the followingH identification and re> identification4 of Objecti.es and constraints/ and alternati.e courses of actionJ e(amination of the probable conse uences of the alternati.es in terms of costs/ benefits and risks presentation of the results in a comparati.e framework so that the decision maker can make a right choice among the alternati.es. The typical use of systems analysis is to take decisions on issues of national or corporate plans and programs/ resource use and protection policies/ research and de.elopment in technology/ regional and urban de.elopment/ educational systems/ and the and other social ser.ices. "learly/ the nature of these problems re uires an interdisciplinary approach. ' system analysis that concentrates on comparison and ranking of alternati.es on basis of their known characteristics is referred to as decision analysis.
;*@*E Desi#n
This focuses on high le.el design 3what programs are we going to need and how they are going to interact4/ low le.el design 3how the indi.idual programs are going to work4/ interface design 3what are the interfaces going to look like4/ and data design 3what data are we going to need4. The primary objecti.e of the design phase is to create a design that satisfies the agreed application re uirements. The re uirements prototype that was de.eloped earlier during the analysis phase is gradually impro.ed and e(tended to include all the specified functions of the application. 'lso/ the planning of the system documentation process should be started. The design must be translated into a machine> readable form.
55
;*@*@ %estin#
Once the code is generated/ the software program testing begins. !ifferent testing methodologies are a.ailable to remo.e the bugs that were committed during the pre.ious phases. The system is tested. 6ormally programs are written as a series of indi.idual modules V these should subject to separate and detailed test. The system is then tested as a whole> the separate modules are brought together and tested as a complete system.
56
;unction ;ile:!atabase
Input:output ;low
Level 0 DFD
Input
'dmin:5ser #ystem
Output
!atabase
)i# ;*;
57
9e0el 1 D)D
)i#F;*5
58
)i#F;*6
59
60
61
;*12*5 %estimonial
)i#? ; *@ %estimonial
This is the testimonial page..In which we select the product into dropdown list and show the images of that product.. &hen we click on any of the product=s image it goes to ne(t page and we can gi.e comment for that product..
62
;*12*6 Galler&
63
64
65
66
;*12*7 'art
This is the cart in which the products selected by the user are added. These are not purchased by the user.
67
This Page !isplays the product model/ its Xuantity and price of the product selected by the user for purchase.
68
This page is to get the details of the user so that a product can be deli.ered on the correct address.
69
;*12*11 Order
70
;*12*1; About (s
71
;*12*15 'ontact (s
72
73
74
75
76
77
78
79
;*11 Database
This project contains ;our tablesH>
;*11*1Products
This table is to store the products those are on sale. Pid "ategory #ub"ategory typesofproduct product name Xuantity Price image description int 3Primary Fey4 8archar 8archar 8archar 8archar 8archar 8archar int int 8archar
80
81
;*11*5 Re#ister
This table is to store the specifications of the registered user* fname mname lname %>mail Paddress "address Mobile Password "ity #tate "ountry Pincode .archar .archar .archar .archar3primary key4 .archar .archar int .archar .archar .archar .archar int
82
83
;*11*6 Orders
This table stores all the orders made by all the users. Pid %mail 'ddress Price OrderUId "no. OrderUdate ;name "ity #tate "ountry Pincode #hipping 'ddress int .archar .archar big int int Big int datetime .archar .archar .archar .archar int .archar
5*1*; Some problems "ere also faced durin# t e unit testin# of t e modules and "eb pa#es?
,. !ue to increasing errors/ we had to simplify our code at e.ery point. *. 5nit testing of e.ery page and module was a .ery time>consuming and a tedious task. B.
86
,. *. B. -. A.
The project only lays out a basic architecture of e>commerce like ebay.com with basic functionalities. There=s a lot to impro.e and a lot of enhancements to be integrated in this project. #ome of the important enhancements are suggested and listed belowH #M# integration. "ustomer should be gi.en reward points for fre uent purchase. !isplay the timer on the Bidding Products. 6ame of the bid winners should be shown to the users. 6umber of items left in the stock for the particular product. 'ccording to the findings of this Project i.e. EFcommerce/ we can conclude the followingH
%>commerce is a field which is growing day by day $ it is becoming a .ery popular field. The scope of this project has been decided on the basis of the re uirements of the users for whom this project has been de.eloped.
87
6 RE)EREN'E
$oo-s? ,. The "@ Programming language by Peter ?lode. *. .6et by "hris 6ahr. B. !aily !iary. Cebsites? httpH::en.wiki.ersity.org httpH::www.codeproject.com httpH::www.slideshare.net httpH::www.wikipidiea.com httpH::www.ebay.com httpH::www.flipkart.com httpH::www.gliffy.com
,. *. B. -. A. <.
7.
88