Professional Documents
Culture Documents
Version <1.0>
[Note: The following template is provided for use with the Rational Unified Process. Text enclosed in
square brackets and displayed in blue italics (style=InfoBlue) is included to provide guidance to the author
and should be deleted before publishing the document. A paragraph entered following this style will
automatically be set to normal (style=Body Text).]
[To customize automatic fields in Microsoft Word (which display a gray background when selected), select
File>Properties and replace the Title, Subject and Company fields with the appropriate information for
this document. After closing the dialog, automatic fields may be updated throughout the document by
selecting Edit>Select All (or Ctrl-A) and pressing F9, or simply click on the field and press F9. This must
be done separately for Headers and Footers. Alt-F9 will toggle between displaying the field names and the
field contents. See Word help for more information on working with fields.]
ALL B2B Version: 1.0
Software Architecture Document Date: 03/06/2009
Table of Contents
1. Introduction 5
1.1 Purpose 5
1.2 Scope 5
1.3 Definitions, Acronyms, and Abbreviations 5
1.4 References 6
1.5 Overview 6
2. Architectural Representation 7
4. Use-Case View 8
5. Logical View 8
5.1 Overview and Architecturally Significant Design Packages 8
5.2 Use-Case Realizations 9
6. Process View 12
7. Deployment View 12
8. Implementation View 13
8.1 Overview 13
11. Quality 15
16. Implementation 24
17. References 27
1.1 Purpose
This document provides a comprehensive architectural overview of the system, using a number of different
architectural views to depict different aspects of the system. It is intended to capture and convey the
significant architectural decisions which have been made on the system.
The goal of this Project is to improve the business of an enterprise. In order to get this target, we will use
information from Internet and private data provided from Internet in the most popular webpage. Then we
will show in a friendly way all of this information.
[This section defines the role or purpose of the Software Architecture Document, in the overall project
documentation, and briefly describes the structure of the document. The specific audiences for the
document is identified, with an indication of how they are expected to use the document.]
1.2 Scope
[A brief description of what the Software Architecture Document applies to; what is affected or influenced
by this document.]
The scope of this project is IT (Information technology), the main goal of this project is to give information
to company that can be used for improve their business. This information is provided from internet,
searchers, news portal, e-business WebPages… and private data that are provided from the company. After
that, when you have all of that information, you can mix them and show that to the last user in a friendly
way, so this user can use it for its benefits.
Due to this goal, the use of internet will be crucial for getting results. Some web pages offer an API
(Application Programming Interface) that let us connect to their private data and use them for our benefits.
Moreover, we can use Web Services to retrieve more information from internet, and then we will show all
the information we retrieve from internet
B2B: business-to-business (B2B) describes commerce transactions between businesses, such as between a
manufacturer and a wholesaler, or between a wholesaler and a retailer. Contrasting terms are business-to-
consumer (B2C) and business-to-government (B2G).
XAMPP: is a free and open source cross-platform web server package, consisting mainly of the Apache
HTTP Server, MySQL database, and interpreters for scripts written in the PHP and Perl programming
languages.
1.4 References
During this project some documents have help me to develop the final solution. Somehow, I have used
them like tutorials, like manuals…
Then, this is the list of references:
• Google API: I used Google API for the searchers on the internet and for the location of the
company. We can see all the documentation in this web
http://code.google.com/apis/ajaxsearch/documentation/
• PHP API: I have been using the PHP API in the official website for programming
http://www.php.net/manual/es/
• MySQL references: I used a document from Internet of the official website of MySQL, it is
http://dev.mysql.com/doc/
• APACHE documentation: In order to configure the APACHE web server I used also the official
documentation, http://httpd.apache.org/docs/2.2/
• CSS: I have been using some web pages for helping, but the main was
http://es.html.net/tutorials/css/
• XAMPP: In order to use this package I used again the official website where you can follow a
simple guide to install XAMPP, I followed the official documentation,
http://www.apachefriends.org/en/xampp-windows.html
1.5 Overview
[This subsection describes what the rest of the Software Architecture Document contains and explains
how the Software Architecture Document is organized.]
The rest of the Software Architecture Document contains all the information related with the project
development, characteristics, architecture…
This software is made of several technologies. They are PHP and MySQL and they are working in an
APACHE web server. Therefore, we need XAMPP because it provides us, in an easy way, all of those
technologies in a package and also programs to manage them.
In general, the technologies I’ve used are the next:
• PHP:(see point 1.3).
• MySQL: is a relational database management system.
• APACHE: is a web server.
• HTML: an acronym for HyperText Markup Language, is the predominant markup language for
web pages.
• JavaScript: is a scripting language used to enable programmatic access to objects within other
applications. It is primarily used in the form of client-side JavaScript for the development of
dynamic websites.
• CSS: is a style sheet language used to describe the presentation (that is, the look and formatting)
of a document written in a markup language. Its most common application is to style web pages
written in HTML and XHTML, but the language can be applied to any kind of XML document,
including SVG and XUL.
• WebServices: is defined by the W3C as "a software system designed to support interoperable
machine-to-machine interaction over a network.
2. Architectural Representation
[This section describes what software architecture is for the current system, and how it is represented. Of
the Use-Case, Logical, Process, Deployment, and Implementation Views, it enumerates the views that are
necessary, and for each view, explains what types of model elements it contains.]
I use UML as the software architecture for the current system. It is represented by UML diagrams,
specifically 4+1 View Model.
• Use-case view: I have used it because thanks to its annotation we can represent the diagrams in an
easy way. It contains actors, represented by a person and use case, represented by circles.
• Logical view: The logical view is represented by class diagram in UML and it has classes and
arrows that represent the relationships between them.
• Deployment view: In this view we have use the UML Deployment Diagram representing the
server, the technologies and so on.
• Implementation view: It is divided in layers, one layer for PHP and Web, and the other for the
database and the Google API.
3.1 Constraints
There are several things that have some impact in the software. The own features of the system made that
we need, as one of the main characteristics, Internet, because our system is based on B2B WebPages on the
Internet. Then, in order to use our system it is always required a computer with an internet connection,
which makes it a big constraint because some companies block internet to their workers.
Other of the main constraints is that we will be always a Google dependent, because we use its API, and
Google is a private company, so if one day Google disappear our software, theoretically, will not work,
anyway, we can trust in this company because it is one the most important companies in the world.
Moreover, the system require the Google API and it use to change in the time, however it is not necessary
to be worried because the new API always support the older API.
Other constraint is that we use B2B WebPages and if they change or disappear as well, our software will be
affected.
On the other hand, we have other constraint because the technology we are using. Always it will be
required a web server that support PHP.
4. Use-Case View
[This section lists use cases or scenarios from the use-case model if they represent some significant, central
functionality of the final system, or if they have a large architectural coverage—they exercise many
architectural elements or if they stress or illustrate a specific, delicate point of the architecture.]
I’ve used the UML methodology, specifically use cases. I have extracted some artifacts. First of all I’ve
defined the actors of the system. For my solution I have one actor.
• User: ser: This user can read and update information provided by the system, for example, he can
update private data of the company, public data provided from internet, the geography location,
tags…. Specifically he can do these things:
o Update/see company data: this user can update the private data of a company.
o Update/see products: this user can update the information of the products of a company.
o See geography location: the user can see where the location of the company is.
o Update company tags: the user can update de tags related with a company.
o Update products tags: the user can update de tags related with the company products.
o Navigate to the original B2B webs: the user can navigate to the search results.
Figure 1
5. Logical View
5.1 Overview and Architecturally Significant Design Packages
[This section describes the architecturally significant parts of the design model, such as its decomposition
into subsystems and packages. And for each significant package, its decomposition into classes and class
utilities. You should introduce architecturally significant classes and describe their responsibilities, as well
as a few very important relationships, operations, and attributes.]
In order to represent the system we use 3 packages, one with the PHP files, and other with a CSS file and
the last one with a JavaScript file. The first one has the next files:
• db_connection.php: connection to the database.
• list_companies.php: list of all the companies of the database.
• company.php: it shows us the company private data of a company.
Figure 2
Figure 3.
In the next diagram we can see how to see the products of a company. In this case, we select the company,
then we make click on the products and then we can see all of them. The next figure shows us all the
process.
Figure 4.
Continuing with the sequence diagrams, in the next we can see how to retrieve all the information of a tag.
In this case we select the company and then the tags, where we can see all the products and companies
related with the tag mentioned before.
Figure 5.
In the last sequence diagram we can see how to get the details of a product. More or less it is always the
same process, but in this case regarding the details of a product, where we can see its details, both public
and private, and also we can update this information, obviously not the public.
Figure 6.
On the other hand the system has 8 main processes. They do all of the main functionality of the system,
thanks to them we can see the system results. Following there is a short description and you can see the
structure in the next figure:
Companies list: this process shows us all the companies of the system.
Company private information: this process, after the selection of a company in the Companies list
process, shows us all the private data of a company.
Company public information: this process, after the selection of a company in the Companies list
process, shows us all the public data of a company by connecting to the Google API.
See all the products of a tag: in this process we can see all the products related with a tag, no matter the
company.
Update company/tags: this process update the private information of a company, both tags and other data.
Figure 7
6. Process View
[This section describes the system's decomposition into lightweight processes (single threads of control)
and heavyweight processes (groupings of lightweight processes). Organize the section by groups of
processes that communicate or interact. Describe the main modes of communication between processes,
such as message passing, interrupts, and rendezvous.]
The system’s decomposition is in lightweight processes and heavyweight processes, but in general this
processes are handle by APACHE, because this Web Server is able to manage the requests and answers.
Then, when someone tries to get into our system it becomes in a lightweight threat and then, being an
independent threat it can be use the features of our system.
On the other hand we have a heavyweight process, this is the APACHE process, and it executes all the
heavy stuffs.
Other heavyweight process is the MySQL process, that execute all the stuffs regarding the database and the
requests and aswers.
7. Deployment View
[This section describes one or more physical network (hardware) configurations on which the software is
deployed and run. It is a view of the Deployment Model. At a minimum for each configuration it should
indicate the physical nodes (computers, CPUs) that execute the software and their interconnections (bus,
LAN, point-to-point, and so on.) Also include a mapping of the processes of the Process View onto the
physical nodes.]
In the next schema we can see the physical network configuration on which the software is deployed and
run. The schema is a view of the deployment model.
The physical nodes are the computer which send request to the server and this one is working in a computer
with a Linux or Windows O.S., no matter which O.S., but it is important to use XAMPP because is it the
base of our system. For the prototype it is no required to have a server with big capabilities.
In general, there is a server with XAMPP running MySQL, PHP and APACHE where is the entire program
and all the processes. The computers on the Internet ask for information to the website.
For running our project we always will need a web browser.
Figure 8
8. Implementation View
[This section describes the overall structure of the implementation model, the decomposition of the
software into layers and subsystems in the implementation model, and any architecturally significant
components.]
8.1 Overview
[This subsection names and defines the various layers and their contents, the rules that govern the
inclusion to a given layer, and the boundaries between layers. Include a component diagram that shows the
relations between layers. ]
The system finally is made of two layers. The first one has the web layer and the PHP layer. Here is where
all the programmatic functions are, and also the design of the system.
The other layer is with the servers, both MySQL and APACHE. And also this layer has the Google API, it
is where you can connect to the Google Database and use other functions.
Figure 9.
Figure 10.
10. Size and Performance
[A description of the major dimensioning characteristics of the software that impact the architecture, as
well as the target performance constraints.]
In the case of the major dimensioning characteristics of the software, the architecture maybe would be
collapsed because it can’t afford all the requests, so in this case and if this situation keeps on time we
should change the architecture, studying which is better.
11. Quality
[A description of how the software architecture contributes to all capabilities (other than functionality) of
the system: extensibility, reliability, portability, and so on. If these characteristics have special
significance, such as safety, security or privacy implications, they must be clearly delineated.]
The quality of software is something very important for a program. In the engineering software process is
necessary to have quality because then we can update, modify, etc. this software easily, as well as having
understandable software. In this case, we have a packet called XAMPP that let us having the best
integration between these 3 technologies: PHP, APACHE and MySQL. Regarding this, we know that the
chosen architecture is quite good, because they are closely related with the solution of the problem.
A part of this, the XAMPP packet has strict policies of safety, privacy and security because it is a packet
with a lot of experience and years and also you can manage the security by yourself thanks to the packet.
Reputation
The best to have the description of this dimension is to reference Biao Yu and Yan Liu [10] document:
“This dimension used for depict the enterprise is the most important of all. Reputation means a lot,
including integrity, reliability, and sustainability. Under normal circumstances, if we want to know that
kind of information, it may take us too much time to find out. And sometimes, we cannot get the real data. It
depends on the search engine we used, the websites we visited, and the trust model we established.
Renate Eisentraut [8] mentioned “Reputation Indicator”. Some recent work on trust-building in the net
follows this strategy. And reputation indicators are used in several online systems. The idea behind them is
to collect ratings about potential partners from other users who already have worked with them and to
calculate a reputation indicator therefrom. This indicator then is made accessible for potential partners to
help them evaluate each other. Examples are online auction platforms like ebay or comment platforms like
dooyoo.
Renate Eisentraut [8] also describes the weakness of a reputation indicator. That is it merely represents the
aggregation of anonymous ratings, whereas valid information about the identity, competence, and
trustworthiness of the raters as well as about the context and background of the ratings is lacking.”
For the reputation, we used several B2B websites, as we think are the best and famous ones, and also we
used the normal Google search for the company in particular:
www.globalsources.com
http://www.alibaba.com/
http://dir.yahoo.com/Regional/Countries/Germany/Business_and_Economy/Business_to_Business/
http://www.tradeprince.com/
http://www.exportnation.com/trade/
Geographic Information
Referencing again Biao Yu and Yan Liu [10] document, because this is the best way to describe this
dimension: “In order to do a successful business, knowing exactly where is your partner company is quite
important. Not only because the geographical conditions, transportation conditions and the work
environment, but also the public facilities and enterprise development strategy”, because of this we chose
to sow the company location in two ways. One is with the exact address of the company and the other is
with the name of the company. Supporting this idea we can read the following quote of Biao Yu and Yan
Liu [10] document:
“Usually, in the exclusive data, there’s always a company’s address. It cannot give us more information
than only several words. Sometimes, we could not find the company according to that address. Therefore,
we should use other data like company name binding that address to search for the company.
Some companies have one or more subsidiaries. Choosing the proper subsidiary may minimize the
spending of both sides and make the business more flexible.”
Type
Type is very important in the intelligence of a company because it let you to know which fields are related
to your company, as Biao Yu and Yan Liu [10] say in their document: “For a company, type is a vital
property. It includes domain knowledge and product information”, so the best way to represent type is with
tagging, according with the next principle also of Biao Yu and Yan Liu: “Tagging has recently acquired
popularity as a lightweight and flexible approach to classifying information. Tagging enables individuals
to use whatever terms they think are appropriate to describe or help them recall a resource without the
burden of selecting a category from a known taxonomy. It has been applied in a variety of applications
ranging from desktop applications for organizing photos (F-spot) to web email systems (Gmail). Tagging
becomes most compelling when it is used in a collaborative environment, and tags from different people
can be aggregated and combined”
Introduction
You can choose an enterprise among the list of these ones and see the information of that.
Input
Introduction
You can choose a product among the list of these ones and see the information of that.
Input
You select a product in the list of enterprises.
Process
The system will run to show the features of the product.
Output
We will see the features of the product, both public and private mixed.
After we download we will have an .exe file, then we only have to install like all the documents in
Windows, we have to have permissions of installing.
Figure 11.
During the installation we have to say to all the things “yes”. Then we will have a main part installed,
APACHE, PHP and MySQL with programs for handle them.
If all have been ok, we will have a program like next figure:
Figure 12.
Figure 13.
• Then in phpMyAdmin you should import the file project.sql pushing on the right top on import:
Figure 14.
• Then select the file and GO.
So, if there was no problem we have the system installed and we can work with it. In order to run the
program, we have to open again a web browser and type: http://localhost/proyecto/list_companies.php
After all, we will see a screen like that:
Figure 15.
This user manual will guide us using the features of the program.
First of all, have to open again a web browser and type: http://localhost/proyecto/list_companies.php
After all, we will see a screen like that:
Figure 16.
Then we select for example the company BMW and we see the next screen:
Figure 17.
See products
If we click in number 3 we can see the products of the company with its tags, like the next screen:
Figure 18.
See products details
In this case we can see the details of a product, both public and private, and we can update the private
information.:
Figure 19.
See tags
If we click in number 4 we can see the next screen. Here we have all the products related with the tag
selected.
Figure 20.
16. Implementation
The implementation of the system has some relevant aspects we should mention because we have used
some API on the internet that are not very common to use in an application. For these reason, firstly we
will comment normal source code and after the specific code of Google API.
16.1 PHP Code
We have used PHP code for almost all the programmatic aspects of the system. Next, there are some
examples.
For connecting to the database we use the file db_connection.php, where we select the database and the
user:
function connection()
{
$conexion = mysql_connect("localhost", "root", "");
mysql_select_db("project", $conexion) OR die ("pepe");
return $conexion;
}
In the file list_companies.php we list all the companies and we use the next code for connecting to the
database and get the private data:
include("includes/db_connection.php");
$conexion = connection();
$queEmp = "SELECT * FROM companies";
$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
$totEmp = mysql_num_rows($resEmp);
In the next code we can see how we can get the rows of the data of the company, using the PHP methods
mysql_fetch_assoc, and others:
In the file compny.php, we can update the tags, and also we can update all the private information. Below
we have the code, where we use several tables of the database and SQL sentences:
$rowEmp = mysql_fetch_assoc($resEmp);
$id_tag = $rowEmp['id'];
$insert_tag = "INSERT INTO tags_company (id_company, id_tag)VALUES ('$id','$id_tag')";
$resEmp = mysql_query($insert_tag, $conexion) or die(mysql_error());
Now, in the next code we can see how the list of all the products with the same tag is made of. We also use
several tables:
$sql = "SELECT DISTINCT * FROM tag t, tags_products tp, companies c, products p WHERE
t.id=tp.id_tag AND t.name='".$tag."' AND c.id=tp.id_company AND tp.id_product=p.id ORDER
BY c.CompanyName;";
16.2 Style
We have been using during the project CSS style sheets and it let us to divide the web page like we want.
We have a header, a middle part with right and left part, and also a footer using div. The next code is the
basic structure of the webpage. Thanks to some properties of CSS we could use this structure. The main
properties are float: right; and display:block;.
#right {
width: 315px;
float: right;
display:block;
margin-top: 10px;
}
#left {
width: 350px;
float:left;
display: block;
margin-left: 20px;
display: inline;
}
<body>
<div id="wrap">
<div id="top">
</div>
<div id="content">
<div id="left">
</div>
<div id="right">
</div>
<div id="clear">
</div>
</div>
<div id=”footer”>
</div>
</div>
As we said before, we have used Google API for getting the public data of the companies. This is one of
the most interesting things of the project because we use a external API to connect to other webpage and
have the results in our webpage, so it is very nice.
Some of the code is below. In the first one we get the information for the map and the second one in the
code for getting the information of the web pages.
var options = {
zoomControl : GSmapSearchControl.ZOOM_CONTROL_ENABLE_ALL,
title : companyName,
url : "http://www.google.com/corporate/index.html",
idleMapZoom : GSmapSearchControl.ACTIVE_MAP_ZOOM-5,
activeMapZoom : GSmapSearchControl.ACTIVE_MAP_ZOOM-5,
hotspots : hotspotsList
}
new GSmapSearchControl(
document.getElementById("mapsearch"),
companyAddress,
options
function onLoad()
{
var siteSearch1 = new google.search.WebSearch();
siteSearch1.setUserDefinedLabel("Alibaba.com");
siteSearch1.setSiteRestriction("alibaba.com");
var siteSearch2 = new google.search.WebSearch();
siteSearch2.setUserDefinedLabel("globalsources.com");
siteSearch2.setSiteRestriction("globalsources.com");
…
searchControl = new google.search.SearchControl();
searchControl.addSearcher(siteSearch1);
searchControl.addSearcher(siteSearch2);
searchControl.addSearcher(new google.search.WebSearch());
17. References
[1] ThuyUyen H. Nguyen, Joseph S. Sherif, and Michael Newby, “Strategies for successful CRM implementation,” Information
Management & Computer Security Journal, vol.15, no.02,2007.
[2] Assion Lawson-Body, Abdou Illia, and Jeanne Jimenez, “Impact of data integration on CRM in the electronic commerce of SMEs,”
Academy of Information and Management Sciences Journal, 2006.
[3] Li, F. & H. Williams, “Interfirm collaboration through interfirm networks,” Information Systems Journal, 9, 1999, pp.103-115.
[4] Sathyan, J and Shenoy, K, “Realizing Unified Service Experience with SaaS on SOA,” Communication Systems Software and
Middleware and Workshops, 2008.
[5] Yan Liu, Qin Liu, Mingguang Zhuang and Qingling Wang, “An event-driven approach for E-Services System design,” 2008 4th
International Conference on Wireless Communications, Networking and Mobile Computing (WiCOM), 2008.
[6] Dan Ma, “The Business Model of “Software-As-A-Service”,” scc, IEEE International Conference on Services Computing (SCC
2007), pp. 701-702, 2007.
[7] J. Hagel III, Out of the Box, “Strategies for Achieving Profits Today and Growth Tomorrow through Web Services,” Harvard
Business School Press, Boston, MA, p. 15, 2002.
[8] Renate Eisentraut, Michael Koch, and Kathrin Möslein, “Building trust and reputation in communities and virtual enterprises,”
Proceedings of Americas Conference on Information Systems, 2001.
[9] Stephen Farrell, Tessa Lau, “Fringe Contacts: People-Tagging for the Enterprise,” IBM Research Report, computer science, June
30,2006.
[10] Biao Yu, Yan Liu, “A Service-Oriented CRM For SMEs Based On The Enterprise Level Customer”, School of Software Engineering,
Tongji University, Shanghai 200092, China