Virtual ALT.NET (VAN) is the online gathering place of the ALT.NET community.
Through conversations, presentations, pair programming and dojos, we strive to
improve, explore, and challenge the way we create software. Using net
conferencing technology such as Skype and LiveMeeting, we hold regular meetings,
open to anyone, usually taking the form of a presentation or an Open Space
Technology-style conversation.
Please see the Calendar (http://snipr.com/m8ia2) to find a VAN group that meets
at a time convenient to you, and feel welcome to join a meeting. Past sessions
can be found on the Recording (http://snipr.com/m8ie1) page.
To stay informed about VAN activities, you can subscribe to the Virtual ALT.NET
Google Group (http://snipr.com/m8ih0) and follow the Virtual ALT.NET blog
(http://snipr.com/m8ihv).
Ryan Svihla has been working as a C# developer Farm Bureau Bank in San Antonio
since September 2007. Before that he worked as a Consultant in Lincoln, NE for
3 years, where he had working experience with Php, some Perl, Python and of
course C#. Attempting Agile since early 2008 as an eager student with a focus
on making programming more useful and relevant for the end user.
Have a look at the first popular MVC .Net based web framework. Also will be
covering persistence with ActiveRecord, and view templates using Brail. Bonus,
will demo a plug-in framework for building CMS like applications.
Central Daylight Time
Start Time: Web, July 8, 2009 8:00 PM UTC/GMT -5 hours
End Time: Web, July 8, 2009 10:00 PM UTC/GMT -5 hours
Attendee URL: http://snipr.com/virtualaltnet (Live Meeting)
Speaker Bio for this week. Who is and what makes this Billy McCafferty guy tick?
Well he is a long time developer and a hopeless romantic when it comes
to writing beautiful software. Billy currently leads a double life
between helping to run a small training and consulting company known
as Codai (which will be getting a new website very very soon) and
filling the role of lead developer and architect with Parsons
Brinckerhoff. After Billy gets his life back – which should be after
the release of S#arp Architecture 1.0 – expect to see him soon at
ALT.NET and other development conferences.
He will be demonstrating the latest cut of S#harp Architecture 1.0
with a 45-50 minute non-PPT presentation.
Bring your opinions and attention. Questions and Answer will be served
also. The drinks as usual are up to the participants.
Should be a fun evening. See you all there.
Meeting details.
Where and When
Start Time: Wednesday, April 22, 2009 9:00 PM GMT/UTC - 5:00 (CDT)
End Time: Wednesday, April 22, 2009 12:00 PM GMT/UTC - 5:00 (CDT)
Attendee URL:http://snipr.com/virtualaltnet (Live Meeting)
It is quite active I think. There is a good ALT.NET community as a whole in the UK.
I run Scottish Developers (another user group which tries to cater to all tastes) and we’ve had a lot of success recently when running ALT.NET topics at our events – We had some of our largest turn outs for those.
The reason I ask is that I'm originally from the UK and having been working in Canada for the past 5 years - the last two in a Alt.Net fashion - learning my TDD-DDD craft with JP Boodhoo. In a few weeks time I'm returning to Glasgow to live and work and thought it would be great to get in touch with a group of alt.neters.
It is quite active I think. There is a good ALT.NET community as
a whole in the UK.
I run Scottish Developers (another user group which tries to
cater to all tastes) and we’ve had a lot of success recently when running
ALT.NET topics at our events – We had some of our largest turn outs for
those.
From:
glasgow_altdotnet_usersgroup@yahoogroups.com [mailto:glasgow_altdotnet_usersgroup@yahoogroups.com]
On Behalf Of gavinmclellan@... Sent: 30 March 2009 20:22 To: glasgow_altdotnet_usersgroup@yahoogroups.com Subject: [glasgow_altdotnet_usersgroup] Glasgow Alt.Net
Hello,
How active is Glasgow Alt.Net at present?
The reason I ask is that I'm originally from the UK and having been working in
Canada for the past 5 years - the last two in a Alt.Net fashion - learning my
TDD-DDD craft with JP Boodhoo. In a few weeks time I'm returning to Glasgow to
live and work and thought it would be great to get in touch with a group of
alt.neters.
Hello,
How active is Glasgow Alt.Net at present?
The reason I ask is that I'm originally from the UK and having been working in
Canada for the past 5 years - the last two in a Alt.Net fashion - learning my
TDD-DDD craft with JP Boodhoo. In a few weeks time I'm returning to Glasgow to
live and work and thought it would be great to get in touch with a group of
alt.neters.
This week Oren Eini will be talking about NHibernate Profiler.
Bio:
My name in Oren Eini, but I'm usually goes by the Alias Ayende Rahien.
The reasons are mostly lost in the mists of time. ;-)
I am an experienced developer / architect, focusing on the CLR and
building business application and developer productivity frameworks
and tools.
I am an active member of several open source projects (NHibernate,
Castle) and the founder of several others (Rhino Mocks, NHibernate
Query Analyzer, Rhino Commons, etc)
Topic:
NHibernate Profiler is now finally available for Public Beta. It is a
real-time visual debugger allowing a development team to gain valuable
insight and perspective into their practice of using NHibernate. The
product is architected with input coming from many top industry
leaders within the NHibernate community. Alerts are presented in a
concise code-review manner indicating patterns of misuse by your
application. To streamline your efforts to correct the misuse, we
provide links to the problematic code section that triggered the alert
Time:
Start Time: Wednesday, Feb 18, 2009 9:00 PM GMT -6 (CST)
End Time: Wednesday, Feb 18, 2009 12:00 PM GMT -6 (CST)
Attendee URL: http://snipr.com/virtualaltnet (Live Meeting)
If you have not heard about VAN. Please read my blog post Intro to VAN.
http://www.zachariahyoung.com/zy/post/2009/01/Introduction-to-Virtual-ALTNET.asp\
x
--
Zachariah Young
President of NW Arkansas .Net User Group
http://zachariahyoung.comzpyoung@...
I am the IT manager for a digital media company based in Glasgow. I am
looking for a freelance software developer to work on a number of
software development projects to help improve internal business
resources.
A working knowledge of C#, SQL, Crystal Reporting and ASP.NET is
essential and applicants will be expected to provide examples of work
and suitable references.
Please send a copy of your CV to rossmclarnonatbtinternetdotcom
including details of your rates. As the developer will be expected to
regularly meet in Glasgow, overseas CV's will not be considered.
No agencies please.
<dagda1@...> wrote:
>
>
> Actually I was just thinking,
> I'm not even Scottish.Would it be OK if I attended?If not, I will be
the one with the sign saying "Belfast ALT.NET"dagda1@...
>
>
>
> To: glasgow_altdotnet_usersgroup@...: dhtmlgod@...: Thu, 23 Oct 2008
13:00:12 +0100Subject: Re: [glasgow_altdotnet_usersgroup] Meeting reminder
>
>
>
>
> "I will be there to add some much needed glamour and sex appeal to
the group."My coffee just came out of my nose and it was not pleasant,
thanks for that!I'll see ya'll there.
> 2008/10/23 Paul Cowan <dagda1@...>
>
>
>
>
>
> I could not book a table unfortunately.Something to do with it being
Thursday night so maybe a sign might be in order.I personally how ugly
you all look so I should recognise you all.I will be there to add some
much needed glamour and sex appeal to the group.dagda1@...
>
> To: glasgow_altdotnet_usersgroup@...: david@...: Thu, 23 Oct 2008
12:11:46 +0100Subject: [glasgow_altdotnet_usersgroup] Meeting reminder
>
>
>
> Just a little reminder that we are meeting tonight at 7pm in Waxy
O'Conners (Next to Queen Street Station)
>
> Be there or be not
there!-------------------------------------------------------------------------------------------------------------------"Alt.net
fool can write code that a computer can understand. Good programmers
write code that humans can understand."-Martin Fowler et al,
Refactoring: Improving the Design of Existing Code
>
>
>
>
>
>
Splitter
--- In glasgow_altdotnet_usersgroup@yahoogroups.com, Paul Cowan
<dagda1@...> wrote:
>
>
> Actually I was just thinking,
> I'm not even Scottish.Would it be OK if I attended?If not, I will be
the one with the sign saying "Belfast ALT.NET"dagda1@...
>
>
>
> To: glasgow_altdotnet_usersgroup@...: dhtmlgod@...: Thu, 23 Oct 2008
13:00:12 +0100Subject: Re: [glasgow_altdotnet_usersgroup] Meeting reminder
>
>
>
>
> "I will be there to add some much needed glamour and sex appeal to
the group."My coffee just came out of my nose and it was not pleasant,
thanks for that!I'll see ya'll there.
> 2008/10/23 Paul Cowan <dagda1@...>
>
>
>
>
>
> I could not book a table unfortunately.Something to do with it being
Thursday night so maybe a sign might be in order.I personally how ugly
you all look so I should recognise you all.I will be there to add some
much needed glamour and sex appeal to the group.dagda1@...
>
> To: glasgow_altdotnet_usersgroup@...: david@...: Thu, 23 Oct 2008
12:11:46 +0100Subject: [glasgow_altdotnet_usersgroup] Meeting reminder
>
>
>
> Just a little reminder that we are meeting tonight at 7pm in Waxy
O'Conners (Next to Queen Street Station)
>
> Be there or be not
there!--------------------------------------------------------------------------\
-----------------------------------------"Alt.net
is the Yì Jīng of software development" - Dave the Ninja,
http://www.scotalt.net----------------------------------------------------------\
---------------------------------------------------------
>
>
> Get the best wallpapers on the Web â€" FREE. Click here! -- "Any
fool can write code that a computer can understand. Good programmers
write code that humans can understand."-Martin Fowler et al,
Refactoring: Improving the Design of Existing Code
>
>
>
>
>
>
> _________________________________________________________________
> Win an Xbox 360 or £200 Top Shop Vouchers
> http://clk.atdmt.com/GBL/go/115454062/direct/01/
>
Get the best wallpapers on the Web – FREE. Click here!
-- "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." -Martin Fowler et al, Refactoring: Improving the Design of Existing Code
Read amazing stories to your kids on Messenger Try it Now!
Get the best wallpapers on the Web ¨C FREE. Click here!
-- "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." -Martin Fowler et al, Refactoring: Improving the Design of Existing Code
Definitely agree, great analogy.
--- In glasgow_altdotnet_usersgroup@yahoogroups.com, Paul Cowan
<dagda1@...> wrote:
>
>
> >> it its the section on Test Doubles that you'll want to look at.
>
> Amen to that.The analogy of the stunt double is one of the things
that finally enabled me to write better tests.I always write my own
test doubles. Is it possible to create through a mocking
framework?Everyone has there own aha moment.The moment it clicked that
I should absolutely start by writing a test that fails and then make
it pass was when I was sold on the whole thing.
> I try and start every bug with the input that caused the bug and
every new functionality with a good assertion that it should
pass.dagda1@...
>
>
>
> To: glasgow_altdotnet_usersgroup@...: colin.jack@...: Wed, 22 Oct
2008 07:52:50 +0000Subject: [glasgow_altdotnet_usersgroup] Re: TDD,
Mocks, Stubs, IoC, DI, getting it straight.
>
>
>
>
> >> Thank you Colin for the book recommendation, it has been sitting
in my > amazon basket for a while now. Got a few others to read
first.> I know that feeling! :) When you do buy it its the section on
TestDoubles that you'll want to look at.
>
>
>
>
>
> _________________________________________________________________
> See the most popular videos on the web
> http://clk.atdmt.com/GBL/go/115454061/direct/01/
>
>
> Thank you Colin for the book recommendation, it has been sitting in my
> amazon basket for a while now. Got a few others to read first.
>
I know that feeling! :) When you do buy it its the section on Test
Doubles that you'll want to look at.
I gave Pex a shot a while back and it did some v. odd things, seemed
inclined to change the SUT with Pex specific magic when I told it to
resolve errors. Definitely want to give it another shot though, but
not what I'd expected.
--- In glasgow_altdotnet_usersgroup@yahoogroups.com, "dsmyth2001"
<derek.smyth@...> wrote:
>
> OK so yous didn't mock me (pun intended) for posting that so I must
> have understood what I have been reading. Stubs did seem easier to
> apply but an understanding of mocks wouldn't hurt. Thanks for
> replying, I'll take your advice on board.
>
> Actually, just for interest, came across something called Pex. It's
> an MS thing but basically it autogenerates your unit tests for you
> through paramaters and I quote....
>
> "...adding parameters (to unit tests) we turn a closed unit test into
> a universally quantified conditional axiom."
>
> In English that means if you have three branches in a method then you
> write one unit test and Pex works out the values necessary to visit
> each branch. What I read suggested it should be used along side
> regular test frameworks.
>
> http://research.microsoft.com/projects/pex/
>
> There is an article here if your wanting to know more...
> http://research.microsoft.com/projects/pex/articles/pextutorial.pdf
>
> I don't know, just sharing the research.
>
>
>
> --- In glasgow_altdotnet_usersgroup@yahoogroups.com, "Chris Canal"
> <dhtmlgod@> wrote:
> >
> > I don't use any mocks anymore, instead I use stubs. In the tests
> that are
> > concerned with the interaction between the dependency and
> method/system
> > under test I will try and assert on the return. If this isn't
> possible, say
> > for a Save/UPdate call, I will then use the AssertWasCalled
> extension
> > method.
> >
> > I would use a Stub over a Mock in every given situation. So far
> anyway. I
> > have been down the road of using Strict Mocks, and it was a very
> painful
> > experience.
> >
> > On Mon, Oct 20, 2008 at 8:51 PM, Paul Cowan <dagda1@> wrote:
> >
> > > I only really have experience of Rhino.Mocks.
> > >
> > > One of the problems of mocking is we have so many names for
> similar things.
> > >
> > > Since the advent of Rhino.Mocks 3.5 and indeed the AAA syntax
> over the
> > > record and playback model, I very rarely if ever use mocks.
> > >
> > > I would want to use mocks if I want to test that a mocked method
> is called.
> > >
> > > I use Stubs to control the input and output of data into the
> system under
> > > test.
> > >
> > > You can confusingly assert that stubs were called.
> > >
> > > IMO mocks lead to more brittle tests.
> > >
> > > This might help to clear it up.
> > >
> > > http://ayende.com/wiki/Rhino%20Mocks%20-%20Stubs.ashx
> > >
> > > Paul
> > >
> > > dagda1@
> > >
> > >
> > > ------------------------------
> > >
> > > To: glasgow_altdotnet_usersgroup@yahoogroups.com
> > > From: derek.smyth@
> > > Date: Mon, 20 Oct 2008 19:41:53 +0000
> > > Subject: [glasgow_altdotnet_usersgroup] TDD, Mocks, Stubs, IoC,
> DI, getting
> > > it straight.
> > >
> > >
> > > Hi folks,
> > >
> > > May I ask, have I got this right....
> > >
> > > TDD is based on writing tests before you write your code. The test
> > > initially fails and then the code is written to pass the tests.
> > >
> > > The code written might have dependencies to resources (external to
> > > the application) and dependencies to other classes that haven't
> been
> > > written yet.
> > >
> > > To get around that for testing purposes mocks and stubs are
> created.
> > > Dependency injection is used to 'fill in the gaps' for the test
> cases
> > > for the missing dependencies of the class thats being tested.
> > >
> > > Doing it that way means when the proper 'dependent' classes are
> > > developed you can add them in to the application very easily
> without
> > > effecting the test cases.
> > >
> > > Stubs are used in place of classes that haven't been developed yet
> > > and which access external resources. They are normally used to
> > > validate state. IsNameValid, etc...
> > >
> > > While Mocks are used to test behaviour of the class to ensure it
> > > calls the correct methods of the 'soon to be developed' class
> > > dependencies (of the class being tested).
> > >
> > > *phew*
> > >
> > > I'm still not completely sure of when you would create a stub and
> > > when you would create a mock? Or whether it matters if you decide
> to
> > > develop one over the other. I read that mocks are behaviour based
> and
> > > stubs are state based, is that correct? Doesn't correct state
> imply
> > > correct behaviour? and vice versa. Would you need to test for
> both,
> > > is it just safer to do so?
> > >
> > > It's all theory at the moment and it's theory pulled from a
> number of
> > > sources. If anyone could tell me if I'm on the right track then
> I'd
> > > appreciate it.
> > >
> > >
> > >
> > > ------------------------------
> > > Read amazing stories to your kids on Messenger Try it Now!
> <http://clk.atdmt.com/GBL/go/115454060/direct/01/>
> > >
> > >
> >
> >
> >
> > --
> > "Any fool can write code that a computer can understand. Good
> programmers
> > write code that humans can understand."
> > -Martin Fowler et al, Refactoring: Improving the Design of Existing
> Code
> >
>
Thank you Colin for the book recommendation, it has been sitting in my
amazon basket for a while now. Got a few others to read first.
--- In glasgow_altdotnet_usersgroup@yahoogroups.com, "Colin Jack"
<colin.jack@...> wrote:
>
> > I'm still not completely sure of when you would create a stub and
> > when you would create a mock? Or whether it matters if you decide
to
> > develop one over the other. I read that mocks are behaviour based
and
> > stubs are state based, is that correct? Doesn't correct state imply
> > correct behaviour? and vice versa. Would you need to test for both,
> > is it just safer to do so?
>
> I'd recommend XUnit Test Patterns and Jimmy Bogard also has some blog
> entries on it.
>
> If you want to hear the pro-mocking view I'd see mockobjects.com or
> the document "Mock Roles, Not Objects" which has a lot of value.
>
OK so yous didn't mock me (pun intended) for posting that so I must
have understood what I have been reading. Stubs did seem easier to
apply but an understanding of mocks wouldn't hurt. Thanks for
replying, I'll take your advice on board.
Actually, just for interest, came across something called Pex. It's
an MS thing but basically it autogenerates your unit tests for you
through paramaters and I quote....
"...adding parameters (to unit tests) we turn a closed unit test into
a universally quantified conditional axiom."
In English that means if you have three branches in a method then you
write one unit test and Pex works out the values necessary to visit
each branch. What I read suggested it should be used along side
regular test frameworks.
http://research.microsoft.com/projects/pex/
There is an article here if your wanting to know more...
http://research.microsoft.com/projects/pex/articles/pextutorial.pdf
I don't know, just sharing the research.
--- In glasgow_altdotnet_usersgroup@yahoogroups.com, "Chris Canal"
<dhtmlgod@...> wrote:
>
> I don't use any mocks anymore, instead I use stubs. In the tests
that are
> concerned with the interaction between the dependency and
method/system
> under test I will try and assert on the return. If this isn't
possible, say
> for a Save/UPdate call, I will then use the AssertWasCalled
extension
> method.
>
> I would use a Stub over a Mock in every given situation. So far
anyway. I
> have been down the road of using Strict Mocks, and it was a very
painful
> experience.
>
> On Mon, Oct 20, 2008 at 8:51 PM, Paul Cowan <dagda1@...> wrote:
>
> > I only really have experience of Rhino.Mocks.
> >
> > One of the problems of mocking is we have so many names for
similar things.
> >
> > Since the advent of Rhino.Mocks 3.5 and indeed the AAA syntax
over the
> > record and playback model, I very rarely if ever use mocks.
> >
> > I would want to use mocks if I want to test that a mocked method
is called.
> >
> > I use Stubs to control the input and output of data into the
system under
> > test.
> >
> > You can confusingly assert that stubs were called.
> >
> > IMO mocks lead to more brittle tests.
> >
> > This might help to clear it up.
> >
> > http://ayende.com/wiki/Rhino%20Mocks%20-%20Stubs.ashx
> >
> > Paul
> >
> > dagda1@...
> >
> >
> > ------------------------------
> >
> > To: glasgow_altdotnet_usersgroup@yahoogroups.com
> > From: derek.smyth@...
> > Date: Mon, 20 Oct 2008 19:41:53 +0000
> > Subject: [glasgow_altdotnet_usersgroup] TDD, Mocks, Stubs, IoC,
DI, getting
> > it straight.
> >
> >
> > Hi folks,
> >
> > May I ask, have I got this right....
> >
> > TDD is based on writing tests before you write your code. The test
> > initially fails and then the code is written to pass the tests.
> >
> > The code written might have dependencies to resources (external to
> > the application) and dependencies to other classes that haven't
been
> > written yet.
> >
> > To get around that for testing purposes mocks and stubs are
created.
> > Dependency injection is used to 'fill in the gaps' for the test
cases
> > for the missing dependencies of the class thats being tested.
> >
> > Doing it that way means when the proper 'dependent' classes are
> > developed you can add them in to the application very easily
without
> > effecting the test cases.
> >
> > Stubs are used in place of classes that haven't been developed yet
> > and which access external resources. They are normally used to
> > validate state. IsNameValid, etc...
> >
> > While Mocks are used to test behaviour of the class to ensure it
> > calls the correct methods of the 'soon to be developed' class
> > dependencies (of the class being tested).
> >
> > *phew*
> >
> > I'm still not completely sure of when you would create a stub and
> > when you would create a mock? Or whether it matters if you decide
to
> > develop one over the other. I read that mocks are behaviour based
and
> > stubs are state based, is that correct? Doesn't correct state
imply
> > correct behaviour? and vice versa. Would you need to test for
both,
> > is it just safer to do so?
> >
> > It's all theory at the moment and it's theory pulled from a
number of
> > sources. If anyone could tell me if I'm on the right track then
I'd
> > appreciate it.
> >
> >
> >
> > ------------------------------
> > Read amazing stories to your kids on Messenger Try it Now!
<http://clk.atdmt.com/GBL/go/115454060/direct/01/>
> >
> >
>
>
>
> --
> "Any fool can write code that a computer can understand. Good
programmers
> write code that humans can understand."
> -Martin Fowler et al, Refactoring: Improving the Design of Existing
Code
>
<dhtmlgod@...> wrote:
>
> And more, make sure you set the lifestyle of controllers to
Transient. The
> default is Singleton, and will break with Mvc. I mention it because
your
> not doing that in the boo file, of course you could be using an
attribute.
> If so, just tell me to shut up :o)
>
> On Tue, Oct 21, 2008 at 2:13 PM, Chris Canal <dhtmlgod@...> wrote:
>
> > And just so you know what you where doing wrong:
> >
> > Component(type.Name, *System.Web.Mvc.Controller*, type)
> >
> > The controllers where being registed with the service type of
Controller
> > with the above bolded seciotn, so trying to resolve
LoginController will not
> > work. To make your code work, it would need to be this:
> >
> > Component type.Name, type
> >
> >
> > On Tue, Oct 21, 2008 at 2:10 PM, Chris Canal <dhtmlgod@...> wrote:
> >
> >> Try this:
> >>
> >> for type in AllTypesBased of IController("Practicum.Web"):
> >> component type.FullName, type:
> >> lifestyle Transient
> >>
> >>
> >> On Tue, Oct 21, 2008 at 2:00 PM, Colin Gemmell
<pythonandchips@...>wrote:
> >>
> >>> Can any of you Binsor/ASP.Net MVC gurus help with a problem I'm
> >>> having.
> >>>
> >>> I've got a very simple boo script that runs through the MVC app and
> >>> another dll that holds services etc.
> >>>
> >>> when the web-site runs i keep getting a "No component for supporting
> >>> the service Practicum.Web.Controllers.LoginController" error. I've
> >>> looked at the ControllerBuilder and both the login controller
and its
> >>> dependancies are in there but it is not resolving it at all.
> >>>
> >>> The code im using is as follows:
> >>>
> >>> //global.asax.cs file
> >>> public class MvcApplication : System.Web.HttpApplication
> >>> {
> >>> public IControllerFactory Factory;
> >>> public IWindsorContainer Container;
> >>>
> >>> public static void RegisterRoutes(RouteCollection routes)
> >>> {
> >>> routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
> >>>
> >>> routes.MapRoute(
> >>> "Default",
> >>> // Route name
> >>> "{controller}/{action}/{id}",
> >>> // URL with parameters
> >>> new { controller = "Login", action = "Login", id = ""
> >>> } // Parameter defaults
> >>> );
> >>>
> >>> }
> >>>
> >>> protected void Application_Start()
> >>> {
> >>> RegisterRoutes(RouteTable.Routes);
> >>> Container = new WindsorContainer();
> >>> BooReader.Read(Container, "Support files/windsor.boo");
> >>> Factory = new WindsorControllerFactory(Container);
> >>> ControllerBuilder.Current.SetControllerFactory(Factory);
> >>> }
> >>> }
> >>>
> >>> /////boo script
> >>> import Practicum.Web
> >>> import System.Web.Mvc
> >>> import Practicum.Core
> >>> import System
> >>> import System.Reflection
> >>> import Castle.Windsor
> >>> import Castle.Core
> >>>
> >>> practicumweb = Assembly.Load("Practicum.Web")
> >>> for type in practicumweb.GetTypes():
> >>> if typeof(System.Web.Mvc.Controller).IsAssignableFrom(type):
> >>> Component(type.Name, System.Web.Mvc.Controller, type)
> >>>
> >>>
> >>> practicumcore = Assembly.Load("Practicum.Core")
> >>> for type in practicumcore.GetTypes():
> >>> if typeof(Practicum.Core.Service.IService).IsAssignableFrom(type)
> >>> and type is not typeof(Practicum.Core.Service.IService):
> >>> Component(type.Name, Practicum.Core.Service.IService, type)
> >>>
> >>> //default page load on the Default.aspx.cs file in site root. I
havn't
> >>> changed this at all
> >>> public void Page_Load(object sender, System.EventArgs e)
> >>> {
> >>> HttpContext.Current.RewritePath(Request.ApplicationPath);
> >>> IHttpHandler httpHandler = new MvcHttpHandler();
> >>> httpHandler.ProcessRequest(HttpContext.Current);
> >>> }
> >>>
> >>> //login controller
> >>>
> >>> [HandleError]
> >>> public class LoginController : Controller
> >>> {
> >>> private readonly IService _service;
> >>>
> >>> public LoginController (IService CustomService)
> >>> {
> >>> _service = CustomService;
> >>> }
> >>>
> >>> public ActionResult Login()
> >>> {
> >>> return View();
> >>> }
> >>> }
> >>>
> >>> The CustomService currently has nothing in it and derives from
IService.
> >>>
> >>> If anyone can help that would be great.
> >>> Cheer
> >>> Colin G
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >> --
> >> "Any fool can write code that a computer can understand. Good
programmers
> >> write code that humans can understand."
> >> -Martin Fowler et al, Refactoring: Improving the Design of
Existing Code
> >>
> >
> >
> >
> > --
> > "Any fool can write code that a computer can understand. Good
programmers
> > write code that humans can understand."
> > -Martin Fowler et al, Refactoring: Improving the Design of
Existing Code
> >
>
>
>
> --
> "Any fool can write code that a computer can understand. Good
programmers
> write code that humans can understand."
> -Martin Fowler et al, Refactoring: Improving the Design of Existing Code
>
-- "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." -Martin Fowler et al, Refactoring: Improving the Design of Existing Code
Cheers Chris that sorted the problem (just as my boss came in perfect
timing). Buy you a pint for that.
Colin G
--- In glasgow_altdotnet_usersgroup@yahoogroups.com, "Chris Canal"
<dhtmlgod@...> wrote:
>
> And more, make sure you set the lifestyle of controllers to
Transient. The
> default is Singleton, and will break with Mvc. I mention it because
your
> not doing that in the boo file, of course you could be using an
attribute.
> If so, just tell me to shut up :o)
>
> On Tue, Oct 21, 2008 at 2:13 PM, Chris Canal <dhtmlgod@...> wrote:
>
> > And just so you know what you where doing wrong:
> >
> > Component(type.Name, *System.Web.Mvc.Controller*, type)
> >
> > The controllers where being registed with the service type of
Controller
> > with the above bolded seciotn, so trying to resolve
LoginController will not
> > work. To make your code work, it would need to be this:
> >
> > Component type.Name, type
> >
> >
> > On Tue, Oct 21, 2008 at 2:10 PM, Chris Canal <dhtmlgod@...> wrote:
> >
> >> Try this:
> >>
> >> for type in AllTypesBased of IController("Practicum.Web"):
> >> component type.FullName, type:
> >> lifestyle Transient
> >>
> >>
> >> On Tue, Oct 21, 2008 at 2:00 PM, Colin Gemmell
<pythonandchips@...>wrote:
> >>
> >>> Can any of you Binsor/ASP.Net MVC gurus help with a problem I'm
> >>> having.
> >>>
> >>> I've got a very simple boo script that runs through the MVC app and
> >>> another dll that holds services etc.
> >>>
> >>> when the web-site runs i keep getting a "No component for supporting
> >>> the service Practicum.Web.Controllers.LoginController" error. I've
> >>> looked at the ControllerBuilder and both the login controller
and its
> >>> dependancies are in there but it is not resolving it at all.
> >>>
> >>> The code im using is as follows:
> >>>
> >>> //global.asax.cs file
> >>> public class MvcApplication : System.Web.HttpApplication
> >>> {
> >>> public IControllerFactory Factory;
> >>> public IWindsorContainer Container;
> >>>
> >>> public static void RegisterRoutes(RouteCollection routes)
> >>> {
> >>> routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
> >>>
> >>> routes.MapRoute(
> >>> "Default",
> >>> // Route name
> >>> "{controller}/{action}/{id}",
> >>> // URL with parameters
> >>> new { controller = "Login", action = "Login", id = ""
> >>> } // Parameter defaults
> >>> );
> >>>
> >>> }
> >>>
> >>> protected void Application_Start()
> >>> {
> >>> RegisterRoutes(RouteTable.Routes);
> >>> Container = new WindsorContainer();
> >>> BooReader.Read(Container, "Support files/windsor.boo");
> >>> Factory = new WindsorControllerFactory(Container);
> >>> ControllerBuilder.Current.SetControllerFactory(Factory);
> >>> }
> >>> }
> >>>
> >>> /////boo script
> >>> import Practicum.Web
> >>> import System.Web.Mvc
> >>> import Practicum.Core
> >>> import System
> >>> import System.Reflection
> >>> import Castle.Windsor
> >>> import Castle.Core
> >>>
> >>> practicumweb = Assembly.Load("Practicum.Web")
> >>> for type in practicumweb.GetTypes():
> >>> if typeof(System.Web.Mvc.Controller).IsAssignableFrom(type):
> >>> Component(type.Name, System.Web.Mvc.Controller, type)
> >>>
> >>>
> >>> practicumcore = Assembly.Load("Practicum.Core")
> >>> for type in practicumcore.GetTypes():
> >>> if typeof(Practicum.Core.Service.IService).IsAssignableFrom(type)
> >>> and type is not typeof(Practicum.Core.Service.IService):
> >>> Component(type.Name, Practicum.Core.Service.IService, type)
> >>>
> >>> //default page load on the Default.aspx.cs file in site root. I
havn't
> >>> changed this at all
> >>> public void Page_Load(object sender, System.EventArgs e)
> >>> {
> >>> HttpContext.Current.RewritePath(Request.ApplicationPath);
> >>> IHttpHandler httpHandler = new MvcHttpHandler();
> >>> httpHandler.ProcessRequest(HttpContext.Current);
> >>> }
> >>>
> >>> //login controller
> >>>
> >>> [HandleError]
> >>> public class LoginController : Controller
> >>> {
> >>> private readonly IService _service;
> >>>
> >>> public LoginController (IService CustomService)
> >>> {
> >>> _service = CustomService;
> >>> }
> >>>
> >>> public ActionResult Login()
> >>> {
> >>> return View();
> >>> }
> >>> }
> >>>
> >>> The CustomService currently has nothing in it and derives from
IService.
> >>>
> >>> If anyone can help that would be great.
> >>> Cheer
> >>> Colin G
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >> --
> >> "Any fool can write code that a computer can understand. Good
programmers
> >> write code that humans can understand."
> >> -Martin Fowler et al, Refactoring: Improving the Design of
Existing Code
> >>
> >
> >
> >
> > --
> > "Any fool can write code that a computer can understand. Good
programmers
> > write code that humans can understand."
> > -Martin Fowler et al, Refactoring: Improving the Design of
Existing Code
> >
>
>
>
> --
> "Any fool can write code that a computer can understand. Good
programmers
> write code that humans can understand."
> -Martin Fowler et al, Refactoring: Improving the Design of Existing Code
>
And more, make sure you set the lifestyle of controllers to Transient. The default is Singleton, and will break with Mvc. I mention it because your not doing that in the boo file, of course you could be using an attribute. If so, just tell me to shut up :o)
On Tue, Oct 21, 2008 at 2:13 PM, Chris Canal <dhtmlgod@...> wrote:
The controllers where being registed with the service type of Controller with the above bolded seciotn, so trying to resolve LoginController will not work. To make your code work, it would need to be this:
Component type.Name, type
On Tue, Oct 21, 2008 at 2:10 PM, Chris Canal <dhtmlgod@...> wrote:
Try this:
for type in AllTypesBased of IController("Practicum.Web"): component type.FullName, type: lifestyle Transient
On Tue, Oct 21, 2008 at 2:00 PM, Colin Gemmell <pythonandchips@...> wrote:
Can any of you Binsor/ASP.Net MVC gurus help with a problem I'm having.
I've got a very simple boo script that runs through the MVC app and
another dll that holds services etc.
when the web-site runs i keep getting a "No component for supporting
the service Practicum.Web.Controllers.LoginController" error. I've
looked at the ControllerBuilder and both the login controller and its
dependancies are in there but it is not resolving it at all.
The code im using is as follows:
//global.asax.cs file
public class MvcApplication : System.Web.HttpApplication
{
public IControllerFactory Factory;
public IWindsorContainer Container;
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default",
// Route name
"{controller}/{action}/{id}",
// URL with parameters
new { controller = "Login", action = "Login", id = ""
} // Parameter defaults
);
}
protected void Application_Start()
{
RegisterRoutes(RouteTable.Routes);
Container = new WindsorContainer();
BooReader.Read(Container, "Support files/windsor.boo");
Factory = new WindsorControllerFactory(Container);
ControllerBuilder.Current.SetControllerFactory(Factory);
}
}
practicumweb = Assembly.Load("Practicum.Web")
for type in practicumweb.GetTypes():
if typeof(System.Web.Mvc.Controller).IsAssignableFrom(type):
Component(type.Name, System.Web.Mvc.Controller, type)
practicumcore = Assembly.Load("Practicum.Core")
for type in practicumcore.GetTypes():
if typeof(Practicum.Core.Service.IService).IsAssignableFrom(type)
and type is not typeof(Practicum.Core.Service.IService):
Component(type.Name, Practicum.Core.Service.IService, type)
//default page load on the Default.aspx.cs file in site root. I havn't
changed this at all
public void Page_Load(object sender, System.EventArgs e)
{
HttpContext.Current.RewritePath(Request.ApplicationPath);
IHttpHandler httpHandler = new MvcHttpHandler();
httpHandler.ProcessRequest(HttpContext.Current);
}
//login controller
[HandleError]
public class LoginController : Controller
{
private readonly IService _service;
public LoginController (IService CustomService)
{
_service = CustomService;
}
public ActionResult Login()
{
return View();
}
}
The CustomService currently has nothing in it and derives from IService.
If anyone can help that would be great.
Cheer
Colin G
-- "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." -Martin Fowler et al, Refactoring: Improving the Design of Existing Code
-- "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." -Martin Fowler et al, Refactoring: Improving the Design of Existing Code
-- "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." -Martin Fowler et al, Refactoring: Improving the Design of Existing Code
The controllers where being registed with the service type of Controller with the above bolded seciotn, so trying to resolve LoginController will not work. To make your code work, it would need to be this:
Component type.Name, type
On Tue, Oct 21, 2008 at 2:10 PM, Chris Canal <dhtmlgod@...> wrote:
Try this:
for type in AllTypesBased of IController("Practicum.Web"): component type.FullName, type: lifestyle Transient
On Tue, Oct 21, 2008 at 2:00 PM, Colin Gemmell <pythonandchips@...> wrote:
Can any of you Binsor/ASP.Net MVC gurus help with a problem I'm having.
I've got a very simple boo script that runs through the MVC app and
another dll that holds services etc.
when the web-site runs i keep getting a "No component for supporting
the service Practicum.Web.Controllers.LoginController" error. I've
looked at the ControllerBuilder and both the login controller and its
dependancies are in there but it is not resolving it at all.
The code im using is as follows:
//global.asax.cs file
public class MvcApplication : System.Web.HttpApplication
{
public IControllerFactory Factory;
public IWindsorContainer Container;
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default",
// Route name
"{controller}/{action}/{id}",
// URL with parameters
new { controller = "Login", action = "Login", id = ""
} // Parameter defaults
);
}
protected void Application_Start()
{
RegisterRoutes(RouteTable.Routes);
Container = new WindsorContainer();
BooReader.Read(Container, "Support files/windsor.boo");
Factory = new WindsorControllerFactory(Container);
ControllerBuilder.Current.SetControllerFactory(Factory);
}
}
practicumweb = Assembly.Load("Practicum.Web")
for type in practicumweb.GetTypes():
if typeof(System.Web.Mvc.Controller).IsAssignableFrom(type):
Component(type.Name, System.Web.Mvc.Controller, type)
practicumcore = Assembly.Load("Practicum.Core")
for type in practicumcore.GetTypes():
if typeof(Practicum.Core.Service.IService).IsAssignableFrom(type)
and type is not typeof(Practicum.Core.Service.IService):
Component(type.Name, Practicum.Core.Service.IService, type)
//default page load on the Default.aspx.cs file in site root. I havn't
changed this at all
public void Page_Load(object sender, System.EventArgs e)
{
HttpContext.Current.RewritePath(Request.ApplicationPath);
IHttpHandler httpHandler = new MvcHttpHandler();
httpHandler.ProcessRequest(HttpContext.Current);
}
//login controller
[HandleError]
public class LoginController : Controller
{
private readonly IService _service;
public LoginController (IService CustomService)
{
_service = CustomService;
}
public ActionResult Login()
{
return View();
}
}
The CustomService currently has nothing in it and derives from IService.
If anyone can help that would be great.
Cheer
Colin G
-- "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." -Martin Fowler et al, Refactoring: Improving the Design of Existing Code
-- "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." -Martin Fowler et al, Refactoring: Improving the Design of Existing Code
for type in AllTypesBased of IController("Practicum.Web"): component type.FullName, type: lifestyle Transient
On Tue, Oct 21, 2008 at 2:00 PM, Colin Gemmell <pythonandchips@...> wrote:
Can any of you Binsor/ASP.Net MVC gurus help with a problem I'm having.
I've got a very simple boo script that runs through the MVC app and
another dll that holds services etc.
when the web-site runs i keep getting a "No component for supporting
the service Practicum.Web.Controllers.LoginController" error. I've
looked at the ControllerBuilder and both the login controller and its
dependancies are in there but it is not resolving it at all.
The code im using is as follows:
//global.asax.cs file
public class MvcApplication : System.Web.HttpApplication
{
public IControllerFactory Factory;
public IWindsorContainer Container;
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default",
// Route name
"{controller}/{action}/{id}",
// URL with parameters
new { controller = "Login", action = "Login", id = ""
} // Parameter defaults
);
}
protected void Application_Start()
{
RegisterRoutes(RouteTable.Routes);
Container = new WindsorContainer();
BooReader.Read(Container, "Support files/windsor.boo");
Factory = new WindsorControllerFactory(Container);
ControllerBuilder.Current.SetControllerFactory(Factory);
}
}
practicumweb = Assembly.Load("Practicum.Web")
for type in practicumweb.GetTypes():
if typeof(System.Web.Mvc.Controller).IsAssignableFrom(type):
Component(type.Name, System.Web.Mvc.Controller, type)
practicumcore = Assembly.Load("Practicum.Core")
for type in practicumcore.GetTypes():
if typeof(Practicum.Core.Service.IService).IsAssignableFrom(type)
and type is not typeof(Practicum.Core.Service.IService):
Component(type.Name, Practicum.Core.Service.IService, type)
//default page load on the Default.aspx.cs file in site root. I havn't
changed this at all
public void Page_Load(object sender, System.EventArgs e)
{
HttpContext.Current.RewritePath(Request.ApplicationPath);
IHttpHandler httpHandler = new MvcHttpHandler();
httpHandler.ProcessRequest(HttpContext.Current);
}
//login controller
[HandleError]
public class LoginController : Controller
{
private readonly IService _service;
public LoginController (IService CustomService)
{
_service = CustomService;
}
public ActionResult Login()
{
return View();
}
}
The CustomService currently has nothing in it and derives from IService.
If anyone can help that would be great.
Cheer
Colin G
-- "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." -Martin Fowler et al, Refactoring: Improving the Design of Existing Code