Is Entity Framework like an In-memory Integrated DevEnvironment?

R

Rich P

I have been experimenting a little bit with Entity Framework, and it
seems like it is mimicking an In-memory Integrated development
environment similar to Microsoft Access which is a "Not" In-memory
Integrated development environment. So it appears to me that Entity
Framework offers the ease of an Integrated Dev Evironment with all the
functionality of .Net -- except in memory.

Is this a reasonable view? Or am I missing anything abut the point of
the Entity Framework?

Rich
 
M

Mr. Arnold

Rich said:
I have been experimenting a little bit with Entity Framework, and it
seems like it is mimicking an In-memory Integrated development
environment similar to Microsoft Access which is a "Not" In-memory
Integrated development environment. So it appears to me that Entity
Framework offers the ease of an Integrated Dev Evironment with all the
functionality of .Net -- except in memory.

Is this a reasonable view? Or am I missing anything abut the point of
the Entity Framework?

I think you're missing the point.

This is what the ADO.NET Entity Framework is about. And the keyword in
all of this is *object*. An object can be kept in memory. It can be a
single object or collection of objects kept in memory. There is no way
the EF is similar to Access.


What is Object Relational Mapping?

(ORM) is a programming technique for converting data between incompatible
type systems in relational databases and object-oriented programming
languages.
This creates, in effect, a "virtual object database,
" which can be used from within the programming language.

http://en.wikipedia.org/wiki/O-RM
http://www.objectmatter.com/vbsf/docs/maptool/ormapping.html

What is ADO.NET Entities framework?

ADO.NET Entity Framework is an object-relational mapping (ORM) framework
for the .NET Framework. This framework is Microsoft's first ORM
offering for the .NET Framework. While Microsoft provided objects to manage
the Object-relational impedance mismatch (such as a DataSet).

http://en.wikipedia.org/wiki/ADO.NET_Entity_Framework


You have two ways to work with the EF. One is Linq-2-Objects that can
query, update, delete an object/entity on the entity model.

The second way to address the object/entity on the entity model is to
use ESQL.

What is Language Integrated Query?

LINQ is a Microsoft .NET Framework component that adds native data
querying capabilities
to .NET languages. Microsoft LINQ defines a set of query operators that
can be used
to query, project and filter data in arrays, enumerable classes, XML,
relational database,
and third party data sources. While it allows any data source to be
queried,
it requires that the data be encapsulated as objects.
So, if the data source does not natively store data as objects,
the data must be mapped to the object domain.
Queries written using the query operators are executed either by the
LINQ query
processing engine or, via an extension mechanism,
handed over to LINQ providers which either implement a separate query
processing
engine or translate to a different format to be executed on a separate
data store
(such as on a database server as SQL queries).
The results of a query are returned as a collection of in-memory objects
that can be enumerated using a standard iterator function such as C#'s
foreach


What is Entity SQL?

Entity SQL is a SQL-like language that enables you to query conceptual
models
in the Entity Framework. Conceptual models represent data as entities
and relationships,
and Entity SQL allows you to query those entities and relationships in a
format that
is familiar to those who have used SQL.

http://msdn.microsoft.com/en-us/library/bb387145.aspx

When using ESQL you can instantiate a custom object (you made) or
instantiate an entity/object off of the model and populate either one
from the ESQL datareader - end results a single object or collection of
objects held in-memory.


Finally about an object and OOPs is this. Each object from the EF on the
model or a (custom object) can be or is like a little machine in memory
based on the concepts of OOPs.

What is Object-oriented-programming?

(OOP) is a programming paradigm that uses "objects" and their
interactions to design
applications and computer programs.

The key concepts of OOP are the following:

Class
Object
Instance
Method
Message passing
Inheritance
Abstraction
Encapsulation
Polymorphism
Decoupling

http://en.wikipedia.org/wiki/Object-oriented_programming

You're only scratching the surface of the EF, and there is no comparison
between EF and Access -- none.
 
R

Rich P

Thank you for this explanation. An as for comparing EF to Access, of
course EF is not like Access, but having table objects in memory that
can be queried from within the application -- that part IS like Access
except that the tables are objects in memory instead of objects on the
disk -- which is what I was referring to. Access is an Integrated
Development environment where you can query tables within the
application. EF it sounds like is also like Access this way where you
have in-memory table objects that you can query directly from within the
application -- just like Access.

I guess I was really asking if I had my metaphor straight -- and it
sounds like I do. Of course, now I have to learn all the linq for EF.
(ouch)

Rich
 
M

Mr. Arnold

Rich said:
Thank you for this explanation. An as for comparing EF to Access, of
course EF is not like Access, but having table objects in memory that
can be queried from within the application -- that part IS like Access
except that the tables are objects in memory instead of objects on the
disk -- which is what I was referring to. Access is an Integrated
Development environment where you can query tables within the
application. EF it sounds like is also like Access this way where you
have in-memory table objects that you can query directly from within the
application -- just like Access.

Linq does the querying with Linq-2-Object that gets translated to T-SQL
statements or one uses ESQL. It is also Linq-2-Objects that queries a
collection of objects in memory.

I guess I was really asking if I had my metaphor straight -- and it
sounds like I do. Of course, now I have to learn all the linq for EF.
(ouch)

While you're at it, you can learn Alinq a linq provider for Access.

http://www.alinq.org/

Enjoy true portability for your application. ALinq support most of the
commercial databases, such as Microsoft Access Database, Microsoft SQL
Server, Oracle and MySQL, SQLite, Firebird.
 
R

Rich P

Thank you for all this great information. One of my other (new)
requirements is that I have to get up to speed on WCF. You guys (they)
are moving just a little too fast for me. I guess this is the Hollywood
of nerdom :).

Rich
 
M

Mr. Arnold

Rich P said:
Thank you for all this great information. One of my other (new)
requirements is that I have to get up to speed on WCF. You guys (they)
are moving just a little too fast for me. I guess this is the Hollywood
of nerdom :).

Well, you should investigate the power of WCF and ADO.NET Entity Framework,
because an EF object is an implicit serialized data contract to WCF. It
means that the WCF client using a BLL object's method can call a WCF service
DAL object's method, and in turn, the DAL object's method can query the EF
model to return an EF object or objects in a collection directly to the
client to be manipulated on the WCF client-side-BLL and sent back to the WCF
service-side-DAL and persisted to the database. You can do it with ease.

Yeah, you should get yourself a good WCF book to learn the basics. I had to
learn the hard-way about what it all means with WCF. You can do the fast
track learning about WCF too, after you learn the basics. I can give you
that information if you like, because what does the book mean if you really
can't see it all in action up close and personal line by line as you
single-step? :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top