/

Issue #19 - ORM or SQL - Web Accessibility - API Gateway

March 1, 2023
3 min read
Issue #19 - ORM or SQL - Web Accessibility - API Gateway

Issue #19 - ORM or SQL - Web Accessibility - API Gateway

‍

<1/> ORM Or SQL

The choice between using an ORM or raw SQL depends on the specific requirements of the application. ORMs are generally a good choice for web applications that require a high degree of abstraction and security, while raw SQL is a better choice for applications that require complex and highly optimised database queries. From my observation, using both an ORM and raw SQL can provide a good balance between productivity and performance, so for simpler queries you would use an ORM and for much more complex queries raw SQL, this approach is one that I highly recommend. However, overusing ORMs can lead to a performance hit and difficulty in debugging, I have come across instances where the output query is difficult to read and debug, while using raw SQL can lead to security vulnerabilities and difficulty in maintaining code. I have seen the conversation on the use of ORMs vs raw SQL for a while that I thought I would add my opinion.

One article that I read referenced how skills your learn from an ORM are not 1:1 transferable to SQL, so you end up knowing how to use an ORM but not the SQL statement, classic computer science problem in my mind, where one beautiful innovation, abstracts us away from the underlying thing, so in essence ORM move us away from SQL. A common problem with ORMs is that they tend to be inefficient for complex queries, I know, I know... you have heard this way too many times than you would want to admit. There are instances where an ORM produces an extra SQL statement that would otherwise not be required. Writing raw SQL can be dangerous if we are not careful, if the SQL that you write is not properly sanitised we might find ourselves dealing with SQL injection attacks.

In my opinion we stand a better chance if we just combine raw SQL and ORMs for developing applications, raw SQL for complex and efficient queries, and ORMs for less complex queries to speed up productivity and a better developer experience. If we just used raw SQL throughout our applications we could find ourselves with an application that is a pain to maintain, littered with SQL statements as the codebase grows, also in the unlikely scenario that you have to switch databases, the SQL statements that you wrote for MySQL do not necessarily transfer nicely to Postgres. So choose wisely!

<2/> Deeper Dives

<3/>Dev Weekly πŸ“°

Web accessibility is a pivotal aspect of web development, which involves making sure that websites and web applications can be used by everyone, regardless of any disabilities they may have. The importance of web accessibility cannot be overstated as it ensures that websites can be accessed and used by the widest possible audience. This importance was highlighted when NextJS team release the latest version of NextJS and made emphasis on including alt property on images as a required key.


To create a more accessible website, we need to follow certain best practices. One of the most important practices is to use semantic HTML. Using appropriate tags to describe the content and structure of the page. Semantic HTML can help technologies like screen readers to interpret the page more accurately, making it more accessible for users with disabilities. Another essential practice is providing alternative text for images. Since images are a significant part of many websites, it is crucial to provide alt text property for images to ensure that screen readers can describe the image to users who cannot see it.


Ensuring that form inputs are labeled correctly is also important as screen readers can have difficulty interpreting form inputs that are not labeled correctly. By ensuring that form inputs are labeled with appropriate labels, we can ensure that all users can understand what information is being requested.
Lastly, following accessibility guidelines is crucial. The Web Content Accessibility Guidelines (WCAG) provide a framework for creating accessible websites. By following these guidelines, we can ensure that their websites meet a minimum level of accessibility.


By following these best practices, we can create websites that are more accessible to people with disabilities, improving the usability and user experience of their websites for everyone. You can checkout an introduction to web accessibility here.

<4/> Inside the Console πŸ’»

Amazon API Gateway is a fully managed service that makes it easy to create, publish, maintain, monitor, and secure APIs at any scale. It is designed to help developers build and deploy RESTful APIs quickly and easily, with minimal overhead and cost.


Amazon API Gateway is its integration with other AWS services. You can use API Gateway with AWS Lambda to create serverless applications that scale automatically, or with Amazon DynamoDB to store and retrieve data for your API. You can also use API Gateway with Amazon CloudWatch to monitor your API's performance and usage.

You can checkout the pricing here, and some of the cool features available for API Gateway.

<5/> Geeking It Up πŸ€“

Software2.0
Andrej Karpathy takes us through what we are now starting to call Software 2.0, which is pretty much all about machine learning and AI
React Documentary
Honeypot with their cool tech documentaries have highlighted React this time around.
RabbitMQ v. Kafka
A nice comparision between RabbitMQ, a message broker, and Kafka, a distributed streaming platform.
Map in JS
A comparison on how using Maps can be more effective for JS developers.

‍

Brandpush trust badge

Similar posts

See our latest blogs and tech news

Start your software project

Get in touch and let's get started
Get started
Tick
Cost-effective
Tick
Reliable
Tick
Scalable