Results 1 to 9 of 9

Thread: Spring and reflection

  1. #1
    Join Date
    Mar 2005
    Location
    hk
    Posts
    7

    Default Spring and reflection

    Is Spring or in partifular Spring.Core, basically just reflection plus some .confgi file?

    Plese correct me if is actually more than that.

  2. #2
    Join Date
    Mar 2005
    Location
    hk
    Posts
    7

    Default

    So spring.core is basically doing in C/C++, stuff like function pointer or callback function, or in Win32 things like LoadLibary, right?

  3. #3
    Join Date
    Sep 2004
    Location
    Belgrade, Serbia
    Posts
    613

    Default

    You can find answer to a similar question in a following thread:

    http://forum.springframework.net/viewtopic.php?t=87

    I believe it should answer your question as well.

    - Aleks

  4. #4
    Join Date
    Mar 2005
    Location
    hk
    Posts
    7

    Default

    that was a very comprehensive post, but I am still a bit confuse as to how u can do service location without using IApplicationContext and stuff in the code snippet of the post u showed. I mean, if i can really do that, that would b neat.

  5. #5
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,

    In the case of the Spring's web support - a custom handler is registered with asp.net and it is responsible for retrieving the objects from the application context for you based on the http request. That is how the example Aleks showed in the previous post works (in brief) w/o using the service locator approach. If you are writing a .NET remoting application then your SAO objects would be described in the standard Spring.NET config file and are created as a result of creating the application context in your startup code. The SAO objects themselves would have their properties set and references to collaborating objects set via Spring without having to use a service locator. I've found when writing a winform application - where you are more exposed to the use of raw 'new' (as compared to the standard infrastructure of asp.net) you tend to use a service locator more frequently in response to creating objects to user actions. This could be hidden via the use of a Spring winform base class but then your object is coupled to spring. As we delve deeper into DI usage in winforms we will have a better idea what the best design practices are in that area. Hope this helps.

    Cheers,
    Mark

  6. #6
    Join Date
    Mar 2005
    Location
    hk
    Posts
    7

    Default

    is there a asp.net web app sample out there that does this?

  7. #7
    Join Date
    Sep 2004
    Location
    Leeds, UK
    Posts
    166

    Default

    Hiya

    There will be one in place for the forthcoming 1.0 release... but there is not one in place right now.

    So what are your views on petshops?

    Ciao
    Rick

  8. #8
    Join Date
    Mar 2005
    Location
    hk
    Posts
    7

    Default pet shop, IBuySpy, whenever is fine

    However, some quick n short same that highlight Spring's main features, or points tat stands out. would be necessary also, so, u know, people like me can pick up quickly.

    for my current project, i decided to stick with just Reflection and some config files. As Spring.NET is not tat well documented yet. While Reflection, i can copy from tons on examples. As for the master page feature. I suppose I can get buy with the Basepage/LoadControls way to do things while waiting for VS 2005.

    Anyway, hope there are more docs when 1.0 comes out

  9. #9
    Join Date
    Sep 2004
    Location
    Leeds, UK
    Posts
    166

    Default

    Hiya

    An example application that demonstrates all of the IOC Dependency Injection features of Spring.NET will be available in the 1.0 release, which is scheduled for release on the 31st of July (ten days).

    Yeah, the documentation is quite light on examples, this is being worked on.

    Ciao
    Rick
    Senior Consultant, Interface21 - Spring Services from the Source

    The Spring Experience - The Premier Spring Event of 2006. December 7-10, 2006, Hollywood, Florida

Similar Threads

  1. How to express a common factory idiom using Spring
    By rmoskal in forum Core Container
    Replies: 3
    Last Post: 06-12-2005, 08:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •