RE: JSP vs Servlet

2001-01-05 Thread Duffey, Kevin

Heh..point well taken, but do keep in mind, some people actually like the
Model 1 approach better than the Model 2. I used to be one of those people
for many months, until some other developers started adding their own code
to the JSP pages and it didn't conform too well like I had it. Thus..I
realized it was a major pain in the ass to keep track of the changes and
maintain it, especially since JSP scriplet code isn't usually the place
comments are put in (no reason not to..just that it appears that they are
"html" pages with a little bit of code..therefore I have thus far seen
examples of JSP without any comments in it, and have done so myself for the
most part).


> -Original Message-
> From: Fyffe Carl [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 05, 2001 12:34 PM
> To: Orion-Interest
> Subject: RE: JSP vs Servlet
> 
> 
> This was not neccessarily a request for the explaination of 
> MVC or CVM or
> VCM or whatever :) Many people learn by example, and this 
> example will cause
> newbies to put their code in the JSP if they don't already 
> know MVC.  I
> think it is up to the more knowledgable folks to lead us less 
> knowledgable
> down the correct path, whether they explain all of the 
> reasons is up to the
> ammount of time the writers have.  This article is VERY good, 
> and I learned
> alot from it.  Just please be sure you are using "best practices" when
> writing a tutorial.  You never know if those little eyes are 
> watching :)
> 
> --Carl
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of 
> Christian Sell
> Sent: Friday, January 05, 2001 3:11 AM
> To: Orion-Interest
> Subject: Re: JSP vs Servlet
> 
> 
> > Anyway, IMHO adding a methodology on top of the purpose of 
> the article -
> > showing the CMP stuff - would have been yet more to learn. 
> I'm of the
> > opinion that something like that needs to show off one aspect of the
> > technology rather than all aspects, so MVC - while useful - 
> would have
> > been yet another thing to track.
> 
> and then he would have had to decide which methodology to 
> use. They all
> speak of MVC, but nowadays almost everyone seems to have 
> his/her own idea of
> how to implement it. There are so many frameworks out there 
> (e.g., Turbine,
> Struts, WebWork, WebMacro, Freemarker, Velocity, to name but 
> a few) that it
> is hard to keep track, IMO.
> 
> 
> 
> 




RE: JSP vs Servlet

2001-01-05 Thread Fyffe Carl

This was not neccessarily a request for the explaination of MVC or CVM or
VCM or whatever :) Many people learn by example, and this example will cause
newbies to put their code in the JSP if they don't already know MVC.  I
think it is up to the more knowledgable folks to lead us less knowledgable
down the correct path, whether they explain all of the reasons is up to the
ammount of time the writers have.  This article is VERY good, and I learned
alot from it.  Just please be sure you are using "best practices" when
writing a tutorial.  You never know if those little eyes are watching :)

--Carl

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Christian Sell
Sent: Friday, January 05, 2001 3:11 AM
To: Orion-Interest
Subject: Re: JSP vs Servlet


> Anyway, IMHO adding a methodology on top of the purpose of the article -
> showing the CMP stuff - would have been yet more to learn. I'm of the
> opinion that something like that needs to show off one aspect of the
> technology rather than all aspects, so MVC - while useful - would have
> been yet another thing to track.

and then he would have had to decide which methodology to use. They all
speak of MVC, but nowadays almost everyone seems to have his/her own idea of
how to implement it. There are so many frameworks out there (e.g., Turbine,
Struts, WebWork, WebMacro, Freemarker, Velocity, to name but a few) that it
is hard to keep track, IMO.








RE: JSP vs Servlet

2001-01-05 Thread Kevin Duffey

I will try my hand at this as soon as my framework is done. I plan to use
the Model 3 approach..which is using Model 2 but instead of forwarding to
JSP, it passes the JSP output (which would be XML tags with dynamic data)
and an XSL to XALAN and transforms it to HTML, then sends that back. In this
way, the tutorial will properly show a clear cut solution to separating data
from logic from the view. It won't be for a little bit though..so don't hold
your breath. I will ask for reviews by this list before I post it, to see if
it makes sense, works, etc.


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Kemp
> Randy-W18971
> Sent: Friday, January 05, 2001 6:16 AM
> To: Orion-Interest
> Subject: RE: JSP vs Servlet
>
>
> I did address this same question to the folks at www.jollem.com
> and their suggestion, which was a fine one, was to create a
> tutorial.  Jollem has a mechanism in place to create tutorials
> (see website).  Since I am not an expert, I would ask if some
> expert (with some spare time) could show us how to create the
> Orion CMP example in a model two format.
>
> -Original Message-
> From: Fyffe Carl [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 05, 2001 2:08 AM
> To: Orion-Interest
> Subject: JSP vs Servlet
>
>
> I went to jollem.com and read the CMP Primer.  Good read.  But it got me
> thinking about a topic that concerns most people that are in large
> development groups.  Seperation of code and html.  Proper MVC
> calls for the
> code to be in the controller while there is little code in the
> view portion
> of the application.  This allows the designers to design and the coders to
> code.
>
> Were the rules broken for convience or has a new methodology
> taken over?  It
> seems to me that the CMP Primer would have been easier to read and
> understand if MVC had been used.
>
> This one short coming can easily overlooked to find a gem of an article.
> Are there other primers of jollem.com's caliber?  What are some
> useful URL's
> that you guys used to get started.
>
> --Carl
>
>





RE: JSP vs Servlet MVC - CMV

2001-01-05 Thread Kevin Duffey

Actually..you are correct for the most part, but think of it this way. Most
sites you just type in the www.company.com and hit enter. You don't type a
specific path (that would be mapped to a controller servlet)..for the most
part. There are a lot of sites you do such things..but for the most part,
you type in the company name to get to the site. Now, the first thing that
shows up is index.html (or index.jsp) usually, so in retrospect, the VIEW is
first, then when a link is clicked the CONTROLLER is accessed, then the
MODEL, then the VIEW again. So, it should probably be called VCM.



> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Juan Lorandi
> (Chile)
> Sent: Friday, January 05, 2001 7:59 AM
> To: Orion-Interest
> Subject: RE: JSP vs Servlet MVC - CMV
>
>
> it's a circular pattern...
> you access the controller from a view, which is generated by the model...
>
> all of this brings us back to the important question:
>
> what was first--- the egg or the chicken?
>
> My 2c,
>
> JP
>
> -Original Message-
> From: Johan Fredriksson [mailto:[EMAIL PROTECTED]]
> Sent: Viernes, 05 de Enero de 2001 9:25
> To: Orion-Interest
> Subject: Re: JSP vs Servlet MVC - CMV
>
>
> I've seen the abbreviation MVC on a lot of places, but shouldn't it be
>
> CMV
>
> for Controller / Model / View
>
> where Controller receives a request, handles it using model and
> displays it
> using view?
>
> Not important to me, just wondered... =)
>
>
> //Johan
> - Original Message -
> From: "Fyffe Carl" <[EMAIL PROTECTED]>
> To: "Orion-Interest" <[EMAIL PROTECTED]>
> Sent: Friday, January 05, 2001 9:07 AM
> Subject: JSP vs Servlet
>
>
> > I went to jollem.com and read the CMP Primer.  Good read.  But it got me
> > thinking about a topic that concerns most people that are in large
> > development groups.  Seperation of code and html.  Proper MVC calls for
> the
> > code to be in the controller while there is little code in the view
> portion
> > of the application.  This allows the designers to design and
> the coders to
> > code.
> >
> > Were the rules broken for convience or has a new methodology taken over?
> It
> > seems to me that the CMP Primer would have been easier to read and
> > understand if MVC had been used.
> >
> > This one short coming can easily overlooked to find a gem of an article.
> > Are there other primers of jollem.com's caliber?  What are some useful
> URL's
> > that you guys used to get started.
> >
> > --Carl
> >
>
>





RE: JSP vs Servlet

2001-01-05 Thread Tony Wilson

 In general, you can consider JSPs the easy way to make a servlet.
Basically, it becomes a matter of location of files.



The way I suggest doing it (and we do on our projects) is to have all of the
'GUI'(or html) portions of the JSP in a separate location.  We have our top
level 'logic' jsp's in the root directories, and when it comes time to
actually display the GUI, we do a jsp (or pageContext) include of the GUI
file.

example: 

/myForm.jsp (sets up cookies, gathers query string params, does some logic) 
/GUI/myForm_en.jsp (display the form elements in English) 
/GUI/myForm_sp.jsp (display the form elements in Spanish) 

/myFormProcess.jsp (collect information and do logic (no GUI include) 

This allows us to still have the ease of jsp coding, recompiling, and
distribution and keep the non-GUI (or controller/view) portions of the
application separated from the GUI portions.  Another aspect of this is that
our html/GUI engineers have access to the form collection and logic portions
of the JSP, if they need it.  An example of why they might need it is if
they change the name of an element and then they have to change the
processing page for that form.  Any business logic and hard-core processing
is done in java classes or java beans used by the JSP, which GUI programmers
have limited access to.

We disallow access to GUI from outside (we use Apache to do this). 
And the difference between GUI files and non-GUI files are specified by
naming convention (directory AND file names). 

I hope this helps. 

Tony Wilson 



-Original Message-
From: Fyffe Carl
To: Orion-Interest
Sent: 1/5/01 12:07 AM
Subject: JSP vs Servlet

I went to jollem.com and read the CMP Primer.  Good read.  But it got me
thinking about a topic that concerns most people that are in large
development groups.  Seperation of code and html.  Proper MVC calls for
the
code to be in the controller while there is little code in the view
portion
of the application.  This allows the designers to design and the coders
to
code.

Were the rules broken for convience or has a new methodology taken over?
It
seems to me that the CMP Primer would have been easier to read and
understand if MVC had been used.

This one short coming can easily overlooked to find a gem of an article.
Are there other primers of jollem.com's caliber?  What are some useful
URL's
that you guys used to get started.

--Carl





RE: JSP vs Servlet MVC - CMV

2001-01-05 Thread Juan Lorandi (Chile)

it's a circular pattern...
you access the controller from a view, which is generated by the model...

all of this brings us back to the important question:

what was first--- the egg or the chicken?

My 2c,

JP

-Original Message-
From: Johan Fredriksson [mailto:[EMAIL PROTECTED]]
Sent: Viernes, 05 de Enero de 2001 9:25
To: Orion-Interest
Subject: Re: JSP vs Servlet MVC - CMV


I've seen the abbreviation MVC on a lot of places, but shouldn't it be

CMV

for Controller / Model / View

where Controller receives a request, handles it using model and displays it
using view?

Not important to me, just wondered... =)


//Johan
- Original Message -
From: "Fyffe Carl" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Friday, January 05, 2001 9:07 AM
Subject: JSP vs Servlet


> I went to jollem.com and read the CMP Primer.  Good read.  But it got me
> thinking about a topic that concerns most people that are in large
> development groups.  Seperation of code and html.  Proper MVC calls for
the
> code to be in the controller while there is little code in the view
portion
> of the application.  This allows the designers to design and the coders to
> code.
>
> Were the rules broken for convience or has a new methodology taken over?
It
> seems to me that the CMP Primer would have been easier to read and
> understand if MVC had been used.
>
> This one short coming can easily overlooked to find a gem of an article.
> Are there other primers of jollem.com's caliber?  What are some useful
URL's
> that you guys used to get started.
>
> --Carl
>





RE: JSP vs Servlet MVC - CMV

2001-01-05 Thread Amir Yasin

Its somewhat of a chicken and egg problem.  The controller interacts with
the model in response to user actions on the view, the view formats and
displays data it querys from the controller, and the model holds the actual
data that the controller querys/updates.  There is no real "main" peice as
they can all be modified/repaced independently.  And MVC is used all over
the liturature so its accepted (just like TCP/IP should really be IP/TCP
based on packing order, but if you say the latter people will look at you
funny hehe) and people will know what you are talking about.

Just my 2 cents,
Amir

-Original Message-
From: Johan Fredriksson [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 05, 2001 6:25 AM
To: Orion-Interest
Subject: Re: JSP vs Servlet MVC - CMV


I've seen the abbreviation MVC on a lot of places, but shouldn't it be

CMV

for Controller / Model / View

where Controller receives a request, handles it using model and displays it
using view?

Not important to me, just wondered... =)


//Johan
- Original Message -
From: "Fyffe Carl" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Friday, January 05, 2001 9:07 AM
Subject: JSP vs Servlet


> I went to jollem.com and read the CMP Primer.  Good read.  But it got me
> thinking about a topic that concerns most people that are in large
> development groups.  Seperation of code and html.  Proper MVC calls for
the
> code to be in the controller while there is little code in the view
portion
> of the application.  This allows the designers to design and the coders to
> code.
>
> Were the rules broken for convience or has a new methodology taken over?
It
> seems to me that the CMP Primer would have been easier to read and
> understand if MVC had been used.
>
> This one short coming can easily overlooked to find a gem of an article.
> Are there other primers of jollem.com's caliber?  What are some useful
URL's
> that you guys used to get started.
>
> --Carl
>





RE: JSP vs Servlet

2001-01-05 Thread Kemp Randy-W18971

Would you be interested in writing a Model three CMP primer (given the time)?  It 
would be helpful to use newcomers to see the CMP primer in three flavors: models 1, 2, 
and 3. 

-Original Message-
From: Kevin Duffey [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 05, 2001 1:59 AM
To: Orion-Interest
Subject: RE: JSP vs Servlet


Interesting point. I agree, and infact I found the CMP primer a bit hard to
read because it wasn't so clean (as far as the code used). However, for the
sake of brevity I am sure they had to cut corners so as not to have a
200-page book. I would have liked to seen a bit more detail and info on the
examples, however. I think a CMP II article should be written, to include
the "latest" MVC model, which is sometimes called Model 3. That is, Using
JSP to return XML output, which is then transformed into HTML, WML or
whatever via XSL, and the output is then returned to the browser. I am
working on just such a thing in my streamlined mvc framework, which I offer
as free source. My framework works very well, and offers some things I
haven't seen in other frameworks, such as auto-population of javabeans used
on the page with support added to handle nested object population within a
javabean. Also, you can choose whether to use auto-population or not on a
per request basis, as well as a very simple to use action class..simply
supply the command=MethodName and implement a public String MethodName()
method in an action class, and its called. I use a small bit of reflection
to call the method in the action class, instead of the command/swtich()
approach often used. Anyways, I have been thinking for quite some time of
creating a small "book" that specifically targets the MVC framework (in
detail) and how to separate the business logic (ejb session beans) from the
controlling logic (controller servlet and instances of action classes) from
the front-end stateful bean (javabean stored in HttpSession), and the JSP
page (view of dynamic data). I just haven't had the time to play around with
it all yet. I am working on my framework to simplify using JSP to return XML
output, and applying XSL to that output to get HTML or something else. When
I am done with this I plan on posting the framework info to this list and
jsp-interest list.





> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Fyffe Carl
> Sent: Friday, January 05, 2001 12:08 AM
> To: Orion-Interest
> Subject: JSP vs Servlet
>
>
> I went to jollem.com and read the CMP Primer.  Good read.  But it got me
> thinking about a topic that concerns most people that are in large
> development groups.  Seperation of code and html.  Proper MVC
> calls for the
> code to be in the controller while there is little code in the
> view portion
> of the application.  This allows the designers to design and the coders to
> code.
>
> Were the rules broken for convience or has a new methodology
> taken over?  It
> seems to me that the CMP Primer would have been easier to read and
> understand if MVC had been used.
>
> This one short coming can easily overlooked to find a gem of an article.
> Are there other primers of jollem.com's caliber?  What are some
> useful URL's
> that you guys used to get started.
>
> --Carl
>





RE: JSP vs Servlet

2001-01-05 Thread Kemp Randy-W18971

I did address this same question to the folks at www.jollem.com and their suggestion, 
which was a fine one, was to create a tutorial.  Jollem has a mechanism in place to 
create tutorials (see website).  Since I am not an expert, I would ask if some expert 
(with some spare time) could show us how to create the Orion CMP example in a model 
two format.  

-Original Message-
From: Fyffe Carl [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 05, 2001 2:08 AM
To: Orion-Interest
Subject: JSP vs Servlet


I went to jollem.com and read the CMP Primer.  Good read.  But it got me
thinking about a topic that concerns most people that are in large
development groups.  Seperation of code and html.  Proper MVC calls for the
code to be in the controller while there is little code in the view portion
of the application.  This allows the designers to design and the coders to
code.

Were the rules broken for convience or has a new methodology taken over?  It
seems to me that the CMP Primer would have been easier to read and
understand if MVC had been used.

This one short coming can easily overlooked to find a gem of an article.
Are there other primers of jollem.com's caliber?  What are some useful URL's
that you guys used to get started.

--Carl





RE: JSP vs Servlet

2001-01-05 Thread Kemp Randy-W18971

A while back, some folks talked about Model 1 (code and HTML mixed in JSP) and Model 2 
(HTML and code separated into Javabean) of JSP.  The tutorials at www.jollem.com use 
Model 1 JSP for the CMP primer.  The jollem folks are creating a method to build 
tutorials, which is found at the main site.  Perhaps some brave volunteers who are 
well versed in MVC or Model 2 can refine the existing tutorials to show us newcomers 
(I know the basics, but I am not an expert) how things should be done.  The way I even 
came this far, was to break down everything they did at jollem (Ant script, beans, 
etc.) to see how the pieces fit together. 

-Original Message-
From: Christian Sell [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 05, 2001 5:11 AM
To: Orion-Interest
Subject: Re: JSP vs Servlet


> Anyway, IMHO adding a methodology on top of the purpose of the article -
> showing the CMP stuff - would have been yet more to learn. I'm of the
> opinion that something like that needs to show off one aspect of the
> technology rather than all aspects, so MVC - while useful - would have
> been yet another thing to track.

and then he would have had to decide which methodology to use. They all
speak of MVC, but nowadays almost everyone seems to have his/her own idea of
how to implement it. There are so many frameworks out there (e.g., Turbine,
Struts, WebWork, WebMacro, Freemarker, Velocity, to name but a few) that it
is hard to keep track, IMO.






Re: JSP vs Servlet MVC - CMV

2001-01-05 Thread Johan Fredriksson

I've seen the abbreviation MVC on a lot of places, but shouldn't it be

CMV

for Controller / Model / View

where Controller receives a request, handles it using model and displays it
using view?

Not important to me, just wondered... =)


//Johan
- Original Message -
From: "Fyffe Carl" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Friday, January 05, 2001 9:07 AM
Subject: JSP vs Servlet


> I went to jollem.com and read the CMP Primer.  Good read.  But it got me
> thinking about a topic that concerns most people that are in large
> development groups.  Seperation of code and html.  Proper MVC calls for
the
> code to be in the controller while there is little code in the view
portion
> of the application.  This allows the designers to design and the coders to
> code.
>
> Were the rules broken for convience or has a new methodology taken over?
It
> seems to me that the CMP Primer would have been easier to read and
> understand if MVC had been used.
>
> This one short coming can easily overlooked to find a gem of an article.
> Are there other primers of jollem.com's caliber?  What are some useful
URL's
> that you guys used to get started.
>
> --Carl
>





Re: JSP vs Servlet

2001-01-05 Thread Christian Sell

> Anyway, IMHO adding a methodology on top of the purpose of the article -
> showing the CMP stuff - would have been yet more to learn. I'm of the
> opinion that something like that needs to show off one aspect of the
> technology rather than all aspects, so MVC - while useful - would have
> been yet another thing to track.

and then he would have had to decide which methodology to use. They all
speak of MVC, but nowadays almost everyone seems to have his/her own idea of
how to implement it. There are so many frameworks out there (e.g., Turbine,
Struts, WebWork, WebMacro, Freemarker, Velocity, to name but a few) that it
is hard to keep track, IMO.






Re: JSP vs Servlet

2001-01-05 Thread Joseph B. Ottinger

Well, Ernst did a fine job, but it'd be better if he'd done those things
in XML... *runs* 

Anyway, IMHO adding a methodology on top of the purpose of the article -
showing the CMP stuff - would have been yet more to learn. I'm of the
opinion that something like that needs to show off one aspect of the
technology rather than all aspects, so MVC - while useful - would have
been yet another thing to track.

BTW, Ernst *is* in the process of writing a DTD for the primers. :)

On Fri, 5 Jan 2001, Fyffe Carl wrote:

> I went to jollem.com and read the CMP Primer.  Good read.  But it got me
> thinking about a topic that concerns most people that are in large
> development groups.  Seperation of code and html.  Proper MVC calls for the
> code to be in the controller while there is little code in the view portion
> of the application.  This allows the designers to design and the coders to
> code.
> 
> Were the rules broken for convience or has a new methodology taken over?  It
> seems to me that the CMP Primer would have been easier to read and
> understand if MVC had been used.
> 
> This one short coming can easily overlooked to find a gem of an article.
> Are there other primers of jollem.com's caliber?  What are some useful URL's
> that you guys used to get started.
> 
> --Carl
> 
> 

---
Joseph B. Ottinger   [EMAIL PROTECTED]
http://epesh.com/ IT Consultant





RE: JSP vs Servlet

2001-01-04 Thread Kevin Duffey

Interesting point. I agree, and infact I found the CMP primer a bit hard to
read because it wasn't so clean (as far as the code used). However, for the
sake of brevity I am sure they had to cut corners so as not to have a
200-page book. I would have liked to seen a bit more detail and info on the
examples, however. I think a CMP II article should be written, to include
the "latest" MVC model, which is sometimes called Model 3. That is, Using
JSP to return XML output, which is then transformed into HTML, WML or
whatever via XSL, and the output is then returned to the browser. I am
working on just such a thing in my streamlined mvc framework, which I offer
as free source. My framework works very well, and offers some things I
haven't seen in other frameworks, such as auto-population of javabeans used
on the page with support added to handle nested object population within a
javabean. Also, you can choose whether to use auto-population or not on a
per request basis, as well as a very simple to use action class..simply
supply the command=MethodName and implement a public String MethodName()
method in an action class, and its called. I use a small bit of reflection
to call the method in the action class, instead of the command/swtich()
approach often used. Anyways, I have been thinking for quite some time of
creating a small "book" that specifically targets the MVC framework (in
detail) and how to separate the business logic (ejb session beans) from the
controlling logic (controller servlet and instances of action classes) from
the front-end stateful bean (javabean stored in HttpSession), and the JSP
page (view of dynamic data). I just haven't had the time to play around with
it all yet. I am working on my framework to simplify using JSP to return XML
output, and applying XSL to that output to get HTML or something else. When
I am done with this I plan on posting the framework info to this list and
jsp-interest list.





> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Fyffe Carl
> Sent: Friday, January 05, 2001 12:08 AM
> To: Orion-Interest
> Subject: JSP vs Servlet
>
>
> I went to jollem.com and read the CMP Primer.  Good read.  But it got me
> thinking about a topic that concerns most people that are in large
> development groups.  Seperation of code and html.  Proper MVC
> calls for the
> code to be in the controller while there is little code in the
> view portion
> of the application.  This allows the designers to design and the coders to
> code.
>
> Were the rules broken for convience or has a new methodology
> taken over?  It
> seems to me that the CMP Primer would have been easier to read and
> understand if MVC had been used.
>
> This one short coming can easily overlooked to find a gem of an article.
> Are there other primers of jollem.com's caliber?  What are some
> useful URL's
> that you guys used to get started.
>
> --Carl
>