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 check in AngularJS if a service was register or not

There are cases when you need to check in a service or a controller was register in AngularJS.
For example a valid use case is when you have the same implementation running on multiple application. In this case, you may want to intercept the HTTP provider and add a custom step there. This step don’t needs to run on all the application, only in the one where the service exist and register.
A solution for this case would be to have a flag in the configuration that specify this. In the core you would have an IF that would check the value of this flag.
Another solution is to check if a specific service was register in AngularJS or not. If the service was register that you would execute your own logic.
To check if a service was register or not in AngularJS container you need to call the ‘has’ method of ‘inhector’. It will return TRUE if the service was register.
if ($injector.has('httpInterceptorService')) { $httpProvider.interceptors.push('httpInterceptorService&#…

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.51EF 6.0.2VS2013
It seems that there …

Run native .NET application in Docker (.NET Framework 4.6.2)

Scope
The main scope of this post is to see how we can run a legacy application written in .NET Framework in Docker.

Context
First of all, let’s define what is a legacy application in our context. By a legacy application we understand an application that runs .NET Framework 3.5 or higher in a production environment where we don’t have any more the people or documentation that would help us to understand what is happening behind the scene.
In this scenarios, you might want to migrate the current solution from a standard environment to Docker. There are many advantages for such a migration, like:

Continuous DeploymentTestingIsolationSecurity at container levelVersioning ControlEnvironment Standardization
Until now, we didn’t had the possibility to run a .NET application in Docker. With .NET Core, there was support for .NET Core in Docker, but migration from a full .NET framework to .NET Core can be costly and even impossible. Not only because of lack of features, but also because once you…