-2

I was wondering whether is that possible to have xlsm file as backend while having html as frontend? How can I achieve this if yes?

Thanks in advance.

klpw
  • 7
  • 1
  • 5

1 Answers1

1

Since the question lacks the understanding of an application structure in the programming realm, I will put this as an answer hoping to clarify a few things.

First of all I don't think you understand what the term "back-end" means.

Please read https://en.wikipedia.org/wiki/Front_and_back_ends AND http://blog.teamtreehouse.com/i-dont-speak-your-language-frontend-vs-backend hopefully these will clarify a few thing for you.

Just to explain these concepts shortly:

In an application Front-end and back-end refer to two interfaces that communicate with each other and exchange data in some form. Such separation is made when the program and the user are separate (such as when you have a server and a client such as in distributed programming). This however, is only one of many programming patterns today. Although rare in today's world, there are programs that do not separate functionality in such way and thus delegate all this functionality to the core program that is statically installed on the clients computer. But in other cases here is what the terms front-end vs. Back-end means:

Reason why such separation is necessary: In today's world many applications (such as web applications and mobile applications) are deployed on common servers to provide wider and faster access, better support and to reduce the cost of access for the client (not requiring any space, no download time etc.). However in such cases, since the client doesn't have access to the program locally, they need to access it over internet protocols such as TCP (which is used by today's http). The problem is that the frontend files are served everytime the application is loaded and can not keep track of states of data (they are stateless) [excluding the edge cases of cookies and caches]

Front End: The sole reason that the front end exists for the user to interact with the application and to collect data from the user such as login information etc. (User Interface)

Back end: Now back-end is a little bit more complicated. There are 2 major components to a good back-end design:

  1. Logic
  2. Data

The backend is responsible for processing the data from the user (front-end) in a correct and meaningful way. For example in a really simple program which adds two numbers the front end would be responsible of asking the user for two numbers and the back-end would carry out the actual addition and send the result back to front end to be displayed.

If the data has states. The backend would also need to save the last state of the data somewhere on the server. This is where the second component comes in. The most common practice is to have a ".db" file(s) which represents a database. However there is no obligation for you to do so. When necessary, if you wanted your backend could read data any where from a plain text file to STDIN.

Why do we use databases? ==> The queries. Query languages that come with data bases make it so much easier for us to extract and isolate the relevant data

After processing and modifying the data, the backend sends it back to the front end to be displayed to the user. The common data transferring ways are JSON, XML and SExpressions.

So following this short lecture, back to your question:

Can I have an xlsm file in the backend? Yes. You can preserve the data in the backend(server) in anyway that you want. The only thing you need to make sure is that the endpoint the front end communicates to reads data from this file and writes back onto this file. (Sometimes CSV files are used in such a way that is similar to xlsm files)

Is it a good idea?

No. Databases exists for a reason. Use them.

Hope this sheds light on a few things. I highly advise you understand the application stack before writing any code

Community
  • 1
  • 1
sinanspd
  • 2,589
  • 3
  • 19
  • 37