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

How to audit an Azure Cosmos DB

In this post, we will talk about how we can audit an Azure Cosmos DB database. Before jumping into the problem let us define the business requirement: As an Administrator I want to be able to audit all changes that were done to specific collection inside my Azure Cosmos DB. The requirement is simple, but can be a little tricky to implement fully. First of all when you are using Azure Cosmos DB or any other storage solution there are 99% odds that you’ll have more than one system that writes data to it. This means that you have or not have control on the systems that are doing any create/update/delete operations. Solution 1: Diagnostic Logs Cosmos DB allows us activate diagnostics logs and stream the output a storage account for achieving to other systems like Event Hub or Log Analytics. This would allow us to have information related to who, when, what, response code and how the access operation to our Cosmos DB was done. Beside this there is a field that specifies what was th...

Can User Technical Profile Influence AI Architecture Decisions?

In the last few days, I ran a small experiment on Devin/Windsurf/Cascade, BMAD, and LLM-based architecture decisions. The initial concern was simple: if an AI coding assistant knows something about the user, for example, that the user is a Java developer or a .NET developer, can this information influence the architecture and technology stack that the AI will propose? This question is important because many companies are starting to use AI tools not only for coding but also for product discovery, architecture, documentation, and technical decision-making. If the AI is influenced by the developer's personal profile, the result may not be fully neutral. It may look like a business or architecture decision, but in reality, it may be partially shaped by the context of the person using the tool. The test was done using BMAD with Devin/Windsurf/Cascade. The scenario was a unified field service operations platform. The task was to let BMAD refine the product, define the architecture and s...

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...