RE: [gentle-devel] An excercise in futility or, What I've been up to...
Brought to you by:
mnmr
From: <rog...@fe...> - 2006-05-26 13:07:40
|
Just call it "Smooth" to smoothen up the Gui. Or Pimp like Pimp up your gentle app). It's Friday.... Grtz Roger -----Oorspronkelijk bericht----- Van: gop...@li... [mailto:gop...@li...] Namens Sanders, David Verzonden: donderdag 25 mei 2006 20:56 Aan: gop...@li... Onderwerp: RE: [gentle-devel] An excercise in futility or, What I've = been up to... Thanks for the replies Morten. I can see now that my current attempts = are going to be more of an education experience than a final product. :) I'm under time pressures to get the project rolling that I'm prototyping = my ideas on, so this current incarnation won't be on Gentle 2. Nor will it include most of what you've talked about in the replies. At this stage, = I gotta get something that works out the door and was hoping to have the majority of my infrastructure finished in the next day or so so I can = move on to actual user requirements. :) That said, probably in a month or so when things quiet down a bit, I'll = go ahead and set up a test bed / development area, from scratch on the new Gentle. Then I can refine a lot of my ideas down onto the new framework = and we can both dig deeper into the architecture. I'm going to have a lot = of re-learning of Gentle in store I'm sure, as most of the stuff you're = doing is already over my head. On the name and calling it Rails, that's just something I can't do. I = don't want this framework to look like a "me too!" nor do I really want = someone to compare it feature by feature to RoR. I'd rather come out with an new = name and "brand" and then let people compare the RESULTS. I was at point = also considering not naming it after Gentle at all (and indeed, the first = alpha I built was called Soft.Framework) to show it as a compliment or add-on to Gentle. But I think that Gentle will be so integrated into it that it should be named similarly and live in the same Gentle root namespace. D -----Original Message----- From: gop...@li... [mailto:gop...@li...] On Behalf Of Morten = Mertner Sent: Thursday, May 25, 2006 2:41 PM To: gop...@li... Subject: Re: [gentle-devel] An excercise in futility or, What I've been = up to... Hi David, > A label called EmployeeEmployeeId > A textbox called EmployeeFirstName > =20 May I suggest to enforce the use of underscores as a substitute for = dots? This would allow you to know for sure whether OhBoyOh refers to Oh.BoyOh = or to Oh.Boy.Oh (allowing you to map UI controls to properties on nested classes). > emp.BuildForm(this); > emp.PersistForm(this); > =20 I'd also suggest to not "infect" the business objects with UI code. It'd = be much better to have a RailsFactory that can produce a RailsForm given a = UI platform (Qt, WinForms, WPF, ASP.NET, Mobile, Console, etc.) and the business object(s) involved. One of the design flaws of Gentle 1.x is the IPersistent interface, = which forces clients to implement way too many methods on their business = objects. In reality this causes Gentle to primarily be useful if you can inherit = from the Persistent base class. In Gentle 2.0 I have gone to great lengths to refactor the interfaces according to what Gentle really needs, leading to very specific = interfaces (IPersistenceState for managing the IsPersisted state, IBindingState for = UI data binding functionality, IEntity for identity management, etc.). While IPersistent is still around, the recommendation is to use = IRepository instead (which puts the persistence methods on the repository instead of = on the business object). In my opinion the UI mapper functionality should = adopt a similar approach. > There are still some limitations. For example, the way that I read the Gentle Object doesn't pick up on any non-table properties. So, in = my example above, if I were to create a public property called "FullName" = that would concatonate the first and last names together, the UIMapper = doesn't pick it up. I'm going to probably have to add a layer that does object reflection too. > =20 I think you can save a bunch of time by using the Gentle.Reflection = library. For instance, you get a list of all members as simple as: MetaType mt =3D new MetaType( emp.GetType() ); // MetaMember is only = fields and properties - not events, methods, etc. IList<MetaMember> members =3D mt.FindMembers( BindingFlags.Instance ); This would probably also decouple you from the internal metadata = structures in Gentle (ObjectMap in 1.x, TypeMap in G2). > You also have to write your objects to inherit from the UIMapper code, which in turn inherit from Peristence. So, with any of my objects that include my history pattern, the chain looks like: > > Table Object -> History Object -> WebUIMapper -> Persistence > =20 Enforcing a base class is probably a bad idea. We need interfaces that people can implement, and then produce a base class implementing those. If going with G2 I'd recomment building a UI base class on top of the = Entity class (rather than Persistent). OTOH I'm all for keeping the base classes as lean as possible. If code = just as well can be placed outside the base class then it should be so. > I agree with the RoR guys though - its worth having to name your controls or objects a certain way if it saves you 90% of the grunt work = in the end. =20 Convention over configuration is a powerful productivity idiom, and I = fully agree. It also adds consistency to the project, which is a Good = Thing<tm>. > Sometime later I'll write about the history method as well, but I think this email is long enough. > =20 I'm certainly looking forward to seeing some code.. :-) Yours, Morten ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications = in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D107521&bid=3D248729&dat=3D= 121642 _______________________________________________ Gopf-devel mailing list Gop...@li... https://lists.sourceforge.net/lists/listinfo/gopf-devel ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications = in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=107521&bid$8729&dat=121642 _______________________________________________ Gopf-devel mailing list Gop...@li... https://lists.sourceforge.net/lists/listinfo/gopf-devel |