Question

I'm trying to use Sharp Architecture to develop ASP.NET MVC 3 app. But I found few issues: SharpArch Edit controller takes NHibernate domain object and calls IsValid and copies data to NHibernate object fetched from Repository. Why SharpArch uses direct propery assignment (TransferFormValuesTo functions) instead of session.Merge or session.SaveOrUpdateCopy? Is it realy gool idea to fill domain object with form data and validate it, instead of using custom data annotation Validate attributes?

May be Sharp Architecture was cool in time of ASP.NET MVC, but is it usefull for now?

Was it helpful?

Solution

Well, lets say SharpArch is just another little but very opinionated layer over ASP.NET MVC. So, to reprase you - those "issues" are not issues; they are just opinions incorporated into SharpArch framework. Is it "good with MVC" or "bad with MVC" desicion should be up to developer. So "yes" for one, "no" for another.

The issue is with how you look at opinions. You never ever have to take them as something "all-for-all-situations-ever". You may have one project done and working like a charm with SharpArch inside but also have another one where SharpArch is just not the tech to use.

Another part about all of that is how you accept the opinion. Or not :) Decide if you feel comfortable with that or not. If you feel somethings wrong then try to decide on alternative or decide whether its worth writing something your own that would do the same thing as SharpArch but in a different way.

After all, SharpArch isn't big enough, its small and simple and easy to learn (which is also useful when writing your own alternative). But you have to decide whether to accept the opinion or not.

OTHER TIPS

If you are talking about small to mid size systems then SharpArch and NHibernate could be too heavy..

Have you ever checked Nido Framework. It is simple but flexible framework develop following a simpler but solid architecture. You can develop your system on Nido and integrate that with MVC of ASP.NET front end.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top