TIP: Use Markdown or, <pre> for multi line code blocks / <code> for inline code.
These forums are read-only and for archival purposes only!
Please join our new forums at discourse.kohanaframework.org
ORM v/s Jelly v/s Sprig etc.
  • Friends,

    Are there any comparative and comprehensive document for various ORM Modules available in Kohana?

    I came across one forum discussion here - http://forum.kohanaframework.org/discussion/3450/ko3-sprig-vs-orm/

    Basically I am looking for comparison table like



    ORM Jelly Sprig
    Feature List


    Performance


    Documentation http://kohanaframework.org/guide/tutorials.orm http://wiki.github.com/jonathangeiger/kohana-jelly/ http://kohanaframework.org/guide/api/Sprig
    Suggested Use cases


    Author(s) John Heathco jonathangeiger shadowhand
    Links http://wiki.github.com/jheathco/kohana-orm/ http://github.com/jonathangeiger/kohana-jelly



    PS: How do I format my posts in new vanilla 2.0? There is no option to post in HTML/MarkDown :-(
  • I too would love to see this. Being New to Kohana I am thouroughly confused by the multiple choices of ORM's Why would one want a whole new option what can one do that the other can't and what looks to be the most fruitful to get used to for the future in terms of development and improvement?
  • They are all tools that accomplish more or less the same thing. Sorta like different car models. At a basic level, cars use gasoline to move you from one place to another quickly. All Modeling systems provide an easy way to CRUD database records and their related records, as well as validation and filtering. But each car and modeling system has its own style, and its own bells and whistles. If it gets the job done, and fits your style, use it. The question "Which modeling system is the best?" is as fruitless as "Which car is the best?". It's all opinion and personal preference.

    The basic difference as far as I recall is that ORM does not define the fields in the model, Sprig does, and Jelly is super field meta oriented. I've used Sprig and ORM in various projects (haven't used Jelly) and they both do the job, that's about all I care about.
  • MPTT modules exist for all, as well as Auth integration.
    ORM is the 'official' module, and seems to have best support on the forums.
    However, Form generation only works with Jelly and Sprig.
    Lastly, Jelly is not yet stable.

    I personally prefer Sprig, since it defines the Table Scheme in the model and therefore also enables for Form generation.
    Everyone has their own preferences though... :)
  • Thank you for trying to explain at least some of the differences.

    Yes I know sometimes somethings are hard to explain why one would choose one over another but to use your car anaolgy one could say do like your cars (or women) built for comfort or speed? See the The Dodge Viper is very fast and sleek looking but it only seats 2 and if your in an accident you're probably toast but it comes in this color and has this top speed vs the Volvo Station wagon which has room for your family and is much safer blah blah blah. Those kind of explainations make it easier for one to decide what his preferences are? Just knowing that in general they all have an engine and seats doesn't help us decide which we'd prefer which is why anyone with a good knowledge of each that would be willing to explain inherent Advantages and Disadvantages of each could be helpful to many I am sure.
  • Very simplified I look at it this way:

    ORM
    - Simple to use
    - Building table relationships (done in the model) is a breeze
    - Validating and sanitizing is easy & fast and still flexible enhough
    - Build to handle authorization/authentication easily

    SPRIG
    - Can basically do the same thing as ORM
    - Even easier validation since field types are defined in the model
    - Excellent form generation that makes CRUD operations VERY fast to build
    - You can to some degree use custom queries with SPRIG

    I haven't tried JELLY yet.

    Of course there are other stuff too but this why I choose SPRIG over ORM. Naturally there are situations where custom queries without using SPRIG at all are more appropriate.
  • I ventured the forums a long time back (maybe almost a year?) when I first started to get interested in Kohana however I was hospitalized for a few months right after that and so I didn't get deep enough in nor can I remember if my following statement is true but I thought I had read somewhere back then that Sprig was no longer being developed or supported by its authors? Am I correct or was that my imagination? To me I thought Jelly seemed to be making the most activity going forward which sounded interesting however I am still a little stumped as to which direction to maintain focus. To me it sounds like Sprig while maybe slightly more cumbersome to use in some areas actually would save you time and effort in others. However Orm is the one shipped in the package not Sprig so it seems the main developers of Kohana will more likely continue to support and improve Orm which is an important factor to consider for sure not to mention other module compatibilities as people develop add ons. I think if the road map is for Kohana core (and mahority addon developers) to stick with Orm then that may be the wiser path to choose?
  • What about some other ORMs? I found a RedBean in net. Must have a closer look but it seems nice. Have any body any experience with it?
  • > Sprig was no longer being developed or supported by its authors? Am I correct or was that my imagination?

    No, that's not correct. It's just been transferred.

    > To me I thought Jelly seemed to be making the most activity

    Most activity is made on brand new projects ;)
  • There are too many ORMs modules for Kohana, therefore there no one is really mature and reliable.
  • > therefore there no one is really mature and reliable.

    This is completely not accurate.
  • I found ORM and Sprig both to be (very) mature and reliable!

    Anyways, a comparison table as the topicstarter suggests would still be good, be it alone for pointing out that there are indeed different kinds of ORM. One might argue that that confuses newcomers, but starting an app, and then slowly finding out that there are many other options than ORM while not knowing what they do and how they are different is probably even more confusing...?
  • Feel free to start one on the unofficial wiki: http://kerkness.ca/wiki

    There are probably many people who would add to it.
  • I have started Wiki Table at http://kerkness.ca/wiki

    Hope many people will start updating that section.

    That should help all in selecting the right module for project(s).
  • I would like to contribute. But shouldn't the comparison sheet be a link to a subpage? Preferably under "Using ORM Object Modeling"
  • I could not figure out how to create a new page in docuwiki (so far) :-(

    Please feel free to make changes as you see fit.

    EDIT: Moved to new page. :-)
  • @zombor: Would you recommend Sprig over ORM or Auto_Modeler for a new project?
  • Sure, depending what your requirements are. We use Sprig on our site, and I don't think something like AM would work very well for what we do. It would require some modifications for that (which wouldn't be so hard to do, but would make it more "heavy").
  • I'm going to go back to my car example. The question "Would you recommend X over Y for a new driver?" doesn't carry enough info. What are you using the car for? How many people do you want to be able to fit in it? How many miles will you put on it? A pickup truck might be better, or a small sedan. We just don't have enough info.

    Same with any kind of programming library. What are you using it for? How big is the project? Does anyone who is working on the project have experience with any of the libraries?

    It's not black and white, and often it's just personal preference.
  • Sorry Bluehawk but I stilll disagree with you. You don't need to know my preferences to describe the difference between a pick up and a sedan. I am not asking which choice of car I should drive just that you explain the differences so I can make my own choice. Perhpas I have a lot of friends so you explain that the sedan has more passenger room than the pickup I can say hmmm I like that. But I am also in construction so having the bed of a pickup to haul supplies would be cool too. now at leats I know the difference between the 2 and can say hmmm I think I like that one. But as it is it is like like hiding the vehicles from the customer and throwing a couple car manuals at them and saying read both those to learn about the cars and their differences and then we will talk in 4 weeks? I mean a good salesman could have ran me down the features and benefits of each in 10 minutes instead of me reading for hours on end only probably still be a little confused.

    But to answer your question of what project I might like them for is basically a CMS whereby I can have Multilevel groups with users as members of multiples of those groups. Then I'd like some forums for discussion and an article system etc etc.
  • I invite all of you to at least list the features/benefits of the ORM you are using and why.

    Once we have some data, I will collate it and put it on the wiki.

    Now go ahead and plug your favorite ORM here. :-)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion