Can you give me a high level understanding of how the NexpartB2C app server works?

Sophio was created in 1999.  At that time, there were very few web development platforms that were data driven and affordable.  As a result, Sophio decided to use Visual Foxpro which was part of Microsoft's Visual Studio development toolkit.  At the time Visual Foxpro was at version 3.  In 2012 we are at version 9 service pack 2.  A Sophio application server has visual foxpro installed.  This means having some basic foxpro knowledge is extremely beneficial.  Our application works just like any visual foxpro application, except the user interface is your web browser.  

Besides Visual Foxpro you will install the popular West Wind Web Connection Framework. This framework was created by Rick Strahl, a well known Microsoft MVP, developer and speaker.  Included in the WWWC framework is an ISAPI connector file named wc.dll.  This dll is what makes it possible for IIS to communicate with a visual foxpro executable file created by a developer.  

Once you install wc.dll on the web server, you bind it to IIS via a script map.  In the current version of IIS this is referred to as a handler mapping.  Sophio uses .epc  and .wws.  EPC stands for 'electronic parts catalog' and WWS stands for 'west wind store'.  The West Wind Store is the visual foxpro framework we started with in 1998.  Since then we have expanded it exponentially, but the basic configuration remains the same today.

The Sophio executable that runs on a windows application server is called webstore.exe.  It is a visual foxpro application that runs as a COM object on the web server.  IIS routes requests to webstore.exe via the connector wc.dll referenced above.  The Sophio application server uses both visual foxpro tables as well as the MySql database.  Since the visual foxpro tables are faster, by default we start all clients with visual foxpro dbf's.  If the client webstore out grows visual foxpro, we upgrade the client to MySql.  Visual Foxpro files cannot exceed 2gig.  

When a page request comes to a Sophio webstore.exe instance, the first thing it does is look for the store record in a database found at application-path\wwstore\wws_stores.  The webstore app looks for the domain name in the virtual field in the wws_stores table for a match.  Once the record is found, a store object is created named 'ostore'.  The ostore object is available to any web page in the store.  There are attributes of the object such as 'baseurl' and 'mainpage' that are often used in your stores html pages.  By using the store object in your html, you can control features and functions from your stores dashboard as opposed to hard coding business logic into your html pages.   The rest of the ostore attributes (aka wws_stores fields) contain the business rules and configuration settings for a given store.

Since web development and standards have evolved considerably since the late 90's, so has our application.  All Sophio webstores use the google hosted, jquery javascript framework for managing the UI (user interface).  By using jquery we make it easy to customize fonts, colors, and shading throughout the site.  Furthermore, every page in the system has access to a shared assets folder (sophio-shared-assets).  There are over 800 folders and 8000 + files contained in the shared assets.  These files and folders are used throughout the UI of your store.  Most of these files can be sub classed by copying them into your templates folder.  When you do that, the application considers that an override and will use your custom file.

This should give you a basic understanding of how the system works. 

Was this answer helpful? 1 Users Found This Useful (3 Votes)