views:

83

answers:

1

Hello,

I just wanted to know how does personalization of a web page happen? How does the state of the web page get saved in database? which field does it use? I've used Asp.net Membership and in Asp.Net it's very easy just drag and drop and you see the magic. But sadly i am using Java and i want to implement this concept in Java. How can this be done? What is the basic idea behind it? and which field in database can hold such information certainly varchar can't :p

A: 

Based on your descriptive comments it is now more possible to answer the question. Here's a suggestion:

  • Make the following data model

    class User {
         private List<UserScreen> screens;
         // more properties
    }
    class Screen {
        // screen properties
    }
    class UserScreen {
        private Screen screen;
        private User user;
        private int position;
    }
    
  • number your possible screen positions from 0 to n. -1 might mean "not visible".

  • whenever re-oredering happens update the position property of each UserScreen
  • persist that in a database using an ORM (Hibernate for example)
Bozho
Thanks man thanks! :) i got the idea now
Ankit Rathod