I think this page explains it well: https://en.wikipedia.org/wiki/Object–relational_impedance_mismatch
Despite all its strengths, SQL can be awkward to integrate with host languages such as JavaScript and Python. There’s often an impedance mismatch between SQL’s declarative nature and the host language’s object-oriented or functional paradigms – SQL queries are typically written as strings within the...
Perhaps I was unclear. What I meant to say is that, whenever possible, we shouldn't have multiple versions of a field, especially when there is no corresponding plaintext password field in the database, as is the case here.
I appreciate the security concerns, but I wouldn't consider overriding the password property with the hashed password to be wrong. Raw passwords are typically only needed in three places: user creation, login, and password reset. I'd argue that having both password and hashedPassword properties in the user object may actually lead to confusion, since user objects are normally used in hundreds of places throughout the codebase. I think, when applicable, we should consider balancing security with code maintainability by avoiding redundancy and potential confusion.
Thanks for the tip. password.trim() can indeed be problematic. I just removed that line.
Think back to the last time you looked at an unfamiliar block of code. Did you immediately understand what it was doing? If not, you’re not alone – many software developers, including myself, find it challenging to grasp unfamiliar code quickly…
Many years ago, I took part in the development of a taxi-hailing mobile app that is still widely used today. I don’t know what kind of code they’re running now, but in those early days, the driver assignment code –if I remember it correctly– was similar in spirit to the grossly simplified example th...
When writing code, you can call any function as long as it’s public, and similarly, you can access any object’s public properties or methods. Usually, access to code is all or none – a piece of code can be either public or private. Lately, I’ve been thinking about ways to implement more fine-grained...
I started programming in GW-BASIC on an IBM PC clone running MS-DOS. Back then, many so-called home and business computers came bundled with a BASIC interpreter, mostly made by or licensed from Microsoft. They all looked similar. You were greeted by a screen with a READY or OK prompt and a blinking ...
Recently, I had a conversation with a junior developer on my team. Let’s call him Alan. We were talking about a new notification feature that was going to be used to send reminder e-mails to potentially thousands of people if they had forgotten to enter certain data in the last month or so. Alan was...
Seriously, why the negative tone? If I've offended you, I'm sorry. You might think that I'm wasting time, but there are multiple ways to skin a cat. I prefer not to use DEB packages for deployment, though others might.
Cleanup can be as simple as deleting the latest deployment directory, if the script gets that far. The article is about using built-in Linux tools for 'easy' application deployments. One can also use dedicated tools, as you suggested, to further automate the deployment process.
Author here. In case it’s not clear, this article isn't about installing Linux packages; it's about deploying multiple versions of software to development and production environments.
Linux comes with all the basic tools necessary to deploy an application and roll back to any past version if something goes wrong. It takes just a few commands to set everything up…
Author here. My blog is also generated with Hugo, and it's great. I just prefer not to generate HTML and CSS from JavaScript unless it's necessary.
Sorry, I haven’t seen that movie. Thanks for the recommendation though.
In the beginning, there was only HTML. The first official HTML specification focused on semantic markup. There were minimal styling tags and attributes. It was up to the web browser how to render the markup in an HTML document. The whole specification was refreshingly simple. You could easily read i...
Reusable HTML Components Powered by Alpine.js Reactivity
Reusable HTML components powered by Alpine JS reactivity 🛸 - markmead/alpinejs-component
That idea crossed my mind too, but you can’t really use the full capabilities of SQL in graph databases, and that’s a deal breaker for me.
There's certainly the danger of creating too many ad-hoc or sparse relationships, which can cause issues. That said, when used for supplementing foreign keys, Tie-in can be a useful tool in a production system as well.
Yes, that's correct. Here's how an entry in the join table looks like:
{
"id": 6,
"sourceComp": "user",
"sourceId": 2,
"targetComp": "post",
"targetId": 3,
"type": "author",
"createdAt": "2024-03-28T13:28:59.175Z",
"updatedAt": "2024-03-28T13:28:59.175Z"
}
AFAIK, no NoSQL database fully supports SQL, and only some offer support for transactions and joins. The idea here is to augment a relational database by adding capabilities for dynamic relationships.
In a relational database, foreign keys are normally used to associate records stored in different tables, but wouldn’t it be nice to define relationships dynamically without having to add extra columns or tables? And while we’re at it, how about having sparse relationships by associating a record di...
A look at a conversion from Vue 2 to Alpine.js
Code Examples and Guides of Functionality with Alpine.js
Collection of code examples and guides of functionality with Alpine JS. Learn how to build a website with Alpine JS.
That idea crossed my mind too. AFAIK, you can't really use SQL in graph databases, and that's a deal breaker for me.
A comparison of a simple app in Vue.js and Alpine.js
Unlike most modern javascript frameworks, Alpine requires absolutely no build, you simply include the library and away you go, all features included. It’s also super lightweight. If you already know Vue, you basically know Alpine, making it perfect for Vue developers to turn to for projects where Vue is simply overkill and without the headache of learning something completely alien.
Tie-in: A relational data component library for Node.js
Relational Data Component Library for Node.js. Contribute to aycangulez/tie-in development by creating an account on GitHub.
Tie-in is a relational data component library that lets you store and query records that can be related to any other record.
The relationships in a database are usually defined between columns across tables. In Tie-in, however, relationships can be defined between individual records. Relationships can also have types, so you can have multiple relationships between two records.
The ability to associate a record with any other record in any table opens up new possibilities that are hard to accomplish with conventional column-based relationships. In addition, since relationships are dynamic, no schema changes are necessary to define new relationships.