cosmos
cosmos

Reputation: 2424

Guidelines and design decisions with .NET and WCSF

We have started migration of a .NET thick client application to web. The scope of the work is restricted to migrating the winforms UI to web UI. The biz logic components will be reused as-is after striping the earlier web service wrapper layer as the presentation components and the biz components will get collocated on IIS. We have decided to use WCSF for the purpose. I would like to validate some of the arch/design decisions,

  1. Do we need to use a JS framework, e.g. jQuery, DOJO etc. for AJAX ? Or are the ASP.NET controls has adequate in-built support to take of all JS based front-end validations, AJAX form submits, error message displays etc.

  2. Is there any concern in using foundation modules ? Does it make the application heavy by loading and caching all modules during startup ?

  3. Is using static method / class for all service functionalities a good approach? Or should we non-static class / method with service dependency instead ?

I am new to .NET :)

Upvotes: 0

Views: 244

Answers (2)

James McLachlan
James McLachlan

Reputation: 1368

Your profile suggests that while you may be new to .NET you are an experienced Java developer.

1 - I agree with TomTom that you don't NEED a JS framework, but ASP.NET WebForms validation controls are pretty limited. You'll quickly find yourself needing to write custom JS, and having a framework like jQuery in place from the beginning will help alot. Things like disabling all buttons when someone clicks one to prevent double postbacks gets much easier with jQuery's selectors.

That said, an alternative would be to buy some 3rd party controls from companies like Telerik, DevExpress or Infragistics. There is a free, open source, community-maintained set of AJAX controls called the ASP.NET AJAX Control Toolkit, here: http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite. The default ASP.NET controls are pretty basic.

2 - All ASP.NET apps have an unavoidable startup time when they're loaded into memory on the first visit after an update, say about 10 - 20 seconds for a typical line of business app. I haven't investigated how much more time WCSF's module loader adds but it'll be part of the initial load anyway. Typically, you visit your ASP.NET site once after updating it to force the initial load so that clients don't have to. Any time WCSF adds really won't matter to clients in this case.

3 - One downside to using static methods for services is that you can't add them to interfaces in .NET. If you're using WCSF I'd strongly suggest using its DI features to resolve interfaces, which means use only non-static things. It's also harder to run into unit testing issues with non-static things e.g. constructors/initializers that only get run once with no way to update member variables.

Upvotes: 0

TomTom
TomTom

Reputation: 62093

I am new to .NET :)

Sounds more likea junior deveoper.

Re 3: bad approach. Use an dependency injector, and avoid static methods in 90% of the cases. You give up a lot of flexibility. This is btw where my junior developer approachcomes from - static methods and the "healing" are standard IT architecture for years now and not related to .NET.

Re 1: you do not NEED to use a JS framework. You also dont need to buy a car and can build your own. It is not cost effective though. Web application? LEARN .NET first.... like thefact that there is this new sub-framework from Microsoft called MVC in version 3 that makes developing good software sasier (testable backend) and is more suited for web aplications. MS internal standard controls for asp.net and the whole webform framework hare limited and have their own set of problems. That said, MVC is most usefull if you know what you are doing - JQuery wise (integrated) and unit test / architecture wise.

Re 2: what do you care ;) As in: even if it makes them academically slower, it is not really relevant. That said, what are foundation modules? I dont see that word in either the ASP.NET framework or the IIS documentaition.

Upvotes: -1

Related Questions