If your'e into mathematics, then This post could be of interest for you.
Computer Science and Math go together, so I thing it's interesting. However, for the ppl that are really into math, this thing is kinda like the simplest databinding for us IT developers ... Let's hope that the hardcore mathematicians somtimes get all excited about some something that's trivial for us ...
I'll post here links for stuff that I find usefull, for people who are doing their first steps in the Castle's ActiveRecord's world.
This post is to be updated while finding more resources.
Note that this is not a replacement for the official ducomentation that can be found on Castle's website, but merely a place to do the beginner's life somewhat easier.
Posts by Hamilton *hammett* Verissimo, who is the engine behind the whole story:
http://geekswithblogs.net/hammett/articles/76697.aspx
http://geekswithblogs.net/hammett/articles/76809.aspx
make sure that you are following his blog.
An article by Ayende about using Generics with ActiveRecord:
http://www.castleproject.org/index.php/ActiveRecord,_.Net_2.0_and_Generics
as before - stay tuned to Ayende's blog for he very experienced in ActiveRecord and in NHibernate too, for the matter. He is also a very readable writer.
So after a lot of talking about the matter, I'm starting a little (but real) project with Castle's ActiveRecord as an ORM service.
What I'm still not sure about, is weather I should inherit everything from ActiveRecordBase, or have my own base class and use ActiveRecordMediator?
Sure, I can derive my base class from ActiveRecordBase and have common behaviour for my model, but I am still not sure that I'm fully into the ActiveRecord pattern as a whole. It's tempting to exploit Castle's implementation but to keep the methods in a seperate class rather than in the model itself.
I also have some problem with the need to do FindAll, Find, etc. on each class so to expose the static methods in a typed way.
Well, I take back the last paragraph, since I could use ActiveRecordBase<> and it solves this problem.
To conclude: I tend to go with subclassing ActiveRecordBase<> as a base class for my model, and I'm starting to code (and test) that way, but I could still use the knowledge gained by people with real experience with this implementation ...
I've looked for insights on the matter on the web, and have found nothing. If anyone reading this has an insight about the matter, please comment here, so people who do their first steps in Castle's ActiveRecord implementation would have a better kick start regarding this issue.
Take a look at the Programmer's Bill Of Rights by Jeff Atwood.
Couldn't agree more.
I't all about productivity.
Found it on Ayende's Blog
Check this out.
I've wanted to send emails, and have messages with both plain text and html views. A quick look at MSDN have braught this up, and it looked good. Waydago MSFT - good work.
However, a strange exception occured in runtime, and after a little check it was obvious that the constructor used in MSDN's doc is just NOT THERE.
This guy also had the same problem, and someone there pointer out the solution. There is a static method to create an instance of a AlternateView from a string that represents a message's body. It's called CreateAlternateViewFromString and It's nice to have it.
Mistakes in docs are exceptable, however, the guy braught it up last January, and MSFT didn't fix the doc until now.
Strange it is.
There is a nice post about naming the Atlas package, at
http://aspadvice.com/blogs/ssmith/archive/2006/08/16/Atlas_Naming_Game.aspx
There are some funny comments there, so do not miss.
And that is my comment:
"I think that too descriptive names suck.
I'd go with any non-descriptive name, such as the ones MS uses as codenames (I loved Avalon and so on).
I believe that from the marketing point of view, non-descriptive catchy names ar far better than the others.
It's like dice.com and monster.com doesn't include "job" in their name.
But since MS are determined to use descriptive names, at least they should concentrate on the "what" and not on the "how".
so "Async XmlHttp Enabled Web Apps" (AXEWA ?) is bad, while "Dynamic Web Browsing" is better."
I'm going to explore a few ways to spawn new threads in c# 2.0.
Let's say that we want to do a time consuming process, and that we do not need that the main program will wait for it to end.
For the sake of the examples here, I'll assume that the long run process is sending an e-mail to "you", from "me" and the message's body is "the body of the message". the email will be processed by a thread-safe(1) static method, called SendMail(string, string, string) that resides in the Utilities class. How convenient.
(1) A thread-safe method is an enchanted, voodoo-enabled method that behaves well under multithreading (2) environment.
(2) Multithreading is a cool name for the ability to knit long sleeved shirts(3)
(3) Disregard the last three comments. Really, you should.
The non-multithreading code looked like this:
Ugly.
Luckily, .NET 2.0 comes with anonymous delegates, that simplifies things a lot:
In the next few days I'll introduce a helper class (well, I think it helps) that encapsulate the things you need to do to spawn a new thread, pass parameters to it, and be notified on it's lifecycle.
sources, etc. will be here soon, too
Scott Guthrie has recently posted this. He is pointing out to a few dozens of posts about ASP.NET 2.0.
The stuff there ranges from UI tweaks, security, performance, VS2005 tips and more.
A "must be in the favorites or even as a desktop shortcut preferably with keyboard shortcut too" for everyone who deals with ASP.NET developing.
Just in case that Scott Hanselman's blog isn't accessible, I'll post here the steps to use watir and WatirRecorder.
1. Install Ruby using the Ruby One-Click Installer, or search http://www.ruby-lang.org/en/ for a newer version to download.
2. Install watir:
3. Install WatirRecorder++
Some problems I've faces during the use of Watir:
1. The WatirRecorder couldn't run my recorded tests. So I've saved the script to a file, changed it's extension to .rb and let Ruby run the test.
2. This led to another problem. For some reason, Ruby doesn't handle hebrew characters so well when they're saved in UTF8 format, and that's the format WatirRecorder saves the scripts, So if you are recording hebrew characters to your script, then after saving the script to a file and changing it's extension to .rb, open it in notepad and resave it in ANSI encoding, and Ruby will run the test flawlessly.
Thumbs up for the makers of Ruby, Watir and WatirRecorder++, as well as to Scott Hanselman who've pointed this tool out for us