Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #10880
| From | Arved Sandstrom <asandstrom3minus1@eastlink.ca> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Modular multi-tenant full-ajax web application |
| References | <2944d35a-77d8-4e9f-a421-2df5ce40d210@z19g2000vbe.googlegroups.com> <t%FHq.26711$JE1.2447@newsfe21.iad> <95ab5265-323c-46d0-b268-9daf69a62d80@z1g2000vbx.googlegroups.com> |
| Message-ID | <5KKHq.32695$LO2.8395@newsfe13.iad> (permalink) |
| Organization | Public Usenet Newsgroup Access |
| Date | 2011-12-19 13:44 -0400 |
On 11-12-19 12:35 PM, carmelo wrote: > Thanks for your answer Arved. > > I try to explain better: my purpose is to develop a web application > with a dynamically generated UI according to the logged customer, and > the purchased/activated modules. > > A good framework for server-side generated UI could be Vaadin, but for > making the application modular I think that I should use it with OSGi. > I don't know if Vaadin+OSGi could be a good solution for this type of > web app. What do you think? You may well have a good reason to use OSGi, but customizing the user experience isn't one of them. Let's say that your web app is called SuperApp 1.0, and you've sold it to 3 customers, A, B and C, with user bases of 100, 200 and 300 respectively. Customer A has licensed all 5 bundles, Customer B has licensed 4 of them, and Customer C has only the 2 core bundles for the SuperApp 1.0 application. OSGi is a good fit for delivering the 3 different versions of SuperApp 1.0 to the 3 different customers. But you're not going to then use it to shape the UI and functionality experience for all 600 users individually. Modularity of the sort that you are looking for is typically more fine-grained than what you'd get from OSGi bundles. Fairly standard Java EE APIs and techniques are applicable to getting the kind of UI and modularity you want. Some points and/or rules of thumb and/or thoughts: 1. in your scenario you've got paying users with known identities. They'll be logging in and will _expect_ to authenticate. It's at that point that you can map them to roles or permissions [1] and enforce declarative or programmatic authorizations; 2. Any decent web framework will have a view technology that supports disabling/enabling and hiding/un-hiding UI elements based on code-behind values etc. If a given user hasn't paid for doing something in SuperApp 1.0, this usually translates to not having paid to _see_ something (or click on something) in a page. And this translates to roles and/or permissions. 3. Modularize from the bottom up starting with the model/domain/business logic layer(s), whatever specific terminology you choose. Make _those_ modules (not OSGi modules, but just small-m modules) look like services in the SOA sense. You'll know you did a good job if, after having finished that job, you can actually drop some WS-endpoints on top of those services, and have some users access via web service clients rather than through your standard web tier. This is the best kind of modularization, and will serve you in good stead for any scenario. Furthermore, _once_ you've done that exercise, if you're then minded to consider OSGi, you're in much better shape to consider what comprises each bundle; 4. It can be a gray area as to whether you customize a page and its codebehind for different users with different authorizations, or whether you supply a different copy of at least the page (and possibly its codebehind) for user groups with substantially different visuals and allowed functionality. At one extreme you'll simply have different chunks of app for different users, actually. Generally you'll be able to tell if you're trying to make a given page and its codebehind do too many different things for too many different user groups. ********* I think you see what I am getting at here. Modularization is an architectural, design *and* coding concept that applies to every layer of your app, horizontally and vertically. You should be doing this all the time in every app you ever write, in any language. Re Vaadin: I haven't used it in the real world, so I am not competent to recommend it. What I do know of it indicates to me that you'd be as capable of doing what you want to, with Vaadin, as any of many other frameworks out there. AHS 1. I prefer permissions, and some security frameworks have good support for them, not just roles.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Modular multi-tenant full-ajax web application carmelo <csaffi@tiscali.it> - 2011-12-19 00:28 -0800
Re: Modular multi-tenant full-ajax web application Rajiv Gupta <rajiv@invalid.com> - 2011-12-19 23:13 +1100
Re: Modular multi-tenant full-ajax web application Tom Anderson <twic@urchin.earth.li> - 2011-12-19 22:47 +0000
Re: Modular multi-tenant full-ajax web application Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-12-19 08:21 -0400
Re: Modular multi-tenant full-ajax web application carmelo <csaffi@tiscali.it> - 2011-12-19 08:35 -0800
Re: Modular multi-tenant full-ajax web application Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-12-19 13:44 -0400
Re: Modular multi-tenant full-ajax web application Tom Anderson <twic@urchin.earth.li> - 2011-12-19 22:46 +0000
Re: Modular multi-tenant full-ajax web application Rajiv Gupta <rajiv@invalid.com> - 2011-12-20 21:51 +1100
csiph-web