Pablo [MSFT]
Check me out on the web at my blog.
Pablo works in the SQL Server product group at Microsoft; he is currently the ADO.NET Technical Lead and he's working on future versions of the data programmability platform.
Pablo Castro, Britt Johnston, Michael Pizzo: ADO.NET Entity Framework - One Year Later
Aug 30, 2007 at 6:26 PMThat template is part of Project Astoria, and we have not released a beta 2-compatible version yet (we will very soon).
You are missing a "new" keyword after the "=" symbol, so the compiler is getting confused about the meaning of the statement.
Pablo Castro, Britt Johnston, Michael Pizzo: ADO.NET Entity Framework - One Year Later
Aug 30, 2007 at 6:23 PMWe actually now fully support databases that use owning schemas to group tables (we didn't back a year ago when we did the original Channel 9 video that's referenced by this one).
You can point the EDM designer to AdventureWorks and we'll automatically generate a fully-functional EDM schema and default mapping for it. (to be very specific, we generate 1 warning from the whole process where we let you know that there is a table with a column with more numeric precision than what the CLR can represent with its "decimal" type and thus we skipped it).
We use Northwind just for demos and just because it's a small schema...it's definitely not our reference test database
Pablo Castro: Astoria Data Services
May 13, 2007 at 5:09 PMWe are still looking at the proper authorization model, including finding the appropriate authorization granularity.
I agree that instance-level security is interesting, particularly from the application building perspective; however, making it fast is difficult, and making it work over arbitrary stores is not always possible.
As we think about this I'll try to post on my blog on the various thoughts/approaches we consider. If you have input on the topic, I'd love to hear it.
-pablo
Pablo Castro: Astoria Data Services
May 13, 2007 at 4:56 PMNot sure what you mean by tamperproof. Do you refer to protecting the URIs themselves? Or protecting the app from users creating their own URIs? The Astoria CRUD interface is no different from a regular website in some sense. In a "typical" application, at some point you fill up some fields and click "submit", which causes an HTTP POST. Anybody can see that URL and send a POST to it. The server-side code has to make sure you had the rights to do so (even if your webpage wasn't used to submit the request), and that the operation makes sense for the app. Astoria entry points have similar requirements; you have to indicate the authorization requirements, and you have to think about the consistency rules that apply to any side-effecting operation that you expose through the interface.
Regarding cross-site request forgery, Astoria does some now, and you can expect more to come. First, HTTP GET requests are non-sideffecting by default (unless you introduce side-effecting operations explicitly). Doing cross-site non-GET requests is much harder. We'll also probably apply the usual techniques such as requiring special HTTP headers to make sure even more that the request is coming from an allowed site.
It's really early to talk about standarization. We'll see how things turn out. I think that the web development community in general (including ourselves) still has a number of things to sort out in the HTTP (REST-style) space.
-pablo
Pablo Castro: Astoria Data Services
May 10, 2007 at 11:29 PMHi Arturo,
Here are some resources that hopefully will help clarify the scenarios we're going after with this technology.
Overview document:
http://astoria.mslivelabs.com/Overview.doc
Mix 2007 presentation:
http://sessions.visitmix.com/default.asp?year=All&event=1011&sessionChoice=2011,2012&sortChoice=4&stype=asc&id=1573&search=XD006&rsscheck=rss
We do, of course, design things top-down; we start with application scenarios and go from there.
Regarding security concerns, could you be more specific? I'd be really interested in hearing them so that I can either elaborate on how we think about specific security aspects, or add them to the list of things to sort out if I haven't heard of/thought of the issue before.
Thanks,
-pablo
ADO.NET Entity Framework: What. How. Why.
Jul 24, 2006 at 9:46 PMWe talk with the VS team database folks often; it's not gonna happen now, but it's reasonable to think of some integration there as you point out, we'll see how things go
Regarding renames into the CLR objects: no, we don't "refactor" the types, we re-generate them. When you design a model using the EDM schema designer or your favorite XML editor, once you're done we generate the CLR classes that represent each of the entities for you. The generated code consists of partial classes, so you can add your own stuff in a separate file, which means that we can simply re-gen the the types whenever we see a new schema, without worring about overrwriting customizations to the classes.
-pablo
ADO.NET Entity Framework: What. How. Why.
Jul 24, 2006 at 10:30 AMWe're planning on doing "something" (screecast, video or something else) to talk about the model and how it maps.
Regarding availability of bits, we're shooting for a CTP in August.
-pablo
ADO.NET Entity Framework: What. How. Why.
Jul 24, 2006 at 10:28 AMGood point. We do have some modularization mechanisms (more details inline with your questions), but I think you put it in interesting terms, that is a good way of thinking about how metadata is organized and deployed.
I have included some comments below on the specifics. Of course, as in any software product in development, things are subject to change
1. Yes, you can partition the model in multiple files
2. Yes, you should be able to do this (although some glitch here or there may complicate things)
3. Yep (you may need to deploy a library + metadata)
4. We currently don't have plans for automated incremental reverse engineering. Currently we do "one shot" reverse engineer and then you can maintain the resulting model by hand. Is that something you could live with for the initial release?
5. While you can re-factor the model (and we'll propagate the changes to your object model in CLR classes), we won't automatically propagate the changes through the mapping, at least not this time...
6. "very readable"...well, it's XML, so you can read it
7. Our plan is to have a mechanism to enable shipping of entities across tiers and allow for the system state to be reconstructed later on, however, that doesn't not include taking care fo serialization itself. We assume that you'd use any of the already-existing serialization infrastructures.
8. Following the typed-table pattern, what you're saying is that you'd like the option to have the "typed ObjectContext" in one assembly and the domain classes in another one, is that right?
9. We don't currently have one planned, but hey, we do have a developer community that might be interested in contributing a few of these nice tools
10. The mapping infrastructure does provide a good degree of isolation from schema changes for the applications built on top of a conceptual model. This requires that you manually update the mappings to map to the new schema, but other than the map everything else should go untouched (of course, there are certain types of changes that we cannot compensate for).
Hope this helps clarify some of the issues. This provided me with good perspectives on certain problems, thanks for the write up.
-pablo
ADO.NET Entity Framework: What. How. Why.
Jul 23, 2006 at 9:59 PMYep, we're aware of that, and we're actually considering supporting attributes as well, although there is no firm plan yet.
Note that although Java folks introduced support for attributes, their adoption is not necessarily great. I remember sitting in a talk (I think it was on new EJB 3.0 stuff) in JavaOne a couple of years ago and when the speaker did a show-hands for who'd use attributes over xml files, it was like a 9-to-1 deal, with most folks preferring xml files (or may be more accurately, external metadata).
We have some generic exceptions, but I do expect that some provider-specific exceptions will show up, at least for this release (which means that we won't be able to change that as a default behavior because it would be a breaking change...).
You're right that there are some frameoworks out there that have a normalized exception hierarchy (Hibernate 3.0 had that as new of the big new features IIRC).
-pablo
ADO.NET Entity Framework: What. How. Why.
Jul 22, 2006 at 7:27 PMYes, we'll have various options, some in the version we're working now, some on future versions, and yet some will be supported but may be will require tools from 3rd parties or the community.
Specifically, you can:
- Reverse engineer a schema from a database; that's what I did in the first example, and it's handy to get a starting point to either code against it directly or start modifying the model from there.
- Create a model describing your entities, your relationships, etc. in the model designer or in XML, and then describe how the various elements of the model map back to your database schema. For mapping you can use the tools or XML files.
Other options will probably come later.
Once you have a model (regardless of whether it was hand-written or generated from a database) you can fully explore the model using our metadata APIs.
NOTE: visual tools won't be included in the August CTP, so you'll have to do this with the XML files, but we WILL include the option to reverse engineer a database do you have a starting point.
The short answer is that we're integrating the system with System.Transactions for transaction management. We also do automatic transactions for update processing.
I'm finishing off some of pending details about transactions. Once I have all the details I'll post it somewhere so you guys can chime in.
Watch http://blogs.msdn.com/adonet
There will be an exception model...I don't know what's the bar for calling it "rich"
Yes, you can fetch entities lazily, but you have to do it explicitly. I'll write up a discussion about this in the next week or so to get some opinions on the specifics.
Re-attaching...we're thining about this. I think that we have a good plan, it won't be in the CTP but once it's solid we'll make it public to gather feedback.
We aren't planning to include this functionality in the initial release of the Entity Framework. It's something we could do in a future version, or may be the community picks it up and does a nice tool
Anyway, thanks for sending thoughts and questions, keep the feedback coming!
-pablo
See more comments…