Introduction

What is the FW App System?

The FW App System is a set of standards for for developing applications for various uses. It incorporates various php, html5, and javascript technologies in a way that is easily extensible and understandable.

Mindset of FW

The FW App System operates on one key concept: modularity. Modularity is the concept of splitting up a framework into several different parts, with each part being responsible for only one function/service or a very small group of tightly related functions/services. Each part can access one or more of the other parts.

An important element of this modularity is interchangeability. Each module that FW ships with comes with a default implementation, but it also includes a structure for building custom implementations of certain modules. This way, the standard implementation of a particular module can be replaced by a custom one with simplicity, as long as the custom implementation adheres to the standards set forth by the current version of FW.

The other effect of the modularity concept is the separation of front-end (client-side) and back-end (server-side) code. Although FW is designed to be extensible, by default the back-end and front-end are to be completely separate code blocks, linked by a two-way data stream.

FW Mindset Modularity: Front-end and Back-end

If followed correctly, one should be able to replace any single module in the api or in the front-end, and the application as a whole will still work. In theory, one could replace the entire front-end or the entire back-end, and as long as the data stream format stayed consistent, the application would continue to function.

Back-end (PHP)

FW's standard backend is written in PHP, an efficient server-side programming language if used correctly. In the standard implementation, the PHP serves only data, and does no rendering of HTML. Therefore there should be no HTML in your PHP (except for specific use cases, which are extremely rare). It also is loosely based on the Model-View-Controller structuring pattern (see a good introduction here)

One of the most important aspects of the back-end part of FW is its adherence to object-oriented programming. PHP works as a procedural programming language just as well, but object-oriented development often leads to cleaner/more readable code, at least where PHP is concerned. Some procedural code is required to support this method of PHP development, but what little there is is encapsulated by FW itself, and is of little concern for app developers.

Front-end (HTML/CSS/Javascript)

Because of modularity, the front-end is completely separate from the backend. Thus, the backend does nothing to render the HTML used for creating stylistic webpages that are responsive and quick. This task falls to the front-end portion of FW.

The default implementation of the front-end is written using EmberJS, an opinionated front-end framework for developing robust applications. This framework takes data returned from the back-end and places it into the correct places for it to make sense to the end user. This also somewhat follows the MVC structure, although the implementation is somewhat different.