On Aug 12, 7:28 pm, Diego Mijelshon <[email protected]> wrote: > Seriously? > > Do you know what a unit test is?
Of course, it is a silver bullet which magically eliminates bugs. No? I'm sure you know that no unit test gives any guarantee. It gives you feeling that the app is in descent shape after changes, but nothing more. > Have you ever used a real refactoring tool (like R#)? I state that xml editing is not easy. And your argument that it requires (or is recommended) to use R# just proves my point. > Do you understand what Configuration.BuildSessionFactory does? Builds session factory? :) What is your question really? Vadim. > Diego > > On Thu, Aug 12, 2010 at 22:51, Vadim Chekan <[email protected]> wrote: > > On Aug 12, 3:27 pm, José F. Romaniello <[email protected]> wrote: > > > > You can change XML easily, and if you do the things right (write unit > > > tests), you are safe. > > > If it is a blogging app, may be. But enterprise app can have 400 > > tables easily. I would rather quit then "easily" edit this xml. > > > Imagine you decided to change naming schema. With c# attribute based > > config you edit name in the code and mapped name is right in the line > > above. > > With programmatic mapping even better, you use refactoring tools. > > With xml you have to switch to xml, find, edit, switch back. Do it > > couple hundreds of times, and call it "easy" :) Ah, wait, error ratio > > in so boring job is high, so there will be bugs. Test it, find bugs, > > troubleshoot, fix, test again. How 'easy" is it? > > > > If you made the things wrong, you are not safe even with FNH. I am > > talking > > > about crud FNH not automappings, that may be another thing. > > > Static languages generate a false sense of safety. > > > Static check is safer then dynamic error. What can be even discussed > > here? > > > > FNH maybe has an advantage when you write from scratch, having > > intellisense > > > is really good. So, I maintain my position, do you? > > > I'd say it is the least concern. Xml can have intellisence based on > > schema too. My concern is dynamic development with many changes to DB. > > I want to minimize time I spent editing mappings and minimize risks. > > > Vadim. > > > > 2010/8/12 Tuna Toksoz <[email protected]> > > > > > You can change it more easily than you could with XML. > > > > > Tuna Toksöz > > > > Eternal sunshine of the open source mind. > > > > >http://devlicio.us/blogs/tuna_toksoz > > > >http://tunatoksoz.com > > > >http://twitter.com/tehlike > > > > > On Fri, Aug 13, 2010 at 1:06 AM, José F. Romaniello < > > > > [email protected]> wrote: > > > > >> define "editable" > > > > >> 2010/8/12 Tuna Toksoz <[email protected]> > > > > >>> I agree with John, and will like to add that I don't see the point of > > a > > > >>>> tool generating code for another tool that generates code. > > > > >>> I do see value in that. FNH is much more readable and editable than > > > >>> ordinary XML. > > > > >>>> Is like if the FNH team choose to generate LLLBlGen Pro dsl. > > > >>>> I hope this will be taken as a constructive comment. > > > > >>>> XML in his both representations as raw XML or as HBM* classes is the > > > >>>> lowest common denominator. > > > >>>> See? I read Fabio's blog. > > > > >>>> 2010/8/12 John Davidson <[email protected]> > > > > >>>> Frans, > > > > >>>>> Fleunt NHibernate is almost a non-starter as there is no > > documentation > > > >>>>> on how to use it with VB.Net, if it would even work. XML is a > > lowest common > > > >>>>> denominator type solution and should always be retained. Higher > > level > > > >>>>> solutions are great, but not always accessible > > > > >>>>> John Davidson > > > > >>>>> On Thu, Aug 12, 2010 at 12:51 PM, Frans Bouma <[email protected]> wrote: > > > > >>>>>> > Same XML please. > > > > >>>>>> that's trivial if I define the model like you did in code. > > > > >>>>>> > btw Frans, you product is a code generator I can't skip 42 > > slides > > > >>>>>> because > > > >>>>>> in > > > >>>>>> > the early slides you are describing the domain relations and > > > >>>>>> relational > > > >>>>>> > mapping... > > > > >>>>>> no, not the mapping, just the entities and the > > relationships. > > > >>>>>> I > > > >>>>>> don't define any mapping in that video by hand, nor the DDL SQL. > > > >>>>>> Mappings + > > > >>>>>> table stuff is created by 1 mouseclick using settings to configure > > > >>>>>> what will > > > >>>>>> I end up with. > > > > >>>>>> > would be the same than explain that you have a whole application > > > >>>>>> running > > > >>>>>> > starting from "press F5". > > > > >>>>>> you wrote classes to start with, I didn't. The classes > > contain > > > >>>>>> the > > > >>>>>> info used by confORM, I created a model, which produces classes + > > > >>>>>> mappings + > > > >>>>>> DDL SQL, using very few keystrokes btw. > > > > >>>>>> But, like I said, let's not end up in a pissing contest :) > > > >>>>>> Being in > > > >>>>>> a rush to get things done a.s.a.p. is never going to end well, so > > > >>>>>> that's not > > > >>>>>> what people should focus on. It's about maintainability etc., and > > > >>>>>> confORM > > > >>>>>> could be a good choice for that as well, I don't want to have that > > > >>>>>> debate, > > > >>>>>> as it's besides the point. The point is: with all the options, is > > yet > > > >>>>>> another option from the team around NH really helping, or just > > > >>>>>> confusing > > > >>>>>> users? > > > > >>>>>> Also, is it or isn't it the future _preferred_ way of doing > > NH > > > >>>>>> mappings from the point of view of the NH team? (so others have to > > > >>>>>> adapt to > > > >>>>>> confORM, and if they want support xml as well, but that's really > > not > > > >>>>>> the way > > > >>>>>> to go) > > > > >>>>>> FB > > > > >>>>>> > On Thu, Aug 12, 2010 at 1:11 PM, Frans Bouma <[email protected]> > > wrote: > > > > >>>>>> > > Now that you saw something more about ConfORM I will > > happy > > > >>>>>> if you > > > >>>>>> > can > > > >>>>>> > answer > > > >>>>>> > > my annoying question. > > > >>>>>> > > Can you show me the equivalent-mapping/procedure using > > what > > > >>>>>> ever > > > >>>>>> > you want > > > >>>>>> > ? > > > > >>>>>> > (it's an old video of the alpha build, I'll soon > > make a > > > >>>>>> new, > > > >>>>>> > more > > > >>>>>> > extensive one with quickmodel and NH. It's for our own > > > >>>>>> framework, > > > >>>>>> but > > > >>>>>> > choosing NH is 2 clicks) > > >http://www.xs4all.nl/~perseus/LLBLGenPro/Videos/LLBLGenProv3.0_QuickM > > > >>>>>> > odel.ht > > > >>>>>> > ml > > > > >>>>>> < > > >http://www.xs4all.nl/~perseus/LLBLGenPro/Videos/LLBLGenProv3.0_QuickM... > > > >>>>>> > t ml> > > > > >>>>>> > skip to slide 42, press play > > > > >>>>>> > I know, you start with code, I with the model, same > > > >>>>>> thing. > > > > >>>>>> > FB > > > > >>>>>> > > Thanks. > > > > >>>>>> > > On Thu, Aug 12, 2010 at 12:34 PM, Fabio Maulo > > > >>>>>> > <[email protected]> > > > >>>>>> > wrote: > > > > >>>>>> > > On Thu, Aug 12, 2010 at 11:43 AM, Tom Allard > > > >>>>>> > <[email protected]> > > > >>>>>> > > wrote: > > > > >>>>>> > > "Make everything as simple as possible, > > but > > > >>>>>> not > > > >>>>>> > simpler." > > > >>>>>> > > -- Albert Einstein > > > > >>>>>> > > Sure. > > > >>>>>> > > For that reason this ConfORM mapping > > > > >>>>>> > > var orm = new ObjectRelationalMapper(); > > > > >>>>>> > > orm.TablePerClass<Animal>(); > > > > >>>>>> > > orm.TablePerClass<User>(); > > > >>>>>> > > orm.TablePerClass<StateProvince>(); > > > >>>>>> > > orm.TablePerClassHierarchy<Zoo>(); > > > > >>>>>> > > orm.ManyToMany<Human, Human>(); > > > >>>>>> > > orm.OneToOne<User, Human>(); > > > > >>>>>> > > orm.PoidStrategies.Add(new NativePoidPattern()); > > > >>>>>> > > is equivalent to this XML mapping > > > > >>>>>> > > <hibernate-mapping > > > >>>>>> > xmlns:xsi="http://www.w3.org/2001/XMLSchema- > > > >>>>>> > > instance" > > > > >>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" > > > > >>>>>> > > namespace="ConfOrmExample.Domain" > > > >>>>>> > > assembly="ConfOrmExample" > > > xmlns="urn:nhibernate-mapping-2.2"> > > > >>>>>> > > <class name="User"> > > > > >>>>>> > > <id name="Id" type="Int64"> > > > > >>>>>> > > <generator class="native" /> > > > > >>>>>> > > </id> > > > >>>>>> > > <property name="UserName" /> > > > > >>>>>> > > <one-to-one name="Human" /> > > > > >>>>>> > > <list name="Permissions"> > > > > >>>>>> > > <key column="user_key" /> > > > > >>>>>> > > <list-index /> > > > >>>>>> > > <element type="String" /> > > > > >>>>>> > > </list> > > > >>>>>> > > </class> > > > >>>>>> > > <class name="Animal"> > > > > >>>>>> > > <id name="Id" type="Int64"> > > > > >>>>>> > > <generator class="native" /> > > > > >>>>>> > > </id> > > > >>>>>> > > <property name="BodyWeight" /> > > > > >>>>>> > > <set name="Offspring" inverse="true" > > > >>>>>> > cascade="all,delete- > > > >>>>>> > > orphan"> > > > > >>>>>> > > <key column="Mother" /> > > > > >>>>>> > > <one-to-many class="Animal" /> > > > > >>>>>> > > </set> > > > >>>>>> > > <many-to-one name="Mother" cascade="all" /> > > > > >>>>>> > > <many-to-one name="Father" cascade="all" /> > > > > >>>>>> > > <property name="Description" /> > > > > >>>>>> > > <many-to-one name="Zoo" /> > > > > >>>>>> > > <property name="SerialNumber" /> > > > > >>>>>> > > </class> > > > >>>>>> > > <class name="StateProvince"> > > > > >>>>>> > > <id name="Id" type="Int64"> > > > > >>>>>> > > <generator class="native" /> > > > > >>>>>> > > </id> > > > >>>>>> > > <property name="Name" /> > > > > >>>>>> > > <property name="IsoCode" /> > > ... > > read more » -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
