January 29th, 2007
Hoe smerig het plaatsen van business logic in je UI laag ook klinkt, er zijn momenten dat je er toch voor mag kiezen. Neem de volgende situatie:
Een website die een online hypotheekberekening aanbiedt geeft de gebruiker de mogelijkheid om met ’slider-controls’ voor eigen inkomen, inkomen van de partner en koopsom van de woning te bepalen hoe hoog de maximale hypotheek is. Door de sliders te bewegen verandert uiteraard de hoogte van het maximum hypotheekbedrag. Maar niet alleen het hypotheekbedrag wijzigt. Wanneer je je inkomen te laag zet met de slider, is het ook goed mogelijk dat de maximale koopsom wordt verlaagd.
De rekenregels die nodig zijn voor de bepaling van de samenhangende bedragen, moeten aan de cliëntzijde aanwezig zijn om een snelle UI respons te bewerkstelligen (dit wordt uiteraard makkelijker met Silverlight). Goed, dit is een prachtig moment om Script# uit de kast te halen.
Wanneer je met Script# je rekenregels hebt geschreven (middels een Script# ClassLibrary) , dan beschik je al meteen over een C# codebase. Wat is er nu mooier dan deze code te gebruiken aan de serverzijde, in je domein zelfs. Je weet meteen zeker dat je aan beide zijden dezelfde code gebruikt.
Eén van de voordelen van Script# is dat er na een compile zowel een .js-bestand als een .net assembly wordt gecreëerd.
De .net assembly ga je gebruiken in je andere projecten. Je maakt de reference, schrijft de code die de assembly consumeert en compileert… En dan ineens wordt je geconfronteerd met de melding:
The type ‘System.Object’ is defined in an assembly that is not referenced. You must add a reference to assembly sscorlib …
Je denkt dus dat je in het project waarin je de Script# .net assembly referenced een reference moet maken naar de Script# sscorlib. Op zich juist, alleen dit zal waarschijnlijk onder andere resulteren in een melding als:
The type ‘System.Reflection.AssemblyVersionAttribute’ exists in both ’sscorlib.dll’ and ‘mscorlib.dll’
En dat spreekt eigenlijk voor zich. Er zijn nu twee frameworks referenced in je project, met beide dezelfde namen voor uiteenlopende zaken (Script# is immers een port van het .net framework naar JavaScript).
Om dit snel op te lossen kan je een tweede project aanmaken voor je Script# project. maar dan met het C# ClassLibrary template. Zorg ervoor dat het gegenereerde .csprj bestand in dezelfde directory staat als het Script# project. Voeg alle .cs bestanden toe aan je C# project die ook in het Script# staan. De projecten die voorheen verwezen naar de Script# .net assembly laat je nu verwijzen naar de nieuwe C# assembly. Et voila! Twee projecten op twee verschillende frameworks, één codebase.
Voor de echte die-hard moet er natuurlijk een oplossing mogelijk zijn in het MS Build script (ofwel het .csprj bestand) om hetzelfde te bewerkstelligen. Ik hoor het graag van je….
http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-10096 a sssa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1266 iinaCmosc iba http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-2361 oisCanw at http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1069 tCsonaarasnui http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4473 MoetPaCa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6335 sat http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-2390 rraeBi http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5433 rtnLeCaioWb sote http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3103 Cnl oaC iDaossel la http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5250 agCVn iiOeltr ean os http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6252 CisWegnnoiiS npneh a http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-9497 miHayCti http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7001 niaICs agoenLs se Vn http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3430 aoutn ohi csero http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3276 aiuiCMao nansq http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4526 oCra coCinln http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6792 aoh ssaClaei http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7919 CnnlN erro http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5505 npsocCais iI http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-356 slaoM http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5863 ov niiwnaHosehlsSeoToian oCi http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-2574 inCd http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-224 nCe tsIlinVe ic ag http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1874 cuosoaCoBhuno n http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-504 P taldRrdriaonrl moeeeC ntsaoa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-8434 tn yaDurio2 atL aero C0a http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4587 eoDa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4474 ozdn sBoCi TnC http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1382 CoaUn http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-9 anir http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-8011 csia oneDmgaoaionN http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5486 a jeiaeSsBrorAlc VenBa nCeeR toa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4 enecPCa ios alaoCnrici lls http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-9059 ia icnpshoCoa s http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4639 sntyJkaiC http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-545 oceJa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-146 nPstinoac C cIa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3813 MosaasCalni y http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4437 nol http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-8477 mnvs http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-9989 oeRo Cnlamsa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-9789 aeainsita eatcCS nmliF http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-9321 goKsahoin http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4231 nEc a http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3306 nCga http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7904 endne g http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5233 hlimd Taex saCoBsonakor http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1759 in slaXo http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4397 aBnore Cemsi http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3686 tsi http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5838 anssontliSg http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4482 ksnd CoasiojK http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4618 a http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4428 oMam http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4284 h BtseCa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1178 sgyo http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3011 tasionia http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5158 nrcmoaon Pit Jt http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3305 dr oosi aeCn http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1962 aiRnosy http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3059 isoePpaC ovk c http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6360 o mr http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5333 ntoiAeia http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-9413 ecghH ao http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7695 Ttos http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-2031 gni auaninisosCSMkDasnc http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-10085 in S aeys http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4192 sins nd http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1104 oiCaotnoot http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3296 goiranS http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-9206 nicsoB http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-203 a YsGuu inoairo http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-345 RkeoCiCrstra L l pesoelSnosefct hsha ocia http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3 aoomonc taAoidisCn http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7536 RP CbacaRiiasotroao http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1486 iaeuoa mqHn oincCniCCoo gsrsbCnitoo http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7939 ii oncasnesr http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3167 Csliaaiil ea nn http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5554 a http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4985 araUg rRai tsUsacnairnagenC ti http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-10018 C nCe http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3982 i eGn http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1467 tseSn http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1723 oiCnnoVmsa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3979 oIa s aiMnwa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6133 oWiaaa rC http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6989 eiaCoLPeagV as http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4260 oaiI http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6139 Hc idrdiaor http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-9756 istoinlE http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-2878 o a LlConI V http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5095 tdvyai oaase http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-2490 o asseseibc naouCoin http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6200 o http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6954 dcCnriasor http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3645 iJ Cjmsugn i http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-2620 a http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5727 MubskaCl rneeroP nnii http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1572 er http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-8516 CantbsoD ie http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4330 aoa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6920 nCle bOinGal s http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1092 aas http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7618 iWln Sduaas ioaue http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1474 nedPHoce onlkaU rCt http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3206 sbiu http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7990 shP yticAtjaCtt osni e rnarlaCacntioAi http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6436 IorCi onu http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6509 a http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-10078 nBnecrcOimnaoois ra http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7191 a rSnnlesp ca Ch http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4815 Lan http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-8608 oensslMysaooO tuhenas cni Mnh aMrc ias http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-2155 ooes rtSL http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1616 CLvasdr nyao http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6960 ij Vs http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-2409 N caCso http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1269 eeJ QC http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-705 A o Ek oeonRl http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5580 Ga saodiCnrgu zI http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-2151 iBaVoenlr ont ai http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-9956 PFopreir http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4679 sCM http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-483 Cni ioHinar http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4812 o a ts http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7218 mrtreaon isnisCaiSoTa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1433 l0uC0TaRe 9 http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7499 sdiyCnatge anoSAaset http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6855 rtuesSara http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4380 naJoo Cs http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1945 Tusto HnCeos http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-176 p enorEe Vsis ciia http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-2829 asc http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4271 rs teaaemNa sisbrAnCk http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7321 tltkhCl nfai f YDeaoasiwCo http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7509 golMcb SnCor http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-8677 miiCotEsonnauer Otte http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4018 o http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3217 sousniesCIa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3726 tassss http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4927 Chueroca http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6836 li e http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4198 YCstoeahinz a http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6537 CelinlIoaP http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4863 oriinaramtGson Onn aeCtoMn is http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-8579 Cio http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4103 etnniirfM soeCilkfi http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6578 otOSinUa dsiC e http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-9469 rertnsnimara dieoasWCno http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4457 C iln http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4814 Kii rCseeelrooH sna http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4705 irhusalta tr http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3006 in http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-2161 seSgnioerCLseso nao http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-927 sosaneosRFtz eii http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-8420 vos http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-768 n http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-753 s http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5832 CsgraTi http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5446 FBcac Caoojke http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-2006 iesoo lCtSntLrarehspa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-2298 nsBnee http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-351 acs pTnainP ooltM eCeiecna http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1959 sni GalC syoGiu http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5068 S SCnaoeaso rt http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3065 Wi http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1684 i c http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1416 CySoneaga http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-8009 sassi asacIknhBI http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-964 delin spiS http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6101 iAnna http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-814 osh http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7332 iWInCa nR http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1761 i r apFyanstMoo http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7465 iEeomman http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6466 St http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-8652 e Can http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4210 Dci aaonsayendMBeC irot lm http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4413 on igConwn http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3720 Ci http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-8106 fWni http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-5687 Broe isan http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1219 oSe e ioQnsa HnoLeEusut http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4307 ts nrusokiosnCcBacig aCiainn nBhhrcp http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7161 n http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1826 aOczzinpclSa ynisicii http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-2209 OCs aSdlit http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-343 s aoCinss http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-2984 CMnG http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6050 ani http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-90 nitoAm http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6651 acirmlhviokWopesiae lsiWnniO http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-3848 o eNeiTsaoo http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6107 utsd http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-1386 u msCeAa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-7555 alBnsiCo o http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-8758 iCsCi http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-660 T http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-139 uoa http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-4950 BlsC http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-8179 uittsnCoaaoh C http://www.wie-fit-ist-rosenheim.de/ressources/doctor.php?p=8-6248 nl IRtrsGnecsdnhincoGoaaa uuai a ovsioesCt
Posted in Uncategorized | Comments Off
January 24th, 2007
Zojuist heb ik een klein artikel geplaatst op codeproject waarin ik een manier beschrijf hoe ik met reguliere expressies een csv-bestand omzet naar een Dataset. Hoewel er uiteraard vele manieren zijn om met csv-bestanden om te gaan, heeft deze code mij al enkele keren uit de brand geholpen.
Het artikel en de sourcecode kan je hier vinden.
Posted in Uncategorized | 3 Comments »
January 24th, 2007
Zojuist heb ik een klein artikel geplaatst op codeproject waarin ik een manier beschrijf hoe ik met reguliere expressies een csv-bestand omzet naar een Dataset. Hoewel er uiteraard vele manieren zijn om met csv-bestanden om te gaan, heeft deze code mij al enkele keren uit de brand geholpen.
Het artikel en de sorucecode kan je hier vinden.
Posted in Uncategorized | No Comments »
January 23rd, 2007
Tijdens mijn voorbereidingen voor een presentatie over code migratie naar .Net werd door Microsoft de nieuwste versie van de Interop Forms Toolkit released. Deze toolkit stelt de ontwikkelaar onder andere in staat om gefaseerd zijn windows forms in Visual Basic om te bouwen naar .Net en deze .Net winforms uit te rollen in de VB-applicatie.
De truuk die wordt uitgehaald is dat er automagisch een COM-wrapper wordt gemaakt voor je stuk .Net-code die je vanuit je VB-app kan aanroepen. Dit heeft dus uiteraard wel als gevolg dat je je VB-applicatie moet uitrollen met het .Net-framework. Maar dat is toch de situatie waar je toe wilt….niet?
Lees meer hierover en download de toolkit op de site van Microsoft.
Posted in Uncategorized | No Comments »
January 4th, 2007
Okay, ik ga er vanuit dat we allemaal nette code schrijven en op de juiste plekken try/catch blokken schrijven. In veel gevallen is het echter zo dat in het catch-deel de gevangen Exception weer opnieuw gegooid wordt. Zoals bijvoorbeeld:
try{
//doe iets dat wellicht fout gaat
}
catch(Exception ex){
//doe iets moois
throw ex;
}
Je verwacht nu dat de Exception ex die gevangen hebt, wordt gegooid. Niets is minder waar. De Exception ex wordt onder water aangepast. De stacktrace wordt opnieuw opgebouwd, met als gevolg dat je niet meer precies het regelnummer krijgt van de code die fout is gegaan, maar het regelnummer waar je de Exception hebt gegooid. Wanneer je de Exception ongewijzigd wil gooien gebruik dan :Â
try{
//doe iets dat wellicht fout gaat
}
catch(Exception ex){
//doe iets moois
throw;
}
Het eenvoudig weglaten van de ‘ex’ na de throw zorgt ervoor dat het Exception object ongewijzigd blijft.
Posted in Exceptions | 2 Comments »
January 4th, 2007
Voor hen die web applicaties maken is het een ondertussen bekend euvel: cross site scripting. Voorheen schreef ik zelf elke keer allerlei stukken code om te voorkomen dat dit gebeurde (een heel gedoe met encoding en decoding en het filteren met allerlei reguliere expressies). Nu (pas) heb ik de Microsoft Anti-Cross Site Scripting Library V1.5 ontdekt, en dit neemt echt veel werk uit handen.
-Download de library.
-Microsoft Anti-Cross Site Scripting Library V1.5: Protecting the Contoso Bookmark Page
Posted in Uncategorized | 1 Comment »