E-commerce website allows people to buy and sell physical goods, services, and digital products over the internet rather than at a brick-and-mortar location. Itβs tough to imagine daily life without e-commerce. We order food, clothes, and furniture; we register for classes and other online services; we download books, music, and movies; and so much more. E-commerce has taken root and is here to stay.
In winter semester 21/22 for the cource of Advance Software Engeneering offered and taught by "Prof. Dr. Stefan Edlich". I am developing this simple E-commerce website with the basic functionalities, I have found this cource very informative and I have learned a lot during the developmemt of this project. I hope this project will help many others as it have helped me.
- register (validation added)
- login & logout
- search
- categories
- cart (add edit delete update) /only login user
- payment with paypal
- pagenation
- sessions
- payment success fail landing pages
- bootstrap 3.7
- jquery
- js
- fontawesome
- mysqli
Git is a free, open-source version control software. It was created by Linus Torvalds in 2005. This tool is a version control system that was initially developed to work with several developers on the Linux kernel.
Matthew McCullough, a trainer at GitHub, explains that Git, like other version control systems, manages and stores revisions of projects. Although itβs mostly used for code but Git could be used to manage any other type of file, such as Word documents or Final Cut projects. Think of it as a filing system for every draft of a document. GitHub is a Git repository hosting service, but it adds many of its own features. While Git is a command line tool, GitHub provides a Web-based graphical interface. It also provides access control and several collaboration features, such as a wikis and basic task management tools for every project.
A UML diagram is a diagram based on the UML (Unified Modeling Language) with the purpose of visually representing a system along with its main actors, roles, actions, artifacts or classes, in order to better understand, alter, maintain, or document information about the system. Mainly, UML has been used as a general-purpose modeling language in the field of software engineering, for the purpose of this project I have used 3 Diagrams to illustrate my design.
- put a product for sale
- categorize a product
- update a product
- change a product price
- validate an order
- place an order
- Collect a payment
- Dispatch a delivery
- stack goods
- fetch goods for shipping
- Add a product review
The e-commerce system is a web application using a Portal component implementing the Backends For Frontends (BFF) pattern.
The communication among domains is implemented via events:
When the customer places an order the following process starts up:
- Shipping prepares a new delivery.
- Sales creates a new order and publishes the OrderPlaced event.
- Shipping accepts the delivery.
- Billing collects payment for the order and publishes the PaymentCollected event.
- Warehouse fetches goods from the stock and publishes the GoodsFetched event.
- Shipping dispatches the delivery and publishes the DeliveryDispatched event.
There is only the basic workflow implemented with a big room for improvement, for example when Shipping doesn't get bot Events within a time period, the delivery process should be cancelled etc..
SonarCloud is a cloud service offered by SonarSource and based on SonarQube. SonarQube is a widely adopted open source platform to inspect continuously the quality of source code and detect bugs, vulnerabilities and code smells in more than 20 different languages.
Codacy Automatically identify issues through static code review analysis. Therefore we can be notified on security issues, code coverage, code duplication, and code complexity in every commit and pull request, directly from your current workflow https://app.codacy.com/gh/YaqoobD/david-ecommerce/dashboard
- meaning full file names
- OOP Concept -> see line 2 register.php
- meaningful variable names (no one letter variable naming)
- Comments
I used semaphore which is very easy and simple to understand. In semaphore build I did
- (installing dependencies) where all the dependencies related to application are installed.
- (code analysis) it runs the PHP Copy Paste Detector from online repository.
- (unit test) runs the unit tests from the phpunit binary in vendor folder.
- (browser test) Here it runs the browser test by openeing the application in browser and checks the response.
- (security check) ensioLabs security checker, will scan the project dependencies which are known for vulnerabilities.
The PHP AutoloadBuilder CLI tool is used and phpab is a command line application to automate the process of generating an autoload require file with the option of creating static require lists as well as phar archives.
When using phpab it is necessary to recreate the autoload file every time a new class is created. This usually also happens after pulling from a repo or when switchting branches. Using a git post-checkout hook placed in .git/hooks/post-update this can be automated for most cases.
Continuous Delivery (CD) is a software engineering approach in which teams produce software in short cycles, ensuring that the software can be reliably released at any time and, when releasing the software, without doing so manually.
GitHub Action is a continuous integration service used to build and test software projects hosted at GitHub by GitHub.
GitHub Action is configured by adding a file named python-app.yml, which is a YAML format text file, to the .github/workflows directory of the repository.This file specifies the programming language used, the desired building and testing environment (including dependencies which must be installed before the software can be built and tested), and various other parameters.
TeamCity is a general-purpose CI/CD solution that allows the most flexibility for all sorts of workflows and development practices. The Projects Overview lets you quickly check the status of your builds, see what triggered them, download the latest build artifacts, and more.
PhpStorm is Usd as IDE in this Project it is a PHP IDE. It provides on-the-fly error prevention, autocompletion and code refactoring, zero configuration debugging and an extended HTML, CSS, and JavaScript editor. PhpStorm also provides powerful built-in tools for debugging, testing and profiling your applications.
- Intelligent coding assistance
- Smart PHP Code Editor
- Code Quality Analysis
- Debugging, Testing and Profiling
- HTML/CSS/JavaScript Editor
- JavaScript Editor
- Development Environment
- Databases & SQL
Small Example of the Domain Specific Language.
Functional programming is a paradigm, or style, that values immutability, first-class functions, referential transparency, and pure functions. functions as machines β they take an input, or arguments, and then output something, the return value. Throughout this project, good practices for functional programming have been adopted, for this project i have used followings.
- used only crud operations.
- to make it work on live server change credentials in db.php
- custom made, no framework used