As I mentioned in my previous blog post, I have been experimenting with using AI more and more during Software Development, up to the point where AI is responsible for all the code and I don’t even look at it. This generated some nice results, but at the same time left me feeling empty. What did I actually accomplish? This is what I want to talk about in this blog post.
AI In Software Development
My usage of AI has changed a lot in the last few months and I want to explain my evolution as well as my reasoning for this change. Finally, I want to also do some self reflection on how this has impacted me and will impact me in the future. AI is causing revolutionary changes in many fields, and software development seems to be one of the forefronts of this revolution.
Schema Fetish
Over the years, one of the things that keep coming back as a concept is the idea of introducing a schema to verify certain restrictions. I do understand the reason to do this, and there are some clear benefits to doing this, but I also feel that it gets done too often and it gets used as a solution to a problem it actually doesn’t fix. So in this blog post, I want to explore what it actually does and give my opinion about it.
Self Discoverability In Software
One of the many things that seem to come and go is the concept of self-discoverability. This idea has been around since the 80s and has gone and come back a couple of times in different forms and on different layers. But in the end the idea is always pretty much the same, to have some generic approach that would allow a third party to discover and explore an application all by itself. I think the main reason why so many get excited by this idea is that it would remove the necessity for documentation. In this blog post, I want to explore the different approaches and implementations I have seen and what I think of the entire concept.
GraphQL First Use
I have read many things about GraphQL, and how some people prefer it over regular REST APIs. It was on my list to try out for quite some time, and recently I decided to try it out on one of my own projects. In this blog post, I will give my opinion about GraphQL, what I like and dislike about it. Note that I have only just started using it, and as such my opinion is the first time experience of using this framework and like with all things, you need to get some experience with it to become proficient with it.
Stomp Authentication
In a previous blog post, I shared my first experience with Stomp and how easily it was to use with StompJS and Spring Boot.
There are however a couple of caveats you have to keep in mind regarding authentication. That is what I want to explore in more depth in this blog post. I will share a lot of code and explain it as well as I can.
Validation logic
I am a big fan of strict enforcement of constraints, this make your application more robust and cleaner since you don’t have to deal with the option of invalid or bad data. Constraints can however be added on multiple levels and in different ways, and depending on which constraint, you will have to put it on a different level. I have already written some previous blog posts about validation, such as here: https://cvesters.wordpress.com/wp-admin/post.php?post=5358&action=edit. This blog post can be considered an extension on that one.
First WebSocket & Stomp Experience
For a project where I want to be able to offer more interactivity and concurrent modifications, I decided to use a WebSocket. Since my backend is written in Spring, after some research, I decided to use Stomp on top of the WebSocket layer as that would give me the best integration with Spring. All in all, the experience went pretty smooth, but there were some caveats which I will reveal in this blog post.
Action Context
When I designed my action object system, I only imagined the possibility that an action would impact a single entity. In the end, this is what you also would imagine with a traditional REST endpoint. You do an update on an actual entity and save it. In my recent project, I however encountered the situation where changes on one entity have impact on others as well. In this blog post, I want to explore how to deal with this scenario and still keep some action based approach.
Multiple Inheritance Actions
In a previous blog post, I introduced my new approach regarding updating objects. Instead of just performing the updates in the service, I approached it in a true object oriented approach and made actual objects for the actions. In a new project I was using this approach as well, but I encountered a problem regarding my inheritance tree for these actions. In this blog post I will go into detail what my problem was and how I solved it.
Third Party Authentication
In the previous blog post, we discussed whether or not you should offer a separate public API. One of the points there was how you do the authentication, and whether that should be done in a separate way. In this blog post, we will go deeper in on that subject and see the different options and which caveats there are.
Public vs Private API
In the world of web applications, APIs are crucial as they allow communication between applications. We often create a difference between some private API, which is only meant to be consumed by our own applications (such as the front-end) and a public API (which will be well-documented and meant for third parties). This however comes with a lot of trade-offs, which we will discuss in this blog post.
Clean Method Signature Patterns
Naming a method properly is crucial in making your code readable and maintainable, it is however also very difficult and comes with lots of caveats and dilemmas. A method name is however not the only part of the full signature, variables are included as well and thus can also play a role in distinguishing methods. In this blog post, I will explore some common bad practices and see what we can do to fix it.
Modifying Objects Through Getters
While it is common sense to not update objects through getters, you would be surprised how often it is actually done and how easy it is to accidentally do it. In this blog post, I will first explain why updating objects through getters is a bad idea and how you can avoid this.
Mail Languages/Translations
I am a big advocate of keeping all translations in the front-end part. This becomes tricky when we have to deal with sending e-mails. The front-end is not able to send e-mails and thus the back-end can no longer be language agnostic. How do we deal with this?
Multi-Tenant SQL Queries
In the world of cloud applications, having a multi-tenant application is standard. While there are multiple options to implement multi-tenancy regarding the database/storage approach, having a single database where all data for all tenants resides is pretty common. When choosing this approach, you have to make sure that you don’t leak information of different tenants, which is what I will explore in this blog post.