Вы находитесь на странице: 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
Egypt Gate Web Development and Web Hosting

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.

2
Egypt Gate Web Development and Web Hosting

Abstract

C
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.

3
Egypt Gate Web Development and Web Hosting

Table of Contents:

Acknologemnt................................................................................................................................2
Abstract..........................................................................................................................................3
List of figures.................................................................................................................................7
List of tables...................................................................................................................................8
Abbreviations.................................................................................................................................9
Chapter 1 Introduction..............................................................................................................10
1.1 Overview................................................................................................................................11
1.2 Definitions:.............................................................................................................................11
1.3 Developments.........................................................................................................................12
1.4 Statistics..................................................................................................................................13
1.5 Famous Classified Ads Web Sites..........................................................................................14
1.5.1 Gumtree...............................................................................................................................14
1.5.2 Ebay Classifieds..................................................................................................................15
1.5.3 Locanto................................................................................................................................17
1.6 Aim of the project...................................................................................................................18
1.7 The main objective of the project...........................................................................................18
1.8 Project planing........................................................................................................................19
Chapter 2 Hypertext Preprocessor and Structured Query Language..................................20
2.1 Hypertext Preprocessor (PHP)...............................................................................................21
2.2 History....................................................................................................................................22
2.3 Usage......................................................................................................................................24
2.4 Security...................................................................................................................................25
2.5 Speed Optimization................................................................................................................26
2.6 Why using PHP not HTML....................................................................................................26
2.7 PHP , ASP comparison...........................................................................................................27
2.8 PHP and database...................................................................................................................29
2.9 Database.................................................................................................................................30
2.10 Structured Query Language (SQL)......................................................................................30
2.10.1 Basic SELECT Query.......................................................................................................30
2.10.2 WHERE Clause.................................................................................................................31
2.10.3ORDER BY Clause............................................................................................................31
2.10.4 Merging Data from Multiple Tables :INNER JOIN.........................................................32
2.10.5 INSERT Statement............................................................................................................33
2.10.6 UPDATE Statement .........................................................................................................33
2.10.7 DELETE Statement...........................................................................................................34
2.11 What is MySQL....................................................................................................................34
2.12 Creat a connection to a MySQL Database...........................................................................34
2.12.1 Closing a connection.........................................................................................................35
Chapter 3 Main SystemDesgin And Architure........................................................................36
3.1 Requirements..........................................................................................................................37
3.1.1 Functional requirements......................................................................................................37
3.1.2 Constitutional requirements................................................................................................37
3.1.2.1 Non registered users rights...............................................................................................37
3.1.2.2 Registered users rights......................................................................................................38

4
Egypt Gate Web Development and Web Hosting

3.1.2.3 System related requirements............................................................................................38


3.2 Use case diagram....................................................................................................................39
3.3 Context Model diagram..........................................................................................................61
Chapter 4 Web & Web Hosting................................................................................................70
4.1 What is the WWW ?...............................................................................................................71
4.1.1 How does the WWW works ?.............................................................................................71
4.1.2 How does a browser fetch a web page ?.............................................................................72
4.1.3 How does a browser display a web page ?..........................................................................72
4.2 What is a web server ?............................................................................................................72
4.3 How to host a web site ?.........................................................................................................74
4.4 What is a domain name ?.......................................................................................................75
4.5 Staic & Dynamic web pages..................................................................................................76
4.6 Server Side Scripting languages.............................................................................................76
Chapter 5 Implementation tools...............................................................................................78
5.1 Dreamweaver CS5..................................................................................................................79
5.1.1 Overview.............................................................................................................................79
5.1.2 Syntax highlighting in Dreamweaver..................................................................................80
5.2 MySQL...................................................................................................................................81
5.2.1 Overview.............................................................................................................................81
5.2.2 Uses.....................................................................................................................................82
5.2.3 Platforms and Interfaces......................................................................................................82
5.2.4 Third Party...........................................................................................................................83
5.3 phpMyAdmin.........................................................................................................................84
5.3.1 Overview.............................................................................................................................84
5.3.2 History.................................................................................................................................84
5.4 Enterprise Archiect.................................................................................................................86
5.4.1 Introduction.........................................................................................................................86
5.4.2.What is Enterprise Archiect................................................................................................86
5.4.3.What differentiates Enterprise Archiect from other UML tools ........................................87
5.4.5 What benefits does Enterprise Archiect provide?...............................................................87
5.4.6 Documentation and reporting in Enterprise Archiect..........................................................88
5.4.6.1 The Rich Text Format (RTF) report writer......................................................................89
5.4.6.2 The HTML report writer..................................................................................................90
5.4.7 Built- in document editor and linked documents................................................................90
5.5 Wamp Server..........................................................................................................................90
5.5.1 Introduction.........................................................................................................................91
5.5.2 Installing..............................................................................................................................91
5.5.3 Functions.............................................................................................................................92
5.5.4 How to start.........................................................................................................................93
Chapter 6 Implementation Details............................................................................................95
6.1 Screen 1..................................................................................................................................96
6.2 Screen 2..................................................................................................................................97
6.3 Screen 3..................................................................................................................................98
6.4 Screen 4..................................................................................................................................99
6.5 Screen 5................................................................................................................................100
6.6 Screen 6................................................................................................................................101

5
Egypt Gate Web Development and Web Hosting

6.7 Screen 7................................................................................................................................102


6.8 Screen 8................................................................................................................................103
6.9 Screen 9................................................................................................................................104
6.10 Screen 10............................................................................................................................105
6.11 Screen 11............................................................................................................................106
6.12 Screen 12............................................................................................................................107
6.13 Screen 13............................................................................................................................108
6.14 Screen 14............................................................................................................................109
Chapter 7 Conclusions and Future Work..............................................................................110
7.1 Conclusions..........................................................................................................................111
7.2 Future Work.........................................................................................................................111
Refrences...................................................................................................................................113

6
Egypt Gate Web Development and Web Hosting

List of figures:

Figure 1: Gumtree logo................................................................................................................14


Figure 1.2: Ebay logo...................................................................................................................15
Figure 1.3: Locanto logo..............................................................................................................17
Figure 2.1: PHP logo....................................................................................................................21
Figure 2.2: PHP usage..................................................................................................................38
Figure 3.1: Use case diagram.......................................................................................................40
Figure 3.2: Use case ....................................................................................................................56
Figure 3.3: Use case ....................................................................................................................58
Figure 3.4: Sequence diagram Use case1.....................................................................................59
Figure 3.5: Context model diagram..............................................................................................62
Figure 4.1 WWW.........................................................................................................................71
Figure 4.2 Opera Browser logo....................................................................................................71
Figure 4.3 Web server example....................................................................................................73
Figure 4.4 Apache server..............................................................................................................75
Figure 4.5 PHP Server Side Language.........................................................................................77
Figure 5.1 Dreamweaver..............................................................................................................79
Figure 5.2 MySQL.......................................................................................................................81
Figure 5.3 phpMyAdmin..............................................................................................................84
Figure 5.4 Enterprise Architect....................................................................................................86
Figure 5.5 Mangement tools.........................................................................................................88
Figure 5.6 Capture tool.................................................................................................................89
Figure 5.7 Wamp Server..............................................................................................................91
Figure 5.8 Wamp Server taskbar..................................................................................................91
Figure 5.9 Wamp Server user interface........................................................................................93
Figure 5.10 Wamp Server taskbar menu......................................................................................94
Figure 6.1 Screen 1:......................................................................................................................96
Figure 6.2 Screen 2:......................................................................................................................97
Figure 6.3 Screen 3.......................................................................................................................98
Figure 6.4: Screen 4......................................................................................................................99
Figure 6.5: Screen 5....................................................................................................................100
Figure 6.6: Screen 6....................................................................................................................101
Figure 6.7: Screen 7....................................................................................................................102
Figure 6.8: Screen 8....................................................................................................................103
Figure 6.9: Screen 9....................................................................................................................104
Figure 6.10: Screen 10................................................................................................................105
Figure 6.11: Screen 11................................................................................................................106
Figure 6.12: Screen 12................................................................................................................107
Figure 6.13: Screen 13................................................................................................................108
Figure 6.14: Screen 14................................................................................................................109

7
Egypt Gate Web Development and Web Hosting

List of tables:

Table 2.1 SQL query keywords....................................................................................................31


Table 3.1 use case.........................................................................................................................41
Table 3.2 use case.........................................................................................................................42
Table 3.3 use case.........................................................................................................................43
Table 3.4 use case.........................................................................................................................44
Table 3.5 use case.........................................................................................................................44
Table 3.6 use case.........................................................................................................................45
Table 3.7 use case.........................................................................................................................46
Table 3.8 use case.........................................................................................................................47
Table 3.9 use case.........................................................................................................................48
Table 3.10 use case.......................................................................................................................48
Table 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.......................................................................................................................55
Table 3.20 use case..................................................................................................................56,57
Table 3.21 use case.......................................................................................................................59
Table 3.22 context model.............................................................................................................61
Table 3.23 context model........................................................................................................64,65
Table 3.24 context model.............................................................................................................69

8
Egypt Gate Web Development and Web Hosting

Abbreviations:

ICT Information and Communication Technology


DRE Direct- Recording Electronic
OOP Object-Oriented Programming
VB.NET Visual Basic. Net
DBMS Database Management System
SQL Structured Query Language
IDE Integrated Development Environment
GUI Graphical User Inter Face
Windows CE Windows Embedded Compact
CSS Cascading Style Sheets
UML Unified Modeling Language
XML Extensible Markup language
XSLT Extensible Stylesheet Language
Transformation
HTML Hyper text markup language
REGEX Regular Expression
SDK Software development kit
RDBMS Relational database management system
SID System identifier
PMON The process monitor
SMON The system monitor
SGA System global area
RAC Real application clusters
CPU Central processing unit
PL/SQL Oracle Corporation's proprietary procedural
extension to SQL
PSD Photoshop document
ICC International color consortium
GIF Graphics interchange format
DICOM Digital imaging and communications in
medicine
PDF Portable document format
UML Unified modeling language
JUnit Unit testing framework for the java
programming language
NUnit Open source unit testing framework for
Microsoft.NeT
RTF Rich text format

9
Egypt Gate Web Development and Web Hosting

Chapter 1

Introduction

Egypt Gate

10
Egypt Gate Web Development and Web Hosting

1.1 Overview:

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.

11
Egypt Gate Web Development and Web Hosting

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.

12
Egypt Gate Web Development and Web Hosting

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.

13
Egypt Gate Web Development and Web Hosting

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 geographical
market. 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 community
classifieds 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 as
a 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 with
accommodation, 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 multiple
cities in a number of countries including the United Kingdom, Poland, France, Canada,
Australia, New Zealand, South Africa, Hong Kong and Dubai.

14
Egypt Gate Web Development and Web Hosting

1.5.2 Ebay Classifieds

Fig 1.2 Ebay logo

eBay Inc. is an American Internet company that manages eBay.com, an online auction
and shopping website in which people and businesses buy and sell a broad variety of goods and
services worldwide. Founded in 1995, eBay is one of the notable success stories of the dot-com
bubble; 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" standard
shopping; shopping by UPC, ISBN, or other kind of SKU (via Half.com); online classified
advertisements (via Kijiji or eBay Classifieds); online event ticket trading (via StubHub); online
money transfers (via PayPal) and other services.

The online auction website was founded as AuctionWeb in San Jose, California, on
September 3, 1995, by French-born Iranian computer programmer Pierre Omidyar as part of a
larger personal site that included, among other things, Omidyar's own tongue-in-cheek tribute to
the 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 trade
Pez 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 first
president of the company in early 1996. In November 1996, eBay entered into its first third-party
licensing deal, with a company called Electronic Travel Auction to use SmartMarket Technology
to sell plane tickets and other travel products. Growth was phenomenal; in January 1997 the site
hosted 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's
consulting firm. Omidyar had tried to register the domain name echobay.com, but found it
already taken by the Echo Bay Mines, a gold mining company, so he shortened it to his second
choice, eBay.com. (Echobay.com is now owned by Echobay Partners, Ltd., a private equity firm
based in Nevis.)

In 1997, the company received $6.7 million in funding from the venture capital firm
Benchmark Capital.

15
Egypt Gate Web Development and Web Hosting

Meg Whitman was hired as eBay President and CEO in March 1998. At the time, the
company had 30 employees half a million users and revenues of $4.7 million in the United
States. eBay went public on September 21, 1998, and both Omidyar and Skoll became instant
billionaires. eBay's target share price of $18 was all but ignored as the price went to $53.50 on
the first day of trading.

As the company expanded product categories beyond collectibles into almost any
saleable 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 years
at eBay, Whitman made the decision to enter politics. On January 23, 2008 the company
announced that Whitman would step down on March 31, 2008 and John Donahoe was selected to
become President and CEO. Whitman remained on the Board of Directors and continued to
advise 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, and
incorporated it into features in its own payment systems, such as PayPal Pay Later and PayPal
Buyer 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 in
Europe. It is subject to regulatory approval and expected to close it in the Q1 2011.

16
Egypt Gate Web Development and Web Hosting

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 is
available in 38 countries worldwide, covering over 1600 cities and 5 major languages and is
considered as competition for Craigslist .

The Locanto Classifieds sites are operated by the German startup company Yalwa located
in Wiesbaden, Germany. Locanto was launched in July 2006 with a local classifieds site for New
York. 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 own
accessible site for the Locanto classifieds service. In addition, Locanto classifieds sites are now
available 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 by
the German start-up company, Yalwa. Klaus P. Gapp, CEO and founder of Yalwa, previously
founded 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.

17
Egypt Gate Web Development and Web Hosting

1.6 Aim of the Project (personal development)

 To give opportunities to the participants to experience a real time environment where


they increase their experience and knowledge on the used tools.
 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.
 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

 To provide a classified advertisements to traders and users to assist them in to trade their
products all over Egypt.
 To provide an indexed view of the advertisements of which will be easier to look for the
thing a user want.
 This site gives the user an electronic free market targeting a large number of customers.
 User can buy products, sell his old car, rent a flat and find a job from the same place.
 This site saves money and time for both traders and users.
 Provide all convenience media to user to browse user-friendly Classifieds website.
 Convert real business to an application.
 Simplify interactions for online consumers.
 Solving traffic crowdedness.
 Greater access to information.
 Simplifying comparison between products or items.
 Giving user wide variety of products.

18
Egypt Gate Web Development and Web Hosting

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 .

19
Egypt Gate Web Development and Web Hosting

Chapter 2

Web Development

And

Structured Query Language

20
Egypt Gate Web Development and Web Hosting

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.

21
Egypt Gate Web Development and Web Hosting

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, public
testing 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.

22
Egypt Gate Web Development and Web Hosting

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

23
Egypt Gate Web Development and Web Hosting

(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.3 Usage:

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 the
complete 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

24
Egypt Gate Web Development and Web Hosting

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.4 Security:

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.

25
Egypt Gate Web Development and Web Hosting

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?

 Through dynamic pages, users can interact (forum, chat).


 Through dynamic pages we can offer value added services (restricted areas, various
services based on user classification…).
 The information is more easily catalogued.
 With a few PHP pages we recall a lot of information.
 Keeping the contents up-to-date does not demand particular technical expertise and can
be managed by anyone.

26
Egypt Gate Web Development and Web Hosting

 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.
 It is very intuitive and easy to learn.
 It is easy to modify by those who intend to personalize the program.
 It is easy to use by the lesser experts among us.

2.7 PHP , ASP comparison:


 Price
PHP is cheaper to implement that ASP.
 Capability
PHP gives us additional capability than if we were to code with ASP.
 “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 a
passion 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.

27
Egypt Gate Web Development and Web Hosting

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.
 PHP is platform-agnostic
 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.

 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

28
Egypt Gate Web Development and Web Hosting

 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.
 PHP is secure
IIS Server is notorious for its security holes.
 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.8 PHP 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.

29
Egypt Gate Web Development and Web Hosting

2.9 Database:

A database is an integrated collection of data. Many different strategies exist for organizing data
in databases to facilitate easy access to and manipulation of the data. A database management
system (DBMS) provides mechanisms for storing and organizing data in a manner that is
consistent with the database’s format. Database management systems enable programmers to
access and store data without worrying about the internal representation of databases.
Today’s most popular database systems are relational databases. Almost universally, relational
databases use a language called Structured Query Language (SQL—pronounced as its individual
letters or as “sequel”) to perform queries (i.e., to request information that satisfies given criteria)
and to manipulate data.
Some popular, enterprise-level relational database systems include Microsoft SQL Server,
Oracle™, Sybase™, DB2™, Informix™ and MySQL™.

2.10 Structured 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

30
Egypt Gate Web Development and Web Hosting

SQL query “selects” information from one or more tables in a database. Such selections are
performed by SELECT queries. The basic format for a SELECT query is:
SELECT * FROM tableName

In this query, the asterisk (*) indicates that all columns from the tableName table of the database
should 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. Required in 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.

Table 2.1: SQL query keywords

2.10. 2 WHERE Clause:

In most cases, users search a database for records that satisfy certain selection criteria. Only
records that match the selection criteria are selected. SQL uses the optional WHERE clause in a
SELECT query to specify the selection criteria for the query. The simplest format for a
SELECT query that includes selection criteria is:
SELECT fieldName1, fieldName2, … FROM tableName WHERE criteria

31
Egypt Gate Web Development and Web Hosting

2.10.3 ORDER BY Clause:

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 tableName ORDER BY field ASC
SELECT fieldName1, fieldName2, … FROM tableName ORDER BY field DESC

The ORDER BY clause also can be used to order records by multiple fields. Such queries are
written in the form:
ORDER BY field1 sortingOrder, field2 sortingOrder, …

2.10.4 Merging Data from Multiple Tables: INNER JOIN:

Database designers often split related data into separate tables to ensure that a database does not
store data redundantly. For example, the Books database has tables Authors and Titles. We use
an AuthorISBN table to provide “links” between authors and their corresponding titles. If we
did not separate this information into individual tables, we would need to include author
information with each entry in the Titles table. This would result in 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 a single set of
data. Referred to as joining the tables, this is accomplished via an INNER JOIN operation in the
SELECT query. An INNER JOIN merges records from two or more tables by testing for
matching values in a field that is common to the tables. The simplest format for an INNER
JOIN clause is:
SELECT fieldName1, fieldName2, …
FROM table1
INNER JOIN table2
ON table1.fieldName = table2.fieldName

32
Egypt Gate Web Development and Web Hosting

2.10.5 INSERT Statement:

The INSERT statement inserts a new record in a table. The simplest form for this statement is:
INSERT INTO tableName ( fieldName1, fieldName2, …, fieldNameN )
VALUES ( value1, value2, …, valueN )
where tableName is the table in which to insert the record. The tableName is followed by a
comma-separated list of field names in parentheses. The list of field names is followed by the
SQL keyword VALUES and a comma-separated list of values in parentheses. The specified
values in this list must match the field names listed after the table name in both order and type
(for example, if fieldName1 is specified as the firstName field, then value1 should be a string in
single quotes representing the first name).

2.10.6 UPDATE Statement:

An UPDATE statement modifies data in a table. The simplest form for an UPDATE statement
is:
UPDATE tableName
SET fieldName1 = value1, fieldName2 = value2, …, fieldNameN = valueN
WHERE criteria
where tableName is the table in which to update a record (or records). The tableName is
followed by keyword SET and a comma-separated list of field name/value pairs written in the
format, fieldName = value. The WHERE clause specifies the criteria used to determine which
record(s) to update.

33
Egypt Gate Web Development and Web Hosting

2.10.7 DELETE Statement:

An SQL DELETE statement removes data from a table. The simplest form for a DELETE
statement is:
DELETE FROM tableName WHERE criteria
where tableName is the table from which to delete a record (or records). The WHERE clause
specifies 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 database
with 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);

34
Egypt Gate Web Development and Web Hosting

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);
?>

35
Egypt Gate Web Development and Web Hosting

Chapter 3

Main System Design

And

Architecture

36
Egypt Gate Web Development and Web Hosting

3.1 Requirements:

3.1.1 Functional requirements:

Egypt Gate web soloution will provide all required services for organizing and
conducting an advert, posting process. It will support all actors involved; namely
administrators, 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 soloution must support the registration of all persons 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:

 Free: Everyone can post his adverts for free.


 Registration: registration gives a user extra features.
 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.1 Non 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 .

37
Egypt Gate Web Development and Web Hosting

3.1.2.2 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. 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.

38
Egypt Gate Web Development and Web Hosting

3.2 Use 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

Type: Package

Status: Proposed. Version . Phase 1.0.

Package: Model

Detail: Created on 02/03/2011. Last modified on 02/03/2011

GUID: {1EAEE549-F419-4428-ACA8-2DC3C311286D}

Use Case Model - (Use Case diagram)

Created By: Basma on 19/11/2005

Last Modified:04/03/2011

Version: 1.0. Locked: False

GUID: {C1DA9883-2065-4263-9C8F-9F5A8CAA330C}

39
Egypt Gate Web Development and Web Hosting

uc Use Case Model

Egypt Gate web solution

sign in

«include»
Register

«include»

sign out

post adv ertisements

«include»
«include»
user
serv ices
electronics

«include» «include» «include»

cars j obs homes

follow to fb, tw itter

Brow se

control the database


play game

«include»
«include»

Monitor the
alter
adv ertisements administrator
delete

Figure: 3.1 use case diagram

administrator
Type: Actor

Status: Proposed. Version 1.0. Phase 1.0.

40
Egypt Gate Web Development and Web Hosting

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {F10AC146-4729-483f-8378-6F1CB944FEDC}

Connections
Connector Source Target Notes

Association Public Public

Unspecified administrator control the database

Association Public Public

Unspecified administrator Monitor the


advertisements

Table 3.1 use case

user
Type: Actor

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {8FBAA2C6-3661-46df-BDD5-278A16645DD2}

41
Egypt Gate Web Development and Web Hosting

Connections
Connector Source Target Notes

Association Public Public

Unspecified user post advertisements

Association Public Public

Unspecified user Register

Association Public Public

Unspecified user Browse

Association Public Public

Unspecified user follow to fb, twitter

Association Public Public

Unspecified user play game

Table 3.2 use case

Browse
Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

42
Egypt Gate Web Development and Web Hosting

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {5258B356-4434-4fe9-A568-E1A0680C4FC3}

Connections
Connector Source Target Notes

Association Public Public

Unspecified user Browse

Table 3.3 use case

Monitor the advertisements


Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {5ABB894C-868E-4251-815D-D07067F681FF}

Connections

43
Egypt Gate Web Development and Web Hosting

Connector Source Target Notes

Association Public Public

Unspecified administrator Monitor the


advertisements

Table 3.4 use case

Register
Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {6D5F7FA1-32E0-45e6-8590-AA126267AE76}

Connections
Connector Source Target Notes

Include Public Public

Source -> Destination Register sign in

Include Public Public

Source -> Destination Register sign out

Association Public Public

Unspecified user Register

Table 3.5 use case

44
Egypt Gate Web Development and Web Hosting

alter
Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {3A10943E-B8E3-418e-BD1C-B03D7A0B0505}

Connections
Connector Source Target Notes

Include Public Public

Source -> Destination control the database alter

Table 3.6 use case

cars
Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {4E4962FD-4671-4a2e-B84F-29EE287A042D}

45
Egypt Gate Web Development and Web Hosting

Connections
Connector Source Target Notes

Include Public Public

Source -> Destination post advertisements cars

Table 3.7 use case

control the database


Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {3350FCE6-1A1F-4b5e-A150-09505A56F385}

46
Egypt Gate Web Development and Web Hosting

Connections

Connector Source Target Notes

Association Public Public

Unspecified administrator control the database

Include Public Public

Source -> Destination control the database alter

Include Public Public

Source -> Destination control the database delete

Table 3.8 use case

delete
Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {33E9180C-0519-40be-B1BD-B6489F3890AD}

Connections

47
Egypt Gate Web Development and Web Hosting

Connector Source Target Notes

Include Public Public

Source -> Destination control the database delete

Table 3.9 use case

electronics
Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {80E443F3-4908-4174-BC54-06F366F348BE}

Connections
Connector Source Target Notes

Include Public Public

Source -> Destination post advertisements electronics

Table 3.10 use case

follow to fb, twitter


Type: UseCase

48
Egypt Gate Web Development and Web Hosting

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {DAC6B7C0-DE28-46bb-8380-37198A6163AF}

Connections
Connector Source Target Notes

Association Public Public

Unspecified user follow to fb, twitter

Table 3.11 use case

homes
Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {8232877D-C623-45db-AB2E-F09719C3C248}

Connections

49
Egypt Gate Web Development and Web Hosting

Connector Source Target Notes

Include Public Public

Source -> Destination post advertisements homes

Table 3.12 use case

jobs
Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {0A6B1248-9EE0-417e-A032-7B8939283A6B}

Connections
Connector Source Target Notes

Include Public Public

Source -> Destination post advertisements jobs

Table 3.13 use case

play game
Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {0C893214-2F56-4e40-BC3A-8307A5964B4A}

Connections
50
Egypt Gate Web Development and Web Hosting

Connector Source Target Notes

Association Public Public

Unspecified user play game

Table 3.14 use case

post advertisements
Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {2F4FF72C-F74F-4514-AB0E-1C5CD91567F9}

Connections
Connector Source Target Notes

Include Public Public

Source -> Destination post advertisements cars

Include Public Public

Source -> Destination post advertisements jobs

Include Public Public

51
Egypt Gate Web Development and Web Hosting

Connector Source Target Notes

Source -> Destination post advertisements homes

Include Public Public

Source -> Destination post advertisements electronics

Association Public Public

Unspecified user post advertisements

Include Public Public

Source -> Destination post advertisements services

Table 3.14 use case

services
Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {3398CA12-4660-49ff-9F0B-27B88478E713}

Connections

52
Egypt Gate Web Development and Web Hosting

Connector Source Target Notes

Include Public Public

Source -> Destination post advertisements services

Table 3.15 use case

sign in
Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {EA2AF234-DE64-45ab-B006-697D8752D449}

Connections
Connector Source Target Notes

Include Public Public

Source -> Destination Register sign in

Table 3.16 use case

sign out
Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.


53
Egypt Gate Web Development and Web Hosting

GUID: {B5FA44E9-1CF9-4a12-A437-94BCC25D1B69}

Connections
Connector Source Target Notes

Include Public Public

Source -> Destination Register sign out

Table 3.17 use case

Object1
Type: Object

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model Keywords:

Detail: Created on 02/03/2011. Last modified on 02/03/2011.

GUID: {E2CBAB1A-A6B2-4e30-BAC1-831D4DAA5951}

Connections
Connector Source Target Notes

Association Public Public

54
Egypt Gate Web Development and Web Hosting

Connector Source Target Notes

Unspecified Egypt Gate web Object1


solution

Table 3.17 use case

Actors
Type: Package

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model

Detail: Created on 19/11/2005. Last modified on 19/11/2005

GUID: {A39DFC2F-0983-47e5-9009-3167C138CAAD}

Actors - (Use Case diagram)

Created By: Basma on 19/11/2005

Last Modified:15/12/2005

Version: 1.0. Locked: False

GUID: {A2D0F299-D951-46fd-97D3-0F4D0209E7CC}

uc Actors

User

Figure:3.2 use case

55
Egypt Gate Web Development and Web Hosting

User
Type: Actor

Status: Proposed. Version 1.0. Phase 1.0.

Package: Actors Keywords:

Detail: Created on 19/11/2005. Last modified on 19/11/2005.

GUID: {8066845D-D5B7-44b7-B884-A29A36025778}

Connections
Connector Source Target Notes

UseCaseLink Public Public

Source -> Destination User Use Case2

UseCaseLink Public Public

Source -> Destination User Use Case1

Sequence Public Public

Source -> Destination User Object1

Table 3.18 use case

56
Egypt Gate Web Development and Web Hosting

Primary Use Cases


Type: Package

Status: Proposed. Version 1.0. Phase 1.0.

Package: Use Case Model

Detail: Created on 19/11/2005. Last modified on 19/11/2005

GUID: {D5374B6E-17B8-4651-9971-3351C9452418}

Primary Use Cases - (Use Case diagram)

Created By: Basma on 19/11/2005

Last Modified:05/01/2006

Version: 1.0. Locked: False

GUID: {D53D8728-0F82-42fd-916D-9E46BFE0433A}

uc Primary Use Cases

System Boundary
The System Boundary shows the
logical interface between users
and the system being described.

Use Case1

User

Use Case2

Figure: 3.3 use case

57
Egypt Gate Web Development and Web Hosting

Use Case1
Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Primary Use Cases Keywords:

Detail: Created on 19/11/2005. Last modified on 19/11/2005.

GUID: {062E0E66-3142-451c-92BA-1BF868556C1C}

Connections
Connector Source Target Notes

UseCaseLink Public Public

Source -> Destination User Use Case1

Table 3.19 use case

58
Egypt Gate Web Development and Web Hosting

sd Use Case1

Object1

User

Fig 3.4 Sequence diagram: Use Case1

Object1
Type: Sequence

Status: Proposed. Version 1.0. Phase 1.0.

Package: Primary Use Cases Keywords:

Detail: Created on 05/01/2006. Last modified on 05/01/2006.

GUID: {C08AC599-073C-48dc-AD87-554B550C0270}

59
Egypt Gate Web Development and Web Hosting

Connections
Connector Source Target Notes

Sequence Public Public

Source -> Destination User Object1

Table 3.20 use case

Use Case2
Type: UseCase

Status: Proposed. Version 1.0. Phase 1.0.

Package: Primary Use Cases Keywords:

Detail: Created on 20/11/2005. Last modified on 20/11/2005.

GUID: {D1A3F7A8-378F-4a4b-9AC3-DCE73DE60CBC}

Connections

Connector Source Target Notes

UseCaseLink Public Public

Source -> Destination User Use Case2

Table 3.21 use case

3.3 Context Model:

60
Egypt Gate Web Development and Web Hosting

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

Type: Package

Status: Proposed. Version 1.0. Phase 1.0.

Package: Model

Detail: Created on 04/03/2011. Last modified on 04/03/2011

GUID: {6433294B-3C84-4eb3-94B6-A2FFDA633A05}

Egypt Gate Web Solution - (Data Flow diagram)

Created By: Basma on 04/03/2011

Last Modified:04/03/2011

Version: 1.0. Locked: False

GUID: {55CA96E7-7C75-44fa-B48A-D871BC60F407}

61
Egypt Gate Web Development and Web Hosting

dfd xyz

personal data

user data
advertisements

messages

advertisements

Egupt Gate Web Solution


user administrator
games

advertisements messages

related sites

messages

Figure: 3.5 Context model diagram

administrator
Type: External

Status: Proposed. Version 1.0. Phase 1.0.

Package: Egypt Gate Web Solution Keywords:

Detail: Created on 04/03/2011. Last modified on 04/03/2011.

GUID: {58B8E520-01BF-4ba5-B625-26119EB8AC6E}

Custom Properties
 isActive = False

62
Egypt Gate Web Development and Web Hosting

Custom Properties

Connections
Connector Source Target Notes

DataFlow messages Public Public

Source -> Destination Egupt Gate Web administrator


Solution

DataFlow Public Public


advertisements
Egupt Gate Web administrator
Source -> Destination Solution

DataFlow user data Public Public

Source -> Destination Egupt Gate Web administrator


Solution

Table 3.22 Context Diagram

user
Type: External

Status: Proposed. Version 1.0. Phase 1.0.

Package: Egypt Gate Web Solution Keywords:

Detail: Created on 04/03/2011. Last modified on 04/03/2011.

63
Egypt Gate Web Development and Web Hosting

GUID: {15CB3D8F-1630-4719-AF4E-147BA9132377}

Custom Properties
 isActive = False

Connections
Connector Source Target Notes

DataFlow messages Public Public

Source -> Destination Egupt Gate Web user


Solution

DataFlow related Public Public


sites
Egupt Gate Web user
Source -> Destination Solution

DataFlow Public Public


advertisements
Egupt Gate Web user
Source -> Destination Solution

DataFlow games Public Public

Source -> Destination Egupt Gate Web user


Solution

64
Egypt Gate Web Development and Web Hosting

Connector Source Target Notes

DataFlow Public Public


advertisements
user Egupt Gate Web
Source -> Destination Solution

DataFlow messages Public Public

Source -> Destination user Egupt Gate Web


Solution

DataFlow personal Public Public


data
user Egupt Gate Web
Source -> Destination Solution

Table 3.23 Context Diagram

Egupt Gate Web Solution


Type: Process

Status: Proposed. Version 1.0. Phase 1.0.

Package: Egypt Gate Web Solution Keywords:

Detail: Created on 04/03/2011. Last modified on 04/03/2011.

GUID: {D7AA5E57-610F-49ce-8D4A-5E8D2A421E2C}

Custom Properties
 isReadOnly = False

65
Egypt Gate Web Development and Web Hosting

Custom Properties
 precondition =
 isSingleExecution = False
 postcondition =
 parameterName =
 _defaultDiagramType = DiagramProfile::DataFlowDiagram

Connections
Connector Source Target Notes

DataFlow messages Public Public

Source -> Destination Egupt Gate Web administrator


Solution

DataFlow Public Public


advertisements
Egupt Gate Web administrator
Source -> Destination Solution

DataFlow user data Public Public

Source -> Destination Egupt Gate Web administrator


Solution

DataFlow messages Public Public

Source -> Destination Egupt Gate Web user


Solution

DataFlow related Public Public


sites

66
Egypt Gate Web Development and Web Hosting

Connector Source Target Notes

Source -> Destination Egupt Gate Web user


Solution

DataFlow Public Public


advertisements
Egupt Gate Web user
Source -> Destination Solution

DataFlow games Public Public

Source -> Destination Egupt Gate Web user


Solution

DataFlow Public Public

Source -> Destination Egupt Gate Web Process1


Solution

DataFlow Public Public


advertisements
user Egupt Gate Web
Source -> Destination Solution

DataFlow messages Public Public

Source -> Destination user Egupt Gate Web


Solution

DataFlow personal Public Public


data
user Egupt Gate Web
Source -> Destination Solution

67
Egypt Gate Web Development and Web Hosting

Table 3.24 Context Diagram

Process1
Type: Process

Status: Proposed. Version 1.0. Phase 1.0.

Package: Egypt Gate Web Solution Keywords:

Detail: Created on 04/03/2011. Last modified on 04/03/2011.

GUID: {291CBC68-1511-420b-A940-14C96EAEDC7D}

Custom Properties
 isReadOnly = False
 precondition =
 isSingleExecution = False
 postcondition =
 parameterName =
 _defaultDiagramType = DiagramProfile::DataFlowDiagram

Connections
Connector Source Target Notes

DataFlow Public Public

Source -> Destination Egupt Gate Web Process1


Solution

68
Egypt Gate Web Development and Web Hosting

Connector Source Target Notes

Table 3.25 Context Diagram

69
Egypt Gate Web Development and Web Hosting

Chapter 4

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.

70
Egypt Gate Web Development and Web Hosting

 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.

 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.

71
Egypt Gate Web Development and Web Hosting

 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.

 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.

72
Egypt Gate Web Development and Web Hosting

Fig 4.3 Web Server example

73
Egypt Gate Web Development and Web Hosting

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 local network.

 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.

74
Egypt Gate Web Development and Web Hosting

Fig 4.4 Apache Servers

4.4 What 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.

75
Egypt Gate Web Development and Web Hosting

4.5 Static & Dynamic web pages:

 STATIC WEB PAGE: A static web page shows the required information to
the viewer, but do not accept any information from the viewer.

 DYNAMIC WEB PAGE: A dynamic web page displays the information to


the viewer and also accepts the information from the user
Railway reservation, Online shopping etc. are examples of dynamic web
page.

4.6 Server-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 to
server-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

76
Egypt Gate Web Development and Web Hosting

 ColdFusion Markup Language

 Java via JavaServer Pages

 JavaScript using Server-side JavaScript

 PHP

 SMX

 Lasso

 WebDNA

Fig 4.5 PHP Server Side Language

77
Egypt Gate Web Development and Web Hosting

Chapter 5

Implementation Tools

78
Egypt Gate Web Development and Web Hosting

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

79
Egypt Gate Web Development and Web Hosting

available (both commercial and free) for most web development tasks from simple rollover
effects to full-featured shopping carts.

Dreamweaver, like other HTML editors, edits files locally then uploads them to the
remote web server using FTP, SFTP, or WebDAV. Dreamweaver CS4 now supports the
Subversion (SVN) version control system.

5.1.2 Syntax highlighting in Dreamweaver

 ActionScript
 Active Server Pages (ASP).
 ASP.NET (no longer supported as of version CS4 -
http://kb2.adobe.com/cps/402/kb402489.html)
 C#
 Cascading Style Sheets (CSS)
 ColdFusion
 EDML
 Extensible HyperText Markup Language (XHTML)
 Extensible Markup Language (XML)
 Extensible Stylesheet Language Transformations (XSLT)
 HyperText Markup Language (HTML)
 Java
 JavaScript
 JavaServer Pages (JSP) (no longer supported as of version CS4 -
http://kb2.adobe.com/cps/402/kb402489.html)
 PHP: Hypertext Preprocessor (PHP)
 Visual Basic (VB)
 Visual Basic Script Edition (VBScript)
 Wireless Markup Language (WML)

It is also possible to add your own language syntax highlighting. In addition, code completion is
available for many of these languages.

80
Egypt Gate Web Development and Web Hosting

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.

81
Egypt Gate Web Development and Web Hosting

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++.

82
Egypt Gate Web Development and Web Hosting

5.2.4 Third-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:

 Adminer – a free MySQL front end written in one PHP script, capable of managing
multiple databases, with many CSS skins available.
 DBEdit – a free front end for MySQL and other databases.
 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.
 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.
 Navicat – a series of proprietary graphical database management applications, developed
for Windows, Macintosh and Linux.
 Other available proprietary MySQL front ends include Aqua Data Studio, dbForge Studio
for MySQL, Epictetus, Oracle SQL Developer, SchemaBank, SQLyog, SQLPro SQL
Client, Toad, Toad Data Modeler
 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.)
 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.

83
Egypt Gate Web Development and Web Hosting

5.3 phpMyAdmin

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.

84
Egypt Gate Web Development and Web Hosting

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.
Photoshop 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)

85
Egypt Gate Web Development and Web Hosting

5.4 Enterprise Architect:

Figure 5.4: Enterprise Architect

5.4.1 Introduction:
This document provides a comprehensive overview of the capabilities of Sparx Systems’
Enterprise Architect 7.1. Each section focuses on a particular aspect of Enterprise Architect,
providing an introduction to the purpose and benefits of each capability.

5.4.2What is Enterprise Architect?

Enterprise Architect is a visual platform for designing and constructing software systems, for
business process modeling, and for more generalized modeling purposes. Enterprise Architect is
based on the latest UML specification. UML defines a visual language that is used to model a
particular domain or system (either proposed or existing). Enterprise Architect is a progressive
tool that covers all aspects of the development cycle, providing full traceability from the initial
design phase through to deployment, maintenance, testing and change control.

86
Egypt Gate Web Development and Web Hosting

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

87
Egypt Gate Web Development and Web Hosting

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
complex information. Often this relates to software development and IT systems design and
deployment, but it can also relate to business analysis and business process modeling. Enterprise
Architect integrates and connects a wide range of structural and behavioral information, helping
to build a coherent and verifiable 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 compliance to standards.

Figure 5.5: Mangement tools

2) Model, Manage and Trace Requirements.


Capture requirements and use full traceability from base requirements to design, build,
deployment and beyond. Use impact analysis to trace from proposed changes to original
requirements. Build the 'right' system.

88
Egypt Gate Web Development and Web Hosting

Figure 5.6: Capture tool

5.4.6 Documentation 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
can modify the RTF formatting directly with RTF Style templates to alter the look and feel of
generated output. Using Microsoft® Word® you can further enhance the output by connecting
and interweaving 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 and
selecting 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 of
documentation (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 by
creating ‘virtual’ documents.

89
Egypt Gate Web Development and Web Hosting

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.2 The HTML report writer:


Enterprise Architect enables you to export an entire model or a single branch of the model to
HTML web pages. The HTML report provides an easy-to-use and highly detailed model tree. In
addition, hyperlinked elements make browsing to related information very easy. The HTML
documentation is based on user-customizable HTML templates, so you can tailor the generated
web-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.

90
Egypt Gate Web Development and Web Hosting

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

91
Egypt Gate Web Development and Web Hosting

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

5.5.4 How to start

92
Egypt Gate Web Development and Web Hosting

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

93
Egypt Gate Web Development and Web Hosting

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.

94
Egypt Gate Web Development and Web Hosting

Chapter 6

Implementation Details

95
Egypt Gate Web Development and Web Hosting

6.1 Screen 1:

Figure 6.1: Creating site

96
Egypt Gate Web Development and Web Hosting

6.2 Screen 2:

Figure 6.2: Creating site

97
Egypt Gate Web Development and Web Hosting

6.3 Screen 3:

Figure 6.3: Adding testing server

98
Egypt Gate Web Development and Web Hosting

5.4 Screen 4:

Figure 5.4: Testing server information

99
Egypt Gate Web Development and Web Hosting

6.5 Screen 5:

Figure 6.5: Testing server type

100
Egypt Gate Web Development and Web Hosting

6.6 Screen 6:

Figure 6.6: Testing server added

101
Egypt Gate Web Development and Web Hosting

6.7 Screen 7:

Figure 6.7: Creating MySQL connection

102
Egypt Gate Web Development and Web Hosting

6.8 Screen 8:

Figure 6.8: MySQL connection details

103
Egypt Gate Web Development and Web Hosting

6.9 Screen 9:

Figure 6.9: user authentication

104
Egypt Gate Web Development and Web Hosting

6.10 Screen 10:

Figure 6.10: Adding user authentication(log In,Out and Restrict Acces to page)

105
Egypt Gate Web Development and Web Hosting

6.11 Screen 11:

Figure 6.11: Log in user info

106
Egypt Gate Web Development and Web Hosting

6.12 Screen 12:

Figure 6.12: Log out user

107
Egypt Gate Web Development and Web Hosting

6.13 Screen 13:

Figure 6.13: Insert repeat region

108
Egypt Gate Web Development and Web Hosting

6.14 Screen 14:

Figure 6.14: Repat region

109
Egypt Gate Web Development and Web Hosting

Chapter 7

Conclusions and Future work

110
Egypt Gate Web Development and Web Hosting

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 least
meet 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 serve
any number of users connected to the system in concurrency sessions with reasonable processing
time for each user.

There is an inverse relationship between security and practicality. i.e. systems that are highly
secured 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. They
use 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

 New operating systems are supposed to detect users' behavior in different fields. These
operating systems should enable browsers to transfer anonymous information about the
users' behavior to smart Web site, allowing these Web sites to serve their users' better.
 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.

111
Egypt Gate Web Development and Web Hosting

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.

112
Egypt Gate Web Development and Web Hosting

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

113
Egypt Gate Web Development and Web Hosting

Abbreviations:

ICT Information and Communication Technology


DRE Direct- Recording Electronic
OOP Object-Oriented Programming
VB.NET Visual Basic. Net
DBMS Database Management System
SQL Structured Query Language
IDE Integrated Development Environment
GUI Graphical User Inter Face
CSS Cascading Style Sheets
UML Unified Modeling Language
XML Extensible Markup language
XSLT Extensible Stylesheet Language
Transformation
HTML Hyper text markup language
REGEX Regular Expression
SDK Software development kit
RDBMS Relational database management system
SID System identifier
PMON The process monitor
SMON The system monitor
SGA System global area
RAC Real application clusters
CPU Central processing unit
PL/SQL Oracle Corporation's proprietary procedural
extension to SQL
PSD Photoshop document
ICC International color consortium
GIF Graphics interchange format
DICOM Digital imaging and communications in
medicine
PDF Portable document format
UML Unified modeling language
JUnit Unit testing framework for the java
programming language
NUnit Open source unit testing framework for
Microsoft.NeT
RTF Rich text format

114

Вам также может понравиться