Hibernating Rhinos - Episode #2 - Select * From MonoRail.Customers
I have just finished putting together the second episode of Hibernating Rhinos. This one tooks several days and a lot of effort to produce. The download page is here, where you can also download the first episode, talking about Rhino Mocks.
The screencast is basically taking implementing similar functionality in both Web Forms and MonoRail, while I talk about the differences between the two approaches. I spent quite a bit of time explaining most of what I do when I am writing MonoRail code, so I hope it would be clear. This episode is not meant to be an introduction to MonoRail, it is merely a show & tell episode.
I am also afraid that I fell into the common trap of Web Froms vs. MonoRail comparision, and I focused quite a bit of my time on the UI layer, instead of focusing more on the controllers side of things, which is more important.
- The overall length: 1:14:32
- Download size: 60Mb
- The big sigh at the beginning? That was the fourth time that I recorded this episode!
- I am showing code from 09:25 onward.
- Fun part that you shouldn’t miss:
It should fails... It doesn't fails... It should fails... It doesn't fails... -
From 05:10 to 08:00 - Web Froms Rant (come to think about it, there are a lot of those J )
Am I talking too fast? Am I making any sense?
Errata: in talking about the view engines, there is a section that might looks like I am taking credit for building Boo, just to clarify, I am an avid user of Boo, but I can't claim any credit for it. What I meant was that I built Brail, which uses Boo.
Comments
Wow, great screencast.
I wonder why Castle (I mean stronghold ;)) don't make more screencasts about MR specifically . I know there are lack of samples and examples, and I think this (IMO) proves and excellent way to show the power, flexibility and simplicity (when you get it) of MR.
On the other side, i think you should speak a little slower, and the audio quality is much better than episode 1 but maybe you can improve that a little more.
Overall Great job. I really appreciate this stuff.
PD: Question: Why the samples on the trunk doesn' have the sql scripts? like the petstore sample...
About the question, what do you mean, examples with SQL Scripts?
Usually we generate them from the Active record entities.
Great screencast!! I've found both of the presentation great fun to watch. I must say that this one is much improved from the first cast.
Question: Are MR going to support generators like RoR?
Marcos,
Great question about CastleStronghold not release any useful samples. They only release useful to their paying customers. In fact, all of the samples from the trunk are useless. I learn more from this site then anywhere else.
Great screencast! Thanks
@John,
Why do you say that the samples are useless?
Noneof the samples are working or architecting for reuse. The are throw away type of works. In fact, there is no good working application for Monorail around on the Net. The only two decent works I am aware so far is Billing from Nterface and NProject.org but none of these are complete.
@Ayende
When I digg into the trunk, the few samples I saw requires a database. No problem, give me schema file and I'll setup a database. Well, for example in the Castle.Forums there is no .sql file.
You tell me that sql files comes from ActiveRecord entities, you mean their are generated automatically or just make .sql file looking the entities properties?
@john.
Yeap, I agree. I'm looking for a realistic, real world example, or at least small samples that focus in one thing. eg: ViewComponents, AR integration, View innerworkings, Controllers, etc.
If there is no samples and no good doc. then we have the chicken-egg thing, no one can make (except castle team) sample contributions without expending days trying to figure it out how things works, and that's a pitty because difficults adoption, and I'm not talking about morts here...
Great screencast Ayende. It would be interesting a screencast about TDD with MR.
I started to use (test) MR with NVelocity engine, but Boo seems to be more natural, where can I find doc about basic Boo sintaxys?
@Jose:
http://boo.codehaus.org/
http://boo.codehaus.org/BooManifesto.pdf
@John,
The samples are just that, they are meant to show of the technology, nothing more.
It looks like you are searching for a starter kit, which has a different purpose.
@Marcos,
Yes, we generate the schema by looking at the AR entities properties.
Ayende, could you explain how do you generate the schema please? Thanks.
Thanks is something that depends on the exact scenario, but there are several ways to do it.
NAnt task, MSBuild task, etc.
In code, this is as simple as:
ActiveRecordStarter.CreateSchema();
Great job.
I posted my comments here:
http://blog.timok.com
Great screencast, in that it shows the potential of the framework,
but the lack of real-world documentation is scary. I think adding intellisense to the views would be a great step forward. Also, adding better samples and writing those tutorials in the documentation would be needed before I believe the castle group can expect their view engines and mvc-engine to be adopted by any professional to any larger extent, like in live paid projects.
If it's a money issue, why not just work a couple of weeks creating these screencasts and uploading them on a web site where you can subscribe to viewing screencasts for a monthly cost?
It's not a money issue, it's a time issue. We already have first class customers using castle for mission critical apps, we have a good user base, and finally Castle is about making you more productive while enforcing a good design. It's something to help you, not us. If you dont want to adopt it, I couldnt care less.
Users around here are too much used to being spoiled to adopt something. We are not MS, we dont have resources (read idle brains).
Ant btw, John. We dont have customers paying us to write "sample code". We're involved in very complex projects. Your perception of Castle Stronghold is just stupid.
Its 4:30 am and I only just finished watching your screencast and all I have to say is welldone and thanks for a great job!
I must say that I am totally new to MonoRail and
<rant> I am quite irritated with the webforms way of doing things - intermingled UI layer with data, business and presentation logic in it, controller in many cases seems to be the Page_Load event and doPostPack, and view state just doesnt seem to be the right way with all that state data going backwards and forth. </rant>
Just one question:
You created a startCell section that adds appropriate styling to TD tags making the text appear bold when IsImportantCustomer evaluates to true. But the link in the customerId section doesnt seem to be bold, or have I missed something? Assuming that the customerId section renders child content in relation to the startCellSection, it should also be bold in your example?
Thanks,
Anastasios
You didn't miss anything, there are different level of customizations.
When I took over the generation of the column, I took over all of it, so startCell does not come into play there.
I'll probably make a change so that it does work, since it is a fairly common scenario, though.
"We already have first class customers using castle for mission critical apps, and finally Castle is about making you more productive while enforcing a good design. It's something to help you, not us. If you dont want to adopt it, I couldnt care less."
Indeed; you're very right, hammet. But you're also misunderstanding what I'm trying to say.
First of all; I've fallen in love with your microkernel engine + windsor. It's just so great :). I'm thinking of trying out your AOP-engine for cross-cutting concerns. I'm not using ActiveRecord, simply because I'm not fond of the domain objects knowing persistance, but that's no problem as it's so well integrated into NHibernate, if I come across it. I'm also using your transaction management, both Castle.Transactions and the AutomaticTransaction facility together with NHibernateIntegration.
So don't assume what I'm not saying. And also, care! Saying "I couldnt care less. " is just a simple way of making yourself sound like an idiot. I think you care about the community: because otherwise why would you even respond and why make it open source. Also, saying so makes people talking to you feel bad, for no good reason. (That's what I truly HATE with internet discussions; people assume the worst)
Now, to what you're actually saying and what I'm saying.
Me: "before I believe the castle group can expect their view engines and mvc-engine to be adopted by any professional to any larger extent, like in live paid projects."
You: "we have a good user base"
No you don't as far as I can see; I'm just talking about MonoRail and view engines here. I think MonoRail could take off compared to what you have now if you invested more time in tutorials/samples/whatever you wanna call it.
You: "Castle is about making..."
Me: I'm not talking about castle, just MonoRail.
Me: "before [lalala] be adopted by any professional to any larger extent"
You: "We already have first class customers using castle for mission critical apps"
So what? I understand that you must have business, from the reasons I explained on top of this post. However, I'm not talking about your business now. I'm talking about professionals all round the world, such as myself, using it in their live projects. Sure you can use the object browser, but you can't seriously expect every user (read: developer) to become acquainted with the inner workings of the mvc-framework, just to produce standard functionality?
I find it amusing that in some posts on other blogs, hammet, you comment in the comment-area: "We can't improve the documentation i you don't tell us what part to improve", but then, if anybody says something, you reject it as that person being an idiot and dissing your framework. Look, I'm not, I'm just saying what I'm saying, not more.
Btw... Just moving half of Eyendes blog to the castle documentation pages would improve it immensely :p.
The official documentation is just one source of information. Blog posts and articles are others. (Did you try http://www.technorati.com/search/castleproject.org ?)
You say "Castle doesnt have real world documentation" First, what hell is a real world documentation? You want a real world sample? I can understand that. But we do have documentation, and AR/MR are the most well documented projects under Castle umbrella. Not enough for you? Too bad. It seems to be for most of people
And we do have a good user base. Check how many posts on our forum, check how many subscribers on our list. Castle and especially MR will never be mainstream on .net due to the average .net/MS developer culture. And I dont mind.
Like I said, I'm not spending my time in sunny beaches and playing online games. I work, I run a business. If there's not enough screencasts about MR, make one. We're not talking about a commercial product, we're talking about a OSS project that will certainly continue even if I get hit by a bus. Contribution is the key word here.
No, I haven't tried that search. Thanks for that.
I'm not talking about real world documentation...
Not enough for me? Read the comments again; not enough for more than just me. And I'm referring to the site now, not to blogs. Take blogs into account and there's probably enough documentation, which I've found out from the last day's searching. I'm not saying that you should drop everything either and just do this, but rather that more docs (or better linked) docs would be better. "Too bad.": So stop being aggressive (!!!) about me commenting on documentation, eh? Be questioning and approachable instead! Links to blogs and your other 'documentation' on the web from the 'real' docs, would be a great step towards making learning it more accessible to newbies without overusing google :). Give me access to the docs and I'll set the links up!
Contribution: all ears: http://forum.castleproject.org/viewtopic.php?p=6721
i.e. I'm trying, but as I said, I still have to learn before I can contribute.
Thanks for the second screencast Ayenda,
I know you said that this was not supposed to be an introduction to MonoRail, talking as someone who has not seen MonoRail, it was a very good introduction to it! It's given me the spark of curiosity to go check this out further.
You did kind of lose me around the point of adding AJAX support, but maybe a second view may clear that up.
Ayende,
I know how much time it takes to put stuff like this together...so thank you very much. It's made for an easy way for me to get the word out about MonoRail around my company. This weekend I'm going to start porting a project I've been working on for 1 1/2 years to MonoRail...I've grown quite weary of the ASP.NET page lifecycle, am frustrated with the extra effort that MVP requires, and am looking forward to a breath of fresh (separation of concerns) air.
Thanks again for all your hard work!
Comment preview