Assignment 2 Daw

download Assignment 2 Daw

of 7

Transcript of Assignment 2 Daw

  • 8/3/2019 Assignment 2 Daw

    1/7

    Abstract:

    In this report we will talk about the steps were taken to build our web site shulaptops. Wewill also talk about the methodology used to carry out the work and give a critic evaluation of the

    alternatives we could have been used with a comparison between them. Moreover by the end this

    report we give a critic evaluation of the part XML played in developing the web applications.

    Business needs:

    The business is basically a website targeting students at Sheffield Hallam University tobuy and sell their used laptops. As stated in the MoSCoW list development framework we had

    the guide line, a to do list of what we will need to accomplish on this website. It combines thesystem and business needs. Business needs is when talking about Kite level which means weare more concerned about the business than the implementation tools. Seemingly in the business

    world not all the employees or the clients will be technical, so we need to understand the

    business needs from a business level point of view. In order to do this we have visited similar

    websites with the same business goal and with even more features like ebay, andAmazon.From what we interpreted the main business needs are making a home page with a

    way to attract non registered users to register, by showing the 10 bestselling machines. The next

    step is to build a catalogue that holds the products for sale or the ones that have been sold andeach with the product specifications, price etc. In order to see this catalogue page the user should

    be registered. Also the user will hold the products he wants to buy through a shopping cart,

    which is similar to many other ecommerce websites. Also users will be able to negotiate the priceand rate the sellers. These are the main business needs in shulaptops website.

    Design decisions:

    In order to accomplish the required business needs we need to think of a methodology

    that organizes the tasks and setup the milestones. We could have used some of the well-knownmethodologies, but we believe that we can make our own methodology, as most of these

    methodologies are theoretical. We have created what we call the tool box methodology,

    regarding the shortage of time and the other factors. By this methodology we mean in brief

    dividing the tasks into main tasks that can be reused in all the parts of the projectimplementation. Also to in reach the outcome of this module we have decided to use a server

    side language that we havent used before called ColdFusion. At the beginning it waschallenging, but the key strength of the tool box methodology is that you dont have to learnthe whole implementation tool. You only need to learn the parts needed for your project. Using

    this methodology we got all the tools ready and then we built the prototype and we even got time

    to build the whole system, and deliver on time. This doesnt mean that our methodology willalways be true. The right thing to do is not to stick with one method even during the same

    project. You can always change even half way through. The best way is to have a set of goals you

    want to accomplish in a certain time. Our set of goals was the MoSCoW list development

    framework and to go beyond this list we looked at the famous websites doing the samebusiness.

  • 8/3/2019 Assignment 2 Daw

    2/7

    Assignment 2 Database and the Web

    Mohamed Hagras

    Figure the tool box method specialized for shulaptops

    Tools used:

    To build a database driven website you need three main things: Client side language,

    server side language and database query language. For the client side language we usedXHTML, CSS and java script. XHTML Extensible Hypertext Mark-up Language which

    combines the well-organized features of XMLExtensible Mark-up Language and the web

    mark-up feature of HTML Hypertext Mark-up Language. This approach was driven to make

    the web documents well-formed in order to refine the use of it. We didnt use the HTML 5

    because it is still a new technology and not stable as many of the features are not yet supportedby the commonly used internet browsers. XHTML is used for contents but not for the format,

    we used CSS Cascading Style Sheets for the format and the look of the contents. The brilliantthing about CSS is the reuse, as you can use the same style sheet file for 100 XHTML documentsand if you want to amend something you only do it once. We also used java script in order to

    enhance the user interface experience because it gives dynamic contents and enables

    programmatic access to computational objects within a host environment. We used it to validate

    forms and create tabs within the same page.

    Comparison between server side languages:

    For the Server side programming language we used ColdFusion mentioned earlier that we

    aimed to learn a new language, as we learn about PHP during the database and web module and

    we learn about JSP during the web application design and modelling module. We foundColdFusion easy to learn and full of features. ColdFusion was designed to make an easy

    connection between HTML and a database in the beginning of it. ColdFusion is a tag basedlanguage, as you write the attributes inside the tag similar to the way we write HTML.

    ColdFusion can also be scripting language. One of the reasons we used ColdFusion is the manyfeatures this language has. These features are:

    1. Easy connection with database through data source which allows the user to connect to

    more than 10 different types of databases without carring about the database driver (likeJSP Java Server Page).

    2. The ability to manage the cache in both the client and server sides.

    http://en.wikipedia.org/wiki/Hypertexthttp://en.wikipedia.org/wiki/Computer_programminghttp://en.wikipedia.org/wiki/Computer_programminghttp://en.wikipedia.org/wiki/Hypertext
  • 8/3/2019 Assignment 2 Daw

    3/7

    Assignment 2 Database and the Web

    Mohamed Hagras

    3. Can do the same job as the java script.

    4. Can export the HTML page into PDF.

    5. Can retrieve data from many enterprise systems such asActive Directory, LDAP, SMTP,POP, HTTP,FTP, Microsoft Exchange Serverand data formats such as RSS and Atom.

    6. Can index and search files based on Verity K2

    7. User friendly GUI administration.8. Server, application, client, session, and requestscopes .

    9. Can parse XML,querying the path, validation andtransformation (XSLT) .

    10. Can Cluster the server.11. Can schedule the tasks.

    12. Can export graphs and reports.

    13. Can generate Capatcha.

    14. Ready libraries for user authentication and email.With this features ColdFusion can compete with the other server side languages. But of course

    we experienced some disadvantages of ColdFusion. For example working with variables is very

    hard, as you have to make a condition every time before you define this variable asking if this

    variable exists or not.There are more than 10 server side commonly used languages. We will talk about another

    two alternative languages which are: WebDNA and OpenEdge .Apparently they are not asfamous and PHP or ASP but again to in reach the outcome of this module we find a massive

    desire to learn new and different technologies.

    WebDNA is a server side scripting language with an optional embedded database and it

    can also connect with other databases through ODBC open database connection interface.Thesyntax of WebDNA is made of square brackets[ and English language. It is very straight

    forward and easy language, for example to display the date, we just type[date]. Also it is very

    easy for ecommerce websites, as it has a ready library for shopping cart.From what weexperienced from the training recorses of this language, it would take half of the time to build

    shulaptops using this language. As WebDNA has ready libraries for user authentication, shopping

    cart, email, working with form variables and search from database.Like any other languagesthere are also some disadvantages of using WebDNA like: First thing when we wanted to learn

    about this language is the online learning materials and tutorials available online is very few and

    from almost one source which is the company of WebDNA .Second is the administrationenvironment which is somehow not easy to deal with. Also the number of the hosting services

    for WebDNA is very few.

    Another interesting to learn about ,server side language is OpenEdge. Which is a business

    development tool; it is a fourth generation programming language 4GL which uses English likesyntax to programme. Fourth generation programing is a different concept than what we used

    to .It is a business oriented language and more business level than the 3GL which we use. It can

    solve more problems and cases. It is designed to reduce the effort done in programming phaseand to focus more on the design phase which is system engineering wise not software

    engineering wise. We found this language very important when working in a large scale

    enterprise applications. As the developer only deal with a graphical user interface GUI and thecode is automatically generated which allows him to think more of the business logic than the

    code. In the following figure is the architecture of how the 4GL works.

    http://en.wikipedia.org/wiki/Active_Directoryhttp://en.wikipedia.org/wiki/Active_Directoryhttp://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocolhttp://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocolhttp://en.wikipedia.org/wiki/Post_Office_Protocolhttp://en.wikipedia.org/wiki/HyperText_Transfer_Protocolhttp://en.wikipedia.org/wiki/File_Transfer_Protocolhttp://en.wikipedia.org/wiki/File_Transfer_Protocolhttp://en.wikipedia.org/wiki/Microsoft_Exchange_Serverhttp://en.wikipedia.org/wiki/RSShttp://en.wikipedia.org/wiki/Atom_(standard)http://en.wikipedia.org/wiki/Scope_(programming)http://en.wikipedia.org/wiki/Scope_(programming)http://en.wikipedia.org/wiki/XMLhttp://en.wikipedia.org/wiki/XMLhttp://en.wikipedia.org/wiki/XPathhttp://en.wikipedia.org/wiki/XPathhttp://en.wikipedia.org/wiki/XSLThttp://en.wikipedia.org/wiki/XSLThttp://en.wikipedia.org/wiki/Active_Directoryhttp://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocolhttp://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocolhttp://en.wikipedia.org/wiki/Post_Office_Protocolhttp://en.wikipedia.org/wiki/HyperText_Transfer_Protocolhttp://en.wikipedia.org/wiki/File_Transfer_Protocolhttp://en.wikipedia.org/wiki/Microsoft_Exchange_Serverhttp://en.wikipedia.org/wiki/RSShttp://en.wikipedia.org/wiki/Atom_(standard)http://en.wikipedia.org/wiki/Scope_(programming)http://en.wikipedia.org/wiki/XMLhttp://en.wikipedia.org/wiki/XPathhttp://en.wikipedia.org/wiki/XSLT
  • 8/3/2019 Assignment 2 Daw

    4/7

    Assignment 2 Database and the Web

    Mohamed Hagras

    Figure 4GL Application development lifecycle under 4GL

    The main disadvantage we faced with OpenEdge is that it is better to use with enterprisescale not with small scale. In other word for the prototype production it is not useful yet should

    be in consideration when the business becomes bigger. Also it is expensive to buy the server tool

    to be able to develop with this tool comparing with WebDNA and ColdFusion, which provide a

    free tool if you were a student. Also we had a problem with with the learning materials.

    Data base and DBMS comparison:

    For the database query language we used simple SQL Sequential Query Languagethrough MySQL DBMS Database Management System. My SQL is rapidly used on many

    famous websites such as the Facebook. The reason of this huge market share of MySQL is thatit is open source, simple and free to use. But the short come of MySQL is that the server itself is

    not reliable if your application was for the large scale. A thought come in your head how come ifthe Facebook is using MySQL. Well Facebook has many servers with cloud hosting and the best

    system engineers to make the performance of their database efficient and reliable. Also the

    problem when something is free is that there is no effective support, as the support is voluntarythrough discussions forums.

  • 8/3/2019 Assignment 2 Daw

    5/7

    Assignment 2 Database and the Web

    Mohamed Hagras

    There were two other commonly used in web applications DBMSs which are: Oracle

    server and Microsoft SQL server. Oracle is one of the best databases and with high market share

    in the business field. It has reliable performance and good support. The only problem is that it isexpensive and the tool provided for free for students is not effective as the other one.

    Microsoft SQL server is a good DBMS with good support and the key strength of it, is

    that they keep it up to date. For example Microsoft added video and images as data types in thisDBMS which can be helpful for security applications.MS SQL is provided for Sheffield Hallam

    University students to for free. The problem with Microsoft products is that they work best with

    each other.

    Database Design phase:

    The shulaptops database is consisted of six tables. One that hold the users and their

    data ,another that holds the products ,one for messages ,one for Wikis ,one for sellers ratings

    , and one for the products requests. As shown in the ERD Entity Relationship Diagram.

    Figure ShuLaptops ERD (using MS Visio)

    Building phases:

    Using the tool box methodology we divided our tools needed into eight main tools. By

    tool we mean a mechanism that combines the three types of languages, client side, server side

    and database querying languages. The 1st two tools were DML Data manipulation languageand DDL Data Definition language and here we used the ColdFusion to connect to the MySQL

    database and then the SQL to do the DDL and DML. These two tools will be reused all over the

    project. For user authentication, for the catalogue, for the top 10 best sellers, for rating the seller,for registering the user and basically in most of the stages to build the website, hence it is a

    database driven website.

    We started with building the home page which has top 10 bestselling items. Then we builtuser registration mechanism. After you register and email is being sent to you automatically. This

    email function we used to great the user after he registers, to retrieve the users password if he

    forget it and to receive messages from other users. After user is registered he signs in. The sign inmechanism is basically a query that asks the database if this user with this password exists or not.

  • 8/3/2019 Assignment 2 Daw

    6/7

    Assignment 2 Database and the Web

    Mohamed Hagras

    If it is successful he signs in, and if it fails he get a message back to re-enter user name and

    password. When a user is logged in a session variable is created with the user name. This session

    variable is very important to get the session based contents from the database; it means that wewant to get this particular users data from the database. The session starts when the user is

    logged in and ends when he logged out. After that we built a simple shopping cart system that

    holds the users preferred products until her purchase them. If a product is held by one user theother users cant see it until he buy it or cancel it so it goes back to the products catalogue. After

    that we built an email system using the cfmail built in function in ColdFusion we were able to

    refine it to be able to use it in many things as stated before.Which is a way to build a goodcustomer relationship. After that we needed to build a logout function that basically terminates

    the users session and redirect him to the home page. These were the major tools that shaped the

    shulaptops web system. In the next section we will talk about XML and how in a direct and

    indirect way XML helped to make the web better.

    XML and Web:

    XML Extensible Mark-up Language is a way to manage, display and organise the data.

    It has become very popular and attached with Web as, every time someone talking about the web

    he has to mention XML. XML is not only with Web it is with working with data in general. Ifyou create something in MS Word copy it and paste it in html editor you will find the format onthe data copied still the same. This is the impact of XML, XML is everywhere but you dont see

    it. XML came to unify the use of files, to make a new kind of files that combines binary files that

    only machines understand and the text files that only humans understand. This way it will beeasy to exchange data between applications and human and application to application. The

    impact of XML on the web is XHTML which is a version of HTML ruled by XML which made

    the HTML more organized and understandable to all browsers. The problem came when you

    used to write an HTML page that appears properly on one browser then, appears different onanother ,this problem were before the XHTML which introduced a unified way to write the web

    pages .

    Table of Figures:

  • 8/3/2019 Assignment 2 Daw

    7/7

    Assignment 2 Database and the Web

    Mohamed Hagras