Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Need good idea and logic

Posted on 2006-05-30
6
Medium Priority
?
222 Views
Last Modified: 2010-04-01
hi experts,

I have a Q&A application pretty much simiar to this site, but much difference. My app. is based on gobal University studies where students can post Q and Proffesors will A it. So I'm planning to using JSP/Servlet. I already had Left Menu and top banner in place as jsp includes for each pages. Correct me if my approach is wrong. I dont wanna use frames. What I'm looking is the great idea and logic to implement the main page content.

What I'm thinking is every day professors will answer the Question from Admin Section from back side the app. Weekends and holidays they will not answer or so.
How to fetch the records with current or lastest answered from DB ? Also I wanna display part of Q like the one on this website, when click on it, it will direct to full question / answer page.
--------------------------------
 top banner
--------------------------------
Left      |    Main Content
Menus  |
           |
           |
           |
           |
--------------------------------

thx,
PH
0
Comment
Question by:princehyderabad
  • 3
  • 3
6 Comments
 
LVL 29

Accepted Solution

by:
bloodredsun earned 400 total points
ID: 16792460
Sorting your questions is easily done by using the "ORDER BY" keywords in your SQL http://www.w3schools.com/sql/sql_orderby.asp where you sort by the date the question was submitted

Linking the questions to the full question can easily be done by having 2 fields in your db table. THe first is the question heading and the second the the body of the question. On the list page, only show the heading and on the full question page show both for that question.

As for your page layout, you want to use the presentation pattern called "Composite View". This can be as simple as having jsp:includes/c:imports in your page to use as a template or you can use thirdparty libraries that are more powerful such as Tiles http://www.lifl.fr/~dumoulin/tiles/ or SiteMesh http://www.opensymphony.com/sitemesh/
0
 

Author Comment

by:princehyderabad
ID: 16792508
>>...having 2 fields in your db table...
Who will enter the 1st field with just Q heading ???? Manually or Automat.....
2nd field having full Q put up there I hv no probls as it will be done by my servlet.

>>sort by the date the question was submitted
I think its been to sort by Answer date. let say if there was only 1 answered on some particular day. So will it be good to display just 1 record on whole Main Content page. How can I make up on this so that the main content looks not empty or so.
0
 
LVL 29

Expert Comment

by:bloodredsun
ID: 16792605
>>Who will enter the 1st field with just Q heading ????
The user does. Look at how EE does it, it's two separate form elements: "Question Title" and "Question Body"

>>>>I think its been to sort by Answer date.
No, it's by question asked date. You can only make it not look empty by first checking if your resultset is empty and then going back a day each time until you find a question.

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:princehyderabad
ID: 16793016
>>No, it's by question asked date. You can only make it not look empty by first checking if your resultset is empty and then going back a day each time until you find a question.

Okay sort by Q date, but display current date as label in main content that will make sense correct. Okay I got ur point if rs is empty go back and check what if rs is not empty and it has only 1 record to show ? Will it be good to just show one Question and 75% of Main content empty ??


Yeah your sitemesh is good. Just went to imp. point on that. But can U just tell me basci feature comparing jsp including to sitemesh. Which should be most more and why.

thx for ur help
0
 

Author Comment

by:princehyderabad
ID: 16811743
I read abt sitemesh. What I look was some advance features like <print> etc., but overall the server executing process is same. Infact sitemesh has a extra step compare to struts or so.

Can you tell me what could be the draw back to use <jsp:include> with respect to sitemesh.
0
 
LVL 29

Assisted Solution

by:bloodredsun
bloodredsun earned 400 total points
ID: 16814560
Not that much conceptually but SiteMesh is far more useful as it gives you extra functionality such as Decorators
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Choosing the right mix of apps is very much necessary for CPAs for making the most of the latest technology through which they can boost their growth.
In my humble opinion (IMHO), TouchDown from Symantec is the best in class for this type of application, but Symantec has end-of-lifed it and although one can keep using it, it will no longer be supported or upgraded.  Time to look for alternatives t…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses
Course of the Month11 days, 12 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question