Currency Converter
Documentation
Currency Converter is a small php application, developed for any person concerned wants to see my code's quality.
There are a lot of ways to build such an easy small project. It could be developed using just html and javascript, legacy jquery or react (check here my attempt), but I have this project as a demo for my PHP knowledge. As it happens mostly to the real world, I have developed this using the Web Service philosophy. Ιn general, Server makes available its services through wsdl file(s), client connects to server through SOAP.
This Application has two parts: Server and Client Part.
Server Side
Server Side makes available its service through wsdl file. It connects to free.currencyconverterapi.com and submits all queries that receives from client. The way that this application is developed, make it too easy to add/remove currencies. Server uses 2 classes. Class "currencies" is responsible for taking currencies rates from internet and return them. Class "currency_service" is responsible for taking user values, convert them and return them. It's also responsible for running the web service. Available currencies can change from "currency_service" class.
ClientSide
Client connects to Server through SOAP using PHP. The usage of PHP happens because I had to predict the
chance of the client being into a different server and I wouldn't like to make cross-domain ajax
connections.
When page loads, it connects to Server, for to take the available currencies and put
them into the select menus. Then, when user wants a currency conversion, client posts data to server and
then the result is displayed.
Both Server and Client Sides uses NuSoap Tools.