Giter Site home page Giter Site logo

sample with play-plugins-salat can't recognize ObjectId (related to https://github.com/leon/play-salat/issues/53) about play-salat HOT 6 CLOSED

leon avatar leon commented on August 28, 2024
sample with play-plugins-salat can't recognize ObjectId (related to https://github.com/leon/play-salat/issues/53)

from play-salat.

Comments (6)

 avatar commented on August 28, 2024

i am having a hard time understanding how sample project use salat plugin and why it has some of the code.
For example why it has 2 controllers if all it does is showing a list of users from the database and allow to get one by Object id.

Can someone explain the architecture underneath. It's problematic to start using something without a strong knowledge of technology and any documentation. Description says very little about why I need salat plugin and how would I use it and how sample project is suppose to work

from play-salat.

Manc avatar Manc commented on August 28, 2024

I've got to say, I've got the same problems. I'm quite new to Scala and Play Framework and just can't get it work.

from play-salat.

leon avatar leon commented on August 28, 2024

the magic behind theObjectId conversion lies with importing the implicit conversions for it.

Make shure you have added them in you bould.sbt or Build.scala

https://github.com/leon/play-salat/blob/master/sample/project/Build.scala#L15

from play-salat.

Manc avatar Manc commented on August 28, 2024

Alright, quick update: I tried getting it work almost on a weekly basis. Today it suddenly worked!

I made sure I'm using Play 2.2.1, created a new project, carefully copied stuff from the sample to my project and I had almost no problems. It works, but I get a warning, when compiling:

[info] Compiling 14 Scala sources and 2 Java sources to …/target/scala-2.10/classes...
[warn] there were 1 feature warning(s); re-run with -feature for details
[warn] one warning found

I don't know if this is related to play-salat, I don't even know what to re-run with -feature (compile -feature is not working and starting play -feature neither).

Anyway, at least I can start doing something now. Thanks!

from play-salat.

 avatar commented on August 28, 2024

I think due to lack of support or documentation because nobody has time to work on both I'll drop efforts and move away to reactive-mongo - it seems to be less mature but in active development.

I think this wiki page should have a clear message at the top of it with big font saying "attention! little documentation, almost no samples, no explanation how it works and why, very brief comments - SUGGESTED NOT TO USE.

my strong opinion - if you don't do it right - don't do it at all, and don't recomment anyone to use it. I was surprised this plugin is mentioned on play framework page - there should be an indicator of how useful it is.
Apart from that - if somebody wants to play with the plugin and experiments and spend a lots of time trying to guess what's happening - you can do it, but it's not for production apps.

and by the way - lack of time is not an excuse for a good documentation : check out reactive mongo plugin for play:

https://github.com/ReactiveMongo/Play-ReactiveMongo/blob/master/samples/Play-ReactiveMongo-Sample/app/controllers/Application.scala

from play-salat.

leon avatar leon commented on August 28, 2024

The plugin works, the sample works.
I did this plugin because I needed it myself. You're not forced to use it, and if you don't like the documentation help me out by writing some better documentation. It's all about trying to help each other by not having to reinvent the wheel everytime you need something.

I can understand the frustration when something isn't well documented. But it all boils down to time and money. If your're willing to pay me, I would gladly update the documentation with more examples and inline commenting.

from play-salat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.