|
|
|
|
|
by jiggawatts
26 days ago
|
|
Something I'd like to see is for someone to finally come to the realisation that the right thing to do is to make the front-end web templating language truly polyglot and support SQL natively, without an ORM wrapper. For example, the ASP.NET Razor syntax allows HTML and C# code to be interspersed surprisingly freely: <ul>
@foreach (var user in Model.Users)
{
<li>@user.Name</li>
}
</ul>
Just picture the same kind of thing, but with SQL expressions freely interspersed with the programming language.Just like how Cargo, NuGet, NPM, etc... can import packages and/or how you can cross-reference projects in build systems, web apps should be able to reference a database schema project directly, importing the SQL definitions without any explicit "mapping". If the SQL changes, the type changes, and the build system picks that up automatically without any additional manual steps. .NET with EF Core is almost there, and I've seen some half-hearted attempts in various languages over the years, but it's like the industry has an allergy to the concept. Ur/Web is probably the closest to the idealised concept, and I think that's what I read years ago that put the dream in my mind: https://dl.acm.org/cms/attachment/feb131ab-37e1-4638-be17-ab... |
|