Forum  Community Devel...  Community Frame...  MEF/VWG CEM framework
Previous Previous
 
Next Next
New Post 6/2/2009 10:46 PM
  mhensen
199 posts
www.webvize.nl
5th Level Poster




Re: MEF/VWG CEM framework 
Modified By mhensen  on 6/3/2009 1:12:57 AM)

 jharmon@blinfo.com wrote
 

Have you looked at NETTIERS?  Currently, I am using NetTiers to generate all of my dataobjects and it is OpenSource...

I have looked at NetTiers but it doesn't fit in the way I am trying to solve the 'problem'. This is a codegenerator and although I also generate code I I only generate code in particular places and at runtime. With complete application generator I always feel that I have to work in their structures and use their tech whenever I want to make a change. I guess I am having a  hard time getting my thoughts out :-) If anybody has a clue of what I am trying to do please step in :-)

See also the next post for more 'details'.

 


With kind regards,

Michael Hensen

VWG Community Frameworks
 
New Post 6/2/2009 11:01 PM
  mhensen
199 posts
www.webvize.nl
5th Level Poster




Re: MEF/VWG CEM framework 
Modified By mhensen  on 6/3/2009 1:04:18 AM)

 Alexnaldo wrote
 

I know NetTier, LLBLGen and many, many others ORM and I don't think a good idea create a new ORM...

After many years studing, using and creating (http://www.codeplex.com/nanomapper) ORM I must to say that Microsoft Entity Framework have good concepts that solved many of commons problems of ORM. IMHO EF is the best to integrate with VWG application.

,
Alexnaldo Santos

 

Hi Alexnaldo,

It's not that I am trying to write my own ORM, It is a way of implementing the IModel interface in the case I am building. If I wanted to use something else, it is just a kind of wrapper class that is laying in between your application and the datalayer but implements IModel. The problem I have to resolve is that in no case I want any references to dataobjects or some kind of business objects. To do this I need to have create objects that are lightweight and have 'yet' no clue of what they are and need to do.

All that this framework will do is listen to the interfaces. If you would like to use Entity Framework I welcome you to write an class that lays between the Imodel and the dataobjects. But again in a  scaffolder you really have no need to have complete objects that you need to fill. As you dynamically create and present the data and functions. This in contrast to hand written screens. Here you might want to have a direct reference to your dataobjects and this is also valid. Because the screen will have a implemented interface of IForm and that way the framework will pull this screen in and present it to you with all its functions.

Just see every single object, control, presentation or form as a plug-in. if you don;t like it you throw it away and create your own. but I want it to be easy to this. Instead of writing a new ORM or standard I want to let the final implementor to be able to use their standards and tools. this is just a productivity booster in the sense of not having to think about 80% of the application but lets you focus on the more complex routines of processes.

I hope I can get through that I don't mind what tech anybody uses. I will allow any tech you want to use and I do an implementation based on Subsonic. but to be flexible I want to be able to configure objects that have calculated fields. That I externally can tell what rules apply for validation of an entity.

A Contact record in the database is exactly the same as if it was created with a generate DAL or any other ORM.
If somebody knows of what I am trying to tell please step in :-)
 


With kind regards,

Michael Hensen

VWG Community Frameworks
 
New Post 6/3/2009 2:53 AM
  Alexnaldo
267 posts
www.automato.org
4th Level Poster


Re: MEF/VWG CEM framework 

Michael,

For example: I would like to request ALL customer's sales between "today" and "tomorrow".

With EF I can do :
 

 using MyEntities context =  new MyEntities())
{
   var result = from sale in context.Sales
                        where sale.SaleDate >= DateTime.Now.Today and sale.SaleDate <= DateTime.Now.AddDays(1)
                        select sale.Customer;
}

Here, EF uses LINQ and "Projection" features.

How do you think to translate it to the "IModel" to turn possible to uses any ORM ?

Even if you create a wrapper class you will have problems :

NETTiers doesn't support LINQ
LLBLGen doesn't support "Projection"

 

"...A Contact record in the database is exactly the same as if it was created with a generate DAL or any other ORM."

Yes for many ORM but NOT for EF ! It is a big different.

EF uses a concept that we can change the Database Schema without change any generated class OR change the Model Schema without change any database table.

Now, a Contact record can be [1..n] tables in the storage (Oracle, SQL Server, XML, any many others ) and [1..n] Entity Class.

I'm here talking about the problems of creating IModel to accept many ORM.

Please, clarify me if I'm thinking wrong.

,
Alexnaldo Santos

 

 

 

 
New Post 6/3/2009 7:34 AM
  rdhatch
635 posts
1st Level Poster




Re: MEF/VWG CEM framework 

Hi Alexnaldo,

What exactly do you mean by a Projection?

LLBLGen supports all types of queries.  Including Linq, Scalar, flat DataTables, and of course, fetching EntityCollections.  It's Predicate filtering mechanism is extremely powerful; more powerful than Linq.  It also supports Projections, which allows you to export your Entities into any other format, including POC objects, etc.  What do you mean by Projections?

Ryan


Ryan D. Hatch, VWG MVP
GeniusCode.net | VWG Community Frameworks | VWG Wiki
 
New Post 6/3/2009 2:07 PM
  Alexnaldo
267 posts
www.automato.org
4th Level Poster


Re: MEF/VWG CEM framework 
Modified By Alexnaldo  on 6/3/2009 4:08:16 PM)

Tables:

     Country ( CountryId, Description )
     Region ( RegionId, Description, CountryId )
     Customer ( customerId, FirstName, LastName, RegionId)
     Sales ( SalesId, SaleDate, CustomerId )


Example of projection.

  select value from Sales where Sales.Customer.Region.Country.Description == "Brazil"

  As you can see, we can easily create powerful queries by navigating relationships. Is it "Projection".

  EF uses a new SQL Language named "eSQL" that is very powerful !

  EF supports: LINQ, Lambda expressions and eSQL.

 

 ,
Alexnaldo Santos

 

 

 
Previous Previous
 
Next Next
  Forum  Community Devel...  Community Frame...  MEF/VWG CEM framework
CompanionKit Bottom
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS