MSure v0.7 was just released. Check it out at the new website.
Posts Tagged “C#”
Apr
19
2008
Vilken besvikelsePostad av Per i C#, ProcessIt!, Programmering, tags: .NET, Add new tag, C#, ProcessIt!, programming, Remoting.NET Remoting är det som använts som kommunikationslager i ProcessIt! sedan start. Så är inte längre fallet; jag har nu kastat ut allt vad .NET Remoting heter (med undantaget för att kunna ladda assemblies [vad heter det på svenska?] i andra applikationsdomäner) och ersatt det med hederliga TCP/IP sockets. Att använda .NET Remoting verkade från början vara en en bra idé, men nu ett halvt år senare så önskar jag att jag aldrig hade hört talats om det. Främsta skälet är att man inte har 100% kontroll över vad som händer, till skillnad från sockets där inget händer utan att man ber om det. Jag tycker att Microsoft har lyckats bra med hela .NET-platformen (i all fall version 2.0, jag har inte använt senare versioner) men .NET Remoting är en stor besvikelse. Visst, att kunna göra anrop via proxys till objekt som finns på andra datorer över ett nätverk är ju läckert men jösses vilken overhead det skapar i form av nätverkstrafik och minnes utnyttjande och så slött det är. Nej, tacka vet jag gamla hederliga sockets; de gör vad man ber dem om, inget annat.
Mar
11
2008
VisualizeIt!Postad av Per i C#, ProcessIt!, Programmering, tags: C#, ProcessIt!, programmingVill du diskutera detta inlägg? Gör då det i forumet! De visa säger att en bild säger mer än tusen ord och det brukar stämma. Så istället för att beskriva hur den tidigare nämnda klienten kommer att se ut, så visar jag därför en bild istället. Kanske inte ser så mycket ut för värden just nu, men det ger er en ide om var det är på väg. Som synes är det MDI (Multi Document Interface) som gäller - dvs flera vyer kan öppnas i programmet, t.ex. 1-Wire schema, temperaturgrafer mm. Så vad har jag gjort de senaste två dagarna? Ritat den supersnygga gröna ikonen? Jajamensan! Som bekant ska applikationen kunna visa flera olika vyer samt presentera olika typer av data, samt hantera användarens klickningar osv. Eftersom det från kärnan kan komma information sporadiskt (nej, jag vill inte använda pollning - det är fegt! Det låter ju inte så svårt, eller hur? Det är det inte heller, men nu blir det knepigare. När informationen bearbetats färdigt ska den presenteras för användaren i ett fönster eller på annat sätt. Det är detta steg som jag jobbat på de senaste dagarna - problemet är att det ramverk jag använder, Microsoft .NET, inte tillåter att man uppdaterar visuella komponenter från anda trådar än programmets huvudtråd (det går att ignorera denna begränsning, men det är *inte* en bra idé). Så vad kan man göra då? Alernativ 1:
Denna lösning funkar, men det blir en väldig massa extra kod - man använder ju fler än en metod per komponent….så nej, bättre lösning måste finnas. Alternativ 2: Alternativ 3: Mins du en gröna ikonen jag nämnde i början av detta inlägg? Den styrs enligt alternativ tre och är bevis på att mina design fungerar vilket, om jag får vara ärlig, känns skönt - jag vill ju implementera funktioner, inte lösa ett problem som jag tycker Microsoft borde ha tagit fram en lösning på redan vid designen av ramverket. Kanske de gjort det i senare versioner (3.0 & 3.5)? Alternativ 4: Har du läst allt ovanstående? Bra jobbat, kanske lärde du dig något
Jan
19
2008
LSIHD44780LCDIIContainerPostad av Per i 1-Wire, C#, Programmering, tags: 1-Wire, C#, LCD Driver, Louis SwartSkrev klart de viktigaste funktionerna i LSIHD44780LCDIIContainer idag, så nu finns det en fungerande klass för Louis Swart’s LCD driver i C#
Jan
12
2008
OW.NetPostad av Per i 1-Wire, C#, Programmering, tags: 1-Wire, C#, Dallas, Java, Maxim, programmingSo, it’s been a few days since I last posted that I would stick to my own 1-Wire library and things have changed since then. I’ve put my project on hold to help out with the Open Source C# 1-Wire project initiated by Ralph Maas. You can find the project here.
Jan
06
2008
Open Source 1-Wire discussionPostad av Per i 1-Wire, C#, Programmering, tags: 1-Wire, C#, Dallas, Maxim, programmingAnother post in English, just to please the larger audience. I just finished an interesting discussion with another developer, about starting an Open Source 1-Wire project to convert the existing Java 1-Wire classes provided by Dallas/Maxim to C#. We’ll see what this ends in, sounds promising. Update: After having a look at the code that was provided (which is based on the alpha release of the “Pure C#”-code by Dallas), I’ve come to the conclusion that I’m going to stick to my own 1-Wire library for the time being. Although using the code-base from Dallas might give some benefits - it is the official C# library after all - I also see benefits of using my own implementation. The biggest advantage to use their code-base is obviously the device containers that comes with it; I’ll have to implement those I need in my library. On the other hand, there are very few devices for which I need support; it’s just temperature sensors (Family 0×10), switches (0×05) and a third party LCD driver. Support for temperature sensors are already implemented and judging by the data sheet for DS2405, implementing support for that switch doesn’t look very hard. The same goes for the LCD driver. So, until someone convinces me otherwise, I will continue to develop my own library. Oh, for those who wonders: I’ve not decided if I shall release my library as Open Source or not yet. I’m still thinking about it.
Jan
03
2008
TMEX.Net = 1-Wire in pure C#Postad av Per i 1-Wire, C#, Programmering, tags: 1-Wire, C#, Dallas, Maxim, programmingHere’s another post in english, to please the larger audience. As the title suggests, I’m busying myself with 1-Wire mixed with C# again. I’m not sure if all this is good or bad idea, but it is fun, and that’s enough to keep me going So, what’s this all about then? Well, almost a year ago - to the day actually - I expressed my disappointment in that Maxim/Dallas still hadn’t released their Pure C# 1-Wire library. They still haven’t, and they’re not giving any indication on when they will provide a finished library. The last time they said anything about this was on Nov 29th, 2007:
In the latest release (currently 4.01) of their TMEX drivers they included a OneWireAPI.NET.dll, but it is Java-based, and as such it requires you to install the J# redistributable on all computes where you want to run the application in which you use the dll, and it also requires you to mix Java with C# in your application. Not a solution I’m very fond of. What can be done about this? Well, you could wait for them to release their Pure C# 1-Wire libary, or you can do like me: write your own implementation in C#! Yes, you read that right - I am writing my own 1-Wire library, in C#. Below are some details (subject to change) about the library:
Back to coding! |


Inlägg (RSS)