Skip to main content

Silverlight - Diferente intre MAC OS si Windows OS.

Am fost întrebat zilele astea de doua persoane de limitările pe care le are Silverlight pe MAC OS. O sa încerc sa enumăr cîteva din aceste limitări mai jos.
1. Din cauza ca pe MAC unele tipuri de data nu exista sau sunt reprezentate diferit, este posibil ca metoda ToString() sa returneze valori diferite pe cele doua sisteme. Mai interesant este cand apelam ToString() pentru
Single.PositiveInfinity.ToString()
In cazul MAC-ului o sa obtinem "+oo", iar pe Windows o sa avem "Infinity".
2. Cand lucram cu informatii despre cultura (CultureInfo) rezultatele o sa difere intre cele doua sisteme chiar daca avem aceiasi cultura setata. Totodata TextInfo.ListSeparator pe MAC OS va returna mereu caracterul ',' indiferent de cultura pe care o avem setata.
3. Daca folosim metoda SaveFileDialog, aceasta nu o sa afiseze la user nici o eroare cand userul foloseste caractere invalide, dar in schimb se va arunca exceptia System.ArgumentException pe care noi trebuie sa facem cache.
4. Parsarea de URL-uri difera pe MAC, din aceasta cauza putem sa ne trezim cu '\' in loc de '/'.
5. Evenimentele de click pe butonul stang sau drept al mouse-ului (MouseRightButtonDown, MouseLeftButtonDown, ...) nu sunt suportate in totalitate pe MAC OS, deoarece nu avem 2 butoane pe mouse la toate device-urile. Din aceasta cauza aceste evenimente pot sa fie aruncate fara sa le putem controla de diferite device-uri pe care userul le are instalate.
6. Evenimentele de MouseWheel nu sunt suportate deloc pe MAC OS daca aplicatia nu ruleaza out of the brower. Daca ruleaza in brower e nevoie sa facem handle la ele prin intermediul DOM-ului HTML.
7. In cazul in care folositi evenimente de KeyPress, este bine de stiut ca exista PlatformKeyCode, care difera in functie de platforma.
8. Evenimentele de Drop nu sunt suportate pe MAC OS cand ruleaza in brower-ul Safari (dar exista un workaround pentru aceasta limitare.
9. Daca lucram cu socke-uri, modul in care sunt implementate difera usor, din aceasta cauza este bine sa verificam pe clasele pe care le folosim pentru socket-uri daca exista diferente pe cele doua platforme.
10. Resursele care sunt accesibile prin interop difera, din aceasta cauza trebuie sa verificam ce sistem de operare foloseste utilizatorul si sa apelam resursele corespunzatoare.
11. Implementarea la controler-ului WebBrower difera pentru cele doua sisteme, deoarece modul de randare este diferit.
12. Daca vrem sa facem debug, acesta poate sa fie facut doar prin Remote Debugging.
13. Pe MAC putem sa afisam o aplicatie Silverlight doar ca "windowed", pe cand pe Windows avem atat "windowed" cat si "windowless". Chiar daca avem o alta setare setata, pe MAC o sa fie folosita doar "windowed".
14. Exceptiile contine informatii diferite, iar unele pot sa fie eronate (linia si coloana unde a aparut exceptia).
15. Cand aplicatia ruleaza pe MAC OS in Safari, doua instante de HtmlPage.Window nu sunt egale.
16. MessageBox pe MAC OS o sa aibe mereu o icoana afisata, orice am face.
17. Zonele de access (cross-zone) difera pe MAC OS.

Daca ati mai gasit si alte diferente, va rog sa postati un comentariu.

Comments

  1. interesant, misto post.

    ReplyDelete
  2. Intr-adevar, cam acestea par sa fie diferentele (http://justinangel.net/SilverlightIsnTFullyCrossPlatform) - mi se par acceptabile in general.. Probabil pe Symbian S60 sunt mai multe limitari, dar din fericire a avut grija Microsoft sa nu ne mai batem mult timp capul cu Symbian, "convingand" Nokia sa treaca pe Windows Phone 7.. :)

    ReplyDelete

Post a Comment

Popular posts from this blog

Windows Docker Containers can make WIN32 API calls, use COM and ASP.NET WebForms

After the last post , I received two interesting questions related to Docker and Windows. People were interested if we do Win32 API calls from a Docker container and if there is support for COM. WIN32 Support To test calls to WIN32 API, let’s try to populate SYSTEM_INFO class. [StructLayout(LayoutKind.Sequential)] public struct SYSTEM_INFO { public uint dwOemId; public uint dwPageSize; public uint lpMinimumApplicationAddress; public uint lpMaximumApplicationAddress; public uint dwActiveProcessorMask; public uint dwNumberOfProcessors; public uint dwProcessorType; public uint dwAllocationGranularity; public uint dwProcessorLevel; public uint dwProcessorRevision; } ... [DllImport("kernel32")] static extern void GetSystemInfo(ref SYSTEM_INFO pSI); ... SYSTEM_INFO pSI = new SYSTEM_INFO(

Azure AD and AWS Cognito side-by-side

In the last few weeks, I was involved in multiple opportunities on Microsoft Azure and Amazon, where we had to analyse AWS Cognito, Azure AD and other solutions that are available on the market. I decided to consolidate in one post all features and differences that I identified for both of them that we should need to take into account. Take into account that Azure AD is an identity and access management services well integrated with Microsoft stack. In comparison, AWS Cognito is just a user sign-up, sign-in and access control and nothing more. The focus is not on the main features, is more on small things that can make a difference when you want to decide where we want to store and manage our users.  This information might be useful in the future when we need to decide where we want to keep and manage our users.  Feature Azure AD (B2C, B2C) AWS Cognito Access token lifetime Default 1h – the value is configurable 1h – cannot be modified

ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded

Today blog post will be started with the following error when running DB tests on the CI machine: threw exception: System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information. at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName, String providerInvariantName) This error happened only on the Continuous Integration machine. On the devs machines, everything has fine. The classic problem – on my machine it’s working. The CI has the following configuration: TeamCity .NET 4.51 EF 6.0.2 VS2013 It see