This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi Mindscape team
I have been evaluating Lightspeed for my company's needs for a while now and I really like it. Some of the present concepts combined with future announcements for version 3.0 made me wonder what to expect in the new version (BTW, do you have some target date for 3.0? I couldn't find it) Mostly I am curious about WCF support and DTOs. Current features of designer creating DTO class and mapping all properties to an entity is that DTOs are direct reflection of only one entity's all properties with no properties of referenced entities (in another words, a reflection of all table columns of only one table). But announcements of new version made me imagine a tool within Lightspeed for generating custom DTO classes. Having a wizard/DTO designer by which it would be easily possible (GUI) to select properties from an entity and it's referenced entities after which a DTO class (with WCF enabled attributes) would be generated together with a mapping method. My target here is to have a tool for preparing DTOs for a presentation layer (more generally it's actually an object-to-object mapper). In concept of using ORM entities within a business layer, we want to also prepare DTOs with exact properties that the presentation layer needs (a sort of, screen-based DTOs). But I don't like to write by hand this DTO class and method for mapping to entities. Besides having a tool like this in Lightspeed itself, we are also looking for other possibilities: - preparing views within the database which would prepare the exact columns for presentation screen and having it as a separate entity in ORM - we don't like this as by our current architecture approach, database is about optimized storage, it shouldn't hold code or objects directly needed for presentation layer (adding a field to a screen for an already existing column would require change in all layers). BTW, I did try it though, I found issues using Lightspeed with Oracle views - using another DTO generator / object-to-object tool (or making our own) - need some more time, not found yet We are also open for other suggestions, possibly an architecture rethink or exploration of another wider framework (i.e. Sculpture). Of course, just thinking out loud, not expecting you to recommend :) Let me know of your thoughts Thanks |
|
|
Hi Mark, Thanks! - Great suggestion :) This is not something we have specifically looked at however it is something we can look into adding in the future. We are pretty locked down on features for 3.0, however its definitely the type of thing we could add in for a later minor release (3.1, 3.2 etc). If there are others who would also be keen on this we would love to hear about that, as it helps us with prioritising feature requests :) Our timeframe around 3.0 is mid year, we have not locked in a specific date yet, but we will certainly be blogging about it when we are closer to the time!
Jeremy |
|
|
Marko,I don't know if you have seen this post: http://www.mindscape.co.nz/blog/index.php/2009/01/20/lightspeed-wcf-and-serialization/comment-page-1/#comment-32199, we are also very interested in using LightSpeed and the DTOs through our WCF services. Offering just a client shell and accessing the data remotely via .net remoting / wcf 3.5 / web services it's what we are looking at, using LightSpeed. I posted today a reply to Jeremy regarding DTO list convertion methods (MapTo, ConvertEmployee, etc). The last nightly build already generates the DTOs, but the DTOConverter class is not present.I hope to see more from mindscape regarding this feature. By the way, the idea of generating custom DTOs classes sounds excellent!
Thanks. |
|
|
Hi Juan, Let me try to answer you even before Mindscape team which are operate at lightspeed :) I believe they changed the concept regarding DTOs so there is no DTOConverter special class, but rather something like every entity has a AsDto method (I am typing at home, so not sure at the moment). But still this is only supporting concept - one entity all properties <=> one DTO with all properties. BTW, regarding custom DTO, I have one of my guys working on a general DTO generator (object 2 object mapper) not necessarily bound only to Lightspeed and if it will be decent, we will maybe share the tool. |
|
|
Thanks Marko! Just to confirm what you say, we tweaked some of the design and naming after the blog post went up: the conversion function (referred to in the blog post as ConvertEmployee) is now called AsDto, and the class containing the conversion methods (referred to in the blog post as DTOConverter) is now called XxxDtoExtensions, where Xxx is the name of the model.
|
|