0

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

TCM
  • 16,780
  • 43
  • 156
  • 254
  • 3
    sadly, when working with java, you have to think. – Bozho Feb 05 '10 at 10:38
  • I was afraid of this answer only! Please atleast suggest something or some alternative way through which i can simulate personalization means if the only page can't be personalized atleast some parts of it? On client side we already have some ready made libraries like GWT etc which enable us to do drag and drop or change zones on our page. The only problem is how to persist this change between different user sessions? – TCM Feb 05 '10 at 10:48
  • mine wasn't an answer but a comment. The way to store these personalization in the DB is entirely your decision - there are millions of ways to do it, depending on the exact context, which is known only to you currently. – Bozho Feb 05 '10 at 11:24
  • Ok take a simple scenario i have 3 widgets, few on left side and few on right side. The registered user of site can move this widget anywhere on screen. He should not be able to move the center panel Now please tell me how do i store it? I don't want in depth knowledge of doing it in million ways. If you can tell me only 1-2 ways then it would be sufficient for me. I really need help! I just need concept. Rest i will manage it. – TCM Feb 05 '10 at 11:29

1 Answers1

0

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
  • 588,226
  • 146
  • 1,060
  • 1,140