Fluent API consistency issues
Hi,
I see the SF fluent API lacks consistency.
For example, to get the published news, you'd do:
var news = App.WorkWith().NewsItems().Publihed();
var pages = App.WorkWith().Pages().ThatArePublished();
var news = App.WorkWith().NewsItems().FirstThat(n => n.UrlName == "something");
var page = App.WorkWith().Pages().FirstThat(p => p.UrlName == "something");
Hello Thomas,
We are aware of these discrepansies and we plan to unify our fluent API in the future. However we cannot give you a strict timeframe. We won't be able to simply rename a method, because that would break a lot of existing code, so we will probably have to create a duplicate method.
Greetings,
Lubomir Velkov
the Telerik team
Hi Lubomir,
Thanks for the answer. Yes, having duplicate methods is fine. You could just mark some as deprecated, telling programmers to use another method instead (through the Obsolete attribute), so people gradually move to the right methods.