How to structure your front end application

Tip of the week

Created on: November 18, 2017

Updated on: November 18, 2017

How to structure your front end application

From my experience, it is important to set out how you are going to structure a front end application from the start; be it used for in-house or in provision as web development services.

One of the main reasons behind this is that you need to know whether your application is going to persist state or not.

If you don’t already know, persisting state within a front end application usually means that the application will use a database.

If you are developing a web development services application that does not persist state, you won’t need to worry about using Ajax.

Ajax stands for Asynchronous JavaScript And XML and it uses HTML requests in a RESTFUL manner to GET, PUT, PATCH, POST & DELETE data on the database.

Determining the complexity of your application

In this case we have decided to use a database for our web development services based application. The next step is to determine whether your application is complex or not.

Earlier we discussed how the persistence of state has an impact on whether your application has a database or not.

If you are developing an application that will make lots of requests to the database store and is more transactional in nature.

The best design pattern to use in this case is VueX.

However if your application is a simple application that is less transactional in nature then I would urge you to use ajax to access your database store and then use a RESTFUL way to access your data.

From my previous experience, I have built my front end applications using the more traditional AJAX methods. I have built a very small number of test applications using Vuex.

Stay tuned for further tips and tricks from www.ormrepo.co.uk/blogs. The link also provides information about the web development services we offer.