Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Frameworks for Layering reusable Architectures

My question is very simple, my intention is to generate a repository with your responses so it could serve to the community when selecting frameworks for developing enterprise general purpose applications. This could apply very well for general purpose languages such as C++, C# or Java.

  • What Framework do you recommend for generating Layered Architectures?
  • Based on you experience why do you prefer the usage of some Framework versus your own architecture?
  • How long do you believe your selected Framework will stay as a preferred option in the software development industry?
like image 677
ArBR Avatar asked Dec 18 '10 00:12

ArBR


2 Answers

To specifically answer the second question:

Developing your own framework gives you the burden of having to maintain it and educating new developers in using it.

The larger your framework becomes, the more time you have to devote specifically to it and the less time you thus have to solve your actual business problem. This is okay if your business problem is the framework, but otherwise it can become a bit of a problem, even for very large companies that can dedicate a group of people to such a framework.

If you're a smaller company (say ~15 developer max) this can really become a huge burden.

Additionally, if your own framework is the kind of framework that can take advantage of third party developments (e.g. third parties can develop components for JSF), then your own framework obviously won't be able to take advantage of that.

Unless of course you open source your own framework, but this will only significantly increase the burden of supporting it. Just dumping your source code on sourceforge does not really count. You will have to actively support it. All of a sudden your framework becomes their framework with maybe 'weird' feature requests and awkward error reports for environments that you have no personal interest in.

This also assumes that your framework will actually be used by external users. Unless it's really very, very, good and you put lots of energy in it, this will probably not happen if it's simply the umpteenth Java web- or ORM framework.

Obviously, some people have to take up the job of creating new frameworks, otherwise the industry just stagnates, but if your prime concern is your business problem I would really think twice of starting your own framework.

like image 69
Arjan Tijms Avatar answered Nov 07 '22 03:11

Arjan Tijms


Very vague question, I'm not really sure it's ever a good idea to "write your own" at this point for a work project (unless writing your own, IS the project). If it's a learning exercise, fine, but otherwise go use one of the libraries written by people who have been doing it far longer. If you really want to get involved, read their code, try and contribute patches etc.

For .Net there is Sharp Architecture Which is a pretty popular framework for layered applications.

Here's some of the stuff I use (I don't use Sharp Architecture)

First, the infrastructure stuff

  • For Dependency Injection, I use StructureMap. I use it because it's way more robust and performant than anything I would or could write, and it's very well supported within the .Net community. It also sticks to being DI, and doesn't venture out into other things that I might want to use other libs for (AOP etc). The fluent configuration is fantastic (but many .Net DI Tools have that now)
  • For AOP, I use Linfu Dynamic Proxy. I know a lot of people that like the code weaver variety for performance reasons, but that's always seemed a bit like premature optimization to me.
  • For a DataMapper, I use AutoMapper. This is one where I'm on again off again. If you can do your mappings based just on convention, then great, I'll use it. Once I have to start tweaking the configuration to do special things.... to me that starts to get into the gray area where the code might be more clear with just some left=>right wrapped in a function.

Web/UI

  • Asp.Net MVC. Although to be quite honest, I'm having a falling out lately and may soon be moving to FubuMvc. Asp.Net MVC seems like it has split personalities in terms of API design (dynamic over here, static over there, using blocks to render forms, but System.Actions to render other things etc). Combine that with the fact that it's not really OSS (you can't submit a patch), and to me there's a compelling reason why the community should come up with something better that's OSS.

Persistence

  • NHibernate, Specifically Fluent NHibernate. Sure I'd love to write my own OR/M, but at the same time I'm certain that the hordes of developers who have worked on NHibernate are way smarter than me.

Services/Distribution etc

  • WCF for Synchronous calls
  • NServiceBus for Messaging and most async calls.

Most of this stuff is OSS, so how long will it be around, well, I would imagine a good long while.

like image 40
Brook Avatar answered Nov 07 '22 01:11

Brook