mohamedhagrasfinalbook
-
Upload
hamoody-goodboy -
Category
Documents
-
view
217 -
download
0
Transcript of mohamedhagrasfinalbook
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 1/114
Arab Academy for Science and Technology and
Maritime Transport
College of Engineering and Technology
Computer Engineering Department
B. Eng. Individual Project
Egypt Gate
Web Development and Connectivity
Presented By:
Mohamed Nasr Mohamed Elbadawi Hagras
Supervised By:
Professor Dr. Gamal Selim
March 2011
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 2/114
Egypt Gate Web Development and Web Hosting
2
Acknowledgement
The work on This Project has been an inspiring, often exciting, sometimes challenging, but
always interesting experience. It has been made possible by many other people, who have
supported us.
We wish to thank Our Supervisor, Professor Dr. Gamal Selim, for his extensive support and
encouraging way of delivering knowledge, which helped us accomplish many successful
thoughts that would provide us with many benefits, not only through this Project, but also
through our career life.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 3/114
Egypt Gate Web Development and Web Hosting
3
Abstract
lassified advertising is a form of advertising which is particularly common in
newspapers, online and other periodicals which may be sold or distributed free of
charge. Advertisements in a newspaper are typically short, as they are charged for by
the line, and one newspaper column wide. Classified advertising is called such because it is
generally grouped within the publication under headings classifying the product or service being
offered (headings such as Accounting, Automobiles, Clothing, Farm Produce, For Sale, For
Rent, etc.) and is grouped entirely in a distinct section of the periodical, which makes it distinct
from display advertising, which often contains graphics or other art work and which is more
typically distributed throughout a publication adjacent to editorial content. In recent years the
term "classified advertising" or "classified ads" has expanded from merely the sense of print
advertisements in periodicals to include similar types of advertising on computer services, radio,
and even television."Egypt Gate" is an interactive, user friendly, classified advertisements
solution, where users can post his personal adverts whether they were registered or not, but
registration will allow him to send and receive messages to and from other registered users;
knowing that registration is completely free .You can post unlimited number of advertisements
choosing from suggested categories in order to be posted and viewed in the regular category
page. The user interface of this web site is very user friendly; user can find everything he needs
easily.
C
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 4/114
Egypt Gate Web Development and Web Hosting
4
Table of Contents:
Acknologemnt .......................................................................................................................... 2Abstract .................................................................................................................................... 3List of figures ........................................................................................................................... 7
List of tables ............................................................................................................................. 8Abbreviations ........................................................................................................................... 9Chapter 1 Introduction..........................................................................................................101.1 Overview ...........................................................................................................................111.2 Definitions: ........................................................................................................................111.3 Developments ....................................................................................................................121.4Statistics..............................................................................................................................131.5 Famous Classified Ads Web Sites ......................................................................................141.5.1 Gumtree ..........................................................................................................................141.5.2 Ebay Classifieds ..............................................................................................................151.5.3 Locanto ...........................................................................................................................17
1.6 Aim of the project ..............................................................................................................181.7 The main objective of the project .......................................................................................181.8 Project planing ...................................................................................................................19Chapter 2 Hypertext Preprocessor and Structured Query Language .................................202.1 Hypertext Preprocessor (PHP) ............................................................................................212.2 History ...............................................................................................................................222.3 Usage .................................................................................................................................242.4 Security ..............................................................................................................................252.5 Speed Optimization ............................................................................................................262.6 Why using PHP not HTML ................................................................................................262.7 PHP , ASP comparison.......................................................................................................27
2.8PHP and database ................................................................................................................292.9 Database ............................................................................................................................302.10 Structured Query Language (SQL) ...................................................................................302.10.1 Basic SELECT Query ...................................................................................................302.10.2 WHERE Clause.............................................................................................................312.10.3ORDER BY Clause ........................................................................................................312.10.4 Merging Data from Multiple Tables :INNER JOIN .......................................................322.10.5 INSERT Statement ........................................................................................................332.10.6 UPDATE Statement .....................................................................................................332.10.7 DELETE Statement .......................................................................................................342.11 What is MySQL ...............................................................................................................34
2.12 Creat a connection to a MySQL Database ........................................................................342.12.1 Closing a connection .....................................................................................................35Chapter 3 Main SystemDesgin And Architure .....................................................................363.1 Requirements .....................................................................................................................373.1.1 Functional requirements ..................................................................................................373.1.2 Constitutional requirements .............................................................................................373.1.2.1Non registered users rights ............................................................................................373.1.2.2 Registered users rights ..................................................................................................38
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 5/114
Egypt Gate Web Development and Web Hosting
5
3.1.2.3 System related requirements .........................................................................................383.2 Use case diagram ...............................................................................................................393.3 Context Model diagram ......................................................................................................61Chapter 4 Web & Web Hosting ............................................................................................704.1 What is the WWW ? ..........................................................................................................71
4.1.1 How does the WWW works ?..........................................................................................714.1.2How does a browser fetch a web page ? ...........................................................................724.1.3How does a browser display a web page ? ........................................................................724.2What is a web server ?.........................................................................................................724.3How to host a web site ? ......................................................................................................744.4What is a domain name ? ....................................................................................................754.5Staic & Dynamic web pages ................................................................................................764.6 Server Side Scripting languages .........................................................................................76Chapter 5 Implementation tools............................................................................................785.1 Dreamweaver CS5 .............................................................................................................795.1.1 Overview ........................................................................................................................79
5.1.2 Syntax highlighting in Dreamweaver ...............................................................................805.2 MySQL ..............................................................................................................................815.2.1 Overview ........................................................................................................................815.2.2 Uses ................................................................................................................................825.2.3 Platforms and Interfaces ..................................................................................................825.2.4 Third Party ......................................................................................................................835.3 phpMyAdmin .....................................................................................................................845.3.1 Overview ........................................................................................................................845.3.2 History ............................................................................................................................845.4 Enterprise Archiect ............................................................................................................865.4.1 Introduction.....................................................................................................................865.4.2.What is EnterpriseArchiect ..............................................................................................865.4.3.What differentiates Enterprise Archiect from other UML tools .......................................875.4.5 What benefits does Enterprise Archiect provide?. ............................................................875.4.6 Documentation and reporting in Enterprise Archiect .......................................................885.4.6.1 The Rich Text Format (RTF) report writer....................................................................895.4.6.2 The HTML report writer...............................................................................................905.4.7 Built- in document editor and linked documents ..............................................................905.5Wamp Server ......................................................................................................................905.5.1 Introduction.....................................................................................................................91
5.5.2 Installing .........................................................................................................................91
5.5.3 Functions ........................................................................................................................925.5.4 How to start.....................................................................................................................93
Chapter 6 Implementation Details. .......................................................................................956.1 Screen 1 .............................................................................................................................966.2Screen 2 ..............................................................................................................................976.3 Screen 3 .............................................................................................................................986.4 Screen 4 .............................................................................................................................996.5Screen 5 ............................................................................................................................ 1006.6Screen 6 ............................................................................................................................ 101
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 6/114
Egypt Gate Web Development and Web Hosting
6
6.7 Screen 7 ........................................................................................................................... 1026.8Screen 8 ............................................................................................................................ 1036.9 Screen 9 ........................................................................................................................... 1046.10 Screen 10 ....................................................................................................................... 1056.11 Screen 11 ....................................................................................................................... 106
6.12 Screen 12 ....................................................................................................................... 1076.13Screen 13 ........................................................................................................................ 1086.14Screen 14 ........................................................................................................................ 109Chapter 7 Conclusions and Future Work ........................................................................... 1107.1 Conclusions ..................................................................................................................... 1117.2 Future Work ..................................................................................................................... 111Refrences .............................................................................................................................. 113
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 7/114
Egypt Gate Web Development and Web Hosting
7
List of figures:
Figure 1:Gumtree logo .............................................................................................................14Figure 1.2: Ebay logo ...............................................................................................................15Figure 1.3: Locanto logo ..........................................................................................................17
Figure 2.1: PHP logo................................................................................................................21Figure 2.2: PHP usage ..............................................................................................................38Figure 3.1: Use case diagram ...................................................................................................40Figure 3.2: Use case ................................................................................................................56Figure 3.3: Use case ................................................................................................................58Figure 3.4: Sequence diagram Use case1 ..................................................................................59Figure 3.5: Context model diagram ..........................................................................................62Figure 4.1 WWW.....................................................................................................................71Figure 4.2 Opera Browser logo ................................................................................................71Figure 4.3 Web server example ................................................................................................73Figure 4.4 Apache server .........................................................................................................75
Figure 4.5 PHP Server Side Language .....................................................................................77Figure 5.1 Dreamweaver ..........................................................................................................79Figure 5.2 MySQL ...................................................................................................................81Figure 5.3 phpMyAdmin ..........................................................................................................84Figure 5.4 Enterprise Architect ................................................................................................86Figure 5.5 Mangement tools .....................................................................................................88Figure 5.6 Capture tool ............................................................................................................89Figure 5.7 Wamp Server ..........................................................................................................91Figure 5.8 Wamp Server taskbar ..............................................................................................91Figure 5.9 Wamp Server user interface ....................................................................................93Figure 5.10 Wamp Server taskbar menu ...................................................................................94
Figure 6.1 Screen 1: .................................................................................................................96Figure 6.2 Screen 2: .................................................................................................................97Figure 6.3Screen 3 ...................................................................................................................98Figure 6.4:Screen 4 ..................................................................................................................99Figure 6.5:Screen 5 ................................................................................................................ 100Figure 6.6:Screen 6 ................................................................................................................ 101Figure 6.7:Screen 7 ................................................................................................................ 102Figure 6.8:Screen 8 ................................................................................................................ 103Figure 6.9: Screen 9 ............................................................................................................... 104Figure 6.10:Screen 10 ............................................................................................................ 105Figure 6.11:Screen 11 ............................................................................................................ 106
Figure 6.12: Screen 12 ........................................................................................................... 107Figure 6.13:Screen 13 ............................................................................................................ 108Figure 6.14:Screen 14 ............................................................................................................ 109
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 8/114
Egypt Gate Web Development and Web Hosting
8
List of tables:
Table 2.1 SQL query keywords ................................................................................................31Table 3.1 use case ....................................................................................................................41Table 3.2 use case ....................................................................................................................42
Table 3.3 use case ....................................................................................................................43Table 3.4 use case ....................................................................................................................44Table 3.5 use case ....................................................................................................................44Table 3.6 use case ....................................................................................................................45Table 3.7 use case ....................................................................................................................46Table 3.8 use case ....................................................................................................................47Table 3.9 use case ....................................................................................................................48Table 3.10 use case ..................................................................................................................48Table 3.11 use case ..................................................................................................................49
Table 3.12 use case ..................................................................................................................50
Table 3.13 use case ..................................................................................................................50
Table 3.14 use case ..................................................................................................................51 Table 3.15 use case ............................................................................................................. 51,52
Table 3.16 use case ..................................................................................................................53
Table 3.17 use case ..................................................................................................................53
Table 3.18 use case ..................................................................................................................54
Table 3.19 use case ..................................................................................................................55Table 3.20 use case ............................................................................................................. 56,57Table 3.21 use case ..................................................................................................................59Table 3.22context model ..........................................................................................................61Table 3.23context model ..................................................................................................... 64,65Table 3.24context model ..........................................................................................................69
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 9/114
Egypt Gate Web Development and Web Hosting
9
Abbreviations:
ICT Information and Communication Technology
DRE Direct- Recording ElectronicOOP Object-Oriented ProgrammingVB.NET Visual Basic. NetDBMS Database Management SystemSQL Structured Query LanguageIDE Integrated Development EnvironmentGUI Graphical User Inter FaceWindows CE Windows Embedded CompactCSS Cascading Style SheetsUML Unified Modeling LanguageXML Extensible Markup languageXSLT Extensible Stylesheet Language
TransformationHTML Hyper text markup languageREGEX Regular ExpressionSDK Software development kitRDBMS Relational database management systemSID System identifier PMON The process monitor SMON The system monitor SGA System global areaRAC Real application clustersCPU Central processing unitPL/SQL Oracle Corporation's proprietary procedural
extension to SQLPSD Photoshop documentICC International color consortiumGIF Graphics interchange formatDICOM Digital imaging and communications in
medicinePDF Portable document formatUML Unified modeling languageJUnit Unit testing framework for the java
programming languageNUnit Open source unit testing framework for
Microsoft.NeTRTF Rich text format
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 10/114
Egypt Gate Web Development and Web Hosting
10
Chapter 1
Introduction
Egypt Gate
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 11/114
Egypt Gate Web Development and Web Hosting
11
1.1Overview:
Classified advertising is a form of advertising which is particularly common in
newspapers, online and other periodicals which may be sold or distributed free of charge.
Advertisements in a newspaper are typically short, as they are charged for by the line, and one
newspaper column wide.
Publications printing news or other information often have sections of classified
advertisements; there are also publications which contain only advertisements. The
advertisements are grouped into categories or classes such as "for sale - telephones", "wanted -
kitchen appliances", and "services - plumbing", hence the term "classified".
Classified advertisements are much cheaper than larger display advertisements used by
businesses, and are mostly placed by private individuals with single items they wish to sell or
buy.
1.2 Definitions:
Advertisement And Its Purposes :
Advertisement: Advertisement consists of all activities involved in presenting to a group
an oral of visual message regarding a product service of an idea. It is an art of creating a demand
for the product or service. Advertisement is the presentation of ideas, goods or services for the
purpose of including people to buy.
Purposes of advertising:
Following are the main purposes of Advertising.
Giving Information: The first and the most important purpose of advertisement are to inform the
public about the availability of new product, service or an idea that is being sold in the market.
This is aimed for creating a demand for new product and the new product has to be known to
public.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 12/114
Egypt Gate Web Development and Web Hosting
12
To Persuade: Advertisement not only informs but also serves to influence the public to buy the
product or services. For example a company seeks to induce the public to buy its particular brand
of soap in preference to others.
To Remind: Advertisement also serves to remind consumers of existing products, that the
product may be needed in future and where to buy the product. It is necessary for the advertiser
to constantly draw the attention of consumer to his product and away from other competitive
brands, which may be heavily advertised.
1.3 Developments
In recent years the term "classified advertising" or "classified ads" has expanded from
merely the sense of print advertisements in periodicals to include similar types of advertising on
computer services, radio, and even television, particularly cable television but occasionally
broadcast television as well, with the latter occurring typically very early in the morning hours.
Like most forms of printed media, the classified ad has found its way to the Internet.
Internet classified ads do not typically use per-line pricing models, so tend to be longer.
They are also searchable, unlike printed material, tend to be local, and may foster a greater sense
of urgency as a result of their daily structure and wider scope for audiences. Because of their
self-policing nature and low cost structures, some companies offer free classifieds
internationally. Other companies focus mainly on their local hometown region, while others
blanket urban areas by using postal codes. Craigslist.org was one of the first online classified
sites, and has grown to become the largest classified source, bringing in over 14 million unique
visitors a month according to comScore Media Metrix. A number of online services called
aggregators crawl and aggregate classifieds from sources such as blogs and RSS feeds, as
opposed to relying on manually submitted listings.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 13/114
Egypt Gate Web Development and Web Hosting
13
Additionally, other companies provide online advertising services and tools to assist members in
designing online ads using professional ad templates and then automatically distributing the
finished ads to the various online ad directories as part of their service. In this sense these
companies act as both an application service provider and a content delivery platform. Social
classifieds is niche that is growing in online classified ads.
1.4 Statistics
In 2003 the market for classified ads in the United States was $15.9 billion (newspapers),
$14.1 billion (online) according to market researcher Classified Intelligence. The worldwide
market for classified ads in 2003 was estimated at over $100 billion. Perhaps due to the lack of a
standard for reporting, market statistics vary concerning the total market for internet classified
ads. The Kelsey Research Group listed online classified ads as being worth $13.3 billion[citation
needed], while Jupiter Research provided a conservative appraisal of $2.6 billion as of
2005[citation needed] and the Interactive Advertising Bureau listed the net worth of online
classified revenue at $2.1 billion as of April 2006.
Newspaper's revenue from classifieds advertisements is decreasing continually as internet
classifieds grow. Classified advertising at some of the larger newspaper chains dropped by 14%
to 20% in 2007, while traffic to classified sites grew by 23%.
As the online classified advertising sector develops, there is an increasing emphasis
toward specialization. Vertical markets for classifieds are developing quickly along with the
general marketplace for classifieds websites. Like search engines, classified websites are often
specialised, with sites providing advertising platforms for niche markets of buyers of sellers.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 14/114
Egypt Gate Web Development and Web Hosting
14
1.5 Famous Classified Ads Web Sites
1.5.1 Gumtree
Fig 1.1 Gumtree logo
Gumtree is an extensive network of online classifieds and community websites.Classified ads are either free or paid for depending on the product category and the geographicalmarket. Sellers may promote their listing through featured placements on the homepage or under product categories. Gumtree now covers 60 cities across 6 countries - the UK, Ireland, Poland,Australia, New Zealand and South Africa. It is the UK's largest website for local communityclassifieds and was once one of the top 20 websites in the UK.
Gumtree.com was founded in March 2000 by Michael Pennington and Simon Crookall asa local London classified ads and community site, designed to connect people who were either planning to move, or had just arrived in the city, and needed help getting started withaccommodation, employment and meeting new people.
In May 2005, Gumtree.com was acquired by Kijiji, eBay¶s internal classifieds group, for an undisclosed sum. At the time of the acquisition, Gumtree already was available in multiplecities in a number of countries including the United Kingdom, Poland, France, Canada,Australia, New Zealand, South Africa, Hong Kong and Dubai.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 15/114
Egypt Gate Web Development and Web Hosting
15
1.5.2 Ebay Classifieds
Fig 1.2 Ebay logo
eBay Inc. is an American Internet company that manages eBay.com, an online auctionand shopping website in which people and businesses buy and sell a broad variety of goods andservices worldwide. Founded in 1995, eBay is one of the notable success stories of the dot-combubble; it is now a multi-billion dollar business with operations localized in over thirty countries.
eBay expanded from its original "set-time" auction format to include "Buy It Now" standardshopping; shopping by UPC, ISBN, or other kind of SKU (via Half.com); online classifiedadvertisements (via Kijiji or eBay Classifieds); online event ticket trading (via StubHub); onlinemoney transfers (via PayPal) and other services.
The online auction website was founded as AuctionWeb in San Jose, California, onSeptember 3, 1995, by French-born Iranian computer programmer Pierre Omidyar as part of alarger personal site that included, among other things, Omidyar's own tongue-in-cheek tribute tothe Ebola virus. One of the first items sold on eBay was a broken laser pointer for $14.83.Astonished, Omidyar contacted the winning bidder to ask if he understood that the laser pointer was broken. In his responding email, the buyer explained: "I'm a collector of broken laser
pointers." The frequently repeated story that eBay was founded to help Omidyar's fiancée tradePez candy dispensers was fabricated by a public relations manager in 1997 to interest the media.This was revealed in Adam Cohen's 2002 book, The Perfect Store, and confirmed by eBay.
Chris Agarpao was hired as eBay's first employee and Jeffrey Skoll was hired as the firstpresident of the company in early 1996. In November 1996, eBay entered into its first third-partylicensing deal, with a company called Electronic Travel Auction to use SmartMarket Technologyto sell plane tickets and other travel products. Growth was phenomenal; in January 1997 the sitehosted 2,000,000 auctions, compared with 250,000 during the whole of 1996.
The company officially changed the name of its service from AuctionWeb to eBay in
September 1997. Originally, the site belonged to Echo Bay Technology Group, Omidyar'sconsulting firm. Omidyar had tried to register the domain name echobay.com, but found italready taken by the Echo Bay Mines, a gold mining company, so he shortened it to his secondchoice, eBay.com. (Echobay.com is now owned by Echobay Partners, Ltd., a private equity firmbased in Nevis.)
In 1997, the company received $6.7 million in funding from the venture capital firmBenchmark Capital.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 16/114
Egypt Gate Web Development and Web Hosting
16
Meg Whitman was hired as eBay President and CEO in March 1998. At the time, thecompany had 30 employees half a million users and revenues of $4.7 million in the UnitedStates. eBay went public on September 21, 1998, and both Omidyar and Skoll became instantbillionaires. eBay's target share price of $18 was all but ignored as the price went to $53.50 onthe first day of trading.
As the company expanded product categories beyond collectibles into almost anysaleable item, business grew quickly. In February 2002, the company purchased IBazar, a similar European auction web site founded in 1995 and then bought PayPal on October 14, 2002.
In early 2008, the company had expanded worldwide, counted hundreds of millions of registered users, 15,000+ employees and revenues of almost $7.7 billion. After nearly ten yearsat eBay, Whitman made the decision to enter politics. On January 23, 2008 the companyannounced that Whitman would step down on March 31, 2008 and John Donahoe was selected tobecome President and CEO. Whitman remained on the Board of Directors and continued toadvise Donahoe through 2008. In late 2009, eBay completed the sale of Skype for $2.75 billion,
but will still own 30% equity in the company.
In July 2010, eBay was sued for $3.8 billion by XPRT Ventures which accused eBay of stealing information shared in confidence by the inventors on XPRT's own patents, andincorporated it into features in its own payment systems, such as PayPal Pay Later and PayPalBuyer Credit.
December 20, 2010, EBay Inc. says it will acquire a German online shopping club -brand4friends for 150 million Euro ($197 million) to strengthen the company fashion business inEurope. It is subject to regulatory approval and expected to close it in the Q1 2011.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 17/114
Egypt Gate Web Development and Web Hosting
17
1.5.3 Locanto
Fig 1.3 Locanto
Locanto is a worldwide online classifieds network with areas dedicated to jobs, personals,for rent, for sale, services, community, real estate, vehicles, and pets. Locanto Classifieds isavailable in 38 countries worldwide, covering over 1600 cities and 5 major languages and isconsidered as competition for Craigslist .
The Locanto Classifieds sites are operated by the German startup company Yalwa locatedin Wiesbaden, Germany. Locanto was launched in July 2006 with a local classifieds site for NewYork. One month later, on August 21, 2006, the service was extended to the U.S. cities of
Boston, Chicago, Los Angeles and San Francisco. As of 2007, every major U.S. city has its ownaccessible site for the Locanto classifieds service. In addition, Locanto classifieds sites are nowavailable in 5 languages for more than 1600 cities in 38 countries worldwide.
Locanto is one of three local web applications, including Askalo and Yalwa, created bythe German start-up company, Yalwa. Klaus P. Gapp, CEO and founder of Yalwa, previouslyfounded and operated OpusForum.org, a local classifieds site for the German speaking market.OpusForum.org was bought by Ebay in 2005 and merged with its classifieds site Kijiji one year later.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 18/114
Egypt Gate Web Development and Web Hosting
18
1.6 Aim of the Project (personal development)
y To give opportunities to the participants to experience a real time environment where
they increase their experience and knowledge on the used tools.
y To enable the participants to work with the newest technology to enhance the outcome of
the project making it more easier, user friendly and never the less more effective and
efficient.
y To involve participants in an organized team work, this is a mandatory obligation in the
real time implementation of the project, which must be taken into consideration.
1.7 The Main Objective of the Project
y
To provide a classified advertisements to traders and users to assist them in to trade their
products all over Egypt.
y To provide an indexed view of the advertisements of which will be easier to look for the
thing a user want.
y This site gives the user an electronic free market targeting a large number of customers.
y User can buy products, sell his old car, rent a flat and find a job from the same place.
y This site saves money and time for both traders and users.
y
Provide all convenience media to user to browse user-friendly Classifieds website.
y Convert real business to an application.
y Simplify interactions for online consumers.
y Solving traffic crowdedness.
y Greater access to information.
y Simplifying comparison between products or items.
y Giving user wide variety of products.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 19/114
Egypt Gate Web Development and Web Hosting
19
1.8 Project Planning
The project is divided into five main phases:
1.
Brain storming
Gathering and collecting information about different ideas for the graduation project.
2. Choosing the tools
Analyzing the project idea into real world to model that can be implemented and used
trying our best to make it end user soloution.
3. System design
Drawing models and designing system menus.
4. Implementation
Building a system using suitable tools.
5. Documentation
Writing a user documentation to describe the phases of building the system .
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 20/114
Egypt Gate Web Development and Web Hosting
20
Chapter 2
Web Development
And
Structured Query Language
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 21/114
Egypt Gate Web Development and Web Hosting
21
2.1 Hypertext Preprocessor (PHP):
Fig 2.1 PHP logo
PHP: Hypertext Preprocessor (a recursive acronym, originally personal home page) is a
general-purpose scripting language that was originally designed for web development to produce
dynamic web pages. For this purpose, PHP code is embedded into the HTML source document
and interpreted by a web server with a PHP processor module, which generates the web page
document. As a general-purpose programming language, PHP code is processed by an interpreter
application in command-line mode performing desired operating system operations and
producing program output on its standard output channel. It may also function as a graphical
application. PHP is available as a processor for most modern web servers and as a standalone
interpreter on most operating systems and computing platforms.
PHP was originally created by Rasmus Lerdorf in 1995and has been in continuous
development ever since. The main implementation of PHP is now produced by the PHP Group
and serves as the de facto standard for PHP as there is no formal specification. PHP is free
software released under the PHP License.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 22/114
Egypt Gate Web Development and Web Hosting
22
2.2 History:
PHP originally stood for personal home page.Its development began in 1994 when the
Danish/Greenlandic programmer Rasmus Lerdorf initially created a set of Perl scripts he called
'Personal Home Page Tools' to maintain his personal homepage, including tasks such as
displaying his résumé and recording how much traffic his page was receiving.
He rewrote these scripts as C programming language Common Gateway Interface (CGI)
binaries, extending them to add the ability to work with web forms and to communicate with
databases and called this implementation 'Personal Home Page/Forms Interpreter' or PHP/FI.
PHP/FI could be used to build simple, dynamic web applications. Lerdorf released PHP/FI as
'Personal Home Page Tools (PHP Tools) version 1.0' publicly on June 8, 1995, to accelerate bug
location and improve the code.This release already had the basic functionality that PHP has
today. This included Perl-like variables, form handling, and the ability to embed HTML. The
syntax was similar to Perl but was more limited and simpler, although less consistent.
A development team began to form and, after months of work and beta testing, officially
released PHP/FI 2 in November 1997.Zeev Suraski and Andi Gutmans, two Israeli developers at
the Technion IIT, rewrote the parser in 1997 and formed the base of PHP 3, changing the
language's name to the recursive initialism PHP: Hypertext Preprocessor.Afterwards, publictesting of PHP 3 began, and the official launch came in June 1998. Suraski and Gutmans then
started a new rewrite of PHP's core, producing the Zend Engine in 1999.They also founded Zend
Technologies in Ramat Gan, Israel.On May 22, 2000, PHP 4, powered by the Zend Engine 1.0,
was released.As of August 2008 this branch is up to version 4.4.9. PHP 4 is no longer under
development nor will any security updates be released.
On July 13, 2004, PHP 5 was released, powered by the new Zend Engine II.PHP 5
included new features such as improved support for object-oriented programming, the PHP Data
Objects (PDO) extension (which defines a lightweight and consistent interface for accessing
databases), and numerous performance enhancements.In 2008 PHP 5 became the only stable
version under development. Late static binding had been missing from PHP and was added in
version 5.3.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 23/114
Egypt Gate Web Development and Web Hosting
23
A new major version has been under development alongside PHP 5 for several years.
This version was originally planned to be released as PHP 6 as a result of its significant changes,
which included plans for full Unicode support. However, Unicode support took developers much
longer to implement than originally thought, and the decision was made in March 2010to move
the project to a branch, with features still under development moved to trunk.Changes in the new
code include the removal of register_globals,magic quotes, and safe mode.The reason for the
removals was that register_globals had given way to security holes, and the use of magic quotes
had an unpredictable nature, and was best avoided. Instead, to escape characters, magic quotes
may be replaced with the addslashes() function, or more appropriately an escape mechanism
specific to the database vendor itself like mysql_real_escape_string() for MySQL. Functions that
will be removed in future versions and have been deprecated in PHP 5.3 will produce a warning
if used.Many high-profile open-source projects ceased to support PHP 4 in new code as of
February 5, 2008, because of the GoPHP5 initiative,provided by a consortium of PHP developers
promoting the transition from PHP 4 to PHP 5.
PHP currently does not have native support for Unicode or multibyte strings; Unicode support is
under development for a future version of PHP and will allow strings as well as class, method,
and function names to contain non-ASCII characters.
PHP interpreters are available on both 32-bit and 64-bit operating systems, but on
Microsoft Windows the only official distribution is a 32-bit implementation, requiring Windows
32-bit compatibility mode while using Internet Information Services (IIS) on a 64-bit Windows
platform. As of PHP 5.3.0, experimental 64-bit versions are available for MS Windows.logic.
The technology focuses on data rather than processes, with programs composed of self-sufficient
modules ("classes"), each instance of which ("objects") contains all the information needed to
manipulate its own data structure ("members"). This is in contrast to the existing modular
programming which had been dominant for many years that focused on the function of a module,
rather than specifically the data, but equally provided for code reuse, and self-sufficient reusable
units of programming logic, enabling collaboration through the use of linked modules
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 24/114
Egypt Gate Web Development and Web Hosting
24
(subroutines). This more conventional approach, which still persists, tends to consider data and
behavior separately.
An object-oriented program may thus be viewed as a collection of interacting objects, as
opposed to the conventional model, in which a program is seen as a list of tasks (subroutines) to
perform. In OOP, each object is capable of receiving messages, processing data, and sending
messages to other objects. Each object can be viewed as an independent 'machine' with a distinct
role or responsibility. The actions (or "methods") on these objects are closely associated with the
object. For example, the data structures tend to 'carry their own operators around with them' (or
at least "inherit" them from a similar object or class). In the conventional model, the data and
operations on the data don't have a tight, formal association.
2.3Usage:
PHP is a general-purpose scripting language that is especially suited to server-side web
development where PHP generally runs on a web server. Any PHP code in a requested file is
executed by the PHP runtime, usually to create dynamic web page content. It can also be used
for command-line scripting and client-side GUI applications. PHP can be deployed on most web
servers, many operating systems and platforms, and can be used with many relational database
management systems (RDBMS). It is available free of charge, and the PHP Group provides thecomplete source code for users to build, customize and extend for their own use.
PHP primarily acts as a filter,taking input from a file or stream containing text and/or
PHP instructions and outputs another stream of data; most commonly the output will be HTML.
Since PHP 4, the PHP parser compiles input to produce bytecode for processing by the Zend
Engine, giving improved performance over its interpreter predecessor.
Originally designed to create dynamic web pages, PHP now focuses mainly on server-
side scripting,and it is similar to other server-side scripting languages that provide dynamic
content from a web server to a client, such as Microsoft's Asp.net, Sun Microsystems' JavaServer
Pages,and mod_perl. PHP has also attracted the development of many frameworks that provide
building blocks and a design structure to promote rapid application development (RAD). Some
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 25/114
Egypt Gate Web Development and Web Hosting
25
of these include CakePHP, Symfony, CodeIgniter, and Zend Framework, offering features
similar to other web application frameworks.
The LAMP architecture has become popular in the web industry as a way of deploying
web applications. PHP is commonly used as the P in this bundle alongside Linux, Apache and
MySQL, although the P may also refer to Python or Perl or some combination of the three.
WAMP packages (Windows/ Apache/ MySQL / PHP) and MAMP packages (Macintosh /
Apache / MySQL / PHP) are also available.
As of April 2007, over 20 million Internet domains had web services hosted on servers
with PHP installed and mod_php was recorded as the most popular Apache HTTP Server
module.PHP is used as the server-side programming language on 75% of all web servers.Web
content management systems written in PHP include MediaWiki,Joomla, eZ Publish,
WordPress,Drupal and Moodle.All websites created using these tools are written in PHP,
including the user-facing portion of Wikipedia, Facebook, and Digg.
2.4Security:
The National Vulnerability Database maintains a list of vulnerabilities found in computer
software. The overall proportion of PHP-related vulnerabilities on the database amounted to:
20% in 2004, 28% in 2005, 43% in 2006, 36% in 2007, 35% in 2008, and 30% in 2009. Most of
these PHP-related vulnerabilities can be exploited remotely: they allow attackers to steal or
destroy data from data sources linked to the webserver (such as an SQL database), send spam or
contribute to DoS attacks using malware, which itself can be installed on the vulnerable servers.
These vulnerabilities are caused mostly by not following best practice programming
rules: technical security flaws of the language itself or of its core libraries are not frequent (23 in
2008, about 1% of the total).Recognizing that programmers cannot be trusted, some languages
include taint checking to detect automatically the lack of input validation which induces many
issues. Such a feature is being developed for PHP,but its inclusion in a release has been rejected
several times in the past.Hosting PHP applications on a server requires careful and constant
attention to deal with these security risks.There are advanced protection patches such as Suhosin
and Hardening-Patch, especially designed for web hosting environments.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 26/114
Egypt Gate Web Development and Web Hosting
26
PHPIDS adds security to any PHP application to defend against intrusions. PHPIDS
detects Cross-site scripting (XSS), SQL injection, header injection, Directory traversal, Remote
File Execution, Local File Inclusion, Denial of Service (DoS).
2.5 Speed optimization:
PHP source code is compiled on-the-fly to an internal format that can be executed by the
PHP engine.In order to speed up execution time and not have to compile the PHP source code
every time the webpage is accessed, PHP scripts can also be deployed in executable format using
a PHP compiler.
Code optimizers aim to enhance the performance of the compiled code by reducing its
size, merging redundant instructs and making other changes that can reduce the execution time.
With PHP, there are often opportunities for code optimization.An example of a code optimizer is
the eAccelerator PHP extension.Another approach for reducing compilation overhead for PHP
servers is using an opcode cache. Opcode caches work by caching the compiled form of a PHP
script (opcodes) in shared memory to avoid the overhead of parsing and compiling the code
every time the script runs. An opcode cache, APC, will be built into an upcoming release of
PHP.
Opcode caching and code optimization can be combined for best efficiency, as the
modifications do not depend on each other (they happen in distinct stages of the compilation).
2.6 Why use dynamic PHP in Egypt Gate not static HTML pages?
y Through dynamic pages, users can interact (forum, chat).
y Through dynamic pages we can offer value added services (restricted areas, various
services based on user classification«).
y The information is more easily catalogued.
y With a few PHP pages we recall a lot of information.
y Keeping the contents up-to-date does not demand particular technical expertise and can
be managed by anyone.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 27/114
Egypt Gate Web Development and Web Hosting
27
y It is the simplest way to pull over a complete portal, thanks to its open source engine; it
allows anyone to implement new modules or to modify and to personalize existing
modules.
y
It is very intuitive and easy to learn.
y It is easy to modify by those who intend to personalize the program.
y It is easy to use by the lesser experts among us.
2.7 PHP , ASP comparison:
y Price
PHP is cheaper to implement that ASP.
y Capability
PHP gives us additional capability than if we were to code with ASP.
y ³Open Source´
We are strong proponents of the ³Open Source´ movement. Open source software is a
collaborative effort amongst a worldwide community of volunteer programmers with apassion for technology. People of disparate backgrounds and experiences join together to
solve problems in new ways, thus resulting in better software. Open source software is
free to use, copy, and modify, which makes it a great deal for our clients.
It is also highly flexible, because it allows us to extend the software and customize it for
our clients¶ requirements.
We don¶t have to reinvent the wheel when we embark on a project for a client, as there is
an amazingly extensive library of software written in PHP that¶s free and available in
source code form. Whenever possible, we repurpose our own extensive code library. But
if we haven¶t already built a similar web application before, we look for the best open
source software to meet the functional requirements and pick up where that software left
off. Adding such enhancements and customizations to the software¶s source code
wouldn¶t be possible with proprietary closed-source software.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 28/114
Egypt Gate Web Development and Web Hosting
28
There are no requirements to purchase commercial licenses and pay continuously for
upgrades. For example, to perform binary file uploads, retrieve a file via FTP or HTTP,
encrypt passwords in MD5, or send email from a Web page require 3rd party commercial
software packages in ASP. It¶s all available for free in PHP.
y PHP is platform-agnostic
y It will run on Linux, Solaris, Windows, and other operating systems as well. With ASP
you¶re also forced down a path that is very costly and painful to extricate yourself from.
For example, what if you wanted to switch web hosting providers to one that was more
reliable and had better customer service but was Linux-based? ASP only runs reliably on
Microsoft Windows-based web servers.
y PHP is the most popular web programming language on the planet
It¶s more popular than ASP, Cold Fusion, Perl, or any other web programming language.
Fig 2.2 PHP usage
y All else being equal, PHP is faster than ASP
ASP supports multiple programming languages. This architecture is inherently slower
and more memory intensive that PHP¶s model because each ASP language compiler runs
in its own process. So when ASP detects a Begin ASP tag () it will do a context switch
back to the HTML parser.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 29/114
Egypt Gate Web Development and Web Hosting
29
y PHP is secure
IIS Server is notorious for its security holes.
y Coding in PHP is more efficient than in ASP
Typically the same functionality can be accomplished in less code with PHP than with
ASP. This is because the HTTP GET and POST variables are created automatically by
PHP as global variables, thus eliminating the step of extracting them from the ASP
Request object. PHP¶s HTTP header manipulation functions are easier to use than in
ASP.
2.8PHP and databases:
Both PHP and relational database management systems (RDBMSs) are extremely common in
software today. Since relational databases don't store objects directly (though some RDBMSs
have object-oriented features to approximate this), there is a general need to bridge the two
worlds.
The problem of bridging object-oriented programming accesses and data patterns with relational
databases is known as Object-Relational impedance mismatch. There are a numbers of
approaches to cope with this problem, but no general solution without downsides.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 30/114
Egypt Gate Web Development and Web Hosting
30
2.9 Database:
A dat abase is an integrated collection of data. Many different strategies exist for organizingdata
in databases to facilitate easy access to and manipulation of the data. A dat abase
management syst em (DBMS ) provides mechanisms for storing and organizing data in a
mannerthat is consistent with the database¶s format. Database management systems enable
programmersto access and store data without worrying about the internal representation of
databases.
Today¶s most popular database systems are relational dat abases. Almost universally,relational
databases use a language called S t r uctured Query Lang uage (SQL²pronouncedas its individual
letters or as ³sequel´) to perform quer ies (i.e., to request information that satisfies given criteria)
and to manipulate data.Some popular, enterprise-level relational database systems include Microsoft SQLServer,
Oracle�, Sybase�, DB2�, Informix� and MySQL�.
2.10Structured Query Language (SQL):
In this section, we provide an overview of Structured Query Language (SQL)
2.10.1 Basic SELECT Query:
Let us consider several SQL queries that extract information from database Books. A typical
SQL query ³selects´ information from one or more tables in a database. Such selectionsare
performed by SELECT quer ies. The basic format for a SELECT query is:
SELECT * FROM t ableName
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 31/114
Egypt Gate Web Development and Web Hosting
31
In this query, the asterisk (*) indicates that all columns from the t ableName table of the
databaseshould be selected.
SQL keyword Description
SELECT Selects (retrieves) fields from one or more
tables
FROM Specifies tables from which to get fields or
delete records. Requiredin every SELECT and
DELETE statement.
WHERE Specifies criteria that determine the rows to be
retrieved.
INNER JOIN Joins records from multiple tables to produce a
single set of records.
GROUP BY Specifies criteria for grouping records.
ORDER BY Specifies criteria for ordering records.
INSERT Inserts data into a specified table.
UPDATE Updates data in a specified table.
DELETE Deletes data from a specified table.
Table2.1: SQL query keywords
2.10.2 WHERE Clause:
In most cases, users search a database for records that satisfy certain selection cr it er ia.
Onlyrecords that match the selection criteria are selected. SQL uses the optional WH ERE
clausein a SELECT query to specify the selection criteria for the query. The simplest format
fora SELECT query that includes selection criteria is:
SELECT fieldName1, fieldName2, « FROM t ableName WHERE cr it er ia
2.10.3 ORDER BY Clause:
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 32/114
Egypt Gate Web Development and Web Hosting
32
The results of a query can be arranged in ascending or descending order using the optional
ORDER BY clause. The simplest forms for an ORDER BY clause are:
SELECT fieldName1, fieldName2, « FROM t ableName ORDER BY field ASC
SELECT fieldName1, fieldName2, « FROM t ableName ORDER BY field DESC
The ORDER BY clause also can be used to order records by multiple fields. Such queriesare
written in the form:
ORDER BY field1 sor tingOrder , field2 sor tingOrder , «
2.10.4 Merging Data from Multiple Tables: INNER JOIN:
Database designers often split related data into separate tables to ensure that a database doesnot
store data redundantly. For example, the Books database has tables Authors andTitles. We use
an AuthorISBN table to provide ³links´ between authors and their correspondingtitles. If we did
not separate this information into individual tables, we wouldneed to include author information
with each entry in the Titles table. This would resultin the database storing duplicate author
information for authors who wrote multiple books.
Often, it is necessary for analysis purposes to merge data from multiple tables into asingle set of
data. Referred to as joining the tables, this is accomplished via an INN ERJ OIN operation in the
SELECT query. An INNER JOIN merges records from two or moretables by testing for
matching values in a field that is common to the tables. The simplestformat for an INNER JOIN
clause is:
SELECT fieldName1, fieldName2, «
FROM t able1
INNER JOIN t able2
ON t able1.fieldName = t able2.fieldName
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 33/114
Egypt Gate Web Development and Web Hosting
33
2.10.5 INSERT Statement:
The IN SERT statement inserts a new record in a table. The simplest form for this statement is:
INSERT INTO t ableName ( fieldName1, fieldName2, «, fieldNameN )
VALUES ( val ue1, val ue2, «, val ueN )
where t ableName is the table in which to insert the record. The t ableName is followed bya
comma-separated list of field names in parentheses. The list of field names is followed bythe
SQL keyword VALUES and a comma-separated list of values in parentheses. The
specifiedvalues in this list must match the field names listed after the table name in both
orderand type (for example, if fieldName1 is specified as the firstName field, then val ue1should
be a string in single quotes representing the first name).
2.10.6 UPDATE Statement:
An UP DATE statement modifies data in a table. The simplest form for an UPDATE statementis:
UPDATE t ableName
SET fieldName1 = val ue1, fieldName2 = val ue2, «, fieldNameN = val ueN
WHERE cr it er ia
where t ableName is the table in which to update a record (or records). The t ableName isfollowed
by keyword SET and a comma-separated list of field name/value pairs written inthe format,
fieldName = val ue. The WHERE clause specifies the criteria used to determinewhich record(s)
to update.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 34/114
Egypt Gate Web Development and Web Hosting
34
2.10.7 DELETE Statement:
An SQL DELETE statement removes data from a table. The simplest form for a
DELETEstatement is:
DELETE FROM t ableName WHERE cr it er ia
where t ableName is the table from which to delete a record (or records). The WHERE
clausespecifies the criteria used to determine which record(s) to delete.
2.11 What is MySQL?
MySQL is a database.The data in MySQL is stored in database objects called tables.A table is a collections of related data entries and it consists of columns and rows.Databases are useful when storing information categorically. A company may have a databasewith the following tables: "Employees", "Products", "Customers" and "Orders".
2.12 Create a Connection to a MySQL Database
Before you can access data in a database, you must create a connection to the database.
In PHP, this is done with the mysql_connect() function.
Syntax
mysql_connect(servername,username,password);
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 35/114
Egypt Gate Web Development and Web Hosting
35
2.12.1 Closing a Connection
The connection will be closed automatically when the script ends. To close the connection
before, use the mysql_close() function:
<?php$con = mysql_connect("localhost","peter","abc123");if (!$con)
{die('Could not connect: ' . mysql_error());}
// some code
mysql_close($con);?>
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 36/114
Egypt Gate Web Development and Web Hosting
36
Chapter 3
Main System Design
And
Architecture
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 37/114
Egypt Gate Web Development and Web Hosting
37
3.1Requirements:
3.1.1Functional requirements:
Egypt Gate web soloution will provide allrequired services for organizing and
conducting an advert, posting process. It will support allactors involved;
namelyadministrators, traders and users. It will also feature an easy and user-friendly
environment for the interaction of the end uers with the system while considering the
appropriate sociological and behavioral aspects.
The Egypt Gate web soloutionmust support the registration of allpersons that are
eligible to post and. at the same tune, provide some kind of unique identification that will
allow the system to organize the ueser's advertisments.
3.1.2 Constitutional requirements:
y Free: Everyone can post his adverts for free.
y Registration:registration gives a user extra features.
y Directness: users select directly (with no intermediates) what they want without any
mazes.
From our point of view, these requirements may be categorized into three categories:
3.1.2.1Non Registered users rights:
1. Browse: they can browse almost all the website and all the advetisments.
2. Post: they can post advertisments without being registerd.
3. Search: they can search for the advert they want.
4. Register: registration is completely free of charge and it allows the users to do more
with the website .
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 38/114
Egypt Gate Web Development and Web Hosting
38
3.1.2.2Registered users rights:
1. Browse: they can browse almost all the website and all the advetisments.
2. Post: they can post advertisments without being registerd.
3. Privacy: No one should be able to know the personal information of each user.
4. Uniqueness/Non reusable: user name is unique name and the adverts posted by each
user and called by his user name.
5. Communication: only registerd users can send and recive messages
3.1.2.3 System related requirements:
1. Accuracy/Completeness: Egypt Gate web solution should record the adverts correctly.
2. Verifiability: Should be possible to verify that adverts are correctly counted for in the
final tally
3. Integrity: Adverts should not be able to be modified without detection.
4.
Reliability: The system must be resistant to randomly generated malfunctions.5. Auditability: There should be a reliable and authentic adverts records.
6. Usability: The system must be very easy to use.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 39/114
Egypt Gate Web Development and Web Hosting
39
3.2Use case diagram :
Model Detail
This document provides a complete overview of all element details. For simpler and more
focused reports, simply copy this initial template and turn off the sections not required.
Use Case Model
T ype: Package
S t atus: .Version .Phase.
Pack age:
Det ail: Creat ed on 02/03/2011 .Last mod ified on 02/03/2011
GUID:
- (Use Case d iagram)
Creat ed By: on
Last M od ified:
Version: .Lock ed:
GUID:
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 40/114
Egypt Gate Web Development and Web Hosting
40
Figure: 3.1 use case diagram
administrator
T ype:
S t atus: .Version .Phase.
uc Use Case Model
user
post adve rtisements
cars jobs homes
electronicsservices
Register
sign in
sign out
Browse
follow to fb, twitter
play game
administrator
Monitor the
advertisements
control the database
alter
delete
Egypt Gate web solution
«include» «include»
«include»«include»
«include»
«include»
«include»«include»
«include»
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 41/114
Egypt Gate Web Development and Web Hosting
41
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 02/03/2011.
GUID:
Connections
Connector Source Target Notes
Association Public Public
Association Public Public
Table 3.1 use case
user
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 02/03/2011.
GUID:
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 42/114
Egypt Gate Web Development and Web Hosting
42
Connections
Connector Source Target Notes
Association Public Public
Association Public Public
Association Public Public
Association Public Public
Association Public Public
Table 3.2 use case
Browse
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 43/114
Egypt Gate Web Development and Web Hosting
43
Det ail: Creat ed on .Last mod ified on 02/03/2011.
GUID:
Connections
Connector Source Target Notes
Association Public Public
Table 3.3 use case
Monitor the advertisements
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 02/03/2011.
GUID:
Connections
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 44/114
Egypt Gate Web Development and Web Hosting
44
Connector Source Target Notes
Association Public Public
Table 3.4 use case
Register
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 02/03/2011.
GUID:
Connections
Connector Source Target Notes
Include Public Public
Include Public Public
Association Public Public
Table 3.5 use case
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 45/114
Egypt Gate Web Development and Web Hosting
45
alter
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 02/03/2011.
GUID:
Connections
Connector Source Target Notes
Include Public Public
Table 3.6 use case
cars
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 02/03/2011.
GUID:
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 46/114
Egypt Gate Web Development and Web Hosting
46
Connections
Connector Source Target Notes
Include Public Public
Table 3.7 use case
control the databaseT ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 02/03/2011.
GUID:
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 47/114
Egypt Gate Web Development and Web Hosting
47
Connections
Connector Source Target Notes
Association Public Public
Include Public Public
Include Public Public
Table 3.8 use case
delete
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 02/03/2011.
GUID:
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 48/114
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 49/114
Egypt Gate Web Development and Web Hosting
49
follow to fb, twitter
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 02/03/2011.
GUID:
Connections
Connector Source Target Notes
Association Public Public
Table 3.11 use case
homes
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 02/03/2011.
GUID:
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 50/114
Egypt Gate Web Development and Web Hosting
50
Connections
Connector Source Target Notes
Include Public Public
Table 3.12 use case
jobs
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 02/03/2011.
GUID:
Connections
Connector Source Target Notes
Include Public Public
Table 3.13 use case
play game
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 02/03/2011.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 51/114
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 52/114
Egypt Gate Web Development and Web Hosting
52
Connector Source Target Notes
Include Public Public
Include Public Public
Association Public Public
Include Public Public
Table 3.14 use case
services
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 02/03/2011.
GUID:
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 53/114
Egypt Gate Web Development and Web Hosting
53
Connections
Connector Source Target Notes
Include Public Public
Table 3.15 use case
sign in
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 02/03/2011.
GUID:
Connections
Connector Source Target Notes
Include Public Public
Table 3.16 use case
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 54/114
Egypt Gate Web Development and Web Hosting
54
sign out
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 02/03/2011.
GUID:
Connections
Connector Source Target Notes
Include Public Public
Table 3.17 use case
Object1
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 02/03/2011.
GUID:
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 55/114
Egypt Gate Web Development and Web Hosting
55
Connections
Connector Source Target Notes
Association Public Public
Table 3.17 use case
Actors
T ype: Package
S t atus: .Version .Phase.
Pack age:
Det ail: Creat ed on 19/11/2005 .Last mod ified on 19/11/2005
GUID:
- (Use Case d iagram)
Creat ed By: on
Last M od ified:
Version: .Lock ed :
GUID:
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 56/114
Egypt Gate Web Development and Web Hosting
56
Figure:3.2 use case
User
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 19/11/2005.
GUID:
Connections
Connector Source Target Notes
UseCaseLink Public Public
UseCaseLink Public Public
uc Actors
User
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 57/114
Egypt Gate Web Development and Web Hosting
57
Connector Source Target Notes
Sequence Public Public
Table 3.18 use case
Primary Use Cases
T ype: Package
S t atus: .Version .Phase.
Pack age:
Det ail: Creat ed on 19/11/2005 .Last mod ified on 19/11/2005
GUID:
- (Use Case d iagram)
Creat ed By: on
Last M od ified:
Version: .Lock ed :
GUID:
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 58/114
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 59/114
Egypt Gate Web Development and Web Hosting
59
Connections
Connector Source Target Notes
UseCaseLink Public Public
Table 3.19 use case
Fig 3.4 diagram: Use Case1
]
sd Use £ ¤
se1
User
Object1
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 60/114
Egypt Gate Web Development and Web Hosting
60
Obj ect1
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 05/01/2006 .
GUID:
Connections
Connector Source Target Notes
Sequence Public Public
Table 3.20 use case
Use Case2
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 20/11/2005.
GUID:
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 61/114
Egypt Gate Web Development and Web Hosting
61
Connections
Connector Source Target Notes
UseCaseLink Public Public
Table 3.21 use case
3.3Context Model:
Model Detail
This document provides a complete overview of all element details. For simpler and more
focused reports, simply copy this initial template and turn off the sections not required.
Egypt Gate Web Solution
T ype: Package
S t atus: .Version .Phase.
Pack age:
Det ail: Creat ed on 04/03/2011 .Last mod ified on 04/03/2011
GUID:
- (Dat a Fl ow d iagram)
Creat ed By: on
Last M od ified:
Version: .Lock ed:
GUID:
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 62/114
Egypt Gate Web Development and Web Hosting
62
Figure: 3.5 Context model diagram
administrator
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 04/03/2011.
GUID:
dfd xyz
user Egupt Gate Web Solution
administrator
personal data
messages
advertisements
games
advertisements
related sites
messages
user data
advertisements
messages
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 63/114
Egypt Gate Web Development and Web Hosting
63
Custom Pr oper ties
isActive =
Connections
Connector Source Target Notes
DataFlow Public Public
DataFlow Public Public
DataFlow Public Public
Table 3.22 Context Diagram
user
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 04/03/2011.
GUID:
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 64/114
Egypt Gate Web Development and Web Hosting
64
Custom Pr oper ties
isActive =
Connections
Connector Source Target Notes
DataFlow Public Public
DataFlow Public Public
DataFlow Public Public
DataFlow Public Public
DataFlow Public Public
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 65/114
Egypt Gate Web Development and Web Hosting
65
Connector Source Target Notes
DataFlow Public Public
DataFlow Public Public
Table 3.23 Context Diagram
Egupt Gate Web Solution
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 04/03/2011.
GUID:
Custom Pr oper ties
isReadOnly =
precondition =
isSingleExecution =
postcondition =
parameterName =
_defaultDiagramType =
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 66/114
Egypt Gate Web Development and Web Hosting
66
Connections
Connector Source Target Notes
DataFlow Public Public
DataFlow Public Public
DataFlow Public Public
DataFlow Public Public
DataFlow Public Public
DataFlow Public Public
DataFlow Public Public
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 67/114
Egypt Gate Web Development and Web Hosting
67
Connector Source Target Notes
DataFlow Public Public
DataFlow Public Public
DataFlow Public Public
DataFlow Public Public
Table 3.24 Context Diagram
Process1
T ype:
S t atus: .Version .Phase.
Pack age: K eywords:
Det ail: Creat ed on .Last mod ified on 04/03/2011.
GUID:
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 68/114
Egypt Gate Web Development and Web Hosting
68
Custom Pr oper ties
isReadOnly =
precondition =
isSingleExecution =
postcondition =
parameterName =
_defaultDiagramType =
Connections
Connector Source Target Notes
DataFlow Public Public
Table 3.25 Context Diagram
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 69/114
Egypt Gate Web Development and Web Hosting
69
Chapter 4
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 70/114
Egypt Gate Web Development and Web Hosting
70
Web &Web Hosting
4.1 What is the World Wide Web?
The Web is a network of computers all over the world.
All the computers in the Web can communicate with each other.
All the computers use a communication protocol called HTTP.
Fig 4.1 World Wide Web
4.1.1 How does the WWW works?
Web information is stored in documents called web pages.
Web pages are files stored on computers called web servers.
Computers reading the web pages are called web clients.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 71/114
Egypt Gate Web Development and Web Hosting
71
Web clients view the pages with a program called a web browser.
Popular browsers are Internet Explorer and Opera.
Fig 4.2 Opera Browser
4.1.2How does a Browser Fetch a Web Page?
A browser fetches a page from a web server by a request.
A request is a standard HTTP request containing a page address.
An address may look like this: http://www.example.com/default.htm.
4.1.3 How does a Browser Display a Web Page?
All web pages contain instructions for display.
The browser displays the page by reading these instructions.
The most common display instructions are called HTML tags.
HTML tags look like this <p>This is a paragraph.</p>.
4.2 What is a Web Server?
The collection of all your web pages is called your web site.
To let others view your web pages, you must publish your web site.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 72/114
Egypt Gate Web Development and Web Hosting
72
To publish your work, you must copy your site to a web server.
Your own PC can act as a web server if it is connected to a network .
Fig 4.3 Web Server example
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 73/114
Egypt Gate Web Development and Web Hosting
73
4.3 How to host a web site?
First we need a high internet connection speed .
Get a DNS hostname for the Internet connection hosting the web site.
Get a static local IP address for your computer within your l ocal net wor k .
Configure the local router to correctly forward connections on port 80 (the
HTTP port) to your web server.
Configure the Firewall to allow your web server to communicate on port 80.
Get Apache, a free, high-quality web server program. If you have Windows
XP Professional, you also have the option of Microsoft Internet Information
Server (IIS).
Replace the default home page with your own web page.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 74/114
Egypt Gate Web Development and Web Hosting
74
Fig 4.4 Apache Servers
4.4What is a Domain Name?
A domain name is a unique name for a web site, like msn.com.
Domain names must be registered. When domain names are registered, they
are added to a large domain name register. In addition, information about the
web site, including the IP address, is stored on a DNS server.
DNS stands for Domain Name System. A DNS server is responsible for
informing all other computers on the Internet about the domain name and the
web site address.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 75/114
Egypt Gate Web Development and Web Hosting
75
4.5 Static & Dynamic web pages:
STATIC WEB PAGE: A static web page shows the required information to
the viewer, but d o not accept any information from the viewer.
DYNAMIC WEB PAGE: A dynamic web page d isplays the information to
the viewer and also accept s the information from the user
Railway reservation, Online shopping etc. are examples of dynamic web
page.
4.6Server-side scripting languages:
technology in which a user's request is fulfilled by running a script directly
on the web server to generate dynamic web pages.
It is usually used to provide interactive web sites that interface to databases
or other data stores.
This is different from client-side scripting where scripts are run by the
viewing web browser, usually in JavaScript. The primary advantage toserver-side scripting is the ability to highly customize the response based on
the user's requirements, access rights, or queries into data stores.
Server-side scripts are never visible to the browser as these scripts are
executes on the server and emit HTML corresponding to user's input to the
page.
Some server-side scripting languages:
ASP
ANSI C scripts
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 76/114
Egypt Gate Web Development and Web Hosting
76
ColdFusion Markup Language
Java via JavaServer Pages
JavaScript using Server-side JavaScript
PHP
SMX
Lasso
WebDNA
Fig 4.5 PHP Server Side Language
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 77/114
Egypt Gate Web Development and Web Hosting
77
Chapter 5
Implementation Tools
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 78/114
Egypt Gate Web Development and Web Hosting
78
5.1 Dreamweaver CS5:
Figure 5.1: Dreamweaver
5.1.1 Overview:
Dreamweaver allows users to preview websites in locally installed web browsers. It
provides transfer and synchronization features, the ability to find and replace lines of text or code
by search terms and regular expressions across the entire site, and a templating feature that
allows single-source update of shared code and layout across entire sites without server-side
includes or scripting. The behaviors panel also enables use of basic JavaScript without any
coding knowledge, and integration with Adobe's Spry Ajax framework offers easy access to
dynamically-generated content and interfaces.
Dreamweaver can use third-party "Extensions" to extend core functionality of the
application, which any web developer can write (largely in HTML and JavaScript).
Dreamweaver is supported by a large community of extension developers who make extensions
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 79/114
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 80/114
Egypt Gate Web Development and Web Hosting
80
5.2 MySQL:
Figure 5.2: MySQL
5.2.1 Overview:
MySQL is a relational database management system (RDBMS)[1] that runs as a server
providing multi-user access to a number of databases.The MySQL development project has
made its source code available under the terms of the GNU General Public License, as well as
under a variety of proprietary agreements. MySQL was owned and sponsored by a single for-
profit firm, the Swedish company MySQL AB, now owned by Oracle Corporation.
Free-software projects that require a full-featured database management system often use
MySQL. Where the project may lead to something in commercial use, the license terms need
careful study. Some free software project examples: WordPress, phpBB, Drupal and other
software built on the LAMP software stack. MySQL is also used in many high-profile, large-
scale World Wide Web products, including Wikipedia, Google and Facebook.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 81/114
Egypt Gate Web Development and Web Hosting
81
5.2.2 Uses:
MySQL is a popular choice of database for use in web applications, and is a central
component of the widely used LAMP web application software stack²LAMP is an acronym for
"Linux, Apache, MySQL, PHP". Its popularity is closely tied to the popularity of PHP. MySQL
is used in some of the most frequently visited web sites on the Internet, including Flickr,
Facebook, Wikipedia, Google²though not for searches, Nokia.com and YouTube.
5.2.3 Platforms and interfaces
MySQL is written in C and C++. Its SQL parser is written in yacc, and a home-brewed
lexical analyzer named sql_lex.cc.
MySQL works on many different system platforms, including AIX, BSDi, FreeBSD, HP-
UX, i5/OS, Linux, Mac OS X, NetBSD, Novell NetWare, OpenBSD, OpenSolaris, eComStation,
OS/2 Warp, QNX, IRIX, Solaris, Symbian, SunOS, SCO OpenServer, SCO UnixWare, Sanos,
Tru64 and Microsoft Windows. A port of MySQL to OpenVMS also exists.
Many programming languages with language-specific APIs include libraries for
accessing MySQL databases. These include MySQL Connector/Net for integration with
Microsoft's Visual Studio (languages such as C# and VB are most commonly used) and the
ODBC driver for Java. In addition, an ODBC interface called MyODBC allows additional
programming languages that support the ODBC interface to communicate with a MySQL
database, such as ASP or ColdFusion. The HTSQL - URL based query method also ships with a
MySQL adapter, allowing direct interaction between a MySQL database and any web client via
structured URLs. The MySQL server and official libraries are mostly implemented in ANSI
C/ANSI C++.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 82/114
Egypt Gate Web Development and Web Hosting
82
5.2.4Third-party
Several other third-party proprietary and free graphical administration applications (or "front
ends") are available that integrate with MySQL and enable users to work with database structure
and data visually. Some well-known front ends, in alphabetical order, are:
y Adminer ± a free MySQL front end written in one PHP script, capable of managing
multiple databases, with many CSS skins available.
y DBEdit ± a free front end for MySQL and other databases.
y dbForge GUI Tools ² a set of tools for database management that includes separate
applications for schema comparison and synchronization, data comparison and
synchronization, and building queries.
y HeidiSQL ± a full featured free front end that runs on Windows, and can connect to local
or remote MySQL servers to manage databases, tables, column structure, and individual
data records. Also supports specialised GUI features for date/time fields and enumerated
multiple-value fields.
y Navicat ± a series of proprietary graphical database management applications, developed
for Windows, Macintosh and Linux.
y Other available proprietary MySQL front ends include Aqua Data Studio, dbForge Studio
for MySQL, Epictetus, Oracle SQL Developer, SchemaBank, SQLyog, SQLPro SQLClient, Toad, Toad Data Modeler
y Open Office ± The database part of Open Office can manage MySQL databases. (You
must install all of the Open Office suite. It is free and open source.)
y phpMyAdmin ± a free Web-based front end widely installed by Web hosts worldwide,
since it is developed in PHP and is included in the convenient LAMP stack and WAMP
software bundle installers.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 83/114
Egypt Gate Web Development and Web Hosting
83
5.3phpMyAdmin
Figure 5.3: phpMyAdmin
5.3.1 Overview:
phpMyAdmin is an open source tool written in PHP intended to handle the administration
of MySQL over the World Wide Web. It can perform various tasks such as creating, modifying
or deleting databases, tables, fields or rows; executing SQL statements; or managing users and
permissions. 5.3.2 History:
Tobias Ratschiller, then an IT consultant and later founder of the software company
Maguma, started to work on a PHP-based web front-end to MySQL in 1998, inspired by
MySQL-Webadmin. He gave up the project (and phpAdsNew, of which he was also the original
author) in 2000 because of lack of time.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 84/114
Egypt Gate Web Development and Web Hosting
84
By that time, phpMyAdmin had already become one of the most popular PHP
applications and MySQL administration tools, with a large community of users and contributors.
In order to coordinate the growing number of patches, a group of three developers registered The
phpMyAdmin Project at SourceForge.net and took over the development in 2001.and worked out
a short-term deal with scanner manufacturer Barneyscan to distribute copies of the program with
a slide scanner; a "total of about 200 copies of Photoshop were shipped" this way.
During this time, John traveled to Silicon Valley and gave a demonstration of the
program to engineers at Apple and Russell Brown, art director at Adobe. Both showings were
successful, and Adobe decided to purchase the license to distribute in September 1988. While
John worked on plug-ins in California, Thomas remained in Ann Arbor writing program code.
P hotoshop 1.0 was released in 1990 for Macintosh exclusively.
Web interface
MySQL database management
Import data from CSV and SQL
Export data to various formats: CSV, SQL, XML, PDF (via the TCPDF library), ISO/IEC 26300
- OpenDocument Text and Spreadsheet, Word, Excel, LaTeX and others
Administering multiple servers
Creating PDF graphics of the database layout
Creating complex queries using Query-by-example (QBE)
Searching globally in a database or a subset of it
Transforming stored data into any format using a set of predefined functions, like displaying
BLOB-data as image or download-link
Active query monitor (Processes)
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 85/114
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 86/114
Egypt Gate Web Development and Web Hosting
86
5.4.3 What differentiates Enterprise Architect from other UML tools?
· Comprehensive UML based modeling
·
Built-in Requirements Management
· Extensive Project Management support, including resources, metrics and testing
· Testing support: test cases, JUnit and NUnit support
· Flexible documentation options: HTML and Rich-Text (RTF) report writers
· Code engineering support for many languages out of the box
· An integrated Debug Workbench for profiling executable Java and .Net applications,
instantiating run-time model objects and recording sequence diagrams from a stack trace
· Extendable modeling environment that can host user-defined profiles and technologies
· Usability: Enterprise Architect makes it easy to get up and running with UML quickly
· Speed: Enterprise Architect is a spectacularly fast performer
· Scalability: Enterprise Architect can handle extremely large models and many concurrent
users with ease
· Price: Enterprise Architect is priced to outfit the entire team, making collaboration and
team development a real possibility.
5.4.4 How popular is Enterprise Architect now?
With over 200,000 licenses sold, Enterprise Architect has proven remarkably popular across a
wide range of industries and is used by thousands of companies world-wide. From large, well
known, multi-national organizations to smaller independent companies and consultants,
Enterprise Architect has become the UML modeling tool of choice for developers, consultants
and analysts in over 130 countries.
Sparx software is used in the development of many kinds of software systems in a wide range of
industries, including: aerospace, banking, web development, engineering, finance, medicine,
military, research, academia, transport, retail, utilities (such as gas and electricity) and electrical
engineering. It is also used effectively for UML and business architecture training in many
prominent colleges, training companies and universities around the world. Actual
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 87/114
Egypt Gate Web Development and Web Hosting
87
implementations range from single users to companies with over 1000 seats working on large,
distributed projects.
5.4.5 What benefits does Enterprise Architect provide?
1) Model and Manage Complex Information.
Enterprise Architect helps individuals, groups and large organizations model and manage
complexinformation. Often this relates to software development and IT systems design and
deployment, butit can also relate to business analysis and business process modeling. Enterprise
Architect integratesand connects a wide range of structural and behavioral information, helping
to build a coherent andverifiable architectural model, either what-is or what-will-be. Tools to
manage versions, track differences,audit changes and enforce security help control project
development and enforce complianceto standards.
Figure 5.5: Mangement tools
2) Model, Manage and Trace Requirements.
Capture requirements and use full traceability from base requirements to design, build,
deploymentand beyond. Use impact analysis to trace from proposed changes to original
requirements. Build the'right' system.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 88/114
Egypt Gate Web Development and Web Hosting
88
Figure 5.6: Capture tool
5.4.6Documentation and reporting in Enterprise Architect:
The production of documentation is essential to realizing the full benefit of Enterprise Architect.
Enterprise Architect outputs high quality documentation in either RTF or HTML format. You
canmodify the RTF formatting directly with RTF Style templates to alter the look and feel of
generatedoutput. Using Microsoft® Word® you can further enhance the output by connecting
andinterweaving model output in linked documents.
There are many ways to specify the Enterprise Architect content being documented. You can:
·Document a package and/or its child packages by manually highlighting the package
andselecting a documentation control.
· Specify embedded packages for exclusion if child packages are recursively documented.
· Link a package to an RTF document template to simplify generating consistent types
ofdocumentation (such as Use Case reports) using the Documents feature.
You can select group and order packages together in a manner different from the project view
bycreating µvirtual¶ documents.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 89/114
Egypt Gate Web Development and Web Hosting
89
5.4.6.1 The Rich Text Format (RTF) report writer:
The RTF Style Template editor enables you to create and edit custom RTF templates to define
any output RTF documentation. The Style Template Editor enables you to select particular
model elements and then to specify, from the element type, the fields for inclusion in the
generated document. Formatting styles can be defined in the Style Editor, and items such as
tables of contents and headers can be added to the document.
5.4.6.2The HTML report writer:
Enterprise Architect enables you to export an entire model or a single branch of the model
toHTML web pages. The HTML report provides an easy-to-use and highly detailed model tree.
Inaddition, hyperlinked elements make browsing to related information very easy. The
HTMLdocumentation is based on user-customizable HTML templates, so you can tailor the
generatedweb-pages to suit your company standard.
5.4.7 Built-in document editor and linked documents:
Enterprise Architect enables you to link rich-text documents to any element in the model. Linked
documents are created from customizable templates and are included in generated web and
Word-based reports.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 90/114
Egypt Gate Web Development and Web Hosting
90
5.5 Wamp Server:
Figure 5.7: Wamp Server
5.5.1 Introduction:
WampServer is a Windows web development environment. It allows you to create web
applications with Apache, PHP and the MySQL database. It also comes with PHPMyAdmin to
easily manage your databases.
WampServer installs automatically (installer), and its usage is very intuitive. You will be able to
tune your server without even touching the setting files.
WampServer is the only packaged solution that will allow you to reproduce your production
server. Once WampServer is installed, you have the possibility to add as many Apache, MySQL
and PHP releases as you want.
WampServer also has a trayicon to manage your server and its settings.
Figure 5.8: Wamp Server taskbar menu
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 91/114
Egypt Gate Web Development and Web Hosting
91
5.5.2 Installing
Double click on the downloaded file and just follow the instructions. Everything is
automatic. The WampServer package is delivered whith the latest releases of Apache, MySQL
and PHP.
Once WampServer is installed, you can add other releases by downloading them on this
website. They will then appear in the WampServer menu and you will be able to switch releases
with a simple click.
Each release of Apache, MySQL and PHP has its own settings and its own files (datas for
MySQL).
5.5.3 Functionalities
WampServer's functionalities are very complete and easy to use so we won't explain here
how to use them.
With a left click on WampServer's icon, you will be able to:
- manage your Apache and MySQL services
- switch online/offline (give access to everyone or only localhost)
- install and switch Apache, MySQL and PHP releases
- manage your servers settings
- access your logs
- access your settings files
- create alias
With a right click :
- change WampServer's menu language
- access this page
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 92/114
Egypt Gate Web Development and Web Hosting
92
5.5.4How to start
When you install WampServer, a "www" directory is created (generally c:\wamp\www).
Create a directory inside for your project and put your PHP files in it.
Click on the link "Localhost" in the WampServer menu or open your browser and open the
http://localhost address.
Figure 5.9: Wamp Server user interface
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 93/114
Egypt Gate Web Development and Web Hosting
93
Add Apache, MySQL and PHP releases
WampServer allows you to install almost all the existing releases of Apache, PHP and MySQL
so you can reproduce exactly the settings of your production server.
To add a new release, donwload it here and install it.
Figure 5.10: Wamp Server taskbar menu
Then click on the WampServer menu and activate the release that you want to use.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 94/114
Egypt Gate Web Development and Web Hosting
94
Chapter 6
Implementation Details
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 95/114
Egypt Gate Web Development and Web Hosting
95
6.1 Screen 1:
Figure 6.1: Creating site
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 96/114
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 97/114
Egypt Gate Web Development and Web Hosting
97
6.3 Screen 3:
Figure 6.3: Adding testing server
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 98/114
Egypt Gate Web Development and Web Hosting
98
5.4 Screen 4:
Figure 5.4: Testing server information
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 99/114
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 100/114
Egypt Gate Web Development and Web Hosting
100
6.6 Screen 6:
Figure 6.6: Testing server added
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 101/114
Egypt Gate Web Development and Web Hosting
101
6.7 Screen 7:
Figure 6.7: Creating MySQL connection
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 102/114
Egypt Gate Web Development and Web Hosting
102
6.8 Screen 8:
Figure 6.8: MySQL connection details
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 103/114
Egypt Gate Web Development and Web Hosting
103
6.9 Screen 9:
Figure 6.9: user authentication
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 104/114
Egypt Gate Web Development and Web Hosting
104
6.10 Screen 10:
Figure 6.10: Adding user authentication(log In,Out and Restrict Acces to page)
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 105/114
Egypt Gate Web Development and Web Hosting
105
6.11 Screen 11:
Figure 6.11: Log in user info
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 106/114
Egypt Gate Web Development and Web Hosting
106
6.12 Screen 12:
Figure 6.12: Log out user
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 107/114
Egypt Gate Web Development and Web Hosting
107
6.13 Screen 13:
Figure 6.13: Insert repeat region
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 108/114
Egypt Gate Web Development and Web Hosting
108
6.14 Screen 14:
Figure 6.14: Repat region
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 109/114
Egypt Gate Web Development and Web Hosting
109
Chapter 7
Conclusions and Future work
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 110/114
Egypt Gate Web Development and Web Hosting
110
7.1 Conclusion:
Classifieds ads received a great interest in the last few years as a normal result of the huge
growth in electronic and digital communications. An ideal Classifieds ads solution must at leastmeet four main characteristics, which are security, privacy, accuracy, and mobility.
The time performance of the system also an important issue, the system should be able to serveany number of users connected to the system in concurrency sessions with reasonable processingtime for each user.
There is an inverse relationship between security and practicality. i.e. systems that are highlysecured have little practicality and systems that are highly practical are minimally secured.
There exist few cryptographic schemes which fulfill a wide range of user requirements. Theyuse sophisticated cryptographic tools that make them hard to implement.
7.2 Future works:
The future is expected to have more changes due to the new software, hardware and
privacy issues. The next few paragraphs will show some of these changes.
Hardware
New hardware will allow the storage of larger database with more details about every
user. This should enhance the detection and prediction of users' behavior.Higher processing
power will allow the use of time consuming models which can guarantee more accurate results.
Software
y New operating systems are supposed to detect users' behavior in different fields. These
operating systems should enable browsers to transfer anonymous information about theusers' behavior to smart Web site, allowing these Web sites to serve their users' better.
y Navigation applications are expected to search automatically for the contents that suit the
customer requirements within the pages. For example a page will contain a lot of
information, and the browser will select what to show. Although this will need more
loading time of the pages, it will insure user's privacy since no preference information is
sent to other Web sites.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 111/114
Egypt Gate Web Development and Web Hosting
111
Privacy
As we said before, security is one of the most important issues that affect the user's
confidence in the internet. Most users will hate to know that their information is collected and
saved somewhere on the internet. Companies that will save users' information should request
user confirmation first. A very powerful encryption should be applied to the database so that no
one can gain access to the information collected about users.
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 112/114
Egypt Gate Web Development and Web Hosting
112
References:
Books
1. PHP, MySQL and Apache All in one by Julie C.meloni.
2. Mastering phpMyAdmin for effective MySQL Management by Marc Delisle.
3. The essential Guide to Dreamweaver Cs3, Cs4 with CSS, Ajax, and PHP by David
powers.
4. Introduction to java programming by Y. Daniel Liang.
Websites
1. www.w3shools.com
2. www.htmldog.com
3. www.php.net
4. www.wikipedia.org
1. www.back2college.com
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 113/114
Egypt Gate Web Development and Web Hosting
113
Abbreviations:
ICT Information and Communication TechnologyDRE Direct- Recording ElectronicOOP Object-Oriented ProgrammingVB.NET Visual Basic. NetDBMS Database Management SystemSQL Structured Query LanguageIDE Integrated Development EnvironmentGUI Graphical User Inter FaceCSS Cascading Style SheetsUML Unified Modeling LanguageXML Extensible Markup languageXSLT Extensible Stylesheet Language
TransformationHTML Hyper text markup languageREGEX Regular ExpressionSDK Software development kitRDBMS Relational database management systemSID System identifier PMON The process monitor SMON The system monitor SGA System global areaRAC Real application clusters
CPU Central processing unitPL/SQL Oracle Corporation's proprietary procedural
extension to SQLPSD Photoshop documentICC International color consortiumGIF Graphics interchange formatDICOM Digital imaging and communications in
medicinePDF Portable document formatUML Unified modeling languageJUnit Unit testing framework for the java
programming languageNUnit Open source unit testing framework for
Microsoft.NeTRTF Rich text format
8/7/2019 mohamedhagrasfinalbook
http://slidepdf.com/reader/full/mohamedhagrasfinalbook 114/114
Egypt Gate Web Development and Web Hosting