Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

preaa

@preaa
About
Posts
6
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Moving from mobile dev to Server dev - cloud?
    P preaa

    Hi, I am a mainly C#/.Net/Vc++ etc etc developer, carrying around 12 years of exp. A lot of my work was related to mobile apps in eVC++ earlier and now in latest Windows platforms. I did some iOS work as well in between. But now the client side work has started to tire me out, mainly because I find myself battling with a lot of UI issues, and Framework limitations. The Projects are small and Need fast development, which does not provide depth in my work. I am getting inclined towards Server side Technologies, but having worked for sometime on Azure and a lot on SQL Server, I must say I was really not a fan of these tools. Moreover with Azure, I think you get stuck on a lot of Hardware related issues? Is that true ? I don't know a lot though. So I am pretty much confused right now, about what Kind of direction I should take? I am also thinking of plunging into Java world, mostly because I am really not excited about Microsoft Server side Technologies. Though it is a vague question, to give more insight into what Kind of work I like, I would say I am all for clean architecture, Patterns and practices and I would like to get into something that provides me more opportunity to design and implement a full Software System. Thanks a lot, Preea

    Work Issues csharp design cloud question c++

  • IOCContainer nested dependencies and failed resolves
    P preaa

    Thanks for the answer Pete, This clears my confusion.. Fail early (throw exception in the constructor) is the preferred way. Regards,

    .NET (Core and Framework) regex question

  • IOCContainer nested dependencies and failed resolves
    P preaa

    Hello All, I am working on the correct usage of IOCContainer(Autofac) in a project which has mulitple assemblies. I am not able to understand the nested dependency pattern correctly as well as what would be the best exception handling strategy in case of failed resolves. The post is not concise, as I am afraid I cannot explain my confusion in a brief manner. So apologies.. I am trying to use the 'constructor injection pattern' instead of 'property' or 'method' injection. so a class which looked like this:

    Class Foo()
    {
    private static readonly IDependency = IOCContainer.Resolve();
    }

    is changed to something like this

    Class Foo(IDependency dependency)
    {
    private readonly IDependency = dependency;
    }

    however after cleaning up the whole code with the constructor pattern, the code looks like this

    Class Foo(){
    public Foo(IDependency dependency)
    {
    this.dependency = dependency;
    ....
    var bar = new Bar(this.dependency);

    }
    

    }

    Class Bar{

    public Bar(IDependency dependency)
    {
     this.dependency = dependency;
    
    }
    

    }

    Now if the dependency was not available (IOCContainer failed to resolve this dependency), Foo will pass that dependency around, without worrying about the failed resolved call.. I think that given this scenario, the property or method injection methods seem correct as all the classes are directly calling IOCContainer resolves and then they would have a way to check if the dependency was resolved or not directly from the IOCContainer. However A null check or a try catch can be applied when we access the dependency anyways even with the constructor injection pattern, for e.g.

    class Bar()
    {
    public SomeMethod()
    {
    (dependency != null ? dependency.doSomething : throw new Exception(DependencyNotAvailable);
    }
    }

    Is it correct approach? How should I handle the exceptions from IOCContainer otherwise? Thanks in advance, Preaa

    .NET (Core and Framework) regex question

  • WPF - Why was it formed?
    P preaa

    Well thanks again for lots of insights. I do not have a clear picture of where WPF knowledge will take me as a developer. I am also an ASP.NET MVC developer and earlier did a lot of iOS work. I thought windows desktop applications were obsolete until I saw some cool apps on Windows 8. I bought myself a Win 8 touch machine and I really liked the weather app and some others. So, I think that WPF and all the other 1000 things like silverlight or RT etc are going to help me create these desktop apps on Win 8. Will that be cool? I don't know. nevertheless, lot of good answers that help me. BEst

    The Lounge csharp question asp-net wpf winforms

  • WPF - Why was it formed?
    P preaa

    Well thanks a lot again for the kind replies.. I think I should look at Windows RT as well along with WPF.. Best

    The Lounge csharp question asp-net wpf winforms

  • WPF - Why was it formed?
    P preaa

    Hi, Having worked with Various Micrsoft programming languages for many years, now I am dabbling into WPF for a project. I don't know a single bit about it, but as I started to read the manual, I got confused as to what is the real purpose of WPF? Why would you put your UI in painful XML tags when you can use Windows forms? If it were to separate UI completely with the behaviour, aren't the developers doing that already with clean layering architecture with the forms based applications? and why somebody would like to load a desktop application on a browser? If its a browser based application, it should be developed in ASP.NET. Thanks,

    The Lounge csharp question asp-net wpf winforms
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups