4 ms·
Shameless plug here, but this is exactly the reason why I did not create a query builder in the RedBeanPHP ORM. At the time (2009) query languages were a real '
by gabordemooij 8y ago
Shameless plug here, but this is exactly the reason why I did not create a query builder in the RedBeanPHP ORM. At the time (2009) query languages were a real 'hype' (as well as noSQL) but I have always loved SQL and I struggled with all the SQL-alternatives offered by other ORMs. So, when I created RedBeanPHP I decided to complement SQL rather than trying to replace it. Yes, there is some room for improvement, notably in the integration with the programming language (in my case PHP). So the ORM class has some methods to indicate you would like to apply a condition, but the condition itself is just written in pure SQL.I see my ORM more as a bridge between SQL and PHP than a carpet that hides the SQL.
Not all DSLs are necessarily bad though. Personally I like to create some very basic and straightforward DSLs to replace horribly complex GUIs with tons of nested menus (aimed at professionals). I think DSLs can be useful for educated computer users who don't know SQL (like people in finance, medicine, statistics). Also there should be a limit to the complexity of a DSL. Not every DSL needs to be turing complete. Simple DSLs that cover the required functionality are the most successful in my experience with customers.
However replacing SQL just does not feel right, it's already an awesome language to query a relational database so why replace it? So, for the most part I agree with the author - although I miss the nuance a bit.
- nojvek 8y agoI loved redbean, such a nice library. Don’t do much php nowadays but Django is a great db - object abstraction. You can go raw sql if you want quite easily.