Thread: RE: [Jmailsrv-development] Web tier architecture
Status: Beta
Brought to you by:
furykid
From: Furykid <fu...@us...> - 2002-01-18 22:51:07
|
Hi, Sorry chris I didnt find time to lok on your rmi reeimplementation but if you think it is necessary just go on !=20 There would have been a problem with my implementation anway, because of the user data passed all at once. for the new design please make it as extensible as possible for maybe some option will be added later. thanks again to you all for your support and have fun ! I am currently dealing with the IMAP protocoll integration, so the basecode will not change ( at least not from me :-) )for a while. johannes -----Original Message----- From: jma...@li... [mailto:jma...@li...] On Behalf Of Chris Davies Sent: Freitag, 18. J=E4nner 2002 23:36 To: Jma...@li... Subject: Re: [Jmailsrv-development] Web tier architecture Hi, OK, so we are agreed then? Right then, lets get on and write some code. I'll write some Web Configuration Client beans for accessing the server's configuration via RMI as soon as I hear from Johannes whether we should continue with the old RMI interface on the server, or use the new one that I wrote. I'll write a couple of interfaces first so that everbody else knows exactly what the backend will look like, so that you can get on writing the front end as soon as possible. Thanks, C.Davies Ben Clarke wrote: > Hi all, > From response to yesterday's post, it has become obvious that an XSLT > model is causing too much controversy to get off the ground. So as I=20 > understand it, this is the architecture that has been decided upon: > > o) the mail server web tier gets an HTTP request for the admin login=20 > page, which is a JSP. > > o) The form submit uses RMI to get the actual mail server to validate > the user, upon which either the login page is redisplayed (error=20 > msg?), or the administration JSP is called and displayed, by parsing=20 > the config XML file and presenting the data to the user. > > o) The user then posts the data back to the JSP, which uses RMI to=20 > send the updated info to the mail server. > > o) Depending on which values were updated, the JSP figures out=20 > whether a restart is necessary and if it is, a message is included in=20 > the returned HTML indicating so. > > That's all I can think of for the administration piece, but I think=20 > the Web Mail interface shouldn't be much different (except it actually > gets mail, marks as read etc. etc.). Please update me as to anything=20 > I've missed. > > So the question becomes, who does what? From what I understand the=20 > RMI stuff is substantially written, and Chris is working on the web=20 > tier code to talk to it. This pretty much leaves JSP's to be written=20 > as I see it, and Eugene and I to do it. Chris, if you're comfortable=20 > continuing to write RMI code, then Eugene, let's identify how many=20 > JSP's we need, what each does, and who should do it (assuming nobody=20 > has yet). > > One last thing, I am fine with moving on and going to a JSP model, but > Eugene, I don't think you gave my suggestions due credit or thought,=20 > specifically these points: > > EV> If there will be new options, what will you do with your xslt=20 > EV> file > ? Create new version each time ? > Yes, someone would absolutely have to make a new XSLT if the config=20 > XML file changed. However, the servlet may not even need recompiling=20 > if we were smart about it. Were you insinuating that with a JSP=20 > model, we wouldn't have to rewrite under the same circumstances? > > EV> Ok, there is nothing on this page, but usual java scriptlets. > What's the novelty ? It is convinient only for pages with really small > amount of code in background. Having used XSP first-hand, I can tell=20 > you that it is not merely useful for small amounts of Java code, I=20 > have written XSP's that have well over a hundred lines of Java code in > them which run beautifully. Also, I was not suggesting the use of=20 > XSP, merely pointing out that JSP is quickly becoming a dated=20 > technology. > > EV> And finally why it is better for our project ? > It is better for our project because it allows people to port the web=20 > UI to just about anything, including being used as an integrated=20 > backend mail system in larger apps of just about any language, without > writing or rewriting a single character of Java code, just the XSLT files used > to present that information. Also, it allows us to create > administration tools that are accessible from just about any device,=20 > including PDA's and Cellphones. If we are capable of putting more=20 > functionality into this product, why would we not? We do not know what > everyone will use it for or what their requirements will be, we are=20 > just the ones trying to satisfy everyone that does use it. > > EV> It's just usual marketing phrases. > Why would an organization that does not earn a cent, that is based on=20 > developer contributions exactly as this JMailSrv project is [the=20 > Apache group, makers of coccoon, the first XSP implementation], care=20 > about marketing or hype? Their main reason for existence is offering=20 > free implementations of standards created by people like the W3C. =20 > They only exist to make our lives easier. > > Have a good weekend all, > > Ben. > > _______________________________________________ > Jmailsrv-development mailing list=20 > Jma...@li... > https://lists.sourceforge.net/lists/listinfo/jmailsrv-development _______________________________________________ Jmailsrv-development mailing list Jma...@li... https://lists.sourceforge.net/lists/listinfo/jmailsrv-development |
From: Furykid <fu...@us...> - 2002-01-20 12:33:27
|
Hi, generally I would prefer that only value objects are passed between mail server and web tier. after login a user object is stored with session scope ( which will be used later for=20 the client part as well). after login ( and verification that the current user has admin rights) the configuration part is visible.=20 Parsing the config file ( should only be done in the mail server) to avoid duplicating this code which might change due to another form of saving the properties. I would use the existing pages of the config tools as stating point for identifying the needed beans. the pages with simple fields could be constructed by a single jsp using reflection, but this is just a suggestion ( for each property of the bean a corresponding label info & description could be defined). for the user administration section we have to specify how we generally pass the information between tiers ( as this might become a lot of data, and should not be passed at once). regards johannes -----Original Message----- From: jma...@li... [mailto:jma...@li...] On Behalf Of Eugene Vogel Sent: Samstag, 19. J=E4nner 2002 20:23 To: Jma...@li... Subject: Re: [Jmailsrv-development] Web tier architecture Hello Ben, Ok, if discussion is over, will someone clarify that question with passing info ? Finally, what will we pass: xml file or object ? BC> continuing to write RMI code, then Eugene, let's identify how many=20 BC> JSP's BC> we need, what each does, and who should do it (assuming nobody has yet). Ok, I'll write about how I see our jsps and beans.It's just one possible variant, may be we should think about control servlet system, where all links points to one servlet, where all work takes place... login.jsp -> autorization.jsp (uses validating bean, this bean will perform actual check) -> forwarding (assume that user is admin) -> main page (ie servers.jsp). Now more difficult part begins, when validatebean confirms that login/pass is ok, it creates new bean (ie admin.class) that retrieves by RMI object/xml file. This file will be saved locally as temp file. Then when forwarding to main page takes place, following will happens : temp file will be parsed for sections and will be created main html file with links to pages, that corresponds to sections, that were found in file. Next, let's see on how page processing will go. Take for example servers.jsp. Servers.jsp consist of server's header and calls tag library method from admin.class with parameter data=3D"servers", = that parses temp file and looks for options from section "servers". Then this class generates page with servers options. Form's "action" parameter will always point to one file: process.jsp, where changed parameters will be saved to temp file by admin.class. Then when forward is going to servers.jsp again from process.jsp, admin.class parses again temp file and changed options can be seen already. The same things will be on each page. So when user clicks on link "Commit", temp file is sent back to server. When user logs out, temp file will be deleted. Here are some drafts for you to demonstrate, how work will be done: autorization.jsp /* <%@ page contentType=3D"text/html; charset=3Dwindows-1251" %> = <jsp:useBean id=3D"InitBeanId" scope=3D"session" class=3D"jms.InitBean" /> = <jsp:setProperty name=3D"InitBeanId" property=3D"*" /> <% InitBeanId.validate(); %> <% if (InitBeanId.isValid()) {%> <jsp:useBean id=3D"userId" scope=3D"session" class=3D"jms.user" /> <jsp:setProperty name=3D"userId" property=3D"name" value=3D"<%=3D InitBeanId.getName()%>"/> <jsp:setProperty = name=3D"userId" property=3D"rights" value=3D"<%=3D InitBeanId.getRights()%>" /> = <jsp:forward page=3D"main.jsp" /> <% } else { %> <jsp:setProperty name=3D"InitBeanId" property=3D"message" value=3D"You entered wrong information"/> = <jsp:forward page=3D"Init.jsp" /> <% } %> */ servers.jsp /* <%@ page contentType=3D"text/html; charset=3Dwindows-1251" %> <%@ taglib uri=3D"/WEB-INF/jms.tld" prefix=3D"jmswriter" %> <jsp:useBean id=3D"userId" scope=3D"session" class=3D"jms.user" /> <% if (userId.getName().equals("")) { %> <jsp:forward page=3D"Init.jsp" > <jsp:param name=3D"message" value=3D"Please log in first" /> </jsp:forward> <% } %> <jsp:useBean id=3D"aw" scope=3D"session" class=3D"jms.AdminWriter" /> <jsp:setProperty name=3D"aw" = property=3D"*"/> <jsp:setProperty name=3D"userId" property=3D"configpage" = value=3D"servers"/> <html> <head> <title>General Settings</title> <meta http-equiv=3D'Content-Type' content=3D'text/html; charset=3Diso-8859-1'> </head> <body bgcolor=3D'#CCCCCC' text=3D'#000000'> <table width=3D'661' border=3D'0' cellpadding=3D'0' cellspacing=3D'0' mm:layoutgroup=3D'true' height=3D'277'> <tr> <td width=3D'1' height=3D'6'></td> <td width=3D'660'></td> <td width=3D'1'></td> </tr> <tr> <td width=3D'1' height=3D'270'></td> <td valign=3D'top' width=3D'660' height=3D'270'> <jmswriter:base operation=3D"read" data=3D"servers" /> // HERE = FULFILLMENT WITH DATA TAKES PLACE </td> <td width=3D'1' height=3D'270'></td> </tr> </table> </body> </html> */ process.jsp /* HERE SOME CHANGES SHOULD BE PERFORMED, THIS VERSION IS FOR STATIC PAGES, NOT FOR DYNAMIC ONES. BUT PRINCIPLE IS THE SAME. <%@ page contentType=3D"text/html; charset=3Dwindows-1251" %> = <jsp:useBean id=3D"userId" scope=3D"session" class=3D"jms.user" /> <% if (userId.getName().equals("")) { %> <jsp:forward page=3D"Init.jsp" > <jsp:param name=3D"message" value=3D"Please log in first" /> </jsp:forward> <% } %> <jsp:useBean id=3D"aw" scope=3D"session" class=3D"jms.AdminWriter" /> <jsp:setProperty name=3D"aw" property=3D"*"/> /* HERE PARAMETERS FROM PREVIOUS PAGE ARE PASSED. */ <% String where =3D ""; if (userId.getConfigpage().equals("logs")) { where =3D "logs.jsp"; } if (userId.getConfigpage().equals("jdbcs")) { where =3D "jdbcs.jsp"; String[] pickedq =3D request.getParameterValues("enablejdbc"); if (pickedq !=3D null && pickedq.length !=3D 0) { aw.setEnablejdbc("checked"); } else { aw.setEnablejdbc(""); } } if (userId.getConfigpage().equals("servers")) { where =3D "servers.jsp"; String[] picked1 =3D request.getParameterValues("fetcherrundaemon"); if (picked1 !=3D null && picked1.length !=3D 0) { aw.setFetcherrundaemon("checked"); } else { aw.setFetcherrundaemon(""); } String[] picked2 =3D request.getParameterValues("senderrundaemon"); if (picked2 !=3D null && picked2.length !=3D 0) { aw.setSenderrundaemon("checked"); } else { aw.setSenderrundaemon(""); } String[] picked3 =3D request.getParameterValues("showstatuswindow"); if (picked3 !=3D null && picked3.length !=3D 0) { aw.setShowstatuswindow("checked"); } else { aw.setShowstatuswindow(""); } String[] picked4 =3D request.getParameterValues("bigbrother"); if (picked4 !=3D null && picked4.length !=3D 0) { aw.setBigbrother("checked"); } else { aw.setBigbrother(""); } } %> <% aw.writeit(userId.getConfigpage()); %> <jsp:forward page=3D"<%=3D where%>" /> */ If you think, that it is overcomplicated, reply, I'm opened for any ideas. May be we can try to simplify pages or create them different way. Feature of this model is that all works actually is in one file - admin.class. =20 EV>> If there will be new options, what will you do with your xslt file BC> ? Create new version each time ? BC> Yes, someone would absolutely have to make a new XSLT if the config=20 BC> XML BC> file changed. However, the servlet may not even need recompiling if we=20 BC> were smart about it. Were you insinuating that with a JSP model, we BC> wouldn't have to rewrite under the same circumstances? With JSP model, that I've wrote above we do not "populate", we generate from scratch each time, depending on our info file so there is no need in updating client if there are new options. Best regards, Eugene mailto:gh...@ma... _______________________________________________ Jmailsrv-development mailing list Jma...@li... https://lists.sourceforge.net/lists/listinfo/jmailsrv-development |
From: Eugene V. <gh...@ma...> - 2002-01-21 00:34:24
|
Hello Ben, I've uploaded adopted version of design to www.mycgiserver.com/~evogel/jms.zip . It is whole JBuilder project subdirectory with sources, jsp-s and classes.Inspect it, it's nearly working version. What is remaining is wrote in adminwriter.java (also see comments for understanding). If you do not understand something, ask me, I'll be happy to answer. About sharing work: I offer you to write reading and parsing of incoming object, it is method readData() in adminwriter. Writing writeData() will not bad, too ;-) Waiting for your reply.. Best regards, Eugene mailto:gh...@ma... |
From: Furykid <fu...@us...> - 2002-02-10 10:16:45
|
Hi, looks good how did you plan to proceed ? is there already a new rmi interface available ? best regards johannes -----Original Message----- From: jma...@li... [mailto:jma...@li...] On Behalf Of Eugene Vogel Sent: Montag, 21. J=E4nner 2002 01:34 To: Jma...@li... Subject: Re[2]: [Jmailsrv-development] Web tier architecture Hello Ben, I've uploaded adopted version of design to www.mycgiserver.com/~evogel/jms.zip . It is whole JBuilder project subdirectory with sources, jsp-s and classes.Inspect it, it's nearly working version. What is remaining is wrote in adminwriter.java (also see comments for understanding). If you do not understand something, ask me, I'll be happy to answer. About sharing work: I offer you to write reading and parsing of incoming object, it is method readData() in adminwriter. Writing writeData() will not bad, too ;-) Waiting for your reply.. Best regards, Eugene mailto:gh...@ma... _______________________________________________ Jmailsrv-development mailing list Jma...@li... https://lists.sourceforge.net/lists/listinfo/jmailsrv-development |
From: Chris D. <c.d...@cd...> - 2002-01-18 23:03:20
|
Hi, OK great. I'll commit that to CVS some time over the weekend. I'll have to change some of the Batch files as well to make sure everything still works with the new security manager, but this should be no problem. I'll also add some features to ensure that clients connecting from 127.0.0.1 don't have to authenticate themselves, so that the GUI config tool still works fine. Thanks, C.Davies Furykid wrote: > Hi, > > Sorry chris I didnt find time to lok on your rmi reeimplementation but > if you think > it is necessary just go on ! > There would have been a problem with my implementation anway, because of > the user data > passed all at once. > for the new design please make it as extensible as possible for maybe > some option > will be added later. > > thanks again to you all for your support and have fun ! > > I am currently dealing with the IMAP protocoll integration, so the > basecode will not change > ( at least not from me :-) )for a while. > > johannes |