Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Decision about web application architecture

I am facing a decision about the web application architecture I am going to work on. We are a small team and actually I will work on it alone (everybody work on something else).

This application will consist of front-end build on the ExtJS library and it will use the model "load page, build GUI and never refresh".
On the web "desktop" there will be a lot of data windows, map views (using openlayers + GeoExt) and other stuff.
GUI should be flexible and allow every user to modify (and persist) the layout to fit his/her needs.

It should be possible to divide the application into modules / parts / ... and then let users in specific groups use only the specific modules. In other words, each group of users can have different GUI available on the web "desktop".

Questions are:

  1. First of all, is this approach good?
    There will be a lot of AJAX calls from clients, may be this could be a problem.

  2. How to handle code complexity on client side?
    So far I have decided to use dojo.require / dojo.provide feature and divide the client side code into modules (for production they will be put together using dojo build system) I am thinking about to use kind of IoC container on client side, but not sure which one yet.
    It is very likely that I will write one for myself, it should not be difficult in dynamic language like JavaScript.

  3. How to handle AJAX calls on server ?
    Should I use WCF on server side ? Or just ordinary ashx handler ?

  4. How to handle code complexity on server side ?
    I want to use Spring.NET. May be this approach could help with modularity problem.

  5. Data access - here I am pretty sure what to use: For DAL classes I will use nHibernate. Then I compose them with business classes using Spring.NET.

I would really appreciate some advice about which way to go.
I know about a lot of technologies, but I have used only little part of it.
I don't have time to explore all of them and be fine with the decision.

like image 245
Lufi Avatar asked Oct 25 '22 09:10

Lufi


2 Answers

We do this type of single page interface where I work on a pretty large scale for our clients. (Our site is not an internet site)

  1. This seems to work pretty well for us. The more js you have the more difficult it gets to maintain, so have as many automated js tests as you can and try to break up your js logic in an mvc fashion. 4.0 is supposed to make this much easier.
  2. Ext 4.0 has this built in if you are trying to limit the code you bring down. If you have the same users day after day, then I think it would be best to just bring all the source down (compressed and minified) and cache it.
  3. We've found asmx to work really well. I have nothing against wcf, but last I looked it seemed like more trouble than it was worth. I know they have made many improvements recently. asmx just works though (with a few request header changes and managing the "d." on the client side).
  4. Our Server side data access layer is pretty complex, but the interface for the ajax calls is pretty simple. You have not really given enough info to answer this part. I would start as simple as possible and refactor often.
  5. We are also using nHibernate. Works fine for us. We have built a DDD model around it. It can take a lot of work to get that right though (not sure if we have it right after months of working at it).

If I were you I'd start with just extjs, your web service technology, and nHibernte.

like image 152
Jerry Avatar answered Oct 27 '22 11:10

Jerry


I would recommend ASP.NET MVC 3 with Razor instead of a lot Javascript and calls to Service you can just do ajax calls to an Action in a Controller and that will let you have more maintainable code and use a IoC like Ninject. EF instead of NHibernate. But it's your decision.

like image 43
dacanetdev Avatar answered Oct 27 '22 09:10

dacanetdev