This is a migrated thread and some comments may be shown as answers.

Torn between two ORMS

10 Answers 214 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michael Josiah
Top achievements
Rank 1
Michael Josiah asked on 26 Feb 2010, 09:49 AM
Hi guys

I am an avid Telerik fan and use all Telerik controls for every single project that I work on. In fact I work with a lot of charities like RNIB and we use your controls for them extensively. However your ORM just does not do it for me at the moment. I have a number of issues but one that creeps up is performance. We have worked with another ORM called Plinqo which is a based of the Linq 2 SQL stuff. Now I want to shift over to OpenAccess but I want to make sure that the performance benefit mentioned on the following page


If it does please let me know how, so that I can explain this to the rest of the team.

Thanks

10 Answers, 1 is accepted

Sort by
0
Dimitar Kapitanov
Telerik team
answered on 10 Mar 2010, 03:28 PM
Hi Michael Josiah,
I am terribly sorry for the very late reply...
The truth is we were working very intensively on our new release that is scheduled for today. Later today you will be able to download our Q1 2010 release, and see for yourself how Telerik OpenAccess ORM changed... Now we provide visual designer and lot other stuff that we feel will make the average user productive. Please when you try the new release do share your opinion with us.

All the best,
Dimitar Kapitanov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Michael Josiah
Top achievements
Rank 1
answered on 10 Mar 2010, 04:29 PM
I appreciate this. I am looking forward to using this. I will let you know my findings immediately.
0
Brian
Top achievements
Rank 2
answered on 14 Mar 2010, 06:57 PM
I must say that OpenAccess is an awesome product.
If you have downloaded the free version I suggest you try it out!

I never really used another ORM besides OpenAccess so I can't compare it features... But, what I can say is that it has really increased my productivity.

So far it performs great on every project I have deployed it.  One project batch updates an Inventory Database of over 40,000 items.. This takes about 2 minutes with OpenAccess.

I am also using OpenAccess on another project that reads in database tables containing over 750,000 records.  OpenAccess seems to handle everything with ease.

I've been using OpenAccess for over a year now. I just love it!
0
Michael Josiah
Top achievements
Rank 1
answered on 15 Mar 2010, 10:17 AM
Hi Brian

I am looking forward to using Open Access but I was (and still am) a little weary about some of it's use when dealing with multi layer architecture on a web application. For instance, my typical setup would be to have the BLL dealing with all the queries and returning the resultant data to the UI and having the UI make changes to the OA entities and passing it back to the BLL for further processing and persistance (would prefer to use DTO in the UI and convert back to OA entities in the BLL).

So I would like to do something as clean as the following

Dim Customer as new OACustomer
Customer.Firstname = "Michael"
bll.CustomerManager.SaveCustomer(Customer)

Dim Order = bll.OrderManager.GetOrderByID(1)
Order.Amount = 5.00
bll.OrderManager.UpdateOrder(Order)

Now this to me seems really simple, clean and easy to work with, but for the life of me I can't seem to get this to work. It appears that I have to pass the objectscope to the BLL just so I can track the changes and I need to also declare the objectscope in a masterpage or httphandler to get it to work based on best practices. Seems needlessly complex and I dont like the idea of passing the objectscope with my methods. This couples my UI and service layer to tightly to OA for my liking. 

Now I saw recently in the Q1 video something that looked like a context object which behaved (or appeared to) more like the Linq2SQL context. For instance in the query I noticed that the word scope of was omitted. I xant find more information about this anywhere and I am very interested indeed. If it simplifies the problem I mentioned above then I am sold.

0
Sergej Mertens
Top achievements
Rank 1
answered on 15 Mar 2010, 11:31 AM
Hi Michael,

there are several solutions for your problem:
1. Take a look at one of these samples in code library to get some ideas of scope handling und business objects:
http://www.telerik.com/community/code-library/orm/general/best-practices-in-web-development-with-openaccess.aspx
http://www.telerik.com/community/code-library/orm/general/implementing-scope-factory-for-telerik-openaccess-orm.aspx
http://www.telerik.com/community/code-library/orm/general/best-practices-web-application-with-class-library-for-business-logic.aspx

2. Use detached objects an manage all by yourself. There ist much code to write, but all fits exactly to your problem.

3. Use WCF or .NET Data Services which handles your requests nearly the way you described it. There is the Data Service Wizard (currently in beta state), which creates nearly all your proxy code and service classes: http://www.telerik.com/products/orm/telerik-data-services-wizard.aspx. As mentioned by a Telerik staff in another thread, this should be included in Service Pack 1 vor Q1/2010-release. There are also several examples on the code library regarding WCF and RIA: http://www.telerik.com/community/code-library/orm/general.aspx

4. If you use the new designer from Q1, service classes are generated as you expect. It's a new way of "scope handling" that is not compatible with "older" releases (before Q1/2010). Currently there are some limitations in this new designer, as statet in this Thread:
http://www.telerik.com/community/forums/orm/getting-started/best-prac-for-q1-2010.aspx#1122055 If you can live with this for the moment, this is maybe your preferred solution.

Greetings,
Daniel


0
Michael Josiah
Top achievements
Rank 1
answered on 15 Mar 2010, 01:11 PM
Hi Daniel

Thanks for this, I just have a couple of questions

1) Will the new designer method work the same way as those best practice links you posted? If not is there anywhere I can get an example of how to use the designer approach to build a solution that addresses the concerns I posted earlier?

2) Does the new designer work for VS2010 RC? If not any idea when?

3) Two of the best use case practices you mentioned in your links both pass the objectscope within the layers. The third link looked promising but there was no example of editing the OAEntity within the UI or ServiceLayer and passing it back to the BLL, also will this approach work with the new context mentioned for the new designer?


0
Sergej Mertens
Top achievements
Rank 1
answered on 15 Mar 2010, 03:57 PM
Hi Michael,

just to answer your questions short:
1) The new designer aproach is different to the "old" best practices. So currently there is no known example and it lacks documentation. But I think it's quite easy to test it by yourself: Create a new (empty) solution. Then add a new item to that solution; the "Add item" window appears. Choose "Data" and then doubleclick "Telerik Entitiy Diagram" (or similar to that, I can't remember the exact phrase). Then follow the wizard for creating entities. After that you have a new item "YourEntityDiagram.tlinq" and several generated sub-items. Now you can use this "entity diagram" as "repository" for your OAEntities in your code (where you use your BLL). Maybe Telerik-TV helps you: http://tv.telerik.com/whats-new/video/whats-new-openaccess-orm-justcode-q1-2010. I've planned writing a blog entry in my blog about it (but it will be in german) shortly, when I have some spare time.

2) Currently not. As far as I know, it should be added in the service pack (which should be next month).

3) If I understand you right, you would like to get the OAEntity of an entity repository. This OAEntity is completely unbound to the data layer. You can use the OAEntity in every way, you can use another object, e.g. data binding or wrapping in a (UI-)service layer. After you're done with editing, you signal the repository to write changes to the database. Am I right?
Then the new designer method should work for you, as long as you instanciate the "entity diagram" (which in this case is treatet as the entity repository).
The other "old" approach with scope handling can be seen in detail in this code library example: http://www.telerik.com/community/code-library/orm/general/northwind-n-tier-web-demo-application.aspx and is described here: http://www.telerik.com/support/kb/orm/general/northwind-web-demo.aspx.
In my opinion currently the new designer lacks the complete "roundtrip"; it's database-first only. This feature is brand new (6 days old), so there are no experiences in using that. But I'm sure, Telerik completes it rapidly (I hope with the next release in Q2).

OpenAccess can be used in a wide variety of different implementation details, depending on different layer- and tier-demands and the style you develop your solution (model-first/Domain Driven Development or database-first), and of course the dimension of your app. This all can lead to other implementations and technics. For me, the rules of thumb would be:
  • If you develop a smaller solution with a tight timetable, you should prefer the "old" way, 'cause it's very well documented (see example above).
  • If you like the new designer (which indeed is for small/medium-size applications) and are willing to play around and wait for possible bug fixes, then this is very simple to use and hopefully satisfies your needs.
  • If you develop a large(er) web application which should be highly scalable, then WCF is your friend. As there has been a longer open beta period of this wizard and Telerik's statement that the final version will be shipped with the first servicepack, this is potentially more stable than the designer approach.

Hope this helps you :-)

Greetings,
Daniel


0
Michael Josiah
Top achievements
Rank 1
answered on 15 Mar 2010, 04:26 PM
HI Daniel

Thanks this helps quite well. I was hoping for some more examples of the designer method but I guess I will have to wait, unless Telerik can supply a quick one. With regards to the designer will it be something that can be used for large projects in the future.

Thanks
0
Sergej Mertens
Top achievements
Rank 1
answered on 15 Mar 2010, 04:40 PM
Hi Michael,

in my opinion the designer in current state never can be used in large projects (with many entities) because you loose track of many entities. Maybe this approach may work, if you can define "views" on the complete model.

Greetings,
Daniel
0
Brian
Top achievements
Rank 2
answered on 15 Mar 2010, 04:58 PM
I kinda feel the same way about the designer.  It needs a way of breaking up the information.  Might be nice to click on an object and see a designer view based on the fetch plan as well.


Tags
General Discussions
Asked by
Michael Josiah
Top achievements
Rank 1
Answers by
Dimitar Kapitanov
Telerik team
Michael Josiah
Top achievements
Rank 1
Brian
Top achievements
Rank 2
Sergej Mertens
Top achievements
Rank 1
Share this question
or