Hey,
Starting a new thread as this is really not related to the Wikidata review status thread.
On 6 October 2012 08:51, Dmitriy Sintsov questpc@rambler.ru wrote:
Speaking of ORM, are there the plans to support table field relations (one
to one, one to many, many to many) and maybe to use ORM through the core and another extensions? This could make DB access cleaner and simplier however maybe with little overhead. Also index hinting is probably required in such case, especially for such large and actively accessed databases.
The existing ORMTable functionality I wrote is intended as a very simple and lightweight layer on top of the regular database abstraction MediaWiki has. It is not a fully fledged ORM framework and is not intended to be one. I think it's a very bad idea to try to turn it into one. If you really want something more like a full object relational mapper, then you'll be better of starting from scratch after putting some serious thought into how you're going to do it. I do suspect that most core developers (including me) will be rather sceptical of putting such a thing into core though, as it would seriously impact a lot of existing code.
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
Sat Oct 06 2012 19:44:51 GMT+0400 (Caucasus Standard Time) пользователь Jeroen De Dauw (jeroendedauw@gmail.com) написал:
Hey,
Starting a new thread as this is really not related to the Wikidata review status thread.
On 6 October 2012 08:51, Dmitriy Sintsov questpc@rambler.ru wrote:
Speaking of ORM, are there the plans to support table field relations (one
to one, one to many, many to many) and maybe to use ORM through the core and another extensions? This could make DB access cleaner and simplier however maybe with little overhead. Also index hinting is probably required in such case, especially for such large and actively accessed databases.
The existing ORMTable functionality I wrote is intended as a very simple and lightweight layer on top of the regular database abstraction MediaWiki has. It is not a fully fledged ORM framework and is not intended to be one. I think it's a very bad idea to try to turn it into one. If you really want something more like a full object relational mapper, then you'll be better of starting from scratch after putting some serious thought into how you're going to do it. I do suspect that most core developers (including me) will be rather sceptical of putting such a thing into core though, as it would seriously impact a lot of existing code.
Many frameworks allow to combine "direct" SQL calls and ORM calls, so there is not that big legacy compatibility problem. The efficiency could be a problem, though. Not all of ORM's are heavy-weight. For example, Yii's is quite light however queries weren't always most efficient. I used to work with Yii recently, that's why I asked. Speaking of Java, that's more heavy-weight, something like Doctrine, probably (which I didn't use yet). Dmitriy
For some cases I find ORMTable and our framework pretty useful, but on the other hand our current database solution (with DatabaseBase::select and the like) is perfectly fine and works efficiently and securely for most purposes.
*--* *Tyler Romeo* Stevens Institute of Technology, Class of 2015 Major in Computer Science www.whizkidztech.com | tylerromeo@gmail.com
On Sat, Oct 6, 2012 at 2:09 PM, Dmitriy Sintsov questpc@rambler.ru wrote:
Sat Oct 06 2012 19:44:51 GMT+0400 (Caucasus Standard Time) пользователь
Jeroen De Dauw (jeroendedauw@gmail.com) написал:
Hey,
Starting a new thread as this is really not related to the Wikidata review status thread.
On 6 October 2012 08:51, Dmitriy Sintsov questpc@rambler.ru wrote:
Speaking of ORM, are there the plans to support table field relations (one
to one, one to many, many to many) and maybe to use ORM through the core and another extensions? This could make DB access cleaner and simplier however maybe with little overhead. Also index hinting is probably
required
in such case, especially for such large and actively accessed databases.
The existing ORMTable functionality I wrote is intended as a very simple and lightweight layer on top of the regular database abstraction MediaWiki has. It is not a fully fledged ORM framework and is not intended to be one. I think it's a very bad idea to try to turn it into one. If you really want something more like a full object relational mapper, then you'll be better of starting from scratch after putting some serious thought into how you're going to do it. I do suspect that most core developers (including me) will be rather sceptical of putting such a thing into core though, as it would seriously impact a lot of existing code.
Many frameworks allow to combine "direct" SQL calls and ORM calls, so
there is not that big legacy compatibility problem. The efficiency could be a problem, though. Not all of ORM's are heavy-weight. For example, Yii's is quite light however queries weren't always most efficient. I used to work with Yii recently, that's why I asked. Speaking of Java, that's more heavy-weight, something like Doctrine, probably (which I didn't use yet). Dmitriy
______________________________**_________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org