Silex and MongoDB, which Silex Extension - mongodb

I would like to use Silex with MongoDB.
I guess the best way is to use a Silex Extension that again uses the Doctrine MongoDB libs.
There are two Silex Extensions right now that seem to provide this functionality.
https://github.com/fate/Silex-Extensions
and
https://github.com/docteurklein/SilexExtensions
Except that the first brings more other Extensions and the second uses submodules (which i would prefer) instead of vendors.sh, are there more things to take care of?
Can anybody recommend the one or the other?

Update:
The Extensions below are outdated, pls use answer above.
to answer it myself:
https://github.com/fate/Silex-Extensions uses the Doctrine MongoDB Abstraction Layer
whereas
https://github.com/docteurklein/SilexExtensions uses the Doctrine MongoDB ODM (Object Document Mapper)
So with the first you can only query MongoDB through Doctrine and with the second you can persist Model Objects to MongoDB as known from f.e. symfony models.

This are brand new MongoDB providers with multi connection support.
MongoDB:
https://github.com/saxulum/saxulum-doctrine-mongodb-provider
MongoDB ODM:
https://github.com/saxulum/saxulum-doctrine-mongodb-odm-provider

Related

Mongoengine and Pymongo?

Can I use mongoengine or djongo for ODM and pymongo for interaction with the db?
I've read these two about something related to my question:
Insert data by pymongo using mongoengine ORM in pyramid
Use MongoEngine and PyMongo together
But, I couldn't find what I'm looking for (I guess).
So here's what I'm trying to find:
¿Does this practice affect the performance of my application?
¿How well recommended is it?
So, if it is recommended, and everything is right, ¿Do I need to put an extra layer of security or something?, because, I want to build an API using the serializations for models that django-rest-framework-mongoengine offers, and then do what I have to do in the view of the API endpoint.
It could be djongo or something like it, what I want is just an ODM for serializing, define a structure for the API and so on, use pymongo for queries, cause according to what I've been reading, mongoengine could make slower the interaction with the db
The term "ORM" does not apply to MongoDB since MongoDB is non-relational. The proper term is "ODM" - object-document mapper.
Generally, a MongoDB ODM is built on top of a MongoDB driver. The functionalities of the ODM and the driver are complementary - the driver provides low-level database access and the ODM provides high-level features like schema, associations, callbacks.
If you want to use the high-level features, it makes sense to use an ODM. If you don't need any of those features and just want to perform basic CRUD operations, using a driver directly is more efficient. Some applications use both of these strategies depending on the operation that needs to be performed.

Data-modelling tools for MongoDB

Even though MongoDB is a schema-less DB but there is a requirement in my project where I have to map my classes to the Database objects and prefer to have the data modelling for the same. Please suggest some Data-modelling tools for MongoDB to map the DB to Classes and Objects.
Moon Modeler is a data modeling tool for MongoDB and Mongoose (ODM)
I think you want to model your applications and persist your data in MongoDB. So it depends on what framework/language are you using for application.
I did a quick web search to get these ODM (Object-Document-Mapper) options recommended to work with MongoDB for some of the popular languages.
ruby
https://docs.mongodb.com/mongoid/master/
http://mongomapper.com/
java
https://github.com/mongodb/morphia
http://hibernate.org/ogm/
python
http://mongoengine.org/
http://api.mongodb.com/python/1.6/index.html

mongodb persistence patterns for JSON client app, jackson mapper or morphia driver?

I've started a new job where they are using mongodb in a java environment.
They have implemented a pattern using DTOs and factories with the morphia driver, this may be due to a migration onto mongodb from a key value store previously. The client is a JSON client.
It seems to me that the jackson-mongo-mapper would be a better approach because it's just mapping pojos from json to BSON and back, seems like it could do away with all DTO factory facade?
Anyone know any pros and cons with these different approaches?
Spring Data for Mongodb is very nice since you can use even another data store or mix them and repository interface is very helpful.
Kundera is an option through JPA2
http://agilemobiledeveloper.wordpress.com/2013/08/22/working-with-mongodb-using-kundera/
There's a lot of java to mongodb options.
http://www.agilemobiledeveloper.com/2013/01/31/hibernate-ogm-mongodb-vs-kundera-vs-jongo-vs-mongodb-api-vs-morphia-vs-spring-data-mongo-mongodb-drivers-for-java/
Adding your own data layer and making sure you use DI and test it fully is very helpful.
NOSQLUnit is awesome -> https://github.com/lordofthejars/nosql-unit
DTOs are good for keeping a separation between implementation and design, so when they need or want to switch from mongo to some other NoSQL or SQL database it can be done cleanly.

MongoDB and similar database technologies

What are comparable database like Mongo DB?
We are trying to evaluate Mongo DB and find the best database for a enterprise level application.
Is there any developer UI and admin UI available for MongoDB like SQL Plus/Toad etc for Oracle?
MongoDB is a document-oriented database, so instead of a row of data, you have a document. In MonogDB's case, its a JSON document. Apache's CouchDB is another document database that stores data in JSON format although there are subtle differences between the two.
Choosing between the two depends on your use case. Sometimes CouchDB is better than MongoDB.
Checkout this comparative to see the differences.
MongoDB is what is known as a NoSQL database, which is I assume why you're interested in it. You can find a list of other NoSQL databases at the below links:
http://en.wikipedia.org/wiki/NoSQL
http://nosql-database.org/
MongoDB does not include a GUI-style administrative interface; however, there are numerous community projects that provide admin UIs for MongoDB:
http://www.mongodb.org/display/DOCS/Admin+UIs
I like document oriented databases like MongoDB very much. Because they are shema-less. You can just insert find and update your records without first having to define a schema. But you can define one in your own Project logic. You have more freedom.
It would be nice to have an embeddable NoSQL database. Like SQLite but document oriented.
Currently I do develop one in Java. (You can also use it withhin an Android App):
https://github.com/neo-expert/thingdb
I am quite happy with MongoVue. I've made a couple of videos about this here.

How to write Linq to Sql query for geting table with condition from MongoDB

I am using MongoDB.I am unable to write Linq to Sql query.
How to write retrieve table from MongoDB.
I like what Christian says, but I think it is clear that the NORM project is dead at this point (though the source is out there freely so that could always change). For a nice LINQ interface over Mongo take a look at Fluent Mongo. Thus far I have found it to be a good experience. Interestingly the CodeProject article that gideon mentions is by the same fellow behind the Fluent Mongo lib but I can not find it mentioned in the article.
I don't know much too about mongoDb, but I do know the Database is under the NoSQL category and linq-to-sql doesn't make much sense.
http://en.wikipedia.org/wiki/NoSQL#Document_store
Scan through these posts: https://stackoverflow.com/questions/tagged/mongodb+linq
Linq is supported, see these articles:
http://wekeroad.com/2010/03/04/using-mongo-with-linq/
http://www.codeproject.com/KB/database/MongoDBCS.aspx
You cannot use LINQ-to-SQL with MongoDB on the backend, since Mongo does not use/accept/understand SQL. You can however use LINQ, if for instance you use NORM library for MongoDB.
If you are specifically after LINQ, but just a nice fluent query interface the official C# MongoDB driver from 10Gen has really nice and accesible query interface.