Force PushedFP
  • Home
  • Blog
  • Workbooks

Is a web application generator even possible?

This is maybe the first actual development automation post I've written but the topic is a great segue from the good amount of JSX and JS codemods I've already written for existing applications.

In my general experience writing web applications, all of the forms I've written are extremely boilerplatey, the backend code is always the same, and basic build system is always boilerplate.

Sure, there might be incremental upgrades here and there but when it all comes down to it, it's more or less the same.

Should the end user really care what JS library is being used? Why does it matter what alerting framework is implemented as long as alerting happens? Is a React v0.13 vs v16 component really all that meaningful if the application is slow and buggy to begin with?

It's really a matter of what’s cheapest or what runs the fastest. These decisions are usually always developer driven based on familiarity or popularity and rarely based on the effectiveness for the job.

This has been my main struggle as a software engineer for the last few years, in that automation really hasn't improved development. There are countless amounts of drag and drop web page builders that work very well, but you really have no insight into what's under the hood (and usually it's not important). When it comes to web applications, nothing even close to this exists, at least in a form that's production ready that a non-programmer can use.

What I want to see is a program that can take some input parameters and spit out a web application, along with source code that I can go on and modify and upgrade. Also, after I'm done with that and read some coder blog I want to be able to run the same tool against my application and upgrade it to the next big thing, all the while leaving my current functionality intacct.

Most of a developers time is wasted thinking of new ways to write HTML

All apps / sites can use the latest version of node, react, redux, express etc. Code not able to be upgradeable once generated since can’t guarantee what the user is coding and might be a breaking change - or can it? Can regression tests be generated?

the author can manage template / recipes / formulas instead of giant repos and monolithic code with constantly evolving templates and design patterns / principles.

Something like this Focuses on code generation, Rapid application development, and writing as little code as possible and hiring as few programmers as possible as a startup / small business.

There are lots of common decision points I see which take up a lot of time and probably take away from time that would be better spent on actually developing the product.

Developing authentication flows are a waste of time and contributes to standardization drift

Developers also continously iterating in this subject for every new app also are the biggest contributor to XSS attacks in my opinion.

Do you want user authentication, and which pages do you need?

Common ones I usually wind up creating are Login, Register, Forgot password, Reset password etc. The template for these is (hopefully) always the same so the template is probably also something that can be generated, possibly done in a web design tool like Webflow.

Which authentication providers do you need support for? Is the app just going to use a username and password? Does it need to support login via Facebook / Twitter / Github / Google?

What are the password complexity requirements?

Every developer should 100% switch to using something like Webflow for building websites

Does the web application have a parent website and what pages will the website need? If the web application is for a SaaS product, it just needs a homepage, contact us page and privacy policy page. These can also be done in some sort of web design tool such as Webflow like I mentioned above.

What's great about this is things like a common header and footer, or other elements can be done there as well especially if the app has some sort of user account management functionality.

Will the users of the application be able to manage their accounts, and if so which info?

Common fields are email, phone, name, profile pic.

Hopefully the users will have the ability to change their own password without having to contact customer support.

And then there are the multitude of web application frameworks. The popular ones are React / Redux or Angular, but researching the web any developer would be mistaken to think it's an easy decision.

Application backends are also another great way to waste development cycles

How will the backend of the application (if necessary) be designed? Will it use NodeJS or Django? Will it be serverless?

What will the template engine be?

How will the application handle logging?

What database will be used (MySQL, PostgreSQL, Mongo, NoSQL), and how will the queries and statements be written? Will the queries be written as strings in the application or will the DB use a bunch of stored procedures?

Developers also need to think about Application security as well, such as things like following the OWASP Top 10, if you use express maybe do you want to implement Helmet? There are also countless amounts of XSS points you need to think about.

I wish I could use a visual designer to build how data flows and UIs change

The biggest part, in my opinion of something like a web application generator is the ability to craft custom processes or formulas.

This is the most time consuming part of development of any application and is another instance for developers to debate over implementation preferences. A formula designer as I think of it would understand all of the above decisions about which application framework, database preference, user authentication scheme, and even the way the HTML is written.

I recall that when I write any web application I always think extra about previous times I've programmed how data was maintained in the app, and how I could do it differently the next time. While it's great to always be improving and optimizing, it's also a distraction from shipping a product. The end-user and I'd argue almost no one cares about the implementation and that refinement in any application is just another flavor of code-smell. It's 2022 - we should be writing programs that can be upgraded at any given time without an actual human having to do the work.

When was the last time you wrote a code path to do something like send an email, create a payment subscription, save or read something in a database, or create a responsive sign up form?

A web application generator would be more than just something to write some HTML or Javascript code. It would also need to manage some setup and DevOps like stuff.

Source control is an overlooked part of any app. There's options to use GitLab, GitHub, Sourcetree.

Package management is another item most often attributed to just running a command, and maybe it's that simple in the near-future. But again, there's lots of options any programmer needs to decide on (Yarn, npm etc).

Building the application requires yet another choice a for a developer to make. Choosing between Webpack (there are also so many different versions!), browserify, rollup, and seemingly an inifite amount of others create almost as much work as writing the application itself.

Lastly, as if there already weren't enough things to consider, where and how the application is deployed demands even more time. Does it live on someones private home server? Is it on Heroku, Digital Ocean, AWS? I won't even go into using Docker or Kubernetes but it seems like you can't read any technical writing on the web about solving a problem or creating an app without someone suggesting to use Docker.

Long story short, you shouldn't have to think about all of these things. If you just want to write an app, you should write the app and click a button to do everything else.