Has anyone written anything like the ActiveRecord for Glorp? VW7.6 has something, but it would be slightly painful to port (for me at least) as it uses VW Package definitions and a few other things I am not familiar with.
I know Ramon did something that used Magritte, but I am not using that in my application. There are many ways of varying complexity that one could try to standardize your Glorp mappings within your application, so I just thought I'd check if anyone had anything working before I go down that road! Thank you, Rob _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
>>>>> "Rob" == Rob Rothwell <[hidden email]> writes:
Rob> Has anyone written anything like the ActiveRecord for Glorp? Using something like ActiveRecord for Glorp would be like buying an airplane just to taxi around the airport without ever lifting off the ground. The big plus in Glorp that I'm seeing is that you can do more than DirectMapping... you can describe tables on one side, model-objects on the other, and then produce an almost arbitrary mapping between the two. Sure, for simple stuff, one-class-is-one-table might make sense, but pay attention to the other kinds of mapping styles. Lots of power in there. It's how an ORM *should* be done. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[hidden email]> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
> Sure, for simple stuff, one-class-is-one-table might make
> sense, but pay attention to the other kinds of mapping > styles. Lots of power in there. It's how an ORM *should* be done. > > -- > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - Rails has made it pretty clear that *most* apps really are that simple since it only supports direct mapping. Glorp is absurdly powerful in its ability to map objects to tables, *assuming* that mapping is the correct answer of course. As powerful as Glorp is, most people will end up spending a lot of time wrestling with mappings, probably far more than they want. Glorp is an expert framework for experts, but those who don't grok mapping patterns in general will be baffled by it. Rob, if you don't need to scale too big, check out the SandstoneDb package on SqueakSource, it should be familiar to anyone who likes ActiveRecord. Ramon Leon http://onsmalltalk.com _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Rob Rothwell
On Wed, 2008-04-02 at 22:48 -0400, Rob Rothwell wrote:
> Has anyone written anything like the ActiveRecord for Glorp? VW7.6 > has something, but it would be slightly painful to port (for me at > least) as it uses VW Package definitions and a few other things I am > not familiar with. > There is a FileOut30 package which provides writing out code in a lot of dialects (it's in the public store). If you want to convert a complete package just install FileOut30. In the preferences you can choose squeak as file out format. If you file out the package you should be able to read it in squeak without too much hussle. If you are not successful than email me. I use my own converter for VW code to port Glorp to squeak. > I know Ramon did something that used Magritte, but I am not using that > in my application. > > There are many ways of varying complexity that one could try to > standardize your Glorp mappings within your application, so I just > thought I'd check if anyone had anything working before I go down that > road! Glorp can figure out a lot of the mapping setting on its own. For easy mappings you can just leave out class mapping and descriptor mappings. No need to have ActiveRecord stuff from the start. Norbert _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Thanks everyone for all the input. It really helped me sit back and think about what the best approach to the overall problem I am trying to solve would be, which included techniques for minimizing the amount of database interaction I need in the first place.
Rob On Thu, Apr 3, 2008 at 5:49 AM, Norbert Hartl <[hidden email]> wrote:
_______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Randal L. Schwartz
still it would be good to have a layer on top of Glorp, I'm amazed by
the quantity of code we should write (See HPI seaside tutorial). It would be good that a reflective or meta description approach would be proposed by default and that if people want to have something that can do it (as it is now). I do not see the value of paying in advance functionality I do not need. Glorp start up is too high from my perspective (I'm lazy and proud of it).] Stef On Apr 3, 2008, at 6:37 AM, Randal L. Schwartz wrote: >>>>>> "Rob" == Rob Rothwell <[hidden email]> writes: > > Rob> Has anyone written anything like the ActiveRecord for Glorp? > > Using something like ActiveRecord for Glorp would be like buying an > airplane > just to taxi around the airport without ever lifting off the ground. > > The big plus in Glorp that I'm seeing is that you can do more than > DirectMapping... you can describe tables on one side, model-objects > on the > other, and then produce an almost arbitrary mapping between the two. > > Sure, for simple stuff, one-class-is-one-table might make sense, but > pay > attention to the other kinds of mapping styles. Lots of power in > there. It's > how an ORM *should* be done. > > -- > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 > 777 0095 > <[hidden email]> <URL:http://www.stonehenge.com/merlyn/> > Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. > See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl > training! > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Ramon Leon-5
I totally agree. Upfront vs practical.
For my dead stupid data I want a dead stupid way of storing them in postgrs stef On Apr 3, 2008, at 7:57 AM, Ramon Leon wrote: >> Sure, for simple stuff, one-class-is-one-table might make >> sense, but pay attention to the other kinds of mapping >> styles. Lots of power in there. It's how an ORM *should* be done. >> >> -- >> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - > > Rails has made it pretty clear that *most* apps really are that > simple since > it only supports direct mapping. Glorp is absurdly powerful in its > ability > to map objects to tables, *assuming* that mapping is the correct > answer of > course. As powerful as Glorp is, most people will end up spending a > lot of > time wrestling with mappings, probably far more than they want. > Glorp is an > expert framework for experts, but those who don't grok mapping > patterns in > general will be baffled by it. > > Rob, if you don't need to scale too big, check out the SandstoneDb > package > on SqueakSource, it should be familiar to anyone who likes > ActiveRecord. > > Ramon Leon > http://onsmalltalk.com > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
On Mon, Apr 7, 2008 at 1:30 PM, stephane ducasse <[hidden email]> wrote:
I totally agree. Upfront vs practical. Well...when you put it that way, that WAS the question I was asking in the first place! (Should the thread be renamed to "Dead Stupid Ways to Store your Data in Postgres?" What would that look like to you, in case I get crazy and try to do do something? Rob _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
uhmm I wonder why Ramon hasn't mentionned his work on MagritteGlorp...
it looks like what you're looking for. There are other posts on Glorp in his Blog. http://onsmalltalk.com/programming/smalltalk/a-smalltalk-activerecord-using-magritte-seaside-and-glorp/ Personnaly, for simple data, I prefer a simple file based persistency, still as Ramon suggested ;) http://onsmalltalk.com/programming/smalltalk/simple-image-based-persistence-in-squeak/ Cédrick _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Free forum by Nabble | Edit this page |