Friday, November 07, 2008

Telerik Watch Minute: OpenAccess ORM reverse engineering

Here's another great introductory video to Telerik's new OpenAcess ORM product. In this special edition of Telerik Watch Minute, I sit down with Jan Blessenohl (OpenAcess ORM Team Lead) and take a look at how you can use OpenAcess ORM to reverse engineer an existing database in to business objects (vs. the forward mapping approach we looked at last time). In this 13 minute video, Jan shows us everything from creating a new project to reverse engineering your database to merging database changes to existing objects to using your reverse engineered objects in an ASP.NET application. It's a great primer on the subject so I hope you enjoy! [Production Note: I regret that I have to keep making these "production notes." I guess it's more difficult than I anticipated to staff a booth, attend sessions, and shoot videos at PDC. As such, this video was recorded with a heavy "light filter," producing a grainy looking, dark video. Apologies. The next video fixes the problem and I promise I'll try to ensure these mistakes don't happen at future events!]


Asit said...

Can this work to generate VB too?

Asit said...

Sorry. I jumped the gun. It tells me in the video half way thru'.

Todd Anglin said...

@Asit- You got it. For the benefit of those that don't watch the whole video, yes, OpenAccess ORM works the same with VB and C#. If you're using VB, OpenAcess will detect that and automatically generate VB objects during reverse engineering.


Ben Hayat said...

Hey Todd, great video;

Does OpenAccess support LINQ for CRUD and filtering?

Chris said...

Thanks for the video. In the example the datasource is dropped straight onto the page whereas we would use another layer between the data access layer and the presentation layer. Is this possible?
Cheers, Chris

Todd Anglin said...

@Chris- Sure! You could build an additional layer that has "Repository" classes (sometimes called Managers) and then use those with either an ObjectDataSource or even manual data binding code. The method in this video is simply the "fastest" path to a running app. OpenAccess is very flexible, though, so all paths are possible. Does that help?

Chris said...

Yes, that's good thanks. We are just purchasing the premium pack so I was looking into how the ORM piece could be of use to us. We are currently using ApexSQL to build CRUD templates in older apps and LINQ is used for the newer apps so I would be interested as to what advantage this might give us over LINQ.

Todd Anglin said...

@Chris- By LINQ, I assume you mean LinqToSQL? If so, a few comments: 1)MS is abandoning LinqToSQL, so it's unlikely to improve over what's out there today, 2) LinqToSQL and OA both enable fast CRUD access, but only OA can be easily optimized at the config level to generate less SQL, and 3) you can use LINQ (the language) to query your data with OpenAcess!

In other words, if you want to use LINQ (the language) and combine the ease of LinqToSQL with the optimization power of Entity Framework, OpenAccess is a great solution.

Chris said...

Yes we are using LinqToSQL and LinqToEntity (soon to be known just as Linq I believe). Thanks for your help.

Anonymous said...

I had just narrowed my search down to NHibernate and LLBLGen Pro. I made the choice to go with NH just a couple of weeks ago. Today, right after Thanksgiving... enter Telerik's OpenAccess. Very exciting!

How does OA compare to these two alternatives? Could use some unbiased input here.

Also, what about cascades for deletes/updates in related tables like NH handles?

We're taught N-layer architecture as being a "top" approach to good OOD. It appears the data source is dropped onto the form and is specific to a table/class. Would one have to drop 3 of them on the same form to access 3 different tables (classes)?

Comment response states that it is possible to use OA indirectly using a business layer. Is there an example (simple) available for using OA in VS2008 under a three-layer architecture?

Peter Brunner said...

Hi Anonymous,
please send a request to providing your contact details for more info about the differences between OA and the others. We can provide some hints where to look to. Basically checking out our feature highlights already helps.
Peter, Telerik

Jan Blessenohl said...

Cascading deletes can be handled in various ways. You can choose between:

Let the database do it, let OpenAccess do it automatically or hook into the delete process and do it with your own code.

You can have as many data sources as you want on one page. You can also implement master/detail by setting the appropriated filter properties.

We are just implementing examples for 3-tier applications. You can use the ObjectContainer (the example is part of the product) or serialize the objects by yourself.

We are also working on some more general product comparison.