tag:blogger.com,1999:blog-86425044131795423722024-03-22T05:02:38.256+02:00Adventures in a Final ProjectExperiences from developing a final project in C# at Machon Tal, the women's department of the Jerusalem College of Technology.Goldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.comBlogger17125tag:blogger.com,1999:blog-8642504413179542372.post-27998806323090621332009-10-18T10:02:00.000+02:002009-10-18T10:02:26.192+02:00Fresh Perspective: Specifications!!!!!!!!!!!!!!!!!!!!!! מזל טוב לתאיר לרגל האירוסין שלה !!!!!!!!!!!!!!!!!!!!!!
Last time I wrote about documentation, I was huffy and annoyed.
Not today.
After posting a link to Joel on Software, I followed my own advice and started reading everything that caught my eye there. And there was a lot that caught my eye.
Notable for today's post are Joel's preachings on functional Goldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com0tag:blogger.com,1999:blog-8642504413179542372.post-22153288584929919172009-09-29T05:13:00.000+02:002009-09-29T05:13:40.273+02:00I can tell she is a born.... HUNGARIAN! (bravo, bravo, bravo!)The title is for all you fans of My Fair Lady.
On to the actual topic: variable naming conventions.
http://www.joelonsoftware.com/articles/Wrong.html
Oh, wow. I really need to start following that blog!
(yes, I got totally distracted for about an hour. Check out this:
http://www.joelonsoftware.com/articles/fog0000000332.html)
(OK, make that 3 hours, and just subscribe to the above-mentioned Goldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com0tag:blogger.com,1999:blog-8642504413179542372.post-50789553988843946582009-09-22T11:20:00.004+03:002009-09-29T01:18:46.340+02:00Null CoalescingI had seen this before, but now it hit me:
?? is an operator in .NET 2.0 and up.
http://weblogs.asp.net/scottgu/archive/2007/09/20/the-new-c-null-coalescing-operator-and-using-it-with-linq.aspx
So all those lines of code that look like this:
int myInt = (myNullableInt.HasValue) ? myNullableInt.Value : 0;
can now look like this:
int myInt = myNullableInt ?? 0;
Hurray!Goldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com0tag:blogger.com,1999:blog-8642504413179542372.post-89733858826936475662009-09-16T10:53:00.004+03:002009-09-16T11:49:04.985+03:00LINQ to SQL, LINQ to EntitiesJust read a fascinating thread on the MSDN forums:Very inefficient SQL generation in EF?(although one of the posters there complained about how the link to this thread is not permanent...)In the new world of .NET data access, it is no longer acceptable to deal with DataTables in the Business Layer of your application. DataTable is meant to bridge between the world of datastore (read: database) Goldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com0tag:blogger.com,1999:blog-8642504413179542372.post-16275344841691692422009-09-15T11:14:00.003+03:002009-09-15T11:45:32.920+03:00Version Control for the Server-ChallengedSome background: there are three of us working on a large project. We are not located in the same city; two of us are about an hour's drive away, given traffic, and the third is in a totally different region of the country. Each of us is developing web pages on her own machine at home, sometimes coming in to school and developing on her own (desktop) machine there. That means that at least six Goldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com3tag:blogger.com,1999:blog-8642504413179542372.post-10997893810070045602009-09-09T22:28:00.003+03:002009-09-09T22:47:58.406+03:00More Asynchronous StuffWe've divided up the project, and I have selected a new (and exciting?) role for myself: the UI developer. Web UI, that is.Taking a look around at popular sites, I can tell you already that I need to learn all about making good use of AJAX. Let me attempt to define it, based of course on an acquaintance of less that three weeks.Traditional ASP and ASP.NET sites are heavy on the server-side Goldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com0tag:blogger.com,1999:blog-8642504413179542372.post-40277828166099000522009-09-03T15:00:00.004+03:002009-09-09T22:27:59.282+03:00WCF TimeoutsDid you ever search all over the web and only find the same wrong answer, over and over? I recently had this experience.In an unrelated project, I was trying to set up a notification system using WCF. At some unspecified point in time, the web service would receive a notification for the client and would need a way to propagate that notification. Our thought had been to implement this with Goldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com4tag:blogger.com,1999:blog-8642504413179542372.post-61992398088806847092009-09-01T12:55:00.001+03:002009-09-09T22:27:07.463+03:00DataList, Templates, and UserControlsTair had a brainstorm this week: why not use a custom UserControl together with a DataList and an ObjectDataSource? When using a UserControl, we can set one property of the type of our business entity in the control, and in the setter of that property fill the child controls of the UserControl with the needed data.Just to show that this can be done, I wrote up some stupid code. I'll put it up in Goldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com0tag:blogger.com,1999:blog-8642504413179542372.post-84657555345411496742009-08-18T14:51:00.003+03:002009-09-02T15:59:21.335+03:00More on Linux Partion RescueThe story goes that Windows's partition manager messed up my Linux partitions, to the extent that I could not see the file system on them or boot from them.After searching online, I found instructions here and here. Whew!Here's what I did:I loaded Parted Magic onto my USB drive with UNetBootin. I love that utility!Then, following the instructions from the links above, I restored the superblock onGoldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com0tag:blogger.com,1999:blog-8642504413179542372.post-51667401460050174442009-08-17T19:31:00.004+03:002009-09-02T16:00:13.443+03:00Anti-Microsoft?I know, this post hardly belongs on a blog that's supposed to be about ASP.NET and the cool tools that Microsoft provides. Bear with me.I've been working on an unrelated job, and to that end I started playing with Linux. I know, the beginning of the end, right?How is it that Linux is so sensitive to the possibility that you might be running another OS and Windows isn't? e.g., when I use the LinuxGoldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com0tag:blogger.com,1999:blog-8642504413179542372.post-74252926638085839752009-07-09T13:47:00.004+03:002009-07-09T15:40:57.864+03:00|DataDirectory| distressThe issue first came up in a project last semester, and again it haunts us:when you place your .mdf file in one project (the DAL) and execute the application from another project (the UI) evil things happen. Namely, you get an exception:System.Data.SqlClient.SqlException was unhandled by user code Message="An attempt to attach an auto-named database for file blah blah blah\PL\myDB.mdf failed. A Goldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com0tag:blogger.com,1999:blog-8642504413179542372.post-61932558556413070662009-07-02T10:31:00.002+03:002009-07-02T12:20:20.937+03:00Pile on the layersHere's a quote from MSDN:"Most ASP.NET data source controls, such as the SqlDataSource, are used in a two-tier application architecture where the presentation layer (the ASP.NET Web page) communicates directly with the data tier (the database, an XML file, and so on)."This is a cute way of saying that all those nice data-bound ASP.net controls - the ones that are supposed to take a data source Goldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com0tag:blogger.com,1999:blog-8642504413179542372.post-55293411668068677662009-06-30T10:15:00.007+03:002009-07-05T10:54:11.105+03:00Dude, where's my data access?בהעמקת הכרותנו עם שכבת הממשק משתמש, אפשר כבר לראות את הצל של שכבת הלוגיקה המתקרבת. הגיע הזמן לקצת תכנון.הנושא של היום הוא השאלה איפה לשים את הקוד שמפיק את שאילתותנו מול מסד הנתונים. החלטנו בשלב מוקדם יותר (ראה להלן) להשתמש בLinq to SQLלשכבת הDAL.LINQ to SQL, כשגוררים עליו טבלאות ממסד נתונים שלSQL Server,אוטומטית קורא ומפיק את היחסים בין הטבלאות שהגדרת במסד הנתוניםכששומרים את הקובץLinq to SQL,מופקGoldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com0tag:blogger.com,1999:blog-8642504413179542372.post-37940734809836918642009-06-29T11:17:00.012+03:002009-07-02T16:20:21.756+03:00Not a member? Join today!הגיע הזמן להפיק גירסה ראשונית לממשק משתמש. לאפליקציה אינטרנטית כמו שלנו, צריך לשאול: איך נטפל בזיהוי משתמשים, דוגמת רישום וכניסה למשתמש מוכר?ASP.netאמור לטפל בנושאים כאלה עם מה שנקרא "חברות" (תרגום.(membershipאם המתכנת הוא אצלן (זה בעצם יכול להיות דבר טוב) אז סביבת הפיתוח יכול להפיק לו מסד נתונים מוסתר בשם aspnetdb.mdfבתיקיית הApp_Data,ודרך קריאות למחלקה מוסתרת שומרת נתונים לתוכו. דף לוקלי פותחיםGoldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com0tag:blogger.com,1999:blog-8642504413179542372.post-86716756959421508442009-06-23T17:23:00.004+03:002009-06-23T17:32:15.437+03:00Human Events: A Sequel to Yesterday's PostAfter we took two months to generate documentation that was expected in a few weeks, our client seems understandably unwilling to meet with us.Did we take too long? Of course. Why? Because the work was so difficult for us. Drawing up a large set of statecharts or use-case diagrams is not difficult work, and it's useful in helping the programmer think through the scenarios he needs to handle. Goldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com0tag:blogger.com,1999:blog-8642504413179542372.post-68184524607585902642009-06-22T11:02:00.006+03:002009-06-22T12:33:44.386+03:00Human Communicationsעם כל התיעוד שנאלצנו לכתוב, אני נזכרת בשני ספרים נהדרים:The Elements of StyleמאתWilliam Strunk Jr, E.B. White,The Visual Display of Quantitative InformationמאתEdward Tufte.ברצוני לדעת: האם באמת בכל המטרים של ניירת שאנחנו מפיקות יש מידע משמעותי שמגיע לצד השני? האם המסר שלנו ברור? האם אפילו אצלינו הוא ברור?אומרים לסטודנטים (שהם אנחנו) שתיעוד הוא חלק חיוני מתהליך הפיתוח, ובמיוחד כשקיימים כמה גורמים Goldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com0tag:blogger.com,1999:blog-8642504413179542372.post-76637532040282074572009-06-21T15:05:00.001+03:002009-06-21T15:40:03.892+03:00Introducing a Projectעכשיו כשאנחנו סופסוף מתחילות לקודד את הפרויקט הסופי (אפילו אם זה התחלה מוטעה, מתקרבים) ברצוני לשמור אזכרה לדברים המגניבים שנעשה. ויתר על כן, אני רוצה לשמור אזכרה לדברים המגניבים שלא נעשה לאחר שמנסים אותם, בגלל שדברים כאלה לא יופיעו לנו בפרויקט הסופי והם עדיין מגניבים.קודם כל תיאור קצר של הפרויקט:אנחנו מפתחות אתר אינטרנט לחברה קיימת (לא האתר הראשי שלהם) בשימוש מסד הנתונים והשרתים שלהם. לפי בקשתם, Goldahttp://www.blogger.com/profile/08087940449299381425noreply@blogger.com0