Coming from Java background, I am now working in a Microsoft shop where we use MS technologies only. Can you please map this architecture stack to the MS world? I am not looking for equivalents to specific layers of the stack, but a proven end-to-end stack that is known to work in the real world:
Thanks!
Architecture Stack:
Hibernate Spring DAO Spring Declarative transaction management Domain model POJOs Spring MVC BlazeDS Flex Flex Interactive data visualization for charting and interactive data analysisCross cutting concerns:
Security using Acegi+ACL (Data content authorization for user rol开发者_Go百科es) Testing with Mock Objects Deployment using Ivy+Ant Logging with Log4JArchitecture Stack:
- Hibernate -> NHibernate
- Domain model POJOs -> Domain Model POCOs
- Spring MVC -> ASP.net MVC
- BlazeDS -> RIA Services
- Flex -> Silverlight
For DI, you can just go for spring.net if that is what you are familiar with. Spring and Castle Windsor are probably the most mature, followed closely by StructureMap.
Cross cutting concerns:
Security using Acegi+ACL (Data content authorization for user roles)
probably have to roll your own.
Testing with Mock Objects
.net methods are not virtual by default like java, which dramatically limits what a dynamic proxy (the secret sauce that makes mocking frameworks work in static language) can do. Either Rhino.Mocks or Moq would be the most used that are free, and use the dynamic proxy approach. There is also Typemock Isolator which will mock pretty much anything, but it is 800$/seat.
Deployment using Ivy+Ant
Ivy would be Cruise Control if you want free, and TeamCity if you want good (caveat: I am a jetbrains fanboi ;-) Ant would be NAnt or MSBuild (virtually the same thing)
Logging with Log4J
Two main choices, either log4net or the Microsoft Enterprise Library Logging Block (love their names) log4net is definately the more lightweight of the two choices, but it depends what you want to do
The following are not so much exact equivalents, but more alternatives used in the .NET world.
Spring MVC -> ASP.NET MVC
Flex -> Silverlight (client side only)
Flex interactive data -> Silverlight charting or ASP.NET Charting
Hibernate -> ADO.NET entity framework.
EDIT:
I think the following would be a good starting point (I have left out the things I do not know anything about, such as "declarative transaction management").
SQL Server
ADO.NET Entity Framework
.NET RIA Services
Silverlight (charting components are included in the Silverlight toolkit)
For logging I prefer log4net.
As for reporting and data analysis you might also want to look at SQL Server Analysis Services and Reporting Services.
Also check out Team Foundation Server for testing, automated builds and deployment.
.NET shops tend to be a bit more prescriptive in what is "allowed", so ask your co-workers first before diving right in and just choosing something.
I've used Spring.NET, and the Castle Project and both are pretty solid but not 1:1 feature wise with their Java counterparts. MS shops often tend to stay close to the mothership so are more likely to go with things like The MS Enterprise Library/Unity (solid but verbose), ASP.NET MVC, Silverlight and Entity Framework.
For CI there's TFS (Team Foundation Server, a free version now ships with Visual Studio) but if you want to stick with free software theres CruiseControl.NET, nAnt, nUnit basically take a Java project convert the "j" to and "n" and there's probably a product ;)
I know a couple of these have equivalents:
log4j -> log4net
Hibernate -> NHibernate
Spring -> Spring.net
Also, it seems like a POJO isn't really all that java specific (well, I suppose the the J part is :)). I guess a "plain old C# object" could be considered an equivalent ...
I found something, does Sharp + Silverlight get me 80% there? Is this considered the current best practice in the .NET world?
http://wiki.sharparchitecture.net/MainPage.ashx
The biggest missing piece I see is Acegi+ACL functionality...
One thing I'd add in, since I don't think it's been mentioned yet, is that Unity is a feasible (and simpler!) alternative to Spring:
http://www.codeplex.com/unity/
精彩评论