Developers, developers, developers have new crazy idea "to publish data in IQueryable interface".
I For example, to provide IQueryable with WCF Data Service
public class MyWcfDataService : DataService<MyEfModel> { [WebGet(ResponseFormat = WebMessageFormat.Json)] public IQueryable<GetMyListEF> GetMyList() { using (MyEfModel context = this.CurrentDataSource) { return context.GetMyListEF().ToList().AsQueryable(); } } }
At first, what if context.GetMyListEF() will return millions of rows? All of them will be send to the client. Is client expect such thing?
Second point will be a bad nature of the IQueryable in real life. Currently nobody can provide full implementation of this interface. Even Entity Framework with modern sql providers does not have ideal implementation of the interface. There lots of exceptions of impossibility to convert to T-SQL code. Or with success we have bad performance (the reason stackoverflow.com choose Micro ORM dapper).
If some provide IQueryable<T> interface then clients expect full implementation of it. Not partial, FULL!
II Next example is widely using our lovely interface in Repository pattern, usually it looks like
public class MyRepository<T> : IRepository<T> { public IQueryable<T> GetModels() { // implementation } }- What is the purpose of abstracting Repository?
- To make it possible exchange in future with another implementation
- Can you make NoSql storage or File storage using in future instead of MS SQL?
- No! Querable providers are very complex to create for such storages.
III Same problem with OData, that is pushing by Microsoft.
With OData users can query data by passing parameters in URI, for example,
http://services.odata.org/OData/OData.svc/Category(1)/Products?$top=2&$orderby=name
The idea is great, but, but, but
"Users like cheating only if it is a focus!"
If you take Sharepoint services with OData you will find the same problem. The service just cannot provide all possible ways of using it. Users will be restricted to the platform in their heads, instead of be lucky with interface features.
P.S. Better use what users expect to get from your services (IEnumerable<T> in most cases).
Resources:
IQueryable is Tight Coupling by Mark Seemann
ReplyDeleteشركة نقل اثاث بالدمام تقدم خدمات لا حصر لها رائعة لتلبية طلبات العميل وتحقيق كل ما يتمناه في خدمات نقل العفش بالدمام فثقتنا في اعمالنا جيدة قد وضعتنا كخبراء داخل مجال نقل الاثاث حيث يتم التشاور مع حقيبة مختلطة من داخل شركة نقل عفش بالدمام عن اختيار المواد الخاصة بك والمواد أو الأشياء من على عتبة منزلك لتصل جميع ممتلكاتك بأمان إلى المكان الذي ترغب فيه
شركة نقل الاثاث بجدة لدينا ميل الي التفكير في إعطاء نوع من الإدارات لدي شركة نقل اثاث بجدة التي تطوير انفسهم ومتابعة كل ما هو حديث في عالم نقل الاثاث المنزلي والبحث عن الطرق الحديثة التي تؤدي الي انجاز المهمة بكل سهولة والتي تترك نجاح باهر يمكن أن يساعد على ارضاء نفسية عملائنا.لدينا الميل في شركة نقل عفش بجدة إلى أن يشار جيدا إلى السيارات الحديثة التي نمتلكها علي انها ذات كفاءة عالية كما نمتلك عمال تنزيل علي اعلي مستوي كما يوجد لدينا في خدمة نقل عفش بجدة
فنين فك وتركيب لديهم القدرة الكافية علي التعامل مع جميع انواع الاثاث كما اننا نمتاز باننا نمتلك المغلفون الذين يقومون بتغليف جميع الاثاث المنزلي للحفاظ عليه من الغبار والتكسير كل هذه العوامل التي تقدمها شركتنا نتيجة للمعيار والتنمية والعقل
شركة نقل الاثاث بمكةتكتشف مجموعتنا الخاصة في فريق شركة نقل اثاث بمكة في خدمتك في أي وقت من اليوم وأنها مستعدة للبقاء طيلة الوقت لمساعدتك في نقل اثاث منزلك سواء كان بيتك كبير او صغير قهذه ميزة الشركات الكبيرة التي تقدم الخدمات المتميزة فنحن نأمل دائما لإعطاء أفضل انطباع من تجربة نقل ممتازة. يتم اتخاذ كل خطوة الرعاية من قبل فريقنا والتعامل مع أفضل طريقة ممكنة. لدينا في شركة نقل عفش بمكة المتخصصين هم أيضا على استعداد للرد على الاحتياجات الفورية لعملائنا الكرام.
مستودعات تخزين الاثاث بالرياضالتعبئة والتغليف واحدة من أكثر المعترف بها في خدمة نقل وتخزين الاثاث بالرياض فخدمة التعبئة والتغليف لدي شركة تخزين اثاث بالرياض يمكن أن يحصل على انتباه الكثير من العملاء وهذا يرجع ببساطة إلى أننا نواصل الوفاء بطلباتهم. كما قمنا بتطوير وواصلنا تقديم أفضل الخدمات التي تحافظ علي ممتلكتهم في مستودعات تخزين العفش التي تكمل في الحفاظ علي الأموال المدفوعة في ممتلكتهم لحين الرجوع اليها مرة أخري
شركة تخزين اثاث
الشيء المثير للإعجاب بالنسبة الينا في شركة تخزين عفش بالرياض هو أن فريقنا على استعداد لخدمتك في أي وقت من اليوم لطالما كنت بحاجة لدينا فنحن نواصل إقناع عملائنا التأمين علي جميع العناصر الخاصة بهم. هذا هو السبب الرئيسي لماذا بقينا على أنها
Our company has well equipped machines and modern tools that ensure quality and fast production with the help of which we are able to manufacture more than 5,000 office chairs per year. And thus, we are able to meet the ever- growing demand of chairs. Among the many places where our products are supplied among those two biggest supplies are done in Mumbai, Pune in India.
ReplyDeletePlease visit Our Sites:Chair Manufacturers in Mumbai
Chair Supplier in Mumbai
Chair Manufacturers in Mumbai
Chair Supplier in Mumbai
Office Chair Supplier in Mumbai
Visitor Chair Supplier in Mumbai
Chair Dealers in Mumbai
Top Chair Manufacturers in Mumbai
Best Chair Manufacturers in Mumbai
ReplyDeleteThere are many packers and movers in Hyderabad who are looking for ways to make easy money from innocent families and individuals like you who are planning to relocate. Such packers and movers Hyd may either provide extremely bad service and end up damaging your goods permanently, or disappear with your entire household items instead of delivering them to the destination. Hence, the most crucial step before you hire any movers packers in Hyderabad is to verify their authenticity and check if they capable of providing good quality services.
Packers and Movers in Hyderabad
Packers and Movers in Jubilee Hills
Packers and Movers in Banjara Hills
Packers and Movers in Kondapur
Packers and Movers in Madhapur
Packers and Movers in Gachibowli
Packers and Movers in Chanda Nagar
Nice one, I guess we just need to stop for a brief moment and read through. I dont read that much but I really had some good time grabbing some knowledge. Still I am out to speak and propose you exotic stuffs like
ReplyDeleteexotic carts official
buy exotic carts
buy exotic carts online.
exotic carts review
exotic carts website
gorilla glue exotic carts.
exotic carts fake
kingpen official
kingpen review.
mario carts official
mario carts online
exotic carts website
exoticcartsofficial
exotic carts for sale
exotic carts thc
exotic cartridges
exotic carts flavors
@exoticcartsofficial
real exotic carts
exotic carts vape cartridges
exotic cart
exotic carts vape pen
mario kart cartridge
king pen battery
exoticcarts
exotic carts official website
supreme cartridges
mario carts cartridges
exotic carts review
710 kingpen gelato
710 king pen battery
supreme cartridge
supreme brand oil cartridge
what are exotic carts
kanchipuram silk sarees Manufacturers
ReplyDeletekanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
kanchipuram silk sarees Manufacturers
شركة تخزين اثاث بالدمام
ReplyDeleteشركة تخزين عفش بالرياض
شركة نقل عفش بالمدينة المنورة شركة نقل عفش بالمدينة المنورة
شركة نقل عفش من الرياض الى جدة
شركة نقل عفش بالدمام
اسعار شركة نقل عفش من الرياض الى مكة
شركة نقل عفش بالرياض رخيصة
ارخص شركة نقل عفش اثاث
_____________---------