Today I was asked, why was I still using API 1.0. I rattled off a bunch of reasons. At the end of it, I asked myself why would I use API 2.0?
So what I’d like to know, and from people who’re proficient in API 1.0, what do you like about API 2.0?
If you don’t have any positive advantages to API 2.0, then please don’t post 'em here. Maybe start a “What are the features and benefits of API 1.0” thread instead.
(ps- I don’t know for certain either, I believe so - but the fact that this has changed at all immediately makes me want to avoid migrating an API1 project to API2… how many obscure bugs will that introduce into a legacy app…?)
Obviously, starting a brand new project is a different matter.
Good one, consistency (currently not complete)… for example in Web 2.0 we have WebControl.Style… (this is a class for styling).
But on WebToolbarButton we also have a .Style but this is an enumeration for WebToolbarButton.ButtonStyles… Which seems inconsistent…
But I can finally make Windows and Mac show the same date(time) strings in a table. Before, the results did not always match fully, at least not for a localized system.
I think the gol was trying to enhance the consistency and modernizing the language, We should do whatever.method() instead of function(whatever), so we could write modern and readable chains like
Var myval = mydata.Trim().Left(10).Upper()
Instead of the reverse notation
Dim mystr As String = Upper(Left(Trim(mydata), 10)
Zero based consistency should be another plus.
Don’t know if we reached proper zero based consistency and we still don’t have all sets of what we need for proper chaining, e.g. we don’t have (literal or expression).method(), so today we still need to write mixed content as
Var mastercode As String = MyCode("My key String").Upper()
Instead of
Var mastercode As String = "My key String".Encoded().Upper()
Or
Var mastercode As String = ("My key String"+saltVar).Encoded().Upper()