LlblgenPro and SilverLight - DTOs...

Posts   
 
    
Walter Almeida avatar
Posts: 150
Joined: 27-Aug-2007
# Posted on: 17-Dec-2009 23:28:44   

Hello,

I recently did a WCF development using Llblgen as the ORM and using the generated Llblgen entities (adapter) up to the interface layer. Works great!

Thought at giving a shot at SilverLight and porting the work I did with WCF to SilverLight.

And hit a wall when I realized that all assemblies referenced by a SilverLight project must be SilverLight class libraries, that is : using the light .NET framework that SilverLight uses. Makes sense after all, but I did not forsee the problem...

So if I want to use Llblgen generated entities layer in a SilverLight App I would require to have the ORM Support libraries compiling against the light weigth .NET framework. And for what I have read from previous posts, it does not at the moment...

Solution would be to use DTOs. However: I quite like the idea of using Llblgen entities up to the UI Layer, even in an SOA architecture, with the limitation of reducing interoperability or having a higher coupling. Reason is that I can make advantage of a lot of stuff already implemented in the entities layer, naming a few : field versionning, support for IDataErrorInfo, support for complex hierarchies of objects... If I use DTOs and want the same kind of features, I would need to re-implement what already exists... And golden rule in software: don't develop what already exists!! reuse... The less code you write, the fewest bug you have...

It is a shame: my understanding (dreams) about SilverLight was to be able to do Web Development the same way and with same power than desktop development... I understand after reading previous posts about the subject that it is quite a challenge to make the Llblgen runtime libraries compile for SilverLight and especially knowing that the light weight framework still evolves quite a lot and MS are far from unifying classical .NET development and SilverLight development.

However I would just like to know if there is any news about it before I invest more time on the subject and on DTOs: can we now (or in near future) build the ORM Support libraries against the SilverLight .NET Framework? If not: any better option that the DTOs or suggestion ? It would just be such a great power to be able to fully use Llblgen in SilverLight projects! I still believe that SilverLight has a great future and will keep evolving.

Thank you in advance!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 18-Dec-2009 10:28:31   

We will not build the ormsupport classes for silverlight. The main reason is that silverlight's framework is very limited and therefore building the ormsupportclasses is a big challenge. giving the fact that the silverlight framework is different from the compact framework (also limited), we've to do the compact framework work all over again and we definitely don't want to do that.

there's also no need to have the ormsupport classes on silverlight: use DTOs and a service. If you need entities on silverlight, perhaps your app is too heavy and you need a WPF app instead, as silverlight applications don't do persistence calls themselves, so ormsupportclasses on silverlight is therefore unnecessary.

To be frank, I hated every single minute working on the CF.NET code, and I really don't want to spend a single second on yet another branch of the code base for yet another UI framework. In fact, we're seriously considering not supporting compact framework in v3.

Frans Bouma | Lead developer LLBLGen Pro
Walter Almeida avatar
Posts: 150
Joined: 27-Aug-2007
# Posted on: 18-Dec-2009 10:44:25   

Hello Frans,

Thank you for the information. It helps me a lot taking the right decision and technical choices.

Walter

greenstone
User
Posts: 132
Joined: 20-Jun-2007
# Posted on: 10-Jan-2010 23:28:41   

Hi,

I'm new to Silverlight and trying to understand how to implement in conjunction with Llblgen.

If I understand your reference to "use a service", I believe you mean a web-service (SOAP, REST, etc.). ...and fetch/process the data (Silverlight) client-side using that web service.

As an alternative, I've been reading about and playing with the "RIA Service"--which also helps me with user authentication (in addition to posting data). From what I understand, the "source" of data for RIA Services must be the "Entity Framework" or Linq (e.g. to SQL).

Can llblgen be used at the "source" of data for RIA Services? (So it would be server side, I believe?)

Thanks!

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 15-Jan-2010 00:07:08   

There is a discussion about this here

Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 19-Jan-2010 20:43:17   

MTrinder wrote:

There is a discussion about this here

When I clicked on the above link it took me to the main forum page.

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 19-Jan-2010 21:17:42   

Hmm - only messages in the private help desk section should do that, and it isn't one of those.

It's in the Feature Requests section of the forum, titled "Get Llblgen Entity to work with .NET RIA Services" - let us know if you can't find it.

Matt