Giter VIP home page Giter VIP logo

Comments (12)

derekprior avatar derekprior commented on May 23, 2024 2

from scenic.

rennanoliveira avatar rennanoliveira commented on May 23, 2024 1

If anyone falls on this issue, there are quite a few community made mysql adapters for scenic, the most downloaded one being this one.

Maybe it would be nice to add a section to the README with the community adapters, like omniauth has, so people get to know they exist.
I actually ended up making my own adapter as I did not know one had already been made :)

from scenic.

derekprior avatar derekprior commented on May 23, 2024

This is definitely something we intended for the community to provide, though we expect that to be in the form of an adapter gem, scenic-mysql.

We've found that the ability to plug and play adapters is important but that unless we are frequent users of those adapters, they tend to become buggy over time. That said, I'm interested to see how this goes and how the testing story would go (It'd be great to have a shared set of tests where/if appropriate).

from scenic.

derekprior avatar derekprior commented on May 23, 2024

And to be fair, I could see scenic-postgres itself becoming a separate gem and you simply add the necessary adatper gem to your Gemfile to use scenic. We're just not stable enough to pursue that right now.

from scenic.

calebhearth avatar calebhearth commented on May 23, 2024

Agreed. At this point all you need to do is provide an adapter and override this line: https://github.com/thoughtbot/scenic/blob/fcfcdbb80560c49cbe415ba675b7fbc9cdef34cc/lib/scenic.rb#L18

from scenic.

westonplatter avatar westonplatter commented on May 23, 2024

I understand and agree with modulizing per db adapter, but similar to AR, I would suggest that modules should exist within the gem. What are the Pro/Cons you're looking at?

I'm looking at using scenic for a non-trivial production app that's on Rails 3.2.x, though we'll be upgrading soon. It's scenic or something else to manage a suite of coming views.

I'm up for working through the kinks and putting in the effort to thoughtfully add to current conventions. Throwing half hearted code towards the project would be unkind on my part :)

from scenic.

westonplatter avatar westonplatter commented on May 23, 2024

He's a working set of mysql2 changes.

westonplatter@043212c

I'll touch base again once I get testing figured out.

from scenic.

derekprior avatar derekprior commented on May 23, 2024

It's not at all that the code would be of questionable quality and more a
concern over maintenance. When we make breaking changes to scenic we are,
perhaps, not best positioned to asses the impact on adapters we don't use
ourselves. When you move on to another project the code languishes and the
support burden shifts to us.

Additionally, there are versioning issues that arise. A breaking change to
the MySQL adapter would mean bumping the major scenic version, which means
everyone has to asses the appropriateness of that version - even those that
don't use that adapter.

I'm trying to keep an open mind but both @calebthompson and I have seen
this go poorly on our other projects.

On Wednesday, February 25, 2015, weston platter [email protected]
wrote:

I understand and agree with modulizing per db adapter, but similar to AR,
I would suggest that modules should exist within the gem. What are the
Pro/Cons you're looking at?

I'm looking at using scenic for a non-trivial production app that's on
Rails 3.2.x, though we'll be upgrading soon. It's scenic or something else
to manage a suite of coming views.

I'm up for working through the kinks and putting in the effort to
thoughtfully add to current conventions. Throwing half hearted code towards
the project would be unkind on my part :)

β€”
Reply to this email directly or view it on GitHub
#70 (comment).

from scenic.

westonplatter avatar westonplatter commented on May 23, 2024

Do you have a pattern for adapter-izing different dbs? I got mysql working within this repo, but wanted to push the MySQL logic into a separate gem/repo. If not, I'll hack something together.

from scenic.

calebhearth avatar calebhearth commented on May 23, 2024

As long as your gem defines a class Scenic::Adapters::Mysql which supports the same contract as https://github.com/thoughtbot/scenic/blob/master/lib/scenic/adapters/postgres.rb and overrides https://github.com/thoughtbot/scenic/blob/master/lib/scenic.rb#L17, it should work fine. That’s basically what we had in mind for adapters.

As far as testing, I'm not really sure yet. You can take a look at the Postgres adapter specs to get an idea. I'd also ensure that Scenic.database is what you expect and maybe have a high level test that just makes sure Mysql is actually being interacted with when you migrate.

from scenic.

derekprior avatar derekprior commented on May 23, 2024

There now exists a configuration point for the adapter. See Scenic::Configuration.

from scenic.

MarkMurphy avatar MarkMurphy commented on May 23, 2024

I second @rennanoliveira. The README for Scenic says it will link to any mysql adapters made available but hasn't done so.
https://github.com/thoughtbot/scenic/blob/master/README.md#faqs

scenic-mysql seems to be newer(ish)?

from scenic.

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.