MVC Port Routing

Generally, port routing is done by the use of php inbuilt server to route urls. However, even when the method is applicable within the framework and has also been integrated with the (wvm or wmv) structure, the process can be slow and sometimes may prevent some files such as external library icons from responding well. It is however advisable to employ the use of local (e.g wamp, xampp) or remote servers in order to render the application well.

Using Ports
This method involves the accessing of a server file (index.php) through port (8080) to load classes based on requested urls. Once the server is started, the index server file will route urls using any of the 3 logics supported by this framework for loading routes.

server file - index.php

    include 'icore/filebase.php';


The code above is a sample format of the index.php server file. Urls are routed through the server file index.php. In this way, all php urls and files are protected unless allowed. Server can be started on port 8080 by running the command php mi start on the terminal which starts the built-in php server. If this method is slow or unresponsive, as a better alternative, developers can use their preferred local or remote server. Spoova has been configured to respond in a better way.

Once the server is started, spoova begins to search for its route files within the windows/Routes directory. For more information on WVM approach visit here

Note that when file are loaded using the php inbuilt server ports, external css library icons may be affected. This may be resolved by loading the icons directly using the cdn link of such libraries.