Suite v2 :)

103 views
Skip to first unread message

Dariusz Górecki

unread,
Oct 26, 2012, 9:44:23 AM10/26/12
to yiimong...@googlegroups.com
Hey all,

loong 2 yeas have passed since I finished working with Yii and YMDS.

I'm glad to announce that I'm currently working on full re-write of YMDS.

YMDS2 will not be backward compatible with v1.x versions, as some core
concepts where changed:

- ORM/AR is not suitable for MongoDB extreme power of "schema-less",
features that poorly tried to implement lack of schema, will be avoided,
if you want to have maximum flexibility, use simple array() Luke :)
- Every relation (eg. Embedded document) will have its own *proxy* class,
I'll provide ref implementation for embedded document and array
of embedded documents, you can write yours *super-extra-featured*
relation classes.
- Core Yii's AR "concept" will be handled, but ActiveRecord like
interface is not guaranteed.
- EMongoCritera is rewritten too, for support of *complex* operators
like `$or`

If you want to help, submit some ideas, pull requests - some core
concept code
is already on GitHub https://github.com/canni/ymds2

I'll be glad if someone can help with docs(blocks) and proper english
speech.

cheers,
canni

Attila Nagy

unread,
Oct 27, 2012, 5:55:21 AM10/27/12
to yiimong...@googlegroups.com
Hi!

Very interesting project, looking forward for it!

On Fri, Oct 26, 2012 at 3:44 PM, Dariusz Górecki <dare...@gmail.com> wrote:
> - EMongoCritera is rewritten too, for support of *complex* operators like
> `$or`

Did you consider making it compatible with the way criterias are
described in php/mongo? The current EMongoCriteria class requires
different way to specify a query than you would do in mongo/php. My
experiences shows that it's quite confusing for most of the
developers, and hard to learn. Especially if you put together a
criteria in the mongoshell, then try to move it to your ymds based
code makes lots of errors.

It would be nice if one should learn only one of the syntaxes instead
of two. I would reconsider dropping EMongoCriteria as a whole, if it
does not add too much feature, or just to focus on other added
features (field selection, etc)

Example of what I mean:
mongoshell> db.product.find({color: 'red', price: {$gt: 10}});

//plain php, basically the json_decoded version of the above
$collection->find(array('color' => 'red', 'price' => array('$gt' => 10)));

// ymds, this is the shortest form I know of
Product::model()->find(array('conditions' => array('color' =>
array('==' => 'red'), 'price' => array('gt' => 10))));

So the latter could be much simpler if I could just use the same array
that I use in the second example, especially when it comes to complex
operators.

--
Nagy Attila Gabor

Dariusz Górecki

unread,
Oct 27, 2012, 6:05:51 AM10/27/12
to yiimong...@googlegroups.com

Hey, the core concept behind criteria object, is support for features like named scopes, simple array_merge would produce buggy results, but probably I'll support both ways.

canni

Rustam Alimov

unread,
Oct 27, 2012, 9:21:13 AM10/27/12
to yiimong...@googlegroups.com
Thanks)

Dmitriy Sevostyanov

unread,
Nov 16, 2012, 2:13:15 AM11/16/12
to yiimong...@googlegroups.com
When are you going to commit usable version?

Dariusz Górecki

unread,
Nov 16, 2012, 3:10:47 AM11/16/12
to yiimong...@googlegroups.com
Hey Dimitriy,

I with other commiters don't have clear roadmap, how code should look and behave, things like, do we want support for PHP 5.2
or do we can use minimum PHP 5.3, an other things.

Don't expect that it will be ready anytime soon, also because I'm moving permanently to London, and dont have time to code now :/

Best Regards,
canni.


2012/11/16 Dmitriy Sevostyanov <xdm.i...@gmail.com>
Reply all
Reply to author
Forward
0 new messages