• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Approach for making a Web app Customizable

 
Ranch Hand
Posts: 49
Python Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys I need your suggestion / thoughts / inputs;

For a Web application already developed and then comes the request to make it customizable for every client (Like we normally have) what would be the best approach for this.
well, normally many developers have this if else condition, if x user do this else do this I am kinda against this as this has loads and loads of issue and is buggy.
One approach which I've thought of is maintaining the global XML which will have all the configuration for all the users we want to have. and make changes to the pages accordingly.

Do we have any other ideas ??

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There could be different type of customization and the design should be based on what is required

Is it just a look n feel change(colour n menu using stylesheet) or some additional functionality change or
you are talking about a product where some features are given to customer who paid for that and some client can live with less features. Based on above thoughts we should think about design.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd probably make it DB-based, not file-based. Databases give you more flexibility to make changes dynamically.

You need to think about which customizations should be possible, how the relevant data is stored in the DB, and how users can go about changing them.

For starters, you need the users to log into your application so that you can identify them. Then you can look up any customizations based on their user ID (or company ID or whatever, if these customizations apply to groups of users).
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Learn how to use locale-sensitive objects to customize your Java-based Web applications.

public final class java.util.Locale extends Object implements Cloneable, Serializable

A Locale object represents a specific geographical, political, or cultural region. An operation that requires a Locale to perform its task is called locale-sensitive and uses the Locale to tailor information for the user. For example, displaying a number is a locale-sensitive operation--the number should be formatted according to the customs/conventions of the user's native country, region, or culture.

public abstract class java.util.ResourceBundle extends Object

Resource bundles contain locale-specific objects. When your program needs a locale-specific resource, a String for example, your program can load it from the resource bundle that is appropriate for the current user's locale. In this way, you can write program code that is largely independent of the user's locale isolating most, if not all, of the locale-specific information in resource bundles.

See http://java.sun.com
 
Jilesh Lakhani
Ranch Hand
Posts: 49
Python Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
umm, well Firstly I am not talking about CSS changes, I am talking about features.
well,
Database driven is one solution would be the best one but also one of the lengthy & neat process, (creating back end UI to control things).

XML is not so lengthy but not neat either.


any other suggestions??
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

umm, well Firstly I am not talking about CSS changes, I am talking about features.



What "features" are you referring to?

If you described a particular feature, then maybe other readers will provide germane design suggestions.
 
Jilesh Lakhani
Ranch Hand
Posts: 49
Python Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sure,
let me think about a example.....

Readers Note that this is a Hypothetical example.

Lets say its about a E-commerce website, where our clients are the vendors, they can show up their products so the end users can purchase it.

So there is a standard system ready for them it also implements CSS changes for every clients.
Now there are product showcase or a sidebar showing recommended products.

Here one client (out client) says that my site should show "Most Purchased Item" instead of "Recommended Products".
and well we could have small small request too.

like a client could say : I would like my customers to print the product information and other one could say i don't want them to have print option!!

now these requests can keep on pouring in as the product grows, here I am looking for an good option where we can incorporate all these customizable change request from time to time.

hopefully this example should give you a better perspective of the issue raised.

till now there are two suggestions
1) XML (Not a Neat Process but short)
2) Database (Neat and lengthy)
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good.

For the type of customization you described, the standard commercial solution is to have configuration data stored in a commercial-quality relational database.

You are associating the term "lengthy" to a standard operation. It is unlcear what your interpretation of "lengthy" means.

Your idea for reading a giant XML file that contains all the customization data for all of the client accounts is not really a healthy option for a commercial quality system. It is problematic in many ways and presents a resource contention bottleneck as well is probable I/O issues with multiple clients reading the file concurrently, not to mention version issues if you attempt to replicate the file.

However, to implement a solid, efficient database solution, you need the right skill sets, e.g. database administration, database design, knowledge of pooling and how to write database-driven software.
 
Jilesh Lakhani
Ranch Hand
Posts: 49
Python Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lengthy just means, it takes lot of time to implement but I agree its a best approach as it would reduce the bugs also its easy to maintain.

 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a significant difference between using an XML-based configuration file at application start-up or deployment and runtime.

XML-based configuration files such as struts-config.xml, web.xml, ejb-jar.xml are read only once when an application is deployed.

The runtime customizations that are described above typically need a more dynamic storage mechanism such as a relational table in a relational database management system.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You really should just read up on how a CMS works. I'm not saying you should use an out of the box CMS, but you should be aware of how one works because it is basically what you might need.
 
You ridiculous clown, did you think you could get away with it? This is my favorite tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic