I hope this is the right section of the forum to post this question. This is actually an architecture problem.
In my project , I am following MVC
Pattern , I back up this model with
Struts, and widely follow Facade Pattern in
my design.
This is my first web application project, so I apologize in advance if answers to my questions are so obvious that one
should already know the answers. But anyway, In this application, I have two classes that follow Facade Pattern:
1. MenuXMLManager.java : Responsible for representing the data, answers to the question "who am I?" in given context.
2. MenuHTMLManager.java : Extends MenuXMLManager, and responsible for generating appropriate views, answers to the question, "How do I look like in mirror?"
Now today, I refactored some of the methods in MenuHTMLManager, and make them accept response object from
servlets, so that I can encode URLs and so support URL Rewriting in my application in case cookies are disabled.
With this architecture, I want to check client for:
1. If it uses JavaScript and has cookies enabled: If yes I am planning to push AJAX + JavaScript enabled view.
2. If cookies are disabled , whether JavaScript enabled or not, I am planning to push URL Rewriting without AJAX and JavaScript.
First of all , does this scenario makes sense, or it is an overkill ? maybe totally unnecessary ? I need some feedback from experienced people around.
And second of all, I will do my research after posting this question but I really appreciate any pointers for proper checking of if the client has JavaScript
enabled or not.
Thanks all for reading this boring post.
Edit: typos, typos, typos...