#25 4 DECENT COMMERCE SITES
Zen Cartâ„¢

osCommerce

OpenCart

nopCommerce

Zen Cartâ„¢

osCommerce

OpenCart

nopCommerce

This is a web gallery in one single PHP file. All you have to do is copy the script to any directory containing images to make a gallery. Sub directories will be sub galleries. Thumbnails for images and directories are generated automatically.
Single File PHP Gallery does not require any configuration and is very easy to use and modify.
INI files are mostly used in C++ and Delphi programming these days. Microsoft’s .Net framework focuses on XML-based config files not INI files. However it is still possible to read and write to INI files using C#. In this example I have created a very simple INI reader. It allows you to read/write to the config file ini_reader_writer_20xx-xx-xx.ini .
There are plenty NuGet packages, such as INI Parser. Which allow easy implementation into our projects. You could also write your own class which gives us more control but is overkill for an example. Example an INI file handling class using C#, P/Invoke and Win32.
Google Charts allows us to display big data in a visually appealing way. Google offers animation and lots of other options to modify google charts. The charts are rendered using HTML5/SVG technology and the charts themselves are exposed as JavaScript classes In this example five different charts are drawn and are refreshed every time the page is resized using a simple line in JavaScript:

window.onresize = function(){ location.reload();}
On page resize the page is refreshed. Since we are using the charts inside HTML iFrames this works quite well.
In this simple example I create a very simple DLL(Dynamic-link library) in C#. the library has to functions the first function is the Calculate method which allows us initiate a simple addition of the numbers in each numerical box.The second function is a logger to keep track of the addition problems we solve. The WriteLine method also shows us how we can write to and delete files in by calling methods from the dll_example_class_library.dll we compiled.

A simple method called Calculate just adds two numbers together using the dll_example_class_library.dll DLL’s help to keep code more organised and also allow us to change functionality of programs without recompiling the EXE .

After the DLL is compiled we can add it to our project by: right clicking Refrences, clicking add reference, clicking browse and selecting our DLL

In order for us to use the methods in our class it has to first be initiated. Once initiated we can start using the methods in our logic.
A simple logger to write all the occurring events to a file in the root directory \ Logs folder of the application.
The logger class LoggerClass.cs processes the data and writes it to a .log file. the Class can also delete the current log file which is being written to.
public static class Logger
{
private static string LogFile = Application.StartupPath + "\\Logs\\Event_Logger_" + DateTime.Now.ToString("yyyy-dd-M--HH-mm-ss") + ".log";
public static void WriteLine(string txt)
{
try
{
File.AppendAllText(LogFile, "[" + DateTime.Now.ToString() + "] : " + txt + "\n");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Could Not Append Text To Log File", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
}
public static void DeleteLog()
{
try
{
File.Delete(LogFile);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Could Not Delete Log File", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
}
}

JALERT is a useful library which can be used to replace the three boring system kinds of popup boxes: Alert box, Confirm box, and Prompt box.
The usual system JavaScript alert would be called like below:
alert("I am an alert box!");
Jalert can be used in the same way but with more functionality:
$("#confirm_button").click( function() {
jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
jAlert('Confirmed: ' + r, 'Confirmation Results');
});
});

Looking for a lightweight event logger for JavaScript? look no further then Loglevel.
Loglevel is a minimal lightweight simple logging library for JavaScript. Loglevel replaces console.log() with level-based logging and filtering, with none of console’s downsides.
It’s a bare bones reliable everyday logging library. It does not do fancy things, it does not let you reconfigure appenders or add complex log filtering rules or boil tea (more’s the pity), but it does have all the core functionality that you actually use…
In this example I have implemented Loglevel directly into my browser page:
<script src="loglevel.min.js"></script>
<script>
function Loginfo(){
log.setLevel('info');//2
log.info("log info");
}
</script>
A batch file is a script file in DOS, OS/2 and Microsoft Windows. It consists of a series of commands to be executed by the command-line interpreter, stored in a plain text file.
Batch scripts are used to automate redundant tasks such as creating 100 folders or updating 50 servers. Yes you could do this 1 at a time manually but this is inefficient and a waste of time and money + resources.

A good well written batch file can get a lot done and makes our lives a hell of a lot easier. The Linux equivalent is called a shell script.
Typically batch scripts end with .bat and some with .cmd. Batch scripts are executed.
Many people are familiar with project collaboration apps such as Trello, Slack or KanbanFlow. These platforms are great for discussing projects and planing results + steps etc. However every application needs a design document. This is where markdown comes into play. Markdown is a lightweight and easy-to-use syntax for styling all forms of writing on the GitHub platform. Although you can use any other document format such as MS Words .docx or .xls etc. Markdown is my preferred documentation syntax.
A good README.md will have the following features:

