What does web development mean? Usually you build some software that gets data out of some database converts it to HTML and sends it to a browser. Usually that software has to handle the other case, too: Receive input from a browser, make sense of it and write the data into the database. There’s your average web project.
Doesn’t sound very DRY, you say? Some other people had the same thought. They created frameworks, environments and whole programming languages to counter the problem. But why go for solutions, that are that complicated?
REST to the rescue
Why not try this:
- Write a REST API that translates your data to JSON.
- Write a (semi-)static HTML page.
- Be done.
Some people call this client-side assembled web applications. I call it good design. It separates business logic (server-side) from the presentation layer (client-side). A bunch of benefits comes with it, for free. Want a native client for mobile devices? Just put a new interface on top of the API. Need an API for third party developers? You already got one. How about performance? Pure JSON data most likely is smaller than complete server-side rendered HTML pages.