This is the raison d'�tre for JSP using beans. Greg
-----Original Message----- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Ola Theander Sent: Monday, July 22, 2002 11:52 AM To: [EMAIL PROTECTED] Subject: Re: Separation of layout and code (similar to Visual Studio.net)? Hi Celeste. Thanks for your answer. Actually, I don't think the big gain is the separated layout/code view you get when you use the new VS.net IDE, but the fact that the code and layout is separated. For all I care I can do the typing in Emacs (not really, but almost :-) for the gain of separated files. The solution I look for doesn't need to support custom server side controls like grids, trees etc. Imagine that a particular form page would consist of a layout file, list.design and a code page, list.code, which would be processed by some engine to output a html page: list.design: <html> ... .. <form> <input type="text" name="txtFirstname"> <select name="items" size="2"> </select> </form> ... </html> list.code ... ... txtFirstname.value ="John"; txtFirstname.size =14; for(int a=0; a <10; a++) items.options.add(new option("Computer", 2); ... I.e. an engine like this would allow you to work with the items on the page as objects, pretty much as you can do with JavaScript on the browser client, instead of doing text processing which is basically what you do today i.e. send some text to the browser, run some code to send some dynamically created text, send some more text etc. What would be the big advantage of the separation? 1) By handling the controls on the web page as objects you'll get a cleaner implementation which is easier to maintain. It could even be extended to support third party controls like you have with Java's Swing components in GUI applications. 2) By separating the layout from the implementation the layout and implementation can be developed independent of each other and thus allow designers and coders to get out of each others way. Another benefit is that it's easier to avoid multiple code bases with this design. I worked earlier on a consulting company, which developed mainly intranet solutions, where we built a base package of web based applications to use with each new customer e.g. a content management system etc. One major problem was that each customer would like to have their own look and feel of the intranet but basically the same functionality, and that gave us the problem how to manage different layouts but basically the same implementation. This problem would be much easier to solve with the design separated from the code. /ola > -----Original Message----- > From: A mailing list about Java Server Pages specification > and reference [mailto:[EMAIL PROTECTED]] On Behalf Of > Haseltine, Celeste > Sent: den 22 juli 2002 17:47 > To: [EMAIL PROTECTED] > Subject: Re: Separation of layout and code (similar to Visual > Studio.net)? > > > Ola, > > I'm not really that familiar with ASP.NET, though I have > worked in the Visual Studio 6.0. But I think I know where > you are heading with this question, so I will give it a shot. > > MS has a very nice set of application development tools that > are fully integrated with each other for web development, > whether you are using a combination of C#, VB.NET, and/or > ASP.NET. I will give them credit for that. Although there > are a LOT of IDE's and tools available for JSP/servlet/Java > development, integrating your favorite tools and application > server together for a development box can take you days. But > no matter which tools you use, your not going to find the > presentation of "GUI separation from the code separation" > that you find in the MS application development environment (IDE). > > Having said the above, I've never found a single > Java/JSP/Servlet tool that will give you the different > "layered view" that you are use to in the MS .NET > environment. Part of the problem is that the GUI controls > you are using in Windows are proprietary to Windows, and are > NOT true HTML GUI controls. You can get close to the type of > view you are use to seeing if you follow the MVC architecture > while developing your JSP/servlet/Java code(In fact, you > should have VERY little Java scripting code in your JSP's, as > the JSP's are considered your "view", and your logic should > be embedded in either servlets or Java class objects, or a > combination of both). Some IDE tools will give you the > ability to view and modify the HTML code and HTML GUI objects > in your JSP's, but they must be integrated with your > application server in order to "render" the HTML code in the > JSP page as an HTML view. JRUN Studio is the IDE I use, and > it give me that ability, but only if I have it integrated > with JRUN Server, and I have the server running on my dev box > at the time I "view" my JSP. I understand that IBM Websphere > also has and IDE that can be used for it's application > server, and that it too can "render" HTML code for viewing > that is contained in a JSP page. > > I hope that this info helped you. The biggest thing to > remember between JSP and ASP development is that JSP > development is done "towards a common standard" and that > there are many vendors that you can choose from that "meet" > the Sun standard, and that you can purchase an IDE from or an > application server from. ASP development on the other hand > is done within a proprietary application environment, NOT to > a standard that is implemented by many vendors. Therefore, > there is one defined IDE for .NET development, one set of > GUI's that are proprietary (NOT pure HTML GUI's, but you can > use HTML GUI's in .NET), and one way of developing and > deploying a .NET application within that proprietary > application framework. So it is very hard for MS developers > to go from the MS way of developing an application to the > Java/JSP way of developing an application, and it is NOT the > development language that is the biggest barrier in my > opinion, but the difference in philosophy that the > development is done under. > > So much for my two cents worth. > > Celeste Haseltine, PE > Dallas, TX > > > > > > > -----Original Message----- > From: Ola Theander [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 22, 2002 7:48 AM > To: [EMAIL PROTECTED] > Subject: Q: Separation of layout and code (similar to Visual > Studio.net)? > > > Dear subscribers. > > I would like to know if there is some JSP engine, class > library or similar that allows the Java code to be separated > from the layout, i.e. HTML code, similar to what's available > in MS Visual Studio.net? > > In VS.net a dynamic web page is built by two separate files, > one file containing the layout of the page and one page > containing the code. The code manages the objects in the > layout file, e.g. a text box, list box etc. as objects with > properties and methods, pretty much as if you where coding a > GUI application. There is also the possibility to build more > complex object composed by existing objects and HTML. The big > advantage is that you as the developer will have an > abstraction layer between the code and the layout and the > graphics designer doesn't need to worry about the code. > > My question is, is there something similar to this on the > JSP/Servlet/J2EE platform? > > Kind regards, Ola Theander > > ============================================================== > ============= > To unsubscribe: mailto [EMAIL PROTECTED] with body: > "signoff JSP-INTEREST". For digest: mailto > [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com ======================================================================== === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
