Logo

dev-resources.site

for different kinds of informations.

Anvil: An attempt of saving time

Published at
8/14/2024
Categories
codegeneration
nocode
standards
Author
henriqueleite42
Categories
3 categories in total
codegeneration
open
nocode
open
standards
open
Author
15 person written this
henriqueleite42
open
Anvil: An attempt of saving time

When I'm creating a new project, I always have the same problem: In order to follow best practices and make the code maintainable, the codebase becomes extremely verbose.

It always takes my motivation from me to have to write a bunch of stuff only to make some CRUDs. It's boring, repetitive and takes all my joy off coding.

Why I don't use Template Repositories?

  • It's a terrible experience to have to keep updating dependencies.

  • I always forgot to change example values, like the README

  • The changes that I do on the template aren't applied to the previous projects, so if I want to add a new thing like graceful shutdown, I have to do it one by one, and I have it.

  • This one doesn't affect it so much, but I don't like to have commits from the template repository on a new repository, and it's an extra thing to have to delete the .git folder

This leads me to think about the things that I hate, and I discovered that I hate many things:

  • Lack of documentation in a project

  • Lack o standards between multiple projects

  • Lack of a way to track where a piece of data is used

  • Lack o standards between multiple projects

  • Lack of a way to track the flow of events and communication between services

  • Lack o standards between multiple projects

Did I mention that I hate Lack o standards between multiple projects? Because I hate it. A lot.

And all these frustrations gave me an idea: What If I tried to create a specification to creating APIs?

Most APIs follow the same pattern, have the same things, and we all agree in a couple of standards and best practices for web development.

And from this, Anvil was born.

Anvil is my attempt to create something that's a mix of three things:

  • OpenAPI/Swagger specs

  • No-Code solutions

  • Frameworks

So, from a schema file (similar to OpenAPI specs), a code generator that can be fully customized by anyone, will generate a repository with all the standards and best practices that you want, without making you dependent on it like a Framework would.

The best part is that it can update your project for you, so it's not used only on the project creation. The schema file will always be the starting point for any feature.

I'm already working on the schema definition, it's hard to make it work with all the features that HTTP has, it ends up being too much flexible (WE NEED MORE STANDARDS!!!!), but nothing that a couple of days to define if a property should be called ResHeaders or ResponseHeader, am I right?

Please, give a look at the repository, the json schema definition and the examples to see what you think about it. I'm open to any suggestions, the more edge cases that we can predict, the less breaking changes we have.

If you have any options that you wanna share, please, leave it in the comments or create an issue in the repository and let's talk about it. Thanks for reading.

standards Article's
30 articles in total
Favicon
PSR-6: Caching Interface in PHP
Favicon
PSR-4: Autoloading Standard in PHP
Favicon
PSR-3: Logger Interface in PHP
Favicon
PSR Standards in PHP: A Practical Guide for Developers
Favicon
PSR-1: Basic Coding Standard in PHP
Favicon
Anvil: An attempt of saving time
Favicon
Wednesday Links - Edition 2024-03-27
Favicon
The TAG, and Responsible Innovation on the Web
Favicon
2023 Industry Trends in Mobile Application User Interface
Favicon
Becoming W3C Games Community Group co-chair
Favicon
Jim's Guide to CockroachDB Naming Standards
Favicon
Writing Code with Standards and generate report on PreCommit : PHP / Laravel Project
Favicon
Creating a code style guide
Favicon
Call for Mentors for the Web Mapping Code Sprint: 29/11 - 01/12 2022 ๐ŸŽ“
Favicon
Apeleg join the W3C
Favicon
2. Green Mode Design: Implementation Strategies
Favicon
Call for Mentors for the Vector Data Code Sprint: 12-14 July 2022 ๐ŸŽ“
Favicon
Re-evaluating technology
Favicon
Web development is like assembling IKEA furniture
Favicon
Introducing the Email Markup Consortium (EMC)
Favicon
Pizza Code
Favicon
Estilo de cรณdigo no PHP: as recomendaรงรตes da PSR-1 e PSR-12
Favicon
Today, the distant future
Favicon
PHPArkitect: Put your architectural rules under test!
Favicon
Cross browser speech synthesis - the hard way and the easy way
Favicon
Foundations
Favicon
XML, making everything just a little bit harder.
Favicon
Coding Standards and Naming Conventions
Favicon
Portals and giant carousels
Favicon
Continuous partial browser support

Featured ones: