8 Split System

Kiss comes as a complete system that includes both the front-end and back-end. This works well for most situations. However, sometimes a web application may have a single back-end that serves several different front-ends. Or, perhaps you prefer to keep the front-end and back-end projects separate. Kiss has a mechanism to support the ability to split the front-end and back-end.

This chapter will detail the steps needed to accomplish this.

8.1 Back-end-only System

A back-end-only system is a complete system minus the front-end portion of the system. The git repo is also deleted since it is meaningless in this scenario.

8.1.1 Creating

In order to create a back-end-only system you start with a complete Kiss system cleanly checked out and delete the front-end portion. That leads you with a back-end-only system. However, before doing that, you must install the third-party libraries. The following commands will accomplish this whole process.

./bld libs                   (Linux or Mac)
./remove-frontend remove
    or
bld libs                     (Windows)
remove-frontend remove

Once these command have been run, what you have left is a back-end-only system. The git repository it came in will have been deleted as well as the front-end portion of the system. The procedure for developing, deploying, and upgrading the system will be slightly modified as described herein.

8.1.2 Developing

The main difference between developing on a back-end-only system vs.\ a whole system is just that the command used to start the back-end is slightly different. The locations of all of the back-end pieces are the same. Once running, the system may be modified while running just the same.

Use the following command to build and run the back-end:

./bld developBackend         (Linux or Mac)
     or
bld developBackend           (Windows)

Viewing the server log is done in the same way as before.

8.1.3 Deploying

Deploying the back-ed is done just as before except now, instead of a single file containing the whole system, you have a single file that represents the back-end only. When deploying the front-end and back-end portions, they will be treated as two separate systems to the server.

8.1.4 Upgrading

Upgrading a back-end-only project is done the same way as upgrading a full system except that after the upgrade, you’ll need to run the remove-frontend script again. See System Updates

8.2 Front-end-only System

A front-end-only system is a complete system minus the backend-end portion of the system. The git repo is also deleted since it is meaningless in this scenario.

8.2.1 Creating

In order to create a front-end-only system you start with a complete Kiss system cleanly checked out and delete the back-end portion. That leads you with a front-end-only system. However, before doing that, you must install the third-party libraries. The following commands will accomplish this whole process.

./bld libs                   (Linux or Mac)
./remove-backend remove
    or
bld libs                     (Windows)
remove-backend remove

Once these command have been run, what you have left is a front-end-only system. The git repository it came in will have been deleted as well as the backend-end portion of the system. The procedure for developing, deploying, and upgrading the system will be slightly modified as described herein.

8.2.2 Developing

Before running the front-end, you should start the back-end as described above.

There are no steps required to edit front-end files. However, you must serve them. This can be accomplished with the following command:

./serve          (Linux or Mac)
    or
serve            (Windows)

Presuming the back-end is running, you can access the running system at http://localhost:8000

As before, you can edit front-end files while the system is running.

8.2.3 Deploying

The front-end must be distributed as a seperate war file named frontend.war. This file can be created with the following command:

./make-frontend         (Linux or Mac)
     or
make-frontend           (Windows)

From your server’s perspective, the front-end and back-end are two different systems.

8.2.4 Upgrading

Upgrading a front-end-only project is done the same way as upgrading a full system except that after the upgrade, you’ll need to run the remove-backend script again. See System Updates